aizuchi 0.5.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +101 -0
- package/README.ja.md +213 -0
- package/README.md +232 -170
- package/dist/server/app.js +46 -10
- package/dist/server/lib/docs.js +45 -11
- package/dist/server/lib/files.js +18 -4
- package/dist/server/lib/fs-safe.js +81 -21
- package/dist/server/lib/proposal.js +35 -4
- package/dist/server/lib/task-ops.js +30 -7
- package/dist/server/lib/trash.js +21 -0
- package/dist/shared/activity-heatmap.js +39 -0
- package/dist/shared/related-docs.js +5 -59
- package/dist/shared/schema.js +16 -5
- package/dist/shared/stats.js +17 -8
- package/dist/shared/task-setters.js +46 -34
- package/dist/web/assets/index-CiZ-pdUZ.css +1 -0
- package/dist/web/assets/index-U2se0dzu.js +99 -0
- package/dist/web/index.html +2 -2
- package/package.json +6 -3
- package/templates/claude-rules.md +5 -0
- package/dist/web/assets/index-C3mZwbO4.js +0 -103
- package/dist/web/assets/index-QsPhBKSP.css +0 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
var k_=Object.defineProperty;var w_=(e,t,r)=>t in e?k_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ri=(e,t,r)=>w_(e,typeof t!="symbol"?t+"":t,r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const a of l)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function r(l){const a={};return l.integrity&&(a.integrity=l.integrity),l.referrerPolicy&&(a.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?a.credentials="include":l.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(l){if(l.ep)return;l.ep=!0;const a=r(l);fetch(l.href,a)}})();function vd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hu={exports:{}},ul={},gu={exports:{}},Je={};/**
|
|
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 Pp;function b_(){if(Pp)return Je;Pp=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.iterator;function x(P){return P===null||typeof P!="object"?null:(P=g&&P[g]||P["@@iterator"],typeof P=="function"?P:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,C={};function D(P,F,E){this.props=P,this.context=F,this.refs=C,this.updater=E||_}D.prototype.isReactComponent={},D.prototype.setState=function(P,F){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,F,"setState")},D.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function S(){}S.prototype=D.prototype;function R(P,F,E){this.props=P,this.context=F,this.refs=C,this.updater=E||_}var T=R.prototype=new S;T.constructor=R,k(T,D.prototype),T.isPureReactComponent=!0;var M=Array.isArray,I=Object.prototype.hasOwnProperty,j={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function Q(P,F,E){var ce,Se={},ge=null,xe=null;if(F!=null)for(ce in F.ref!==void 0&&(xe=F.ref),F.key!==void 0&&(ge=""+F.key),F)I.call(F,ce)&&!B.hasOwnProperty(ce)&&(Se[ce]=F[ce]);var ze=arguments.length-2;if(ze===1)Se.children=E;else if(1<ze){for(var de=Array(ze),ke=0;ke<ze;ke++)de[ke]=arguments[ke+2];Se.children=de}if(P&&P.defaultProps)for(ce in ze=P.defaultProps,ze)Se[ce]===void 0&&(Se[ce]=ze[ce]);return{$$typeof:e,type:P,key:ge,ref:xe,props:Se,_owner:j.current}}function te(P,F){return{$$typeof:e,type:P.type,key:F,ref:P.ref,props:P.props,_owner:P._owner}}function O(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function W(P){var F={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(E){return F[E]})}var ne=/\/+/g;function _e(P,F){return typeof P=="object"&&P!==null&&P.key!=null?W(""+P.key):F.toString(36)}function ie(P,F,E,ce,Se){var ge=typeof P;(ge==="undefined"||ge==="boolean")&&(P=null);var xe=!1;if(P===null)xe=!0;else switch(ge){case"string":case"number":xe=!0;break;case"object":switch(P.$$typeof){case e:case t:xe=!0}}if(xe)return xe=P,Se=Se(xe),P=ce===""?"."+_e(xe,0):ce,M(Se)?(E="",P!=null&&(E=P.replace(ne,"$&/")+"/"),ie(Se,F,E,"",function(ke){return ke})):Se!=null&&(O(Se)&&(Se=te(Se,E+(!Se.key||xe&&xe.key===Se.key?"":(""+Se.key).replace(ne,"$&/")+"/")+P)),F.push(Se)),1;if(xe=0,ce=ce===""?".":ce+":",M(P))for(var ze=0;ze<P.length;ze++){ge=P[ze];var de=ce+_e(ge,ze);xe+=ie(ge,F,E,de,Se)}else if(de=x(P),typeof de=="function")for(P=de.call(P),ze=0;!(ge=P.next()).done;)ge=ge.value,de=ce+_e(ge,ze++),xe+=ie(ge,F,E,de,Se);else if(ge==="object")throw F=String(P),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.");return xe}function X(P,F,E){if(P==null)return P;var ce=[],Se=0;return ie(P,ce,"","",function(ge){return F.call(E,ge,Se++)}),ce}function J(P){if(P._status===-1){var F=P._result;F=F(),F.then(function(E){(P._status===0||P._status===-1)&&(P._status=1,P._result=E)},function(E){(P._status===0||P._status===-1)&&(P._status=2,P._result=E)}),P._status===-1&&(P._status=0,P._result=F)}if(P._status===1)return P._result.default;throw P._result}var ve={current:null},ee={transition:null},fe={ReactCurrentDispatcher:ve,ReactCurrentBatchConfig:ee,ReactCurrentOwner:j};function N(){throw Error("act(...) is not supported in production builds of React.")}return Je.Children={map:X,forEach:function(P,F,E){X(P,function(){F.apply(this,arguments)},E)},count:function(P){var F=0;return X(P,function(){F++}),F},toArray:function(P){return X(P,function(F){return F})||[]},only:function(P){if(!O(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Je.Component=D,Je.Fragment=r,Je.Profiler=l,Je.PureComponent=R,Je.StrictMode=s,Je.Suspense=m,Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fe,Je.act=N,Je.cloneElement=function(P,F,E){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var ce=k({},P.props),Se=P.key,ge=P.ref,xe=P._owner;if(F!=null){if(F.ref!==void 0&&(ge=F.ref,xe=j.current),F.key!==void 0&&(Se=""+F.key),P.type&&P.type.defaultProps)var ze=P.type.defaultProps;for(de in F)I.call(F,de)&&!B.hasOwnProperty(de)&&(ce[de]=F[de]===void 0&&ze!==void 0?ze[de]:F[de])}var de=arguments.length-2;if(de===1)ce.children=E;else if(1<de){ze=Array(de);for(var ke=0;ke<de;ke++)ze[ke]=arguments[ke+2];ce.children=ze}return{$$typeof:e,type:P.type,key:Se,ref:ge,props:ce,_owner:xe}},Je.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:a,_context:P},P.Consumer=P},Je.createElement=Q,Je.createFactory=function(P){var F=Q.bind(null,P);return F.type=P,F},Je.createRef=function(){return{current:null}},Je.forwardRef=function(P){return{$$typeof:f,render:P}},Je.isValidElement=O,Je.lazy=function(P){return{$$typeof:y,_payload:{_status:-1,_result:P},_init:J}},Je.memo=function(P,F){return{$$typeof:p,type:P,compare:F===void 0?null:F}},Je.startTransition=function(P){var F=ee.transition;ee.transition={};try{P()}finally{ee.transition=F}},Je.unstable_act=N,Je.useCallback=function(P,F){return ve.current.useCallback(P,F)},Je.useContext=function(P){return ve.current.useContext(P)},Je.useDebugValue=function(){},Je.useDeferredValue=function(P){return ve.current.useDeferredValue(P)},Je.useEffect=function(P,F){return ve.current.useEffect(P,F)},Je.useId=function(){return ve.current.useId()},Je.useImperativeHandle=function(P,F,E){return ve.current.useImperativeHandle(P,F,E)},Je.useInsertionEffect=function(P,F){return ve.current.useInsertionEffect(P,F)},Je.useLayoutEffect=function(P,F){return ve.current.useLayoutEffect(P,F)},Je.useMemo=function(P,F){return ve.current.useMemo(P,F)},Je.useReducer=function(P,F,E){return ve.current.useReducer(P,F,E)},Je.useRef=function(P){return ve.current.useRef(P)},Je.useState=function(P){return ve.current.useState(P)},Je.useSyncExternalStore=function(P,F,E){return ve.current.useSyncExternalStore(P,F,E)},Je.useTransition=function(){return ve.current.useTransition()},Je.version="18.3.1",Je}var Lp;function xd(){return Lp||(Lp=1,gu.exports=b_()),gu.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 Mp;function S_(){if(Mp)return ul;Mp=1;var e=xd(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(f,m,p){var y,g={},x=null,_=null;p!==void 0&&(x=""+p),m.key!==void 0&&(x=""+m.key),m.ref!==void 0&&(_=m.ref);for(y in m)s.call(m,y)&&!a.hasOwnProperty(y)&&(g[y]=m[y]);if(f&&f.defaultProps)for(y in m=f.defaultProps,m)g[y]===void 0&&(g[y]=m[y]);return{$$typeof:t,type:f,key:x,ref:_,props:g,_owner:l.current}}return ul.Fragment=r,ul.jsx=c,ul.jsxs=c,ul}var Op;function C_(){return Op||(Op=1,hu.exports=S_()),hu.exports}var u=C_(),w=xd();const ur=vd(w);var qa={},yu={exports:{}},Fn={},vu={exports:{}},xu={};/**
|
|
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
|
+
*/var zp;function N_(){return zp||(zp=1,(function(e){function t(ee,fe){var N=ee.length;ee.push(fe);e:for(;0<N;){var P=N-1>>>1,F=ee[P];if(0<l(F,fe))ee[P]=fe,ee[N]=F,N=P;else break e}}function r(ee){return ee.length===0?null:ee[0]}function s(ee){if(ee.length===0)return null;var fe=ee[0],N=ee.pop();if(N!==fe){ee[0]=N;e:for(var P=0,F=ee.length,E=F>>>1;P<E;){var ce=2*(P+1)-1,Se=ee[ce],ge=ce+1,xe=ee[ge];if(0>l(Se,N))ge<F&&0>l(xe,Se)?(ee[P]=xe,ee[ge]=N,P=ge):(ee[P]=Se,ee[ce]=N,P=ce);else if(ge<F&&0>l(xe,N))ee[P]=xe,ee[ge]=N,P=ge;else break e}}return fe}function l(ee,fe){var N=ee.sortIndex-fe.sortIndex;return N!==0?N:ee.id-fe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var m=[],p=[],y=1,g=null,x=3,_=!1,k=!1,C=!1,D=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(ee){for(var fe=r(p);fe!==null;){if(fe.callback===null)s(p);else if(fe.startTime<=ee)s(p),fe.sortIndex=fe.expirationTime,t(m,fe);else break;fe=r(p)}}function M(ee){if(C=!1,T(ee),!k)if(r(m)!==null)k=!0,J(I);else{var fe=r(p);fe!==null&&ve(M,fe.startTime-ee)}}function I(ee,fe){k=!1,C&&(C=!1,S(Q),Q=-1),_=!0;var N=x;try{for(T(fe),g=r(m);g!==null&&(!(g.expirationTime>fe)||ee&&!W());){var P=g.callback;if(typeof P=="function"){g.callback=null,x=g.priorityLevel;var F=P(g.expirationTime<=fe);fe=e.unstable_now(),typeof F=="function"?g.callback=F:g===r(m)&&s(m),T(fe)}else s(m);g=r(m)}if(g!==null)var E=!0;else{var ce=r(p);ce!==null&&ve(M,ce.startTime-fe),E=!1}return E}finally{g=null,x=N,_=!1}}var j=!1,B=null,Q=-1,te=5,O=-1;function W(){return!(e.unstable_now()-O<te)}function ne(){if(B!==null){var ee=e.unstable_now();O=ee;var fe=!0;try{fe=B(!0,ee)}finally{fe?_e():(j=!1,B=null)}}else j=!1}var _e;if(typeof R=="function")_e=function(){R(ne)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,X=ie.port2;ie.port1.onmessage=ne,_e=function(){X.postMessage(null)}}else _e=function(){D(ne,0)};function J(ee){B=ee,j||(j=!0,_e())}function ve(ee,fe){Q=D(function(){ee(e.unstable_now())},fe)}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(ee){ee.callback=null},e.unstable_continueExecution=function(){k||_||(k=!0,J(I))},e.unstable_forceFrameRate=function(ee){0>ee||125<ee?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<ee?Math.floor(1e3/ee):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return r(m)},e.unstable_next=function(ee){switch(x){case 1:case 2:case 3:var fe=3;break;default:fe=x}var N=x;x=fe;try{return ee()}finally{x=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ee,fe){switch(ee){case 1:case 2:case 3:case 4:case 5:break;default:ee=3}var N=x;x=ee;try{return fe()}finally{x=N}},e.unstable_scheduleCallback=function(ee,fe,N){var P=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?P+N:P):N=P,ee){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=N+F,ee={id:y++,callback:fe,priorityLevel:ee,startTime:N,expirationTime:F,sortIndex:-1},N>P?(ee.sortIndex=N,t(p,ee),r(m)===null&&ee===r(p)&&(C?(S(Q),Q=-1):C=!0,ve(M,N-P))):(ee.sortIndex=F,t(m,ee),k||_||(k=!0,J(I))),ee},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(ee){var fe=x;return function(){var N=x;x=fe;try{return ee.apply(this,arguments)}finally{x=N}}}})(xu)),xu}var $p;function j_(){return $p||($p=1,vu.exports=N_()),vu.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 Bp;function E_(){if(Bp)return Fn;Bp=1;var e=xd(),t=j_();function r(n){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+n,o=1;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,l={};function a(n,i){c(n,i),c(n+"Capture",i)}function c(n,i){for(l[n]=i,n=0;n<i.length;n++)s.add(i[n])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,p=/^[: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]*$/,y={},g={};function x(n){return m.call(g,n)?!0:m.call(y,n)?!1:p.test(n)?g[n]=!0:(y[n]=!0,!1)}function _(n,i,o,d){if(o!==null&&o.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return d?!1:o!==null?!o.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function k(n,i,o,d){if(i===null||typeof i>"u"||_(n,i,o,d))return!0;if(d)return!1;if(o!==null)switch(o.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function C(n,i,o,d,h,v,b){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=d,this.attributeNamespace=h,this.mustUseProperty=o,this.propertyName=n,this.type=i,this.sanitizeURL=v,this.removeEmptyString=b}var D={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){D[n]=new C(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var i=n[0];D[i]=new C(i,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){D[n]=new C(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){D[n]=new C(n,2,!1,n,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(n){D[n]=new C(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){D[n]=new C(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){D[n]=new C(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){D[n]=new C(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){D[n]=new C(n,5,!1,n.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function R(n){return n[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(n){var i=n.replace(S,R);D[i]=new C(i,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var i=n.replace(S,R);D[i]=new C(i,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var i=n.replace(S,R);D[i]=new C(i,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){D[n]=new C(n,1,!1,n.toLowerCase(),null,!1,!1)}),D.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){D[n]=new C(n,1,!1,n.toLowerCase(),null,!0,!0)});function T(n,i,o,d){var h=D.hasOwnProperty(i)?D[i]:null;(h!==null?h.type!==0:d||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(k(i,o,h,d)&&(o=null),d||h===null?x(i)&&(o===null?n.removeAttribute(i):n.setAttribute(i,""+o)):h.mustUseProperty?n[h.propertyName]=o===null?h.type===3?!1:"":o:(i=h.attributeName,d=h.attributeNamespace,o===null?n.removeAttribute(i):(h=h.type,o=h===3||h===4&&o===!0?"":""+o,d?n.setAttributeNS(d,i,o):n.setAttribute(i,o))))}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,I=Symbol.for("react.element"),j=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),W=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),_e=Symbol.for("react.suspense"),ie=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),ve=Symbol.for("react.offscreen"),ee=Symbol.iterator;function fe(n){return n===null||typeof n!="object"?null:(n=ee&&n[ee]||n["@@iterator"],typeof n=="function"?n:null)}var N=Object.assign,P;function F(n){if(P===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);P=i&&i[1]||""}return`
|
|
34
|
+
`+P+n}var E=!1;function ce(n,i){if(!n||E)return"";E=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(U){var d=U}Reflect.construct(n,[],i)}else{try{i.call()}catch(U){d=U}n.call(i.prototype)}else{try{throw Error()}catch(U){d=U}n()}}catch(U){if(U&&d&&typeof U.stack=="string"){for(var h=U.stack.split(`
|
|
35
|
+
`),v=d.stack.split(`
|
|
36
|
+
`),b=h.length-1,A=v.length-1;1<=b&&0<=A&&h[b]!==v[A];)A--;for(;1<=b&&0<=A;b--,A--)if(h[b]!==v[A]){if(b!==1||A!==1)do if(b--,A--,0>A||h[b]!==v[A]){var L=`
|
|
37
|
+
`+h[b].replace(" at new "," at ");return n.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",n.displayName)),L}while(1<=b&&0<=A);break}}}finally{E=!1,Error.prepareStackTrace=o}return(n=n?n.displayName||n.name:"")?F(n):""}function Se(n){switch(n.tag){case 5:return F(n.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return n=ce(n.type,!1),n;case 11:return n=ce(n.type.render,!1),n;case 1:return n=ce(n.type,!0),n;default:return""}}function ge(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case B:return"Fragment";case j:return"Portal";case te:return"Profiler";case Q:return"StrictMode";case _e:return"Suspense";case ie:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case W:return(n.displayName||"Context")+".Consumer";case O:return(n._context.displayName||"Context")+".Provider";case ne:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case X:return i=n.displayName||null,i!==null?i:ge(n.type)||"Memo";case J:i=n._payload,n=n._init;try{return ge(n(i))}catch{}}return null}function xe(n){var i=n.type;switch(n.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=i.render,n=n.displayName||n.name||"",i.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(i);case 8:return i===Q?"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 i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function ze(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function de(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ke(n){var i=de(n)?"checked":"value",o=Object.getOwnPropertyDescriptor(n.constructor.prototype,i),d=""+n[i];if(!n.hasOwnProperty(i)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,v=o.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return h.call(this)},set:function(b){d=""+b,v.call(this,b)}}),Object.defineProperty(n,i,{enumerable:o.enumerable}),{getValue:function(){return d},setValue:function(b){d=""+b},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function Nt(n){n._valueTracker||(n._valueTracker=ke(n))}function Lt(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var o=i.getValue(),d="";return n&&(d=de(n)?n.checked?"true":"false":n.value),n=d,n!==o?(i.setValue(n),!0):!1}function Kt(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function jt(n,i){var o=i.checked;return N({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??n._wrapperState.initialChecked})}function se(n,i){var o=i.defaultValue==null?"":i.defaultValue,d=i.checked!=null?i.checked:i.defaultChecked;o=ze(i.value!=null?i.value:o),n._wrapperState={initialChecked:d,initialValue:o,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Ge(n,i){i=i.checked,i!=null&&T(n,"checked",i,!1)}function wt(n,i){Ge(n,i);var o=ze(i.value),d=i.type;if(o!=null)d==="number"?(o===0&&n.value===""||n.value!=o)&&(n.value=""+o):n.value!==""+o&&(n.value=""+o);else if(d==="submit"||d==="reset"){n.removeAttribute("value");return}i.hasOwnProperty("value")?Zt(n,i.type,o):i.hasOwnProperty("defaultValue")&&Zt(n,i.type,ze(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(n.defaultChecked=!!i.defaultChecked)}function tn(n,i,o){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var d=i.type;if(!(d!=="submit"&&d!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+n._wrapperState.initialValue,o||i===n.value||(n.value=i),n.defaultValue=i}o=n.name,o!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,o!==""&&(n.name=o)}function Zt(n,i,o){(i!=="number"||Kt(n.ownerDocument)!==n)&&(o==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+o&&(n.defaultValue=""+o))}var bt=Array.isArray;function Mt(n,i,o,d){if(n=n.options,i){i={};for(var h=0;h<o.length;h++)i["$"+o[h]]=!0;for(o=0;o<n.length;o++)h=i.hasOwnProperty("$"+n[o].value),n[o].selected!==h&&(n[o].selected=h),h&&d&&(n[o].defaultSelected=!0)}else{for(o=""+ze(o),i=null,h=0;h<n.length;h++){if(n[h].value===o){n[h].selected=!0,d&&(n[h].defaultSelected=!0);return}i!==null||n[h].disabled||(i=n[h])}i!==null&&(i.selected=!0)}}function yt(n,i){if(i.dangerouslySetInnerHTML!=null)throw Error(r(91));return N({},i,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function Yt(n,i){var o=i.value;if(o==null){if(o=i.children,i=i.defaultValue,o!=null){if(i!=null)throw Error(r(92));if(bt(o)){if(1<o.length)throw Error(r(93));o=o[0]}i=o}i==null&&(i=""),o=i}n._wrapperState={initialValue:ze(o)}}function ye(n,i){var o=ze(i.value),d=ze(i.defaultValue);o!=null&&(o=""+o,o!==n.value&&(n.value=o),i.defaultValue==null&&n.defaultValue!==o&&(n.defaultValue=o)),d!=null&&(n.defaultValue=""+d)}function Ce(n){var i=n.textContent;i===n._wrapperState.initialValue&&i!==""&&i!==null&&(n.value=i)}function $(n){switch(n){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 Z(n,i){return n==null||n==="http://www.w3.org/1999/xhtml"?$(i):n==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var q,we=(function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,o,d,h){MSApp.execUnsafeLocalFunction(function(){return n(i,o,d,h)})}:n})(function(n,i){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=i;else{for(q=q||document.createElement("div"),q.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=q.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;i.firstChild;)n.appendChild(i.firstChild)}});function Ve(n,i){if(i){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=i;return}}n.textContent=i}var st={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},Ot=["Webkit","ms","Moz","O"];Object.keys(st).forEach(function(n){Ot.forEach(function(i){i=i+n.charAt(0).toUpperCase()+n.substring(1),st[i]=st[n]})});function Ut(n,i,o){return i==null||typeof i=="boolean"||i===""?"":o||typeof i!="number"||i===0||st.hasOwnProperty(n)&&st[n]?(""+i).trim():i+"px"}function yn(n,i){n=n.style;for(var o in i)if(i.hasOwnProperty(o)){var d=o.indexOf("--")===0,h=Ut(o,i[o],d);o==="float"&&(o="cssFloat"),d?n.setProperty(o,h):n[o]=h}}var vn=N({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 Y(n,i){if(i){if(vn[n]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(r(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(r(61))}if(i.style!=null&&typeof i.style!="object")throw Error(r(62))}}function le(n,i){if(n.indexOf("-")===-1)return typeof i.is=="string";switch(n){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 Ne=null;function Xe(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Tn=null,vt=null,ot=null;function Et(n){if(n=Ys(n)){if(typeof Tn!="function")throw Error(r(280));var i=n.stateNode;i&&(i=aa(i),Tn(n.stateNode,n.type,i))}}function zt(n){vt?ot?ot.push(n):ot=[n]:vt=n}function Pn(){if(vt){var n=vt,i=ot;if(ot=vt=null,Et(n),i)for(n=0;n<i.length;n++)Et(i[n])}}function mn(n,i){return n(i)}function on(){}var xn=!1;function mr(n,i,o){if(xn)return n(i,o);xn=!0;try{return mn(n,i,o)}finally{xn=!1,(vt!==null||ot!==null)&&(on(),Pn())}}function Dt(n,i){var o=n.stateNode;if(o===null)return null;var d=aa(o);if(d===null)return null;o=d[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(n=n.type,d=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!d;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(r(231,i,typeof o));return o}var In=!1;if(f)try{var nn={};Object.defineProperty(nn,"passive",{get:function(){In=!0}}),window.addEventListener("test",nn,nn),window.removeEventListener("test",nn,nn)}catch{In=!1}function Ln(n,i,o,d,h,v,b,A,L){var U=Array.prototype.slice.call(arguments,3);try{i.apply(o,U)}catch(oe){this.onError(oe)}}var Wn=!1,nr=null,_n=!1,qn=null,Ar={onError:function(n){Wn=!0,nr=n}};function $l(n,i,o,d,h,v,b,A,L){Wn=!1,nr=null,Ln.apply(Ar,arguments)}function Bl(n,i,o,d,h,v,b,A,L){if($l.apply(this,arguments),Wn){if(Wn){var U=nr;Wn=!1,nr=null}else throw Error(r(198));_n||(_n=!0,qn=U)}}function K(n){var i=n,o=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(o=i.return),n=i.return;while(n)}return i.tag===3?o:null}function be(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function lt(n){if(K(n)!==n)throw Error(r(188))}function pn(n){var i=n.alternate;if(!i){if(i=K(n),i===null)throw Error(r(188));return i!==n?null:n}for(var o=n,d=i;;){var h=o.return;if(h===null)break;var v=h.alternate;if(v===null){if(d=h.return,d!==null){o=d;continue}break}if(h.child===v.child){for(v=h.child;v;){if(v===o)return lt(h),n;if(v===d)return lt(h),i;v=v.sibling}throw Error(r(188))}if(o.return!==d.return)o=h,d=v;else{for(var b=!1,A=h.child;A;){if(A===o){b=!0,o=h,d=v;break}if(A===d){b=!0,d=h,o=v;break}A=A.sibling}if(!b){for(A=v.child;A;){if(A===o){b=!0,o=v,d=h;break}if(A===d){b=!0,d=v,o=h;break}A=A.sibling}if(!b)throw Error(r(189))}}if(o.alternate!==d)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?n:i}function sf(n){return n=pn(n),n!==null?lf(n):null}function lf(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var i=lf(n);if(i!==null)return i;n=n.sibling}return null}var af=t.unstable_scheduleCallback,of=t.unstable_cancelCallback,Av=t.unstable_shouldYield,Rv=t.unstable_requestPaint,Qt=t.unstable_now,Pv=t.unstable_getCurrentPriorityLevel,Lo=t.unstable_ImmediatePriority,cf=t.unstable_UserBlockingPriority,Fl=t.unstable_NormalPriority,Lv=t.unstable_LowPriority,uf=t.unstable_IdlePriority,Hl=null,br=null;function Mv(n){if(br&&typeof br.onCommitFiberRoot=="function")try{br.onCommitFiberRoot(Hl,n,void 0,(n.current.flags&128)===128)}catch{}}var pr=Math.clz32?Math.clz32:$v,Ov=Math.log,zv=Math.LN2;function $v(n){return n>>>=0,n===0?32:31-(Ov(n)/zv|0)|0}var Vl=64,Ul=4194304;function Ds(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Wl(n,i){var o=n.pendingLanes;if(o===0)return 0;var d=0,h=n.suspendedLanes,v=n.pingedLanes,b=o&268435455;if(b!==0){var A=b&~h;A!==0?d=Ds(A):(v&=b,v!==0&&(d=Ds(v)))}else b=o&~h,b!==0?d=Ds(b):v!==0&&(d=Ds(v));if(d===0)return 0;if(i!==0&&i!==d&&(i&h)===0&&(h=d&-d,v=i&-i,h>=v||h===16&&(v&4194240)!==0))return i;if((d&4)!==0&&(d|=o&16),i=n.entangledLanes,i!==0)for(n=n.entanglements,i&=d;0<i;)o=31-pr(i),h=1<<o,d|=n[o],i&=~h;return d}function Bv(n,i){switch(n){case 1:case 2:case 4:return i+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 i+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 Fv(n,i){for(var o=n.suspendedLanes,d=n.pingedLanes,h=n.expirationTimes,v=n.pendingLanes;0<v;){var b=31-pr(v),A=1<<b,L=h[b];L===-1?((A&o)===0||(A&d)!==0)&&(h[b]=Bv(A,i)):L<=i&&(n.expiredLanes|=A),v&=~A}}function Mo(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function df(){var n=Vl;return Vl<<=1,(Vl&4194240)===0&&(Vl=64),n}function Oo(n){for(var i=[],o=0;31>o;o++)i.push(n);return i}function As(n,i,o){n.pendingLanes|=i,i!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,i=31-pr(i),n[i]=o}function Hv(n,i){var o=n.pendingLanes&~i;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=i,n.mutableReadLanes&=i,n.entangledLanes&=i,i=n.entanglements;var d=n.eventTimes;for(n=n.expirationTimes;0<o;){var h=31-pr(o),v=1<<h;i[h]=0,d[h]=-1,n[h]=-1,o&=~v}}function zo(n,i){var o=n.entangledLanes|=i;for(n=n.entanglements;o;){var d=31-pr(o),h=1<<d;h&i|n[d]&i&&(n[d]|=i),o&=~h}}var xt=0;function ff(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var mf,$o,pf,hf,gf,Bo=!1,ql=[],qr=null,Kr=null,Zr=null,Rs=new Map,Ps=new Map,Yr=[],Vv="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 yf(n,i){switch(n){case"focusin":case"focusout":qr=null;break;case"dragenter":case"dragleave":Kr=null;break;case"mouseover":case"mouseout":Zr=null;break;case"pointerover":case"pointerout":Rs.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ps.delete(i.pointerId)}}function Ls(n,i,o,d,h,v){return n===null||n.nativeEvent!==v?(n={blockedOn:i,domEventName:o,eventSystemFlags:d,nativeEvent:v,targetContainers:[h]},i!==null&&(i=Ys(i),i!==null&&$o(i)),n):(n.eventSystemFlags|=d,i=n.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),n)}function Uv(n,i,o,d,h){switch(i){case"focusin":return qr=Ls(qr,n,i,o,d,h),!0;case"dragenter":return Kr=Ls(Kr,n,i,o,d,h),!0;case"mouseover":return Zr=Ls(Zr,n,i,o,d,h),!0;case"pointerover":var v=h.pointerId;return Rs.set(v,Ls(Rs.get(v)||null,n,i,o,d,h)),!0;case"gotpointercapture":return v=h.pointerId,Ps.set(v,Ls(Ps.get(v)||null,n,i,o,d,h)),!0}return!1}function vf(n){var i=ki(n.target);if(i!==null){var o=K(i);if(o!==null){if(i=o.tag,i===13){if(i=be(o),i!==null){n.blockedOn=i,gf(n.priority,function(){pf(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Kl(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var o=Ho(n.domEventName,n.eventSystemFlags,i[0],n.nativeEvent);if(o===null){o=n.nativeEvent;var d=new o.constructor(o.type,o);Ne=d,o.target.dispatchEvent(d),Ne=null}else return i=Ys(o),i!==null&&$o(i),n.blockedOn=o,!1;i.shift()}return!0}function xf(n,i,o){Kl(n)&&o.delete(i)}function Wv(){Bo=!1,qr!==null&&Kl(qr)&&(qr=null),Kr!==null&&Kl(Kr)&&(Kr=null),Zr!==null&&Kl(Zr)&&(Zr=null),Rs.forEach(xf),Ps.forEach(xf)}function Ms(n,i){n.blockedOn===i&&(n.blockedOn=null,Bo||(Bo=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Wv)))}function Os(n){function i(h){return Ms(h,n)}if(0<ql.length){Ms(ql[0],n);for(var o=1;o<ql.length;o++){var d=ql[o];d.blockedOn===n&&(d.blockedOn=null)}}for(qr!==null&&Ms(qr,n),Kr!==null&&Ms(Kr,n),Zr!==null&&Ms(Zr,n),Rs.forEach(i),Ps.forEach(i),o=0;o<Yr.length;o++)d=Yr[o],d.blockedOn===n&&(d.blockedOn=null);for(;0<Yr.length&&(o=Yr[0],o.blockedOn===null);)vf(o),o.blockedOn===null&&Yr.shift()}var Vi=M.ReactCurrentBatchConfig,Zl=!0;function qv(n,i,o,d){var h=xt,v=Vi.transition;Vi.transition=null;try{xt=1,Fo(n,i,o,d)}finally{xt=h,Vi.transition=v}}function Kv(n,i,o,d){var h=xt,v=Vi.transition;Vi.transition=null;try{xt=4,Fo(n,i,o,d)}finally{xt=h,Vi.transition=v}}function Fo(n,i,o,d){if(Zl){var h=Ho(n,i,o,d);if(h===null)sc(n,i,d,Yl,o),yf(n,d);else if(Uv(h,n,i,o,d))d.stopPropagation();else if(yf(n,d),i&4&&-1<Vv.indexOf(n)){for(;h!==null;){var v=Ys(h);if(v!==null&&mf(v),v=Ho(n,i,o,d),v===null&&sc(n,i,d,Yl,o),v===h)break;h=v}h!==null&&d.stopPropagation()}else sc(n,i,d,null,o)}}var Yl=null;function Ho(n,i,o,d){if(Yl=null,n=Xe(d),n=ki(n),n!==null)if(i=K(n),i===null)n=null;else if(o=i.tag,o===13){if(n=be(i),n!==null)return n;n=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null);return Yl=n,null}function _f(n){switch(n){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(Pv()){case Lo:return 1;case cf:return 4;case Fl:case Lv:return 16;case uf:return 536870912;default:return 16}default:return 16}}var Qr=null,Vo=null,Ql=null;function kf(){if(Ql)return Ql;var n,i=Vo,o=i.length,d,h="value"in Qr?Qr.value:Qr.textContent,v=h.length;for(n=0;n<o&&i[n]===h[n];n++);var b=o-n;for(d=1;d<=b&&i[o-d]===h[v-d];d++);return Ql=h.slice(n,1<d?1-d:void 0)}function Xl(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function Gl(){return!0}function wf(){return!1}function Kn(n){function i(o,d,h,v,b){this._reactName=o,this._targetInst=h,this.type=d,this.nativeEvent=v,this.target=b,this.currentTarget=null;for(var A in n)n.hasOwnProperty(A)&&(o=n[A],this[A]=o?o(v):v[A]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Gl:wf,this.isPropagationStopped=wf,this}return N(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Gl)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Gl)},persist:function(){},isPersistent:Gl}),i}var Ui={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uo=Kn(Ui),zs=N({},Ui,{view:0,detail:0}),Zv=Kn(zs),Wo,qo,$s,Jl=N({},zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zo,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==$s&&($s&&n.type==="mousemove"?(Wo=n.screenX-$s.screenX,qo=n.screenY-$s.screenY):qo=Wo=0,$s=n),Wo)},movementY:function(n){return"movementY"in n?n.movementY:qo}}),bf=Kn(Jl),Yv=N({},Jl,{dataTransfer:0}),Qv=Kn(Yv),Xv=N({},zs,{relatedTarget:0}),Ko=Kn(Xv),Gv=N({},Ui,{animationName:0,elapsedTime:0,pseudoElement:0}),Jv=Kn(Gv),ex=N({},Ui,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),tx=Kn(ex),nx=N({},Ui,{data:0}),Sf=Kn(nx),rx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ix={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"},sx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lx(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=sx[n])?!!i[n]:!1}function Zo(){return lx}var ax=N({},zs,{key:function(n){if(n.key){var i=rx[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=Xl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?ix[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zo,charCode:function(n){return n.type==="keypress"?Xl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Xl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),ox=Kn(ax),cx=N({},Jl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cf=Kn(cx),ux=N({},zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zo}),dx=Kn(ux),fx=N({},Ui,{propertyName:0,elapsedTime:0,pseudoElement:0}),mx=Kn(fx),px=N({},Jl,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),hx=Kn(px),gx=[9,13,27,32],Yo=f&&"CompositionEvent"in window,Bs=null;f&&"documentMode"in document&&(Bs=document.documentMode);var yx=f&&"TextEvent"in window&&!Bs,Nf=f&&(!Yo||Bs&&8<Bs&&11>=Bs),jf=" ",Ef=!1;function Tf(n,i){switch(n){case"keyup":return gx.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function If(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Wi=!1;function vx(n,i){switch(n){case"compositionend":return If(i);case"keypress":return i.which!==32?null:(Ef=!0,jf);case"textInput":return n=i.data,n===jf&&Ef?null:n;default:return null}}function xx(n,i){if(Wi)return n==="compositionend"||!Yo&&Tf(n,i)?(n=kf(),Ql=Vo=Qr=null,Wi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Nf&&i.locale!=="ko"?null:i.data;default:return null}}var _x={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 Df(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!_x[n.type]:i==="textarea"}function Af(n,i,o,d){zt(d),i=ia(i,"onChange"),0<i.length&&(o=new Uo("onChange","change",null,o,d),n.push({event:o,listeners:i}))}var Fs=null,Hs=null;function kx(n){Qf(n,0)}function ea(n){var i=Qi(n);if(Lt(i))return n}function wx(n,i){if(n==="change")return i}var Rf=!1;if(f){var Qo;if(f){var Xo="oninput"in document;if(!Xo){var Pf=document.createElement("div");Pf.setAttribute("oninput","return;"),Xo=typeof Pf.oninput=="function"}Qo=Xo}else Qo=!1;Rf=Qo&&(!document.documentMode||9<document.documentMode)}function Lf(){Fs&&(Fs.detachEvent("onpropertychange",Mf),Hs=Fs=null)}function Mf(n){if(n.propertyName==="value"&&ea(Hs)){var i=[];Af(i,Hs,n,Xe(n)),mr(kx,i)}}function bx(n,i,o){n==="focusin"?(Lf(),Fs=i,Hs=o,Fs.attachEvent("onpropertychange",Mf)):n==="focusout"&&Lf()}function Sx(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return ea(Hs)}function Cx(n,i){if(n==="click")return ea(i)}function Nx(n,i){if(n==="input"||n==="change")return ea(i)}function jx(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var hr=typeof Object.is=="function"?Object.is:jx;function Vs(n,i){if(hr(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var o=Object.keys(n),d=Object.keys(i);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var h=o[d];if(!m.call(i,h)||!hr(n[h],i[h]))return!1}return!0}function Of(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function zf(n,i){var o=Of(n);n=0;for(var d;o;){if(o.nodeType===3){if(d=n+o.textContent.length,n<=i&&d>=i)return{node:o,offset:i-n};n=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Of(o)}}function $f(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?$f(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function Bf(){for(var n=window,i=Kt();i instanceof n.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)n=i.contentWindow;else break;i=Kt(n.document)}return i}function Go(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}function Ex(n){var i=Bf(),o=n.focusedElem,d=n.selectionRange;if(i!==o&&o&&o.ownerDocument&&$f(o.ownerDocument.documentElement,o)){if(d!==null&&Go(o)){if(i=d.start,n=d.end,n===void 0&&(n=i),"selectionStart"in o)o.selectionStart=i,o.selectionEnd=Math.min(n,o.value.length);else if(n=(i=o.ownerDocument||document)&&i.defaultView||window,n.getSelection){n=n.getSelection();var h=o.textContent.length,v=Math.min(d.start,h);d=d.end===void 0?v:Math.min(d.end,h),!n.extend&&v>d&&(h=d,d=v,v=h),h=zf(o,v);var b=zf(o,d);h&&b&&(n.rangeCount!==1||n.anchorNode!==h.node||n.anchorOffset!==h.offset||n.focusNode!==b.node||n.focusOffset!==b.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),n.removeAllRanges(),v>d?(n.addRange(i),n.extend(b.node,b.offset)):(i.setEnd(b.node,b.offset),n.addRange(i)))}}for(i=[],n=o;n=n.parentNode;)n.nodeType===1&&i.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<i.length;o++)n=i[o],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var Tx=f&&"documentMode"in document&&11>=document.documentMode,qi=null,Jo=null,Us=null,ec=!1;function Ff(n,i,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;ec||qi==null||qi!==Kt(d)||(d=qi,"selectionStart"in d&&Go(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Us&&Vs(Us,d)||(Us=d,d=ia(Jo,"onSelect"),0<d.length&&(i=new Uo("onSelect","select",null,i,o),n.push({event:i,listeners:d}),i.target=qi)))}function ta(n,i){var o={};return o[n.toLowerCase()]=i.toLowerCase(),o["Webkit"+n]="webkit"+i,o["Moz"+n]="moz"+i,o}var Ki={animationend:ta("Animation","AnimationEnd"),animationiteration:ta("Animation","AnimationIteration"),animationstart:ta("Animation","AnimationStart"),transitionend:ta("Transition","TransitionEnd")},tc={},Hf={};f&&(Hf=document.createElement("div").style,"AnimationEvent"in window||(delete Ki.animationend.animation,delete Ki.animationiteration.animation,delete Ki.animationstart.animation),"TransitionEvent"in window||delete Ki.transitionend.transition);function na(n){if(tc[n])return tc[n];if(!Ki[n])return n;var i=Ki[n],o;for(o in i)if(i.hasOwnProperty(o)&&o in Hf)return tc[n]=i[o];return n}var Vf=na("animationend"),Uf=na("animationiteration"),Wf=na("animationstart"),qf=na("transitionend"),Kf=new Map,Zf="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 Xr(n,i){Kf.set(n,i),a(i,[n])}for(var nc=0;nc<Zf.length;nc++){var rc=Zf[nc],Ix=rc.toLowerCase(),Dx=rc[0].toUpperCase()+rc.slice(1);Xr(Ix,"on"+Dx)}Xr(Vf,"onAnimationEnd"),Xr(Uf,"onAnimationIteration"),Xr(Wf,"onAnimationStart"),Xr("dblclick","onDoubleClick"),Xr("focusin","onFocus"),Xr("focusout","onBlur"),Xr(qf,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ws="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(" "),Ax=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ws));function Yf(n,i,o){var d=n.type||"unknown-event";n.currentTarget=o,Bl(d,i,void 0,n),n.currentTarget=null}function Qf(n,i){i=(i&4)!==0;for(var o=0;o<n.length;o++){var d=n[o],h=d.event;d=d.listeners;e:{var v=void 0;if(i)for(var b=d.length-1;0<=b;b--){var A=d[b],L=A.instance,U=A.currentTarget;if(A=A.listener,L!==v&&h.isPropagationStopped())break e;Yf(h,A,U),v=L}else for(b=0;b<d.length;b++){if(A=d[b],L=A.instance,U=A.currentTarget,A=A.listener,L!==v&&h.isPropagationStopped())break e;Yf(h,A,U),v=L}}}if(_n)throw n=qn,_n=!1,qn=null,n}function At(n,i){var o=i[dc];o===void 0&&(o=i[dc]=new Set);var d=n+"__bubble";o.has(d)||(Xf(i,n,2,!1),o.add(d))}function ic(n,i,o){var d=0;i&&(d|=4),Xf(o,n,d,i)}var ra="_reactListening"+Math.random().toString(36).slice(2);function qs(n){if(!n[ra]){n[ra]=!0,s.forEach(function(o){o!=="selectionchange"&&(Ax.has(o)||ic(o,!1,n),ic(o,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[ra]||(i[ra]=!0,ic("selectionchange",!1,i))}}function Xf(n,i,o,d){switch(_f(i)){case 1:var h=qv;break;case 4:h=Kv;break;default:h=Fo}o=h.bind(null,i,o,n),h=void 0,!In||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),d?h!==void 0?n.addEventListener(i,o,{capture:!0,passive:h}):n.addEventListener(i,o,!0):h!==void 0?n.addEventListener(i,o,{passive:h}):n.addEventListener(i,o,!1)}function sc(n,i,o,d,h){var v=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var b=d.tag;if(b===3||b===4){var A=d.stateNode.containerInfo;if(A===h||A.nodeType===8&&A.parentNode===h)break;if(b===4)for(b=d.return;b!==null;){var L=b.tag;if((L===3||L===4)&&(L=b.stateNode.containerInfo,L===h||L.nodeType===8&&L.parentNode===h))return;b=b.return}for(;A!==null;){if(b=ki(A),b===null)return;if(L=b.tag,L===5||L===6){d=v=b;continue e}A=A.parentNode}}d=d.return}mr(function(){var U=v,oe=Xe(o),ue=[];e:{var ae=Kf.get(n);if(ae!==void 0){var je=Uo,Ae=n;switch(n){case"keypress":if(Xl(o)===0)break e;case"keydown":case"keyup":je=ox;break;case"focusin":Ae="focus",je=Ko;break;case"focusout":Ae="blur",je=Ko;break;case"beforeblur":case"afterblur":je=Ko;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":je=bf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":je=Qv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":je=dx;break;case Vf:case Uf:case Wf:je=Jv;break;case qf:je=mx;break;case"scroll":je=Zv;break;case"wheel":je=hx;break;case"copy":case"cut":case"paste":je=tx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":je=Cf}var Pe=(i&4)!==0,Xt=!Pe&&n==="scroll",H=Pe?ae!==null?ae+"Capture":null:ae;Pe=[];for(var z=U,V;z!==null;){V=z;var he=V.stateNode;if(V.tag===5&&he!==null&&(V=he,H!==null&&(he=Dt(z,H),he!=null&&Pe.push(Ks(z,he,V)))),Xt)break;z=z.return}0<Pe.length&&(ae=new je(ae,Ae,null,o,oe),ue.push({event:ae,listeners:Pe}))}}if((i&7)===0){e:{if(ae=n==="mouseover"||n==="pointerover",je=n==="mouseout"||n==="pointerout",ae&&o!==Ne&&(Ae=o.relatedTarget||o.fromElement)&&(ki(Ae)||Ae[Rr]))break e;if((je||ae)&&(ae=oe.window===oe?oe:(ae=oe.ownerDocument)?ae.defaultView||ae.parentWindow:window,je?(Ae=o.relatedTarget||o.toElement,je=U,Ae=Ae?ki(Ae):null,Ae!==null&&(Xt=K(Ae),Ae!==Xt||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(je=null,Ae=U),je!==Ae)){if(Pe=bf,he="onMouseLeave",H="onMouseEnter",z="mouse",(n==="pointerout"||n==="pointerover")&&(Pe=Cf,he="onPointerLeave",H="onPointerEnter",z="pointer"),Xt=je==null?ae:Qi(je),V=Ae==null?ae:Qi(Ae),ae=new Pe(he,z+"leave",je,o,oe),ae.target=Xt,ae.relatedTarget=V,he=null,ki(oe)===U&&(Pe=new Pe(H,z+"enter",Ae,o,oe),Pe.target=V,Pe.relatedTarget=Xt,he=Pe),Xt=he,je&&Ae)t:{for(Pe=je,H=Ae,z=0,V=Pe;V;V=Zi(V))z++;for(V=0,he=H;he;he=Zi(he))V++;for(;0<z-V;)Pe=Zi(Pe),z--;for(;0<V-z;)H=Zi(H),V--;for(;z--;){if(Pe===H||H!==null&&Pe===H.alternate)break t;Pe=Zi(Pe),H=Zi(H)}Pe=null}else Pe=null;je!==null&&Gf(ue,ae,je,Pe,!1),Ae!==null&&Xt!==null&&Gf(ue,Xt,Ae,Pe,!0)}}e:{if(ae=U?Qi(U):window,je=ae.nodeName&&ae.nodeName.toLowerCase(),je==="select"||je==="input"&&ae.type==="file")var Me=wx;else if(Df(ae))if(Rf)Me=Nx;else{Me=Sx;var $e=bx}else(je=ae.nodeName)&&je.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(Me=Cx);if(Me&&(Me=Me(n,U))){Af(ue,Me,o,oe);break e}$e&&$e(n,ae,U),n==="focusout"&&($e=ae._wrapperState)&&$e.controlled&&ae.type==="number"&&Zt(ae,"number",ae.value)}switch($e=U?Qi(U):window,n){case"focusin":(Df($e)||$e.contentEditable==="true")&&(qi=$e,Jo=U,Us=null);break;case"focusout":Us=Jo=qi=null;break;case"mousedown":ec=!0;break;case"contextmenu":case"mouseup":case"dragend":ec=!1,Ff(ue,o,oe);break;case"selectionchange":if(Tx)break;case"keydown":case"keyup":Ff(ue,o,oe)}var Be;if(Yo)e:{switch(n){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Wi?Tf(n,o)&&(Ue="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(Ue="onCompositionStart");Ue&&(Nf&&o.locale!=="ko"&&(Wi||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Wi&&(Be=kf()):(Qr=oe,Vo="value"in Qr?Qr.value:Qr.textContent,Wi=!0)),$e=ia(U,Ue),0<$e.length&&(Ue=new Sf(Ue,n,null,o,oe),ue.push({event:Ue,listeners:$e}),Be?Ue.data=Be:(Be=If(o),Be!==null&&(Ue.data=Be)))),(Be=yx?vx(n,o):xx(n,o))&&(U=ia(U,"onBeforeInput"),0<U.length&&(oe=new Sf("onBeforeInput","beforeinput",null,o,oe),ue.push({event:oe,listeners:U}),oe.data=Be))}Qf(ue,i)})}function Ks(n,i,o){return{instance:n,listener:i,currentTarget:o}}function ia(n,i){for(var o=i+"Capture",d=[];n!==null;){var h=n,v=h.stateNode;h.tag===5&&v!==null&&(h=v,v=Dt(n,o),v!=null&&d.unshift(Ks(n,v,h)),v=Dt(n,i),v!=null&&d.push(Ks(n,v,h))),n=n.return}return d}function Zi(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function Gf(n,i,o,d,h){for(var v=i._reactName,b=[];o!==null&&o!==d;){var A=o,L=A.alternate,U=A.stateNode;if(L!==null&&L===d)break;A.tag===5&&U!==null&&(A=U,h?(L=Dt(o,v),L!=null&&b.unshift(Ks(o,L,A))):h||(L=Dt(o,v),L!=null&&b.push(Ks(o,L,A)))),o=o.return}b.length!==0&&n.push({event:i,listeners:b})}var Rx=/\r\n?/g,Px=/\u0000|\uFFFD/g;function Jf(n){return(typeof n=="string"?n:""+n).replace(Rx,`
|
|
38
|
+
`).replace(Px,"")}function sa(n,i,o){if(i=Jf(i),Jf(n)!==i&&o)throw Error(r(425))}function la(){}var lc=null,ac=null;function oc(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var cc=typeof setTimeout=="function"?setTimeout:void 0,Lx=typeof clearTimeout=="function"?clearTimeout:void 0,em=typeof Promise=="function"?Promise:void 0,Mx=typeof queueMicrotask=="function"?queueMicrotask:typeof em<"u"?function(n){return em.resolve(null).then(n).catch(Ox)}:cc;function Ox(n){setTimeout(function(){throw n})}function uc(n,i){var o=i,d=0;do{var h=o.nextSibling;if(n.removeChild(o),h&&h.nodeType===8)if(o=h.data,o==="/$"){if(d===0){n.removeChild(h),Os(i);return}d--}else o!=="$"&&o!=="$?"&&o!=="$!"||d++;o=h}while(o);Os(i)}function Gr(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return n}function tm(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"){if(i===0)return n;i--}else o==="/$"&&i++}n=n.previousSibling}return null}var Yi=Math.random().toString(36).slice(2),Sr="__reactFiber$"+Yi,Zs="__reactProps$"+Yi,Rr="__reactContainer$"+Yi,dc="__reactEvents$"+Yi,zx="__reactListeners$"+Yi,$x="__reactHandles$"+Yi;function ki(n){var i=n[Sr];if(i)return i;for(var o=n.parentNode;o;){if(i=o[Rr]||o[Sr]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(n=tm(n);n!==null;){if(o=n[Sr])return o;n=tm(n)}return i}n=o,o=n.parentNode}return null}function Ys(n){return n=n[Sr]||n[Rr],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function Qi(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(r(33))}function aa(n){return n[Zs]||null}var fc=[],Xi=-1;function Jr(n){return{current:n}}function Rt(n){0>Xi||(n.current=fc[Xi],fc[Xi]=null,Xi--)}function Tt(n,i){Xi++,fc[Xi]=n.current,n.current=i}var ei={},kn=Jr(ei),Mn=Jr(!1),wi=ei;function Gi(n,i){var o=n.type.contextTypes;if(!o)return ei;var d=n.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===i)return d.__reactInternalMemoizedMaskedChildContext;var h={},v;for(v in o)h[v]=i[v];return d&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=i,n.__reactInternalMemoizedMaskedChildContext=h),h}function On(n){return n=n.childContextTypes,n!=null}function oa(){Rt(Mn),Rt(kn)}function nm(n,i,o){if(kn.current!==ei)throw Error(r(168));Tt(kn,i),Tt(Mn,o)}function rm(n,i,o){var d=n.stateNode;if(i=i.childContextTypes,typeof d.getChildContext!="function")return o;d=d.getChildContext();for(var h in d)if(!(h in i))throw Error(r(108,xe(n)||"Unknown",h));return N({},o,d)}function ca(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||ei,wi=kn.current,Tt(kn,n),Tt(Mn,Mn.current),!0}function im(n,i,o){var d=n.stateNode;if(!d)throw Error(r(169));o?(n=rm(n,i,wi),d.__reactInternalMemoizedMergedChildContext=n,Rt(Mn),Rt(kn),Tt(kn,n)):Rt(Mn),Tt(Mn,o)}var Pr=null,ua=!1,mc=!1;function sm(n){Pr===null?Pr=[n]:Pr.push(n)}function Bx(n){ua=!0,sm(n)}function ti(){if(!mc&&Pr!==null){mc=!0;var n=0,i=xt;try{var o=Pr;for(xt=1;n<o.length;n++){var d=o[n];do d=d(!0);while(d!==null)}Pr=null,ua=!1}catch(h){throw Pr!==null&&(Pr=Pr.slice(n+1)),af(Lo,ti),h}finally{xt=i,mc=!1}}return null}var Ji=[],es=0,da=null,fa=0,rr=[],ir=0,bi=null,Lr=1,Mr="";function Si(n,i){Ji[es++]=fa,Ji[es++]=da,da=n,fa=i}function lm(n,i,o){rr[ir++]=Lr,rr[ir++]=Mr,rr[ir++]=bi,bi=n;var d=Lr;n=Mr;var h=32-pr(d)-1;d&=~(1<<h),o+=1;var v=32-pr(i)+h;if(30<v){var b=h-h%5;v=(d&(1<<b)-1).toString(32),d>>=b,h-=b,Lr=1<<32-pr(i)+h|o<<h|d,Mr=v+n}else Lr=1<<v|o<<h|d,Mr=n}function pc(n){n.return!==null&&(Si(n,1),lm(n,1,0))}function hc(n){for(;n===da;)da=Ji[--es],Ji[es]=null,fa=Ji[--es],Ji[es]=null;for(;n===bi;)bi=rr[--ir],rr[ir]=null,Mr=rr[--ir],rr[ir]=null,Lr=rr[--ir],rr[ir]=null}var Zn=null,Yn=null,Pt=!1,gr=null;function am(n,i){var o=or(5,null,null,0);o.elementType="DELETED",o.stateNode=i,o.return=n,i=n.deletions,i===null?(n.deletions=[o],n.flags|=16):i.push(o)}function om(n,i){switch(n.tag){case 5:var o=n.type;return i=i.nodeType!==1||o.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(n.stateNode=i,Zn=n,Yn=Gr(i.firstChild),!0):!1;case 6:return i=n.pendingProps===""||i.nodeType!==3?null:i,i!==null?(n.stateNode=i,Zn=n,Yn=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(o=bi!==null?{id:Lr,overflow:Mr}:null,n.memoizedState={dehydrated:i,treeContext:o,retryLane:1073741824},o=or(18,null,null,0),o.stateNode=i,o.return=n,n.child=o,Zn=n,Yn=null,!0):!1;default:return!1}}function gc(n){return(n.mode&1)!==0&&(n.flags&128)===0}function yc(n){if(Pt){var i=Yn;if(i){var o=i;if(!om(n,i)){if(gc(n))throw Error(r(418));i=Gr(o.nextSibling);var d=Zn;i&&om(n,i)?am(d,o):(n.flags=n.flags&-4097|2,Pt=!1,Zn=n)}}else{if(gc(n))throw Error(r(418));n.flags=n.flags&-4097|2,Pt=!1,Zn=n}}}function cm(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Zn=n}function ma(n){if(n!==Zn)return!1;if(!Pt)return cm(n),Pt=!0,!1;var i;if((i=n.tag!==3)&&!(i=n.tag!==5)&&(i=n.type,i=i!=="head"&&i!=="body"&&!oc(n.type,n.memoizedProps)),i&&(i=Yn)){if(gc(n))throw um(),Error(r(418));for(;i;)am(n,i),i=Gr(i.nextSibling)}if(cm(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));e:{for(n=n.nextSibling,i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"){if(i===0){Yn=Gr(n.nextSibling);break e}i--}else o!=="$"&&o!=="$!"&&o!=="$?"||i++}n=n.nextSibling}Yn=null}}else Yn=Zn?Gr(n.stateNode.nextSibling):null;return!0}function um(){for(var n=Yn;n;)n=Gr(n.nextSibling)}function ts(){Yn=Zn=null,Pt=!1}function vc(n){gr===null?gr=[n]:gr.push(n)}var Fx=M.ReactCurrentBatchConfig;function Qs(n,i,o){if(n=o.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(r(309));var d=o.stateNode}if(!d)throw Error(r(147,n));var h=d,v=""+n;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===v?i.ref:(i=function(b){var A=h.refs;b===null?delete A[v]:A[v]=b},i._stringRef=v,i)}if(typeof n!="string")throw Error(r(284));if(!o._owner)throw Error(r(290,n))}return n}function pa(n,i){throw n=Object.prototype.toString.call(i),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n))}function dm(n){var i=n._init;return i(n._payload)}function fm(n){function i(H,z){if(n){var V=H.deletions;V===null?(H.deletions=[z],H.flags|=16):V.push(z)}}function o(H,z){if(!n)return null;for(;z!==null;)i(H,z),z=z.sibling;return null}function d(H,z){for(H=new Map;z!==null;)z.key!==null?H.set(z.key,z):H.set(z.index,z),z=z.sibling;return H}function h(H,z){return H=ci(H,z),H.index=0,H.sibling=null,H}function v(H,z,V){return H.index=V,n?(V=H.alternate,V!==null?(V=V.index,V<z?(H.flags|=2,z):V):(H.flags|=2,z)):(H.flags|=1048576,z)}function b(H){return n&&H.alternate===null&&(H.flags|=2),H}function A(H,z,V,he){return z===null||z.tag!==6?(z=cu(V,H.mode,he),z.return=H,z):(z=h(z,V),z.return=H,z)}function L(H,z,V,he){var Me=V.type;return Me===B?oe(H,z,V.props.children,he,V.key):z!==null&&(z.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===J&&dm(Me)===z.type)?(he=h(z,V.props),he.ref=Qs(H,z,V),he.return=H,he):(he=za(V.type,V.key,V.props,null,H.mode,he),he.ref=Qs(H,z,V),he.return=H,he)}function U(H,z,V,he){return z===null||z.tag!==4||z.stateNode.containerInfo!==V.containerInfo||z.stateNode.implementation!==V.implementation?(z=uu(V,H.mode,he),z.return=H,z):(z=h(z,V.children||[]),z.return=H,z)}function oe(H,z,V,he,Me){return z===null||z.tag!==7?(z=Ai(V,H.mode,he,Me),z.return=H,z):(z=h(z,V),z.return=H,z)}function ue(H,z,V){if(typeof z=="string"&&z!==""||typeof z=="number")return z=cu(""+z,H.mode,V),z.return=H,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case I:return V=za(z.type,z.key,z.props,null,H.mode,V),V.ref=Qs(H,null,z),V.return=H,V;case j:return z=uu(z,H.mode,V),z.return=H,z;case J:var he=z._init;return ue(H,he(z._payload),V)}if(bt(z)||fe(z))return z=Ai(z,H.mode,V,null),z.return=H,z;pa(H,z)}return null}function ae(H,z,V,he){var Me=z!==null?z.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Me!==null?null:A(H,z,""+V,he);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case I:return V.key===Me?L(H,z,V,he):null;case j:return V.key===Me?U(H,z,V,he):null;case J:return Me=V._init,ae(H,z,Me(V._payload),he)}if(bt(V)||fe(V))return Me!==null?null:oe(H,z,V,he,null);pa(H,V)}return null}function je(H,z,V,he,Me){if(typeof he=="string"&&he!==""||typeof he=="number")return H=H.get(V)||null,A(z,H,""+he,Me);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case I:return H=H.get(he.key===null?V:he.key)||null,L(z,H,he,Me);case j:return H=H.get(he.key===null?V:he.key)||null,U(z,H,he,Me);case J:var $e=he._init;return je(H,z,V,$e(he._payload),Me)}if(bt(he)||fe(he))return H=H.get(V)||null,oe(z,H,he,Me,null);pa(z,he)}return null}function Ae(H,z,V,he){for(var Me=null,$e=null,Be=z,Ue=z=0,dn=null;Be!==null&&Ue<V.length;Ue++){Be.index>Ue?(dn=Be,Be=null):dn=Be.sibling;var dt=ae(H,Be,V[Ue],he);if(dt===null){Be===null&&(Be=dn);break}n&&Be&&dt.alternate===null&&i(H,Be),z=v(dt,z,Ue),$e===null?Me=dt:$e.sibling=dt,$e=dt,Be=dn}if(Ue===V.length)return o(H,Be),Pt&&Si(H,Ue),Me;if(Be===null){for(;Ue<V.length;Ue++)Be=ue(H,V[Ue],he),Be!==null&&(z=v(Be,z,Ue),$e===null?Me=Be:$e.sibling=Be,$e=Be);return Pt&&Si(H,Ue),Me}for(Be=d(H,Be);Ue<V.length;Ue++)dn=je(Be,H,Ue,V[Ue],he),dn!==null&&(n&&dn.alternate!==null&&Be.delete(dn.key===null?Ue:dn.key),z=v(dn,z,Ue),$e===null?Me=dn:$e.sibling=dn,$e=dn);return n&&Be.forEach(function(ui){return i(H,ui)}),Pt&&Si(H,Ue),Me}function Pe(H,z,V,he){var Me=fe(V);if(typeof Me!="function")throw Error(r(150));if(V=Me.call(V),V==null)throw Error(r(151));for(var $e=Me=null,Be=z,Ue=z=0,dn=null,dt=V.next();Be!==null&&!dt.done;Ue++,dt=V.next()){Be.index>Ue?(dn=Be,Be=null):dn=Be.sibling;var ui=ae(H,Be,dt.value,he);if(ui===null){Be===null&&(Be=dn);break}n&&Be&&ui.alternate===null&&i(H,Be),z=v(ui,z,Ue),$e===null?Me=ui:$e.sibling=ui,$e=ui,Be=dn}if(dt.done)return o(H,Be),Pt&&Si(H,Ue),Me;if(Be===null){for(;!dt.done;Ue++,dt=V.next())dt=ue(H,dt.value,he),dt!==null&&(z=v(dt,z,Ue),$e===null?Me=dt:$e.sibling=dt,$e=dt);return Pt&&Si(H,Ue),Me}for(Be=d(H,Be);!dt.done;Ue++,dt=V.next())dt=je(Be,H,Ue,dt.value,he),dt!==null&&(n&&dt.alternate!==null&&Be.delete(dt.key===null?Ue:dt.key),z=v(dt,z,Ue),$e===null?Me=dt:$e.sibling=dt,$e=dt);return n&&Be.forEach(function(__){return i(H,__)}),Pt&&Si(H,Ue),Me}function Xt(H,z,V,he){if(typeof V=="object"&&V!==null&&V.type===B&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case I:e:{for(var Me=V.key,$e=z;$e!==null;){if($e.key===Me){if(Me=V.type,Me===B){if($e.tag===7){o(H,$e.sibling),z=h($e,V.props.children),z.return=H,H=z;break e}}else if($e.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===J&&dm(Me)===$e.type){o(H,$e.sibling),z=h($e,V.props),z.ref=Qs(H,$e,V),z.return=H,H=z;break e}o(H,$e);break}else i(H,$e);$e=$e.sibling}V.type===B?(z=Ai(V.props.children,H.mode,he,V.key),z.return=H,H=z):(he=za(V.type,V.key,V.props,null,H.mode,he),he.ref=Qs(H,z,V),he.return=H,H=he)}return b(H);case j:e:{for($e=V.key;z!==null;){if(z.key===$e)if(z.tag===4&&z.stateNode.containerInfo===V.containerInfo&&z.stateNode.implementation===V.implementation){o(H,z.sibling),z=h(z,V.children||[]),z.return=H,H=z;break e}else{o(H,z);break}else i(H,z);z=z.sibling}z=uu(V,H.mode,he),z.return=H,H=z}return b(H);case J:return $e=V._init,Xt(H,z,$e(V._payload),he)}if(bt(V))return Ae(H,z,V,he);if(fe(V))return Pe(H,z,V,he);pa(H,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,z!==null&&z.tag===6?(o(H,z.sibling),z=h(z,V),z.return=H,H=z):(o(H,z),z=cu(V,H.mode,he),z.return=H,H=z),b(H)):o(H,z)}return Xt}var ns=fm(!0),mm=fm(!1),ha=Jr(null),ga=null,rs=null,xc=null;function _c(){xc=rs=ga=null}function kc(n){var i=ha.current;Rt(ha),n._currentValue=i}function wc(n,i,o){for(;n!==null;){var d=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),n===o)break;n=n.return}}function is(n,i){ga=n,xc=rs=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&i)!==0&&(zn=!0),n.firstContext=null)}function sr(n){var i=n._currentValue;if(xc!==n)if(n={context:n,memoizedValue:i,next:null},rs===null){if(ga===null)throw Error(r(308));rs=n,ga.dependencies={lanes:0,firstContext:n}}else rs=rs.next=n;return i}var Ci=null;function bc(n){Ci===null?Ci=[n]:Ci.push(n)}function pm(n,i,o,d){var h=i.interleaved;return h===null?(o.next=o,bc(i)):(o.next=h.next,h.next=o),i.interleaved=o,Or(n,d)}function Or(n,i){n.lanes|=i;var o=n.alternate;for(o!==null&&(o.lanes|=i),o=n,n=n.return;n!==null;)n.childLanes|=i,o=n.alternate,o!==null&&(o.childLanes|=i),o=n,n=n.return;return o.tag===3?o.stateNode:null}var ni=!1;function Sc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hm(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function zr(n,i){return{eventTime:n,lane:i,tag:0,payload:null,callback:null,next:null}}function ri(n,i,o){var d=n.updateQueue;if(d===null)return null;if(d=d.shared,(ct&2)!==0){var h=d.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),d.pending=i,Or(n,o)}return h=d.interleaved,h===null?(i.next=i,bc(d)):(i.next=h.next,h.next=i),d.interleaved=i,Or(n,o)}function ya(n,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194240)!==0)){var d=i.lanes;d&=n.pendingLanes,o|=d,i.lanes=o,zo(n,o)}}function gm(n,i){var o=n.updateQueue,d=n.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var h=null,v=null;if(o=o.firstBaseUpdate,o!==null){do{var b={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};v===null?h=v=b:v=v.next=b,o=o.next}while(o!==null);v===null?h=v=i:v=v.next=i}else h=v=i;o={baseState:d.baseState,firstBaseUpdate:h,lastBaseUpdate:v,shared:d.shared,effects:d.effects},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=i:n.next=i,o.lastBaseUpdate=i}function va(n,i,o,d){var h=n.updateQueue;ni=!1;var v=h.firstBaseUpdate,b=h.lastBaseUpdate,A=h.shared.pending;if(A!==null){h.shared.pending=null;var L=A,U=L.next;L.next=null,b===null?v=U:b.next=U,b=L;var oe=n.alternate;oe!==null&&(oe=oe.updateQueue,A=oe.lastBaseUpdate,A!==b&&(A===null?oe.firstBaseUpdate=U:A.next=U,oe.lastBaseUpdate=L))}if(v!==null){var ue=h.baseState;b=0,oe=U=L=null,A=v;do{var ae=A.lane,je=A.eventTime;if((d&ae)===ae){oe!==null&&(oe=oe.next={eventTime:je,lane:0,tag:A.tag,payload:A.payload,callback:A.callback,next:null});e:{var Ae=n,Pe=A;switch(ae=i,je=o,Pe.tag){case 1:if(Ae=Pe.payload,typeof Ae=="function"){ue=Ae.call(je,ue,ae);break e}ue=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Pe.payload,ae=typeof Ae=="function"?Ae.call(je,ue,ae):Ae,ae==null)break e;ue=N({},ue,ae);break e;case 2:ni=!0}}A.callback!==null&&A.lane!==0&&(n.flags|=64,ae=h.effects,ae===null?h.effects=[A]:ae.push(A))}else je={eventTime:je,lane:ae,tag:A.tag,payload:A.payload,callback:A.callback,next:null},oe===null?(U=oe=je,L=ue):oe=oe.next=je,b|=ae;if(A=A.next,A===null){if(A=h.shared.pending,A===null)break;ae=A,A=ae.next,ae.next=null,h.lastBaseUpdate=ae,h.shared.pending=null}}while(!0);if(oe===null&&(L=ue),h.baseState=L,h.firstBaseUpdate=U,h.lastBaseUpdate=oe,i=h.shared.interleaved,i!==null){h=i;do b|=h.lane,h=h.next;while(h!==i)}else v===null&&(h.shared.lanes=0);Ei|=b,n.lanes=b,n.memoizedState=ue}}function ym(n,i,o){if(n=i.effects,i.effects=null,n!==null)for(i=0;i<n.length;i++){var d=n[i],h=d.callback;if(h!==null){if(d.callback=null,d=o,typeof h!="function")throw Error(r(191,h));h.call(d)}}}var Xs={},Cr=Jr(Xs),Gs=Jr(Xs),Js=Jr(Xs);function Ni(n){if(n===Xs)throw Error(r(174));return n}function Cc(n,i){switch(Tt(Js,i),Tt(Gs,n),Tt(Cr,Xs),n=i.nodeType,n){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:Z(null,"");break;default:n=n===8?i.parentNode:i,i=n.namespaceURI||null,n=n.tagName,i=Z(i,n)}Rt(Cr),Tt(Cr,i)}function ss(){Rt(Cr),Rt(Gs),Rt(Js)}function vm(n){Ni(Js.current);var i=Ni(Cr.current),o=Z(i,n.type);i!==o&&(Tt(Gs,n),Tt(Cr,o))}function Nc(n){Gs.current===n&&(Rt(Cr),Rt(Gs))}var $t=Jr(0);function xa(n){for(var i=n;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var jc=[];function Ec(){for(var n=0;n<jc.length;n++)jc[n]._workInProgressVersionPrimary=null;jc.length=0}var _a=M.ReactCurrentDispatcher,Tc=M.ReactCurrentBatchConfig,ji=0,Bt=null,rn=null,cn=null,ka=!1,el=!1,tl=0,Hx=0;function wn(){throw Error(r(321))}function Ic(n,i){if(i===null)return!1;for(var o=0;o<i.length&&o<n.length;o++)if(!hr(n[o],i[o]))return!1;return!0}function Dc(n,i,o,d,h,v){if(ji=v,Bt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,_a.current=n===null||n.memoizedState===null?qx:Kx,n=o(d,h),el){v=0;do{if(el=!1,tl=0,25<=v)throw Error(r(301));v+=1,cn=rn=null,i.updateQueue=null,_a.current=Zx,n=o(d,h)}while(el)}if(_a.current=Sa,i=rn!==null&&rn.next!==null,ji=0,cn=rn=Bt=null,ka=!1,i)throw Error(r(300));return n}function Ac(){var n=tl!==0;return tl=0,n}function Nr(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return cn===null?Bt.memoizedState=cn=n:cn=cn.next=n,cn}function lr(){if(rn===null){var n=Bt.alternate;n=n!==null?n.memoizedState:null}else n=rn.next;var i=cn===null?Bt.memoizedState:cn.next;if(i!==null)cn=i,rn=n;else{if(n===null)throw Error(r(310));rn=n,n={memoizedState:rn.memoizedState,baseState:rn.baseState,baseQueue:rn.baseQueue,queue:rn.queue,next:null},cn===null?Bt.memoizedState=cn=n:cn=cn.next=n}return cn}function nl(n,i){return typeof i=="function"?i(n):i}function Rc(n){var i=lr(),o=i.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=n;var d=rn,h=d.baseQueue,v=o.pending;if(v!==null){if(h!==null){var b=h.next;h.next=v.next,v.next=b}d.baseQueue=h=v,o.pending=null}if(h!==null){v=h.next,d=d.baseState;var A=b=null,L=null,U=v;do{var oe=U.lane;if((ji&oe)===oe)L!==null&&(L=L.next={lane:0,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),d=U.hasEagerState?U.eagerState:n(d,U.action);else{var ue={lane:oe,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null};L===null?(A=L=ue,b=d):L=L.next=ue,Bt.lanes|=oe,Ei|=oe}U=U.next}while(U!==null&&U!==v);L===null?b=d:L.next=A,hr(d,i.memoizedState)||(zn=!0),i.memoizedState=d,i.baseState=b,i.baseQueue=L,o.lastRenderedState=d}if(n=o.interleaved,n!==null){h=n;do v=h.lane,Bt.lanes|=v,Ei|=v,h=h.next;while(h!==n)}else h===null&&(o.lanes=0);return[i.memoizedState,o.dispatch]}function Pc(n){var i=lr(),o=i.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=n;var d=o.dispatch,h=o.pending,v=i.memoizedState;if(h!==null){o.pending=null;var b=h=h.next;do v=n(v,b.action),b=b.next;while(b!==h);hr(v,i.memoizedState)||(zn=!0),i.memoizedState=v,i.baseQueue===null&&(i.baseState=v),o.lastRenderedState=v}return[v,d]}function xm(){}function _m(n,i){var o=Bt,d=lr(),h=i(),v=!hr(d.memoizedState,h);if(v&&(d.memoizedState=h,zn=!0),d=d.queue,Lc(bm.bind(null,o,d,n),[n]),d.getSnapshot!==i||v||cn!==null&&cn.memoizedState.tag&1){if(o.flags|=2048,rl(9,wm.bind(null,o,d,h,i),void 0,null),un===null)throw Error(r(349));(ji&30)!==0||km(o,i,h)}return h}function km(n,i,o){n.flags|=16384,n={getSnapshot:i,value:o},i=Bt.updateQueue,i===null?(i={lastEffect:null,stores:null},Bt.updateQueue=i,i.stores=[n]):(o=i.stores,o===null?i.stores=[n]:o.push(n))}function wm(n,i,o,d){i.value=o,i.getSnapshot=d,Sm(i)&&Cm(n)}function bm(n,i,o){return o(function(){Sm(i)&&Cm(n)})}function Sm(n){var i=n.getSnapshot;n=n.value;try{var o=i();return!hr(n,o)}catch{return!0}}function Cm(n){var i=Or(n,1);i!==null&&_r(i,n,1,-1)}function Nm(n){var i=Nr();return typeof n=="function"&&(n=n()),i.memoizedState=i.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:nl,lastRenderedState:n},i.queue=n,n=n.dispatch=Wx.bind(null,Bt,n),[i.memoizedState,n]}function rl(n,i,o,d){return n={tag:n,create:i,destroy:o,deps:d,next:null},i=Bt.updateQueue,i===null?(i={lastEffect:null,stores:null},Bt.updateQueue=i,i.lastEffect=n.next=n):(o=i.lastEffect,o===null?i.lastEffect=n.next=n:(d=o.next,o.next=n,n.next=d,i.lastEffect=n)),n}function jm(){return lr().memoizedState}function wa(n,i,o,d){var h=Nr();Bt.flags|=n,h.memoizedState=rl(1|i,o,void 0,d===void 0?null:d)}function ba(n,i,o,d){var h=lr();d=d===void 0?null:d;var v=void 0;if(rn!==null){var b=rn.memoizedState;if(v=b.destroy,d!==null&&Ic(d,b.deps)){h.memoizedState=rl(i,o,v,d);return}}Bt.flags|=n,h.memoizedState=rl(1|i,o,v,d)}function Em(n,i){return wa(8390656,8,n,i)}function Lc(n,i){return ba(2048,8,n,i)}function Tm(n,i){return ba(4,2,n,i)}function Im(n,i){return ba(4,4,n,i)}function Dm(n,i){if(typeof i=="function")return n=n(),i(n),function(){i(null)};if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function Am(n,i,o){return o=o!=null?o.concat([n]):null,ba(4,4,Dm.bind(null,i,n),o)}function Mc(){}function Rm(n,i){var o=lr();i=i===void 0?null:i;var d=o.memoizedState;return d!==null&&i!==null&&Ic(i,d[1])?d[0]:(o.memoizedState=[n,i],n)}function Pm(n,i){var o=lr();i=i===void 0?null:i;var d=o.memoizedState;return d!==null&&i!==null&&Ic(i,d[1])?d[0]:(n=n(),o.memoizedState=[n,i],n)}function Lm(n,i,o){return(ji&21)===0?(n.baseState&&(n.baseState=!1,zn=!0),n.memoizedState=o):(hr(o,i)||(o=df(),Bt.lanes|=o,Ei|=o,n.baseState=!0),i)}function Vx(n,i){var o=xt;xt=o!==0&&4>o?o:4,n(!0);var d=Tc.transition;Tc.transition={};try{n(!1),i()}finally{xt=o,Tc.transition=d}}function Mm(){return lr().memoizedState}function Ux(n,i,o){var d=ai(n);if(o={lane:d,action:o,hasEagerState:!1,eagerState:null,next:null},Om(n))zm(i,o);else if(o=pm(n,i,o,d),o!==null){var h=An();_r(o,n,d,h),$m(o,i,d)}}function Wx(n,i,o){var d=ai(n),h={lane:d,action:o,hasEagerState:!1,eagerState:null,next:null};if(Om(n))zm(i,h);else{var v=n.alternate;if(n.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var b=i.lastRenderedState,A=v(b,o);if(h.hasEagerState=!0,h.eagerState=A,hr(A,b)){var L=i.interleaved;L===null?(h.next=h,bc(i)):(h.next=L.next,L.next=h),i.interleaved=h;return}}catch{}finally{}o=pm(n,i,h,d),o!==null&&(h=An(),_r(o,n,d,h),$m(o,i,d))}}function Om(n){var i=n.alternate;return n===Bt||i!==null&&i===Bt}function zm(n,i){el=ka=!0;var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}function $m(n,i,o){if((o&4194240)!==0){var d=i.lanes;d&=n.pendingLanes,o|=d,i.lanes=o,zo(n,o)}}var Sa={readContext:sr,useCallback:wn,useContext:wn,useEffect:wn,useImperativeHandle:wn,useInsertionEffect:wn,useLayoutEffect:wn,useMemo:wn,useReducer:wn,useRef:wn,useState:wn,useDebugValue:wn,useDeferredValue:wn,useTransition:wn,useMutableSource:wn,useSyncExternalStore:wn,useId:wn,unstable_isNewReconciler:!1},qx={readContext:sr,useCallback:function(n,i){return Nr().memoizedState=[n,i===void 0?null:i],n},useContext:sr,useEffect:Em,useImperativeHandle:function(n,i,o){return o=o!=null?o.concat([n]):null,wa(4194308,4,Dm.bind(null,i,n),o)},useLayoutEffect:function(n,i){return wa(4194308,4,n,i)},useInsertionEffect:function(n,i){return wa(4,2,n,i)},useMemo:function(n,i){var o=Nr();return i=i===void 0?null:i,n=n(),o.memoizedState=[n,i],n},useReducer:function(n,i,o){var d=Nr();return i=o!==void 0?o(i):i,d.memoizedState=d.baseState=i,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:i},d.queue=n,n=n.dispatch=Ux.bind(null,Bt,n),[d.memoizedState,n]},useRef:function(n){var i=Nr();return n={current:n},i.memoizedState=n},useState:Nm,useDebugValue:Mc,useDeferredValue:function(n){return Nr().memoizedState=n},useTransition:function(){var n=Nm(!1),i=n[0];return n=Vx.bind(null,n[1]),Nr().memoizedState=n,[i,n]},useMutableSource:function(){},useSyncExternalStore:function(n,i,o){var d=Bt,h=Nr();if(Pt){if(o===void 0)throw Error(r(407));o=o()}else{if(o=i(),un===null)throw Error(r(349));(ji&30)!==0||km(d,i,o)}h.memoizedState=o;var v={value:o,getSnapshot:i};return h.queue=v,Em(bm.bind(null,d,v,n),[n]),d.flags|=2048,rl(9,wm.bind(null,d,v,o,i),void 0,null),o},useId:function(){var n=Nr(),i=un.identifierPrefix;if(Pt){var o=Mr,d=Lr;o=(d&~(1<<32-pr(d)-1)).toString(32)+o,i=":"+i+"R"+o,o=tl++,0<o&&(i+="H"+o.toString(32)),i+=":"}else o=Hx++,i=":"+i+"r"+o.toString(32)+":";return n.memoizedState=i},unstable_isNewReconciler:!1},Kx={readContext:sr,useCallback:Rm,useContext:sr,useEffect:Lc,useImperativeHandle:Am,useInsertionEffect:Tm,useLayoutEffect:Im,useMemo:Pm,useReducer:Rc,useRef:jm,useState:function(){return Rc(nl)},useDebugValue:Mc,useDeferredValue:function(n){var i=lr();return Lm(i,rn.memoizedState,n)},useTransition:function(){var n=Rc(nl)[0],i=lr().memoizedState;return[n,i]},useMutableSource:xm,useSyncExternalStore:_m,useId:Mm,unstable_isNewReconciler:!1},Zx={readContext:sr,useCallback:Rm,useContext:sr,useEffect:Lc,useImperativeHandle:Am,useInsertionEffect:Tm,useLayoutEffect:Im,useMemo:Pm,useReducer:Pc,useRef:jm,useState:function(){return Pc(nl)},useDebugValue:Mc,useDeferredValue:function(n){var i=lr();return rn===null?i.memoizedState=n:Lm(i,rn.memoizedState,n)},useTransition:function(){var n=Pc(nl)[0],i=lr().memoizedState;return[n,i]},useMutableSource:xm,useSyncExternalStore:_m,useId:Mm,unstable_isNewReconciler:!1};function yr(n,i){if(n&&n.defaultProps){i=N({},i),n=n.defaultProps;for(var o in n)i[o]===void 0&&(i[o]=n[o]);return i}return i}function Oc(n,i,o,d){i=n.memoizedState,o=o(d,i),o=o==null?i:N({},i,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var Ca={isMounted:function(n){return(n=n._reactInternals)?K(n)===n:!1},enqueueSetState:function(n,i,o){n=n._reactInternals;var d=An(),h=ai(n),v=zr(d,h);v.payload=i,o!=null&&(v.callback=o),i=ri(n,v,h),i!==null&&(_r(i,n,h,d),ya(i,n,h))},enqueueReplaceState:function(n,i,o){n=n._reactInternals;var d=An(),h=ai(n),v=zr(d,h);v.tag=1,v.payload=i,o!=null&&(v.callback=o),i=ri(n,v,h),i!==null&&(_r(i,n,h,d),ya(i,n,h))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var o=An(),d=ai(n),h=zr(o,d);h.tag=2,i!=null&&(h.callback=i),i=ri(n,h,d),i!==null&&(_r(i,n,d,o),ya(i,n,d))}};function Bm(n,i,o,d,h,v,b){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(d,v,b):i.prototype&&i.prototype.isPureReactComponent?!Vs(o,d)||!Vs(h,v):!0}function Fm(n,i,o){var d=!1,h=ei,v=i.contextType;return typeof v=="object"&&v!==null?v=sr(v):(h=On(i)?wi:kn.current,d=i.contextTypes,v=(d=d!=null)?Gi(n,h):ei),i=new i(o,v),n.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Ca,n.stateNode=i,i._reactInternals=n,d&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=h,n.__reactInternalMemoizedMaskedChildContext=v),i}function Hm(n,i,o,d){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,d),i.state!==n&&Ca.enqueueReplaceState(i,i.state,null)}function zc(n,i,o,d){var h=n.stateNode;h.props=o,h.state=n.memoizedState,h.refs={},Sc(n);var v=i.contextType;typeof v=="object"&&v!==null?h.context=sr(v):(v=On(i)?wi:kn.current,h.context=Gi(n,v)),h.state=n.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(Oc(n,i,v,o),h.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(i=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),i!==h.state&&Ca.enqueueReplaceState(h,h.state,null),va(n,o,h,d),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308)}function ls(n,i){try{var o="",d=i;do o+=Se(d),d=d.return;while(d);var h=o}catch(v){h=`
|
|
39
|
+
Error generating stack: `+v.message+`
|
|
40
|
+
`+v.stack}return{value:n,source:i,stack:h,digest:null}}function $c(n,i,o){return{value:n,source:null,stack:o??null,digest:i??null}}function Bc(n,i){try{console.error(i.value)}catch(o){setTimeout(function(){throw o})}}var Yx=typeof WeakMap=="function"?WeakMap:Map;function Vm(n,i,o){o=zr(-1,o),o.tag=3,o.payload={element:null};var d=i.value;return o.callback=function(){Aa||(Aa=!0,tu=d),Bc(n,i)},o}function Um(n,i,o){o=zr(-1,o),o.tag=3;var d=n.type.getDerivedStateFromError;if(typeof d=="function"){var h=i.value;o.payload=function(){return d(h)},o.callback=function(){Bc(n,i)}}var v=n.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(o.callback=function(){Bc(n,i),typeof d!="function"&&(si===null?si=new Set([this]):si.add(this));var b=i.stack;this.componentDidCatch(i.value,{componentStack:b!==null?b:""})}),o}function Wm(n,i,o){var d=n.pingCache;if(d===null){d=n.pingCache=new Yx;var h=new Set;d.set(i,h)}else h=d.get(i),h===void 0&&(h=new Set,d.set(i,h));h.has(o)||(h.add(o),n=c_.bind(null,n,i,o),i.then(n,n))}function qm(n){do{var i;if((i=n.tag===13)&&(i=n.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return n;n=n.return}while(n!==null);return null}function Km(n,i,o,d,h){return(n.mode&1)===0?(n===i?n.flags|=65536:(n.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(i=zr(-1,1),i.tag=2,ri(o,i,1))),o.lanes|=1),n):(n.flags|=65536,n.lanes=h,n)}var Qx=M.ReactCurrentOwner,zn=!1;function Dn(n,i,o,d){i.child=n===null?mm(i,null,o,d):ns(i,n.child,o,d)}function Zm(n,i,o,d,h){o=o.render;var v=i.ref;return is(i,h),d=Dc(n,i,o,d,v,h),o=Ac(),n!==null&&!zn?(i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~h,$r(n,i,h)):(Pt&&o&&pc(i),i.flags|=1,Dn(n,i,d,h),i.child)}function Ym(n,i,o,d,h){if(n===null){var v=o.type;return typeof v=="function"&&!ou(v)&&v.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(i.tag=15,i.type=v,Qm(n,i,v,d,h)):(n=za(o.type,null,d,i,i.mode,h),n.ref=i.ref,n.return=i,i.child=n)}if(v=n.child,(n.lanes&h)===0){var b=v.memoizedProps;if(o=o.compare,o=o!==null?o:Vs,o(b,d)&&n.ref===i.ref)return $r(n,i,h)}return i.flags|=1,n=ci(v,d),n.ref=i.ref,n.return=i,i.child=n}function Qm(n,i,o,d,h){if(n!==null){var v=n.memoizedProps;if(Vs(v,d)&&n.ref===i.ref)if(zn=!1,i.pendingProps=d=v,(n.lanes&h)!==0)(n.flags&131072)!==0&&(zn=!0);else return i.lanes=n.lanes,$r(n,i,h)}return Fc(n,i,o,d,h)}function Xm(n,i,o){var d=i.pendingProps,h=d.children,v=n!==null?n.memoizedState:null;if(d.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},Tt(os,Qn),Qn|=o;else{if((o&1073741824)===0)return n=v!==null?v.baseLanes|o:o,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:n,cachePool:null,transitions:null},i.updateQueue=null,Tt(os,Qn),Qn|=n,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=v!==null?v.baseLanes:o,Tt(os,Qn),Qn|=d}else v!==null?(d=v.baseLanes|o,i.memoizedState=null):d=o,Tt(os,Qn),Qn|=d;return Dn(n,i,h,o),i.child}function Gm(n,i){var o=i.ref;(n===null&&o!==null||n!==null&&n.ref!==o)&&(i.flags|=512,i.flags|=2097152)}function Fc(n,i,o,d,h){var v=On(o)?wi:kn.current;return v=Gi(i,v),is(i,h),o=Dc(n,i,o,d,v,h),d=Ac(),n!==null&&!zn?(i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~h,$r(n,i,h)):(Pt&&d&&pc(i),i.flags|=1,Dn(n,i,o,h),i.child)}function Jm(n,i,o,d,h){if(On(o)){var v=!0;ca(i)}else v=!1;if(is(i,h),i.stateNode===null)ja(n,i),Fm(i,o,d),zc(i,o,d,h),d=!0;else if(n===null){var b=i.stateNode,A=i.memoizedProps;b.props=A;var L=b.context,U=o.contextType;typeof U=="object"&&U!==null?U=sr(U):(U=On(o)?wi:kn.current,U=Gi(i,U));var oe=o.getDerivedStateFromProps,ue=typeof oe=="function"||typeof b.getSnapshotBeforeUpdate=="function";ue||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(A!==d||L!==U)&&Hm(i,b,d,U),ni=!1;var ae=i.memoizedState;b.state=ae,va(i,d,b,h),L=i.memoizedState,A!==d||ae!==L||Mn.current||ni?(typeof oe=="function"&&(Oc(i,o,oe,d),L=i.memoizedState),(A=ni||Bm(i,o,A,d,ae,L,U))?(ue||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(i.flags|=4194308)):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=L),b.props=d,b.state=L,b.context=U,d=A):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{b=i.stateNode,hm(n,i),A=i.memoizedProps,U=i.type===i.elementType?A:yr(i.type,A),b.props=U,ue=i.pendingProps,ae=b.context,L=o.contextType,typeof L=="object"&&L!==null?L=sr(L):(L=On(o)?wi:kn.current,L=Gi(i,L));var je=o.getDerivedStateFromProps;(oe=typeof je=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(A!==ue||ae!==L)&&Hm(i,b,d,L),ni=!1,ae=i.memoizedState,b.state=ae,va(i,d,b,h);var Ae=i.memoizedState;A!==ue||ae!==Ae||Mn.current||ni?(typeof je=="function"&&(Oc(i,o,je,d),Ae=i.memoizedState),(U=ni||Bm(i,o,U,d,ae,Ae,L)||!1)?(oe||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(d,Ae,L),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(d,Ae,L)),typeof b.componentDidUpdate=="function"&&(i.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof b.componentDidUpdate!="function"||A===n.memoizedProps&&ae===n.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&ae===n.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=Ae),b.props=d,b.state=Ae,b.context=L,d=U):(typeof b.componentDidUpdate!="function"||A===n.memoizedProps&&ae===n.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&ae===n.memoizedState||(i.flags|=1024),d=!1)}return Hc(n,i,o,d,v,h)}function Hc(n,i,o,d,h,v){Gm(n,i);var b=(i.flags&128)!==0;if(!d&&!b)return h&&im(i,o,!1),$r(n,i,v);d=i.stateNode,Qx.current=i;var A=b&&typeof o.getDerivedStateFromError!="function"?null:d.render();return i.flags|=1,n!==null&&b?(i.child=ns(i,n.child,null,v),i.child=ns(i,null,A,v)):Dn(n,i,A,v),i.memoizedState=d.state,h&&im(i,o,!0),i.child}function ep(n){var i=n.stateNode;i.pendingContext?nm(n,i.pendingContext,i.pendingContext!==i.context):i.context&&nm(n,i.context,!1),Cc(n,i.containerInfo)}function tp(n,i,o,d,h){return ts(),vc(h),i.flags|=256,Dn(n,i,o,d),i.child}var Vc={dehydrated:null,treeContext:null,retryLane:0};function Uc(n){return{baseLanes:n,cachePool:null,transitions:null}}function np(n,i,o){var d=i.pendingProps,h=$t.current,v=!1,b=(i.flags&128)!==0,A;if((A=b)||(A=n!==null&&n.memoizedState===null?!1:(h&2)!==0),A?(v=!0,i.flags&=-129):(n===null||n.memoizedState!==null)&&(h|=1),Tt($t,h&1),n===null)return yc(i),n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((i.mode&1)===0?i.lanes=1:n.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(b=d.children,n=d.fallback,v?(d=i.mode,v=i.child,b={mode:"hidden",children:b},(d&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=b):v=$a(b,d,0,null),n=Ai(n,d,o,null),v.return=i,n.return=i,v.sibling=n,i.child=v,i.child.memoizedState=Uc(o),i.memoizedState=Vc,n):Wc(i,b));if(h=n.memoizedState,h!==null&&(A=h.dehydrated,A!==null))return Xx(n,i,b,d,A,h,o);if(v){v=d.fallback,b=i.mode,h=n.child,A=h.sibling;var L={mode:"hidden",children:d.children};return(b&1)===0&&i.child!==h?(d=i.child,d.childLanes=0,d.pendingProps=L,i.deletions=null):(d=ci(h,L),d.subtreeFlags=h.subtreeFlags&14680064),A!==null?v=ci(A,v):(v=Ai(v,b,o,null),v.flags|=2),v.return=i,d.return=i,d.sibling=v,i.child=d,d=v,v=i.child,b=n.child.memoizedState,b=b===null?Uc(o):{baseLanes:b.baseLanes|o,cachePool:null,transitions:b.transitions},v.memoizedState=b,v.childLanes=n.childLanes&~o,i.memoizedState=Vc,d}return v=n.child,n=v.sibling,d=ci(v,{mode:"visible",children:d.children}),(i.mode&1)===0&&(d.lanes=o),d.return=i,d.sibling=null,n!==null&&(o=i.deletions,o===null?(i.deletions=[n],i.flags|=16):o.push(n)),i.child=d,i.memoizedState=null,d}function Wc(n,i){return i=$a({mode:"visible",children:i},n.mode,0,null),i.return=n,n.child=i}function Na(n,i,o,d){return d!==null&&vc(d),ns(i,n.child,null,o),n=Wc(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function Xx(n,i,o,d,h,v,b){if(o)return i.flags&256?(i.flags&=-257,d=$c(Error(r(422))),Na(n,i,b,d)):i.memoizedState!==null?(i.child=n.child,i.flags|=128,null):(v=d.fallback,h=i.mode,d=$a({mode:"visible",children:d.children},h,0,null),v=Ai(v,h,b,null),v.flags|=2,d.return=i,v.return=i,d.sibling=v,i.child=d,(i.mode&1)!==0&&ns(i,n.child,null,b),i.child.memoizedState=Uc(b),i.memoizedState=Vc,v);if((i.mode&1)===0)return Na(n,i,b,null);if(h.data==="$!"){if(d=h.nextSibling&&h.nextSibling.dataset,d)var A=d.dgst;return d=A,v=Error(r(419)),d=$c(v,d,void 0),Na(n,i,b,d)}if(A=(b&n.childLanes)!==0,zn||A){if(d=un,d!==null){switch(b&-b){case 4:h=2;break;case 16:h=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:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(d.suspendedLanes|b))!==0?0:h,h!==0&&h!==v.retryLane&&(v.retryLane=h,Or(n,h),_r(d,n,h,-1))}return au(),d=$c(Error(r(421))),Na(n,i,b,d)}return h.data==="$?"?(i.flags|=128,i.child=n.child,i=u_.bind(null,n),h._reactRetry=i,null):(n=v.treeContext,Yn=Gr(h.nextSibling),Zn=i,Pt=!0,gr=null,n!==null&&(rr[ir++]=Lr,rr[ir++]=Mr,rr[ir++]=bi,Lr=n.id,Mr=n.overflow,bi=i),i=Wc(i,d.children),i.flags|=4096,i)}function rp(n,i,o){n.lanes|=i;var d=n.alternate;d!==null&&(d.lanes|=i),wc(n.return,i,o)}function qc(n,i,o,d,h){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:h}:(v.isBackwards=i,v.rendering=null,v.renderingStartTime=0,v.last=d,v.tail=o,v.tailMode=h)}function ip(n,i,o){var d=i.pendingProps,h=d.revealOrder,v=d.tail;if(Dn(n,i,d.children,o),d=$t.current,(d&2)!==0)d=d&1|2,i.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&rp(n,o,i);else if(n.tag===19)rp(n,o,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}d&=1}if(Tt($t,d),(i.mode&1)===0)i.memoizedState=null;else switch(h){case"forwards":for(o=i.child,h=null;o!==null;)n=o.alternate,n!==null&&xa(n)===null&&(h=o),o=o.sibling;o=h,o===null?(h=i.child,i.child=null):(h=o.sibling,o.sibling=null),qc(i,!1,h,o,v);break;case"backwards":for(o=null,h=i.child,i.child=null;h!==null;){if(n=h.alternate,n!==null&&xa(n)===null){i.child=h;break}n=h.sibling,h.sibling=o,o=h,h=n}qc(i,!0,o,null,v);break;case"together":qc(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function ja(n,i){(i.mode&1)===0&&n!==null&&(n.alternate=null,i.alternate=null,i.flags|=2)}function $r(n,i,o){if(n!==null&&(i.dependencies=n.dependencies),Ei|=i.lanes,(o&i.childLanes)===0)return null;if(n!==null&&i.child!==n.child)throw Error(r(153));if(i.child!==null){for(n=i.child,o=ci(n,n.pendingProps),i.child=o,o.return=i;n.sibling!==null;)n=n.sibling,o=o.sibling=ci(n,n.pendingProps),o.return=i;o.sibling=null}return i.child}function Gx(n,i,o){switch(i.tag){case 3:ep(i),ts();break;case 5:vm(i);break;case 1:On(i.type)&&ca(i);break;case 4:Cc(i,i.stateNode.containerInfo);break;case 10:var d=i.type._context,h=i.memoizedProps.value;Tt(ha,d._currentValue),d._currentValue=h;break;case 13:if(d=i.memoizedState,d!==null)return d.dehydrated!==null?(Tt($t,$t.current&1),i.flags|=128,null):(o&i.child.childLanes)!==0?np(n,i,o):(Tt($t,$t.current&1),n=$r(n,i,o),n!==null?n.sibling:null);Tt($t,$t.current&1);break;case 19:if(d=(o&i.childLanes)!==0,(n.flags&128)!==0){if(d)return ip(n,i,o);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Tt($t,$t.current),d)break;return null;case 22:case 23:return i.lanes=0,Xm(n,i,o)}return $r(n,i,o)}var sp,Kc,lp,ap;sp=function(n,i){for(var o=i.child;o!==null;){if(o.tag===5||o.tag===6)n.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Kc=function(){},lp=function(n,i,o,d){var h=n.memoizedProps;if(h!==d){n=i.stateNode,Ni(Cr.current);var v=null;switch(o){case"input":h=jt(n,h),d=jt(n,d),v=[];break;case"select":h=N({},h,{value:void 0}),d=N({},d,{value:void 0}),v=[];break;case"textarea":h=yt(n,h),d=yt(n,d),v=[];break;default:typeof h.onClick!="function"&&typeof d.onClick=="function"&&(n.onclick=la)}Y(o,d);var b;o=null;for(U in h)if(!d.hasOwnProperty(U)&&h.hasOwnProperty(U)&&h[U]!=null)if(U==="style"){var A=h[U];for(b in A)A.hasOwnProperty(b)&&(o||(o={}),o[b]="")}else U!=="dangerouslySetInnerHTML"&&U!=="children"&&U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&U!=="autoFocus"&&(l.hasOwnProperty(U)?v||(v=[]):(v=v||[]).push(U,null));for(U in d){var L=d[U];if(A=h!=null?h[U]:void 0,d.hasOwnProperty(U)&&L!==A&&(L!=null||A!=null))if(U==="style")if(A){for(b in A)!A.hasOwnProperty(b)||L&&L.hasOwnProperty(b)||(o||(o={}),o[b]="");for(b in L)L.hasOwnProperty(b)&&A[b]!==L[b]&&(o||(o={}),o[b]=L[b])}else o||(v||(v=[]),v.push(U,o)),o=L;else U==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,A=A?A.__html:void 0,L!=null&&A!==L&&(v=v||[]).push(U,L)):U==="children"?typeof L!="string"&&typeof L!="number"||(v=v||[]).push(U,""+L):U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&(l.hasOwnProperty(U)?(L!=null&&U==="onScroll"&&At("scroll",n),v||A===L||(v=[])):(v=v||[]).push(U,L))}o&&(v=v||[]).push("style",o);var U=v;(i.updateQueue=U)&&(i.flags|=4)}},ap=function(n,i,o,d){o!==d&&(i.flags|=4)};function il(n,i){if(!Pt)switch(n.tailMode){case"hidden":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:d.sibling=null}}function bn(n){var i=n.alternate!==null&&n.alternate.child===n.child,o=0,d=0;if(i)for(var h=n.child;h!==null;)o|=h.lanes|h.childLanes,d|=h.subtreeFlags&14680064,d|=h.flags&14680064,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)o|=h.lanes|h.childLanes,d|=h.subtreeFlags,d|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=d,n.childLanes=o,i}function Jx(n,i,o){var d=i.pendingProps;switch(hc(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bn(i),null;case 1:return On(i.type)&&oa(),bn(i),null;case 3:return d=i.stateNode,ss(),Rt(Mn),Rt(kn),Ec(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(n===null||n.child===null)&&(ma(i)?i.flags|=4:n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,gr!==null&&(iu(gr),gr=null))),Kc(n,i),bn(i),null;case 5:Nc(i);var h=Ni(Js.current);if(o=i.type,n!==null&&i.stateNode!=null)lp(n,i,o,d,h),n.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!d){if(i.stateNode===null)throw Error(r(166));return bn(i),null}if(n=Ni(Cr.current),ma(i)){d=i.stateNode,o=i.type;var v=i.memoizedProps;switch(d[Sr]=i,d[Zs]=v,n=(i.mode&1)!==0,o){case"dialog":At("cancel",d),At("close",d);break;case"iframe":case"object":case"embed":At("load",d);break;case"video":case"audio":for(h=0;h<Ws.length;h++)At(Ws[h],d);break;case"source":At("error",d);break;case"img":case"image":case"link":At("error",d),At("load",d);break;case"details":At("toggle",d);break;case"input":se(d,v),At("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!v.multiple},At("invalid",d);break;case"textarea":Yt(d,v),At("invalid",d)}Y(o,v),h=null;for(var b in v)if(v.hasOwnProperty(b)){var A=v[b];b==="children"?typeof A=="string"?d.textContent!==A&&(v.suppressHydrationWarning!==!0&&sa(d.textContent,A,n),h=["children",A]):typeof A=="number"&&d.textContent!==""+A&&(v.suppressHydrationWarning!==!0&&sa(d.textContent,A,n),h=["children",""+A]):l.hasOwnProperty(b)&&A!=null&&b==="onScroll"&&At("scroll",d)}switch(o){case"input":Nt(d),tn(d,v,!0);break;case"textarea":Nt(d),Ce(d);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(d.onclick=la)}d=h,i.updateQueue=d,d!==null&&(i.flags|=4)}else{b=h.nodeType===9?h:h.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=$(o)),n==="http://www.w3.org/1999/xhtml"?o==="script"?(n=b.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof d.is=="string"?n=b.createElement(o,{is:d.is}):(n=b.createElement(o),o==="select"&&(b=n,d.multiple?b.multiple=!0:d.size&&(b.size=d.size))):n=b.createElementNS(n,o),n[Sr]=i,n[Zs]=d,sp(n,i,!1,!1),i.stateNode=n;e:{switch(b=le(o,d),o){case"dialog":At("cancel",n),At("close",n),h=d;break;case"iframe":case"object":case"embed":At("load",n),h=d;break;case"video":case"audio":for(h=0;h<Ws.length;h++)At(Ws[h],n);h=d;break;case"source":At("error",n),h=d;break;case"img":case"image":case"link":At("error",n),At("load",n),h=d;break;case"details":At("toggle",n),h=d;break;case"input":se(n,d),h=jt(n,d),At("invalid",n);break;case"option":h=d;break;case"select":n._wrapperState={wasMultiple:!!d.multiple},h=N({},d,{value:void 0}),At("invalid",n);break;case"textarea":Yt(n,d),h=yt(n,d),At("invalid",n);break;default:h=d}Y(o,h),A=h;for(v in A)if(A.hasOwnProperty(v)){var L=A[v];v==="style"?yn(n,L):v==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&we(n,L)):v==="children"?typeof L=="string"?(o!=="textarea"||L!=="")&&Ve(n,L):typeof L=="number"&&Ve(n,""+L):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(l.hasOwnProperty(v)?L!=null&&v==="onScroll"&&At("scroll",n):L!=null&&T(n,v,L,b))}switch(o){case"input":Nt(n),tn(n,d,!1);break;case"textarea":Nt(n),Ce(n);break;case"option":d.value!=null&&n.setAttribute("value",""+ze(d.value));break;case"select":n.multiple=!!d.multiple,v=d.value,v!=null?Mt(n,!!d.multiple,v,!1):d.defaultValue!=null&&Mt(n,!!d.multiple,d.defaultValue,!0);break;default:typeof h.onClick=="function"&&(n.onclick=la)}switch(o){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return bn(i),null;case 6:if(n&&i.stateNode!=null)ap(n,i,n.memoizedProps,d);else{if(typeof d!="string"&&i.stateNode===null)throw Error(r(166));if(o=Ni(Js.current),Ni(Cr.current),ma(i)){if(d=i.stateNode,o=i.memoizedProps,d[Sr]=i,(v=d.nodeValue!==o)&&(n=Zn,n!==null))switch(n.tag){case 3:sa(d.nodeValue,o,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&sa(d.nodeValue,o,(n.mode&1)!==0)}v&&(i.flags|=4)}else d=(o.nodeType===9?o:o.ownerDocument).createTextNode(d),d[Sr]=i,i.stateNode=d}return bn(i),null;case 13:if(Rt($t),d=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Pt&&Yn!==null&&(i.mode&1)!==0&&(i.flags&128)===0)um(),ts(),i.flags|=98560,v=!1;else if(v=ma(i),d!==null&&d.dehydrated!==null){if(n===null){if(!v)throw Error(r(318));if(v=i.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[Sr]=i}else ts(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;bn(i),v=!1}else gr!==null&&(iu(gr),gr=null),v=!0;if(!v)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=o,i):(d=d!==null,d!==(n!==null&&n.memoizedState!==null)&&d&&(i.child.flags|=8192,(i.mode&1)!==0&&(n===null||($t.current&1)!==0?sn===0&&(sn=3):au())),i.updateQueue!==null&&(i.flags|=4),bn(i),null);case 4:return ss(),Kc(n,i),n===null&&qs(i.stateNode.containerInfo),bn(i),null;case 10:return kc(i.type._context),bn(i),null;case 17:return On(i.type)&&oa(),bn(i),null;case 19:if(Rt($t),v=i.memoizedState,v===null)return bn(i),null;if(d=(i.flags&128)!==0,b=v.rendering,b===null)if(d)il(v,!1);else{if(sn!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(b=xa(n),b!==null){for(i.flags|=128,il(v,!1),d=b.updateQueue,d!==null&&(i.updateQueue=d,i.flags|=4),i.subtreeFlags=0,d=o,o=i.child;o!==null;)v=o,n=d,v.flags&=14680066,b=v.alternate,b===null?(v.childLanes=0,v.lanes=n,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=b.childLanes,v.lanes=b.lanes,v.child=b.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=b.memoizedProps,v.memoizedState=b.memoizedState,v.updateQueue=b.updateQueue,v.type=b.type,n=b.dependencies,v.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),o=o.sibling;return Tt($t,$t.current&1|2),i.child}n=n.sibling}v.tail!==null&&Qt()>cs&&(i.flags|=128,d=!0,il(v,!1),i.lanes=4194304)}else{if(!d)if(n=xa(b),n!==null){if(i.flags|=128,d=!0,o=n.updateQueue,o!==null&&(i.updateQueue=o,i.flags|=4),il(v,!0),v.tail===null&&v.tailMode==="hidden"&&!b.alternate&&!Pt)return bn(i),null}else 2*Qt()-v.renderingStartTime>cs&&o!==1073741824&&(i.flags|=128,d=!0,il(v,!1),i.lanes=4194304);v.isBackwards?(b.sibling=i.child,i.child=b):(o=v.last,o!==null?o.sibling=b:i.child=b,v.last=b)}return v.tail!==null?(i=v.tail,v.rendering=i,v.tail=i.sibling,v.renderingStartTime=Qt(),i.sibling=null,o=$t.current,Tt($t,d?o&1|2:o&1),i):(bn(i),null);case 22:case 23:return lu(),d=i.memoizedState!==null,n!==null&&n.memoizedState!==null!==d&&(i.flags|=8192),d&&(i.mode&1)!==0?(Qn&1073741824)!==0&&(bn(i),i.subtreeFlags&6&&(i.flags|=8192)):bn(i),null;case 24:return null;case 25:return null}throw Error(r(156,i.tag))}function e_(n,i){switch(hc(i),i.tag){case 1:return On(i.type)&&oa(),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return ss(),Rt(Mn),Rt(kn),Ec(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 5:return Nc(i),null;case 13:if(Rt($t),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(r(340));ts()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return Rt($t),null;case 4:return ss(),null;case 10:return kc(i.type._context),null;case 22:case 23:return lu(),null;case 24:return null;default:return null}}var Ea=!1,Sn=!1,t_=typeof WeakSet=="function"?WeakSet:Set,De=null;function as(n,i){var o=n.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(d){Wt(n,i,d)}else o.current=null}function Zc(n,i,o){try{o()}catch(d){Wt(n,i,d)}}var op=!1;function n_(n,i){if(lc=Zl,n=Bf(),Go(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var h=d.anchorOffset,v=d.focusNode;d=d.focusOffset;try{o.nodeType,v.nodeType}catch{o=null;break e}var b=0,A=-1,L=-1,U=0,oe=0,ue=n,ae=null;t:for(;;){for(var je;ue!==o||h!==0&&ue.nodeType!==3||(A=b+h),ue!==v||d!==0&&ue.nodeType!==3||(L=b+d),ue.nodeType===3&&(b+=ue.nodeValue.length),(je=ue.firstChild)!==null;)ae=ue,ue=je;for(;;){if(ue===n)break t;if(ae===o&&++U===h&&(A=b),ae===v&&++oe===d&&(L=b),(je=ue.nextSibling)!==null)break;ue=ae,ae=ue.parentNode}ue=je}o=A===-1||L===-1?null:{start:A,end:L}}else o=null}o=o||{start:0,end:0}}else o=null;for(ac={focusedElem:n,selectionRange:o},Zl=!1,De=i;De!==null;)if(i=De,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,De=n;else for(;De!==null;){i=De;try{var Ae=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var Pe=Ae.memoizedProps,Xt=Ae.memoizedState,H=i.stateNode,z=H.getSnapshotBeforeUpdate(i.elementType===i.type?Pe:yr(i.type,Pe),Xt);H.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var V=i.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(he){Wt(i,i.return,he)}if(n=i.sibling,n!==null){n.return=i.return,De=n;break}De=i.return}return Ae=op,op=!1,Ae}function sl(n,i,o){var d=i.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var h=d=d.next;do{if((h.tag&n)===n){var v=h.destroy;h.destroy=void 0,v!==void 0&&Zc(i,o,v)}h=h.next}while(h!==d)}}function Ta(n,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var o=i=i.next;do{if((o.tag&n)===n){var d=o.create;o.destroy=d()}o=o.next}while(o!==i)}}function Yc(n){var i=n.ref;if(i!==null){var o=n.stateNode;switch(n.tag){case 5:n=o;break;default:n=o}typeof i=="function"?i(n):i.current=n}}function cp(n){var i=n.alternate;i!==null&&(n.alternate=null,cp(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&(delete i[Sr],delete i[Zs],delete i[dc],delete i[zx],delete i[$x])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function up(n){return n.tag===5||n.tag===3||n.tag===4}function dp(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||up(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Qc(n,i,o){var d=n.tag;if(d===5||d===6)n=n.stateNode,i?o.nodeType===8?o.parentNode.insertBefore(n,i):o.insertBefore(n,i):(o.nodeType===8?(i=o.parentNode,i.insertBefore(n,o)):(i=o,i.appendChild(n)),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=la));else if(d!==4&&(n=n.child,n!==null))for(Qc(n,i,o),n=n.sibling;n!==null;)Qc(n,i,o),n=n.sibling}function Xc(n,i,o){var d=n.tag;if(d===5||d===6)n=n.stateNode,i?o.insertBefore(n,i):o.appendChild(n);else if(d!==4&&(n=n.child,n!==null))for(Xc(n,i,o),n=n.sibling;n!==null;)Xc(n,i,o),n=n.sibling}var hn=null,vr=!1;function ii(n,i,o){for(o=o.child;o!==null;)fp(n,i,o),o=o.sibling}function fp(n,i,o){if(br&&typeof br.onCommitFiberUnmount=="function")try{br.onCommitFiberUnmount(Hl,o)}catch{}switch(o.tag){case 5:Sn||as(o,i);case 6:var d=hn,h=vr;hn=null,ii(n,i,o),hn=d,vr=h,hn!==null&&(vr?(n=hn,o=o.stateNode,n.nodeType===8?n.parentNode.removeChild(o):n.removeChild(o)):hn.removeChild(o.stateNode));break;case 18:hn!==null&&(vr?(n=hn,o=o.stateNode,n.nodeType===8?uc(n.parentNode,o):n.nodeType===1&&uc(n,o),Os(n)):uc(hn,o.stateNode));break;case 4:d=hn,h=vr,hn=o.stateNode.containerInfo,vr=!0,ii(n,i,o),hn=d,vr=h;break;case 0:case 11:case 14:case 15:if(!Sn&&(d=o.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){h=d=d.next;do{var v=h,b=v.destroy;v=v.tag,b!==void 0&&((v&2)!==0||(v&4)!==0)&&Zc(o,i,b),h=h.next}while(h!==d)}ii(n,i,o);break;case 1:if(!Sn&&(as(o,i),d=o.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=o.memoizedProps,d.state=o.memoizedState,d.componentWillUnmount()}catch(A){Wt(o,i,A)}ii(n,i,o);break;case 21:ii(n,i,o);break;case 22:o.mode&1?(Sn=(d=Sn)||o.memoizedState!==null,ii(n,i,o),Sn=d):ii(n,i,o);break;default:ii(n,i,o)}}function mp(n){var i=n.updateQueue;if(i!==null){n.updateQueue=null;var o=n.stateNode;o===null&&(o=n.stateNode=new t_),i.forEach(function(d){var h=d_.bind(null,n,d);o.has(d)||(o.add(d),d.then(h,h))})}}function xr(n,i){var o=i.deletions;if(o!==null)for(var d=0;d<o.length;d++){var h=o[d];try{var v=n,b=i,A=b;e:for(;A!==null;){switch(A.tag){case 5:hn=A.stateNode,vr=!1;break e;case 3:hn=A.stateNode.containerInfo,vr=!0;break e;case 4:hn=A.stateNode.containerInfo,vr=!0;break e}A=A.return}if(hn===null)throw Error(r(160));fp(v,b,h),hn=null,vr=!1;var L=h.alternate;L!==null&&(L.return=null),h.return=null}catch(U){Wt(h,i,U)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)pp(i,n),i=i.sibling}function pp(n,i){var o=n.alternate,d=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(xr(i,n),jr(n),d&4){try{sl(3,n,n.return),Ta(3,n)}catch(Pe){Wt(n,n.return,Pe)}try{sl(5,n,n.return)}catch(Pe){Wt(n,n.return,Pe)}}break;case 1:xr(i,n),jr(n),d&512&&o!==null&&as(o,o.return);break;case 5:if(xr(i,n),jr(n),d&512&&o!==null&&as(o,o.return),n.flags&32){var h=n.stateNode;try{Ve(h,"")}catch(Pe){Wt(n,n.return,Pe)}}if(d&4&&(h=n.stateNode,h!=null)){var v=n.memoizedProps,b=o!==null?o.memoizedProps:v,A=n.type,L=n.updateQueue;if(n.updateQueue=null,L!==null)try{A==="input"&&v.type==="radio"&&v.name!=null&&Ge(h,v),le(A,b);var U=le(A,v);for(b=0;b<L.length;b+=2){var oe=L[b],ue=L[b+1];oe==="style"?yn(h,ue):oe==="dangerouslySetInnerHTML"?we(h,ue):oe==="children"?Ve(h,ue):T(h,oe,ue,U)}switch(A){case"input":wt(h,v);break;case"textarea":ye(h,v);break;case"select":var ae=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!v.multiple;var je=v.value;je!=null?Mt(h,!!v.multiple,je,!1):ae!==!!v.multiple&&(v.defaultValue!=null?Mt(h,!!v.multiple,v.defaultValue,!0):Mt(h,!!v.multiple,v.multiple?[]:"",!1))}h[Zs]=v}catch(Pe){Wt(n,n.return,Pe)}}break;case 6:if(xr(i,n),jr(n),d&4){if(n.stateNode===null)throw Error(r(162));h=n.stateNode,v=n.memoizedProps;try{h.nodeValue=v}catch(Pe){Wt(n,n.return,Pe)}}break;case 3:if(xr(i,n),jr(n),d&4&&o!==null&&o.memoizedState.isDehydrated)try{Os(i.containerInfo)}catch(Pe){Wt(n,n.return,Pe)}break;case 4:xr(i,n),jr(n);break;case 13:xr(i,n),jr(n),h=n.child,h.flags&8192&&(v=h.memoizedState!==null,h.stateNode.isHidden=v,!v||h.alternate!==null&&h.alternate.memoizedState!==null||(eu=Qt())),d&4&&mp(n);break;case 22:if(oe=o!==null&&o.memoizedState!==null,n.mode&1?(Sn=(U=Sn)||oe,xr(i,n),Sn=U):xr(i,n),jr(n),d&8192){if(U=n.memoizedState!==null,(n.stateNode.isHidden=U)&&!oe&&(n.mode&1)!==0)for(De=n,oe=n.child;oe!==null;){for(ue=De=oe;De!==null;){switch(ae=De,je=ae.child,ae.tag){case 0:case 11:case 14:case 15:sl(4,ae,ae.return);break;case 1:as(ae,ae.return);var Ae=ae.stateNode;if(typeof Ae.componentWillUnmount=="function"){d=ae,o=ae.return;try{i=d,Ae.props=i.memoizedProps,Ae.state=i.memoizedState,Ae.componentWillUnmount()}catch(Pe){Wt(d,o,Pe)}}break;case 5:as(ae,ae.return);break;case 22:if(ae.memoizedState!==null){yp(ue);continue}}je!==null?(je.return=ae,De=je):yp(ue)}oe=oe.sibling}e:for(oe=null,ue=n;;){if(ue.tag===5){if(oe===null){oe=ue;try{h=ue.stateNode,U?(v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(A=ue.stateNode,L=ue.memoizedProps.style,b=L!=null&&L.hasOwnProperty("display")?L.display:null,A.style.display=Ut("display",b))}catch(Pe){Wt(n,n.return,Pe)}}}else if(ue.tag===6){if(oe===null)try{ue.stateNode.nodeValue=U?"":ue.memoizedProps}catch(Pe){Wt(n,n.return,Pe)}}else if((ue.tag!==22&&ue.tag!==23||ue.memoizedState===null||ue===n)&&ue.child!==null){ue.child.return=ue,ue=ue.child;continue}if(ue===n)break e;for(;ue.sibling===null;){if(ue.return===null||ue.return===n)break e;oe===ue&&(oe=null),ue=ue.return}oe===ue&&(oe=null),ue.sibling.return=ue.return,ue=ue.sibling}}break;case 19:xr(i,n),jr(n),d&4&&mp(n);break;case 21:break;default:xr(i,n),jr(n)}}function jr(n){var i=n.flags;if(i&2){try{e:{for(var o=n.return;o!==null;){if(up(o)){var d=o;break e}o=o.return}throw Error(r(160))}switch(d.tag){case 5:var h=d.stateNode;d.flags&32&&(Ve(h,""),d.flags&=-33);var v=dp(n);Xc(n,v,h);break;case 3:case 4:var b=d.stateNode.containerInfo,A=dp(n);Qc(n,A,b);break;default:throw Error(r(161))}}catch(L){Wt(n,n.return,L)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function r_(n,i,o){De=n,hp(n)}function hp(n,i,o){for(var d=(n.mode&1)!==0;De!==null;){var h=De,v=h.child;if(h.tag===22&&d){var b=h.memoizedState!==null||Ea;if(!b){var A=h.alternate,L=A!==null&&A.memoizedState!==null||Sn;A=Ea;var U=Sn;if(Ea=b,(Sn=L)&&!U)for(De=h;De!==null;)b=De,L=b.child,b.tag===22&&b.memoizedState!==null?vp(h):L!==null?(L.return=b,De=L):vp(h);for(;v!==null;)De=v,hp(v),v=v.sibling;De=h,Ea=A,Sn=U}gp(n)}else(h.subtreeFlags&8772)!==0&&v!==null?(v.return=h,De=v):gp(n)}}function gp(n){for(;De!==null;){var i=De;if((i.flags&8772)!==0){var o=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:Sn||Ta(5,i);break;case 1:var d=i.stateNode;if(i.flags&4&&!Sn)if(o===null)d.componentDidMount();else{var h=i.elementType===i.type?o.memoizedProps:yr(i.type,o.memoizedProps);d.componentDidUpdate(h,o.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var v=i.updateQueue;v!==null&&ym(i,v,d);break;case 3:var b=i.updateQueue;if(b!==null){if(o=null,i.child!==null)switch(i.child.tag){case 5:o=i.child.stateNode;break;case 1:o=i.child.stateNode}ym(i,b,o)}break;case 5:var A=i.stateNode;if(o===null&&i.flags&4){o=A;var L=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&o.focus();break;case"img":L.src&&(o.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var U=i.alternate;if(U!==null){var oe=U.memoizedState;if(oe!==null){var ue=oe.dehydrated;ue!==null&&Os(ue)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Sn||i.flags&512&&Yc(i)}catch(ae){Wt(i,i.return,ae)}}if(i===n){De=null;break}if(o=i.sibling,o!==null){o.return=i.return,De=o;break}De=i.return}}function yp(n){for(;De!==null;){var i=De;if(i===n){De=null;break}var o=i.sibling;if(o!==null){o.return=i.return,De=o;break}De=i.return}}function vp(n){for(;De!==null;){var i=De;try{switch(i.tag){case 0:case 11:case 15:var o=i.return;try{Ta(4,i)}catch(L){Wt(i,o,L)}break;case 1:var d=i.stateNode;if(typeof d.componentDidMount=="function"){var h=i.return;try{d.componentDidMount()}catch(L){Wt(i,h,L)}}var v=i.return;try{Yc(i)}catch(L){Wt(i,v,L)}break;case 5:var b=i.return;try{Yc(i)}catch(L){Wt(i,b,L)}}}catch(L){Wt(i,i.return,L)}if(i===n){De=null;break}var A=i.sibling;if(A!==null){A.return=i.return,De=A;break}De=i.return}}var i_=Math.ceil,Ia=M.ReactCurrentDispatcher,Gc=M.ReactCurrentOwner,ar=M.ReactCurrentBatchConfig,ct=0,un=null,Gt=null,gn=0,Qn=0,os=Jr(0),sn=0,ll=null,Ei=0,Da=0,Jc=0,al=null,$n=null,eu=0,cs=1/0,Br=null,Aa=!1,tu=null,si=null,Ra=!1,li=null,Pa=0,ol=0,nu=null,La=-1,Ma=0;function An(){return(ct&6)!==0?Qt():La!==-1?La:La=Qt()}function ai(n){return(n.mode&1)===0?1:(ct&2)!==0&&gn!==0?gn&-gn:Fx.transition!==null?(Ma===0&&(Ma=df()),Ma):(n=xt,n!==0||(n=window.event,n=n===void 0?16:_f(n.type)),n)}function _r(n,i,o,d){if(50<ol)throw ol=0,nu=null,Error(r(185));As(n,o,d),((ct&2)===0||n!==un)&&(n===un&&((ct&2)===0&&(Da|=o),sn===4&&oi(n,gn)),Bn(n,d),o===1&&ct===0&&(i.mode&1)===0&&(cs=Qt()+500,ua&&ti()))}function Bn(n,i){var o=n.callbackNode;Fv(n,i);var d=Wl(n,n===un?gn:0);if(d===0)o!==null&&of(o),n.callbackNode=null,n.callbackPriority=0;else if(i=d&-d,n.callbackPriority!==i){if(o!=null&&of(o),i===1)n.tag===0?Bx(_p.bind(null,n)):sm(_p.bind(null,n)),Mx(function(){(ct&6)===0&&ti()}),o=null;else{switch(ff(d)){case 1:o=Lo;break;case 4:o=cf;break;case 16:o=Fl;break;case 536870912:o=uf;break;default:o=Fl}o=Ep(o,xp.bind(null,n))}n.callbackPriority=i,n.callbackNode=o}}function xp(n,i){if(La=-1,Ma=0,(ct&6)!==0)throw Error(r(327));var o=n.callbackNode;if(us()&&n.callbackNode!==o)return null;var d=Wl(n,n===un?gn:0);if(d===0)return null;if((d&30)!==0||(d&n.expiredLanes)!==0||i)i=Oa(n,d);else{i=d;var h=ct;ct|=2;var v=wp();(un!==n||gn!==i)&&(Br=null,cs=Qt()+500,Ii(n,i));do try{a_();break}catch(A){kp(n,A)}while(!0);_c(),Ia.current=v,ct=h,Gt!==null?i=0:(un=null,gn=0,i=sn)}if(i!==0){if(i===2&&(h=Mo(n),h!==0&&(d=h,i=ru(n,h))),i===1)throw o=ll,Ii(n,0),oi(n,d),Bn(n,Qt()),o;if(i===6)oi(n,d);else{if(h=n.current.alternate,(d&30)===0&&!s_(h)&&(i=Oa(n,d),i===2&&(v=Mo(n),v!==0&&(d=v,i=ru(n,v))),i===1))throw o=ll,Ii(n,0),oi(n,d),Bn(n,Qt()),o;switch(n.finishedWork=h,n.finishedLanes=d,i){case 0:case 1:throw Error(r(345));case 2:Di(n,$n,Br);break;case 3:if(oi(n,d),(d&130023424)===d&&(i=eu+500-Qt(),10<i)){if(Wl(n,0)!==0)break;if(h=n.suspendedLanes,(h&d)!==d){An(),n.pingedLanes|=n.suspendedLanes&h;break}n.timeoutHandle=cc(Di.bind(null,n,$n,Br),i);break}Di(n,$n,Br);break;case 4:if(oi(n,d),(d&4194240)===d)break;for(i=n.eventTimes,h=-1;0<d;){var b=31-pr(d);v=1<<b,b=i[b],b>h&&(h=b),d&=~v}if(d=h,d=Qt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*i_(d/1960))-d,10<d){n.timeoutHandle=cc(Di.bind(null,n,$n,Br),d);break}Di(n,$n,Br);break;case 5:Di(n,$n,Br);break;default:throw Error(r(329))}}}return Bn(n,Qt()),n.callbackNode===o?xp.bind(null,n):null}function ru(n,i){var o=al;return n.current.memoizedState.isDehydrated&&(Ii(n,i).flags|=256),n=Oa(n,i),n!==2&&(i=$n,$n=o,i!==null&&iu(i)),n}function iu(n){$n===null?$n=n:$n.push.apply($n,n)}function s_(n){for(var i=n;;){if(i.flags&16384){var o=i.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var d=0;d<o.length;d++){var h=o[d],v=h.getSnapshot;h=h.value;try{if(!hr(v(),h))return!1}catch{return!1}}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function oi(n,i){for(i&=~Jc,i&=~Da,n.suspendedLanes|=i,n.pingedLanes&=~i,n=n.expirationTimes;0<i;){var o=31-pr(i),d=1<<o;n[o]=-1,i&=~d}}function _p(n){if((ct&6)!==0)throw Error(r(327));us();var i=Wl(n,0);if((i&1)===0)return Bn(n,Qt()),null;var o=Oa(n,i);if(n.tag!==0&&o===2){var d=Mo(n);d!==0&&(i=d,o=ru(n,d))}if(o===1)throw o=ll,Ii(n,0),oi(n,i),Bn(n,Qt()),o;if(o===6)throw Error(r(345));return n.finishedWork=n.current.alternate,n.finishedLanes=i,Di(n,$n,Br),Bn(n,Qt()),null}function su(n,i){var o=ct;ct|=1;try{return n(i)}finally{ct=o,ct===0&&(cs=Qt()+500,ua&&ti())}}function Ti(n){li!==null&&li.tag===0&&(ct&6)===0&&us();var i=ct;ct|=1;var o=ar.transition,d=xt;try{if(ar.transition=null,xt=1,n)return n()}finally{xt=d,ar.transition=o,ct=i,(ct&6)===0&&ti()}}function lu(){Qn=os.current,Rt(os)}function Ii(n,i){n.finishedWork=null,n.finishedLanes=0;var o=n.timeoutHandle;if(o!==-1&&(n.timeoutHandle=-1,Lx(o)),Gt!==null)for(o=Gt.return;o!==null;){var d=o;switch(hc(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&oa();break;case 3:ss(),Rt(Mn),Rt(kn),Ec();break;case 5:Nc(d);break;case 4:ss();break;case 13:Rt($t);break;case 19:Rt($t);break;case 10:kc(d.type._context);break;case 22:case 23:lu()}o=o.return}if(un=n,Gt=n=ci(n.current,null),gn=Qn=i,sn=0,ll=null,Jc=Da=Ei=0,$n=al=null,Ci!==null){for(i=0;i<Ci.length;i++)if(o=Ci[i],d=o.interleaved,d!==null){o.interleaved=null;var h=d.next,v=o.pending;if(v!==null){var b=v.next;v.next=h,d.next=b}o.pending=d}Ci=null}return n}function kp(n,i){do{var o=Gt;try{if(_c(),_a.current=Sa,ka){for(var d=Bt.memoizedState;d!==null;){var h=d.queue;h!==null&&(h.pending=null),d=d.next}ka=!1}if(ji=0,cn=rn=Bt=null,el=!1,tl=0,Gc.current=null,o===null||o.return===null){sn=1,ll=i,Gt=null;break}e:{var v=n,b=o.return,A=o,L=i;if(i=gn,A.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var U=L,oe=A,ue=oe.tag;if((oe.mode&1)===0&&(ue===0||ue===11||ue===15)){var ae=oe.alternate;ae?(oe.updateQueue=ae.updateQueue,oe.memoizedState=ae.memoizedState,oe.lanes=ae.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var je=qm(b);if(je!==null){je.flags&=-257,Km(je,b,A,v,i),je.mode&1&&Wm(v,U,i),i=je,L=U;var Ae=i.updateQueue;if(Ae===null){var Pe=new Set;Pe.add(L),i.updateQueue=Pe}else Ae.add(L);break e}else{if((i&1)===0){Wm(v,U,i),au();break e}L=Error(r(426))}}else if(Pt&&A.mode&1){var Xt=qm(b);if(Xt!==null){(Xt.flags&65536)===0&&(Xt.flags|=256),Km(Xt,b,A,v,i),vc(ls(L,A));break e}}v=L=ls(L,A),sn!==4&&(sn=2),al===null?al=[v]:al.push(v),v=b;do{switch(v.tag){case 3:v.flags|=65536,i&=-i,v.lanes|=i;var H=Vm(v,L,i);gm(v,H);break e;case 1:A=L;var z=v.type,V=v.stateNode;if((v.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(si===null||!si.has(V)))){v.flags|=65536,i&=-i,v.lanes|=i;var he=Um(v,A,i);gm(v,he);break e}}v=v.return}while(v!==null)}Sp(o)}catch(Me){i=Me,Gt===o&&o!==null&&(Gt=o=o.return);continue}break}while(!0)}function wp(){var n=Ia.current;return Ia.current=Sa,n===null?Sa:n}function au(){(sn===0||sn===3||sn===2)&&(sn=4),un===null||(Ei&268435455)===0&&(Da&268435455)===0||oi(un,gn)}function Oa(n,i){var o=ct;ct|=2;var d=wp();(un!==n||gn!==i)&&(Br=null,Ii(n,i));do try{l_();break}catch(h){kp(n,h)}while(!0);if(_c(),ct=o,Ia.current=d,Gt!==null)throw Error(r(261));return un=null,gn=0,sn}function l_(){for(;Gt!==null;)bp(Gt)}function a_(){for(;Gt!==null&&!Av();)bp(Gt)}function bp(n){var i=jp(n.alternate,n,Qn);n.memoizedProps=n.pendingProps,i===null?Sp(n):Gt=i,Gc.current=null}function Sp(n){var i=n;do{var o=i.alternate;if(n=i.return,(i.flags&32768)===0){if(o=Jx(o,i,Qn),o!==null){Gt=o;return}}else{if(o=e_(o,i),o!==null){o.flags&=32767,Gt=o;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{sn=6,Gt=null;return}}if(i=i.sibling,i!==null){Gt=i;return}Gt=i=n}while(i!==null);sn===0&&(sn=5)}function Di(n,i,o){var d=xt,h=ar.transition;try{ar.transition=null,xt=1,o_(n,i,o,d)}finally{ar.transition=h,xt=d}return null}function o_(n,i,o,d){do us();while(li!==null);if((ct&6)!==0)throw Error(r(327));o=n.finishedWork;var h=n.finishedLanes;if(o===null)return null;if(n.finishedWork=null,n.finishedLanes=0,o===n.current)throw Error(r(177));n.callbackNode=null,n.callbackPriority=0;var v=o.lanes|o.childLanes;if(Hv(n,v),n===un&&(Gt=un=null,gn=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Ra||(Ra=!0,Ep(Fl,function(){return us(),null})),v=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||v){v=ar.transition,ar.transition=null;var b=xt;xt=1;var A=ct;ct|=4,Gc.current=null,n_(n,o),pp(o,n),Ex(ac),Zl=!!lc,ac=lc=null,n.current=o,r_(o),Rv(),ct=A,xt=b,ar.transition=v}else n.current=o;if(Ra&&(Ra=!1,li=n,Pa=h),v=n.pendingLanes,v===0&&(si=null),Mv(o.stateNode),Bn(n,Qt()),i!==null)for(d=n.onRecoverableError,o=0;o<i.length;o++)h=i[o],d(h.value,{componentStack:h.stack,digest:h.digest});if(Aa)throw Aa=!1,n=tu,tu=null,n;return(Pa&1)!==0&&n.tag!==0&&us(),v=n.pendingLanes,(v&1)!==0?n===nu?ol++:(ol=0,nu=n):ol=0,ti(),null}function us(){if(li!==null){var n=ff(Pa),i=ar.transition,o=xt;try{if(ar.transition=null,xt=16>n?16:n,li===null)var d=!1;else{if(n=li,li=null,Pa=0,(ct&6)!==0)throw Error(r(331));var h=ct;for(ct|=4,De=n.current;De!==null;){var v=De,b=v.child;if((De.flags&16)!==0){var A=v.deletions;if(A!==null){for(var L=0;L<A.length;L++){var U=A[L];for(De=U;De!==null;){var oe=De;switch(oe.tag){case 0:case 11:case 15:sl(8,oe,v)}var ue=oe.child;if(ue!==null)ue.return=oe,De=ue;else for(;De!==null;){oe=De;var ae=oe.sibling,je=oe.return;if(cp(oe),oe===U){De=null;break}if(ae!==null){ae.return=je,De=ae;break}De=je}}}var Ae=v.alternate;if(Ae!==null){var Pe=Ae.child;if(Pe!==null){Ae.child=null;do{var Xt=Pe.sibling;Pe.sibling=null,Pe=Xt}while(Pe!==null)}}De=v}}if((v.subtreeFlags&2064)!==0&&b!==null)b.return=v,De=b;else e:for(;De!==null;){if(v=De,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:sl(9,v,v.return)}var H=v.sibling;if(H!==null){H.return=v.return,De=H;break e}De=v.return}}var z=n.current;for(De=z;De!==null;){b=De;var V=b.child;if((b.subtreeFlags&2064)!==0&&V!==null)V.return=b,De=V;else e:for(b=z;De!==null;){if(A=De,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:Ta(9,A)}}catch(Me){Wt(A,A.return,Me)}if(A===b){De=null;break e}var he=A.sibling;if(he!==null){he.return=A.return,De=he;break e}De=A.return}}if(ct=h,ti(),br&&typeof br.onPostCommitFiberRoot=="function")try{br.onPostCommitFiberRoot(Hl,n)}catch{}d=!0}return d}finally{xt=o,ar.transition=i}}return!1}function Cp(n,i,o){i=ls(o,i),i=Vm(n,i,1),n=ri(n,i,1),i=An(),n!==null&&(As(n,1,i),Bn(n,i))}function Wt(n,i,o){if(n.tag===3)Cp(n,n,o);else for(;i!==null;){if(i.tag===3){Cp(i,n,o);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(si===null||!si.has(d))){n=ls(o,n),n=Um(i,n,1),i=ri(i,n,1),n=An(),i!==null&&(As(i,1,n),Bn(i,n));break}}i=i.return}}function c_(n,i,o){var d=n.pingCache;d!==null&&d.delete(i),i=An(),n.pingedLanes|=n.suspendedLanes&o,un===n&&(gn&o)===o&&(sn===4||sn===3&&(gn&130023424)===gn&&500>Qt()-eu?Ii(n,0):Jc|=o),Bn(n,i)}function Np(n,i){i===0&&((n.mode&1)===0?i=1:(i=Ul,Ul<<=1,(Ul&130023424)===0&&(Ul=4194304)));var o=An();n=Or(n,i),n!==null&&(As(n,i,o),Bn(n,o))}function u_(n){var i=n.memoizedState,o=0;i!==null&&(o=i.retryLane),Np(n,o)}function d_(n,i){var o=0;switch(n.tag){case 13:var d=n.stateNode,h=n.memoizedState;h!==null&&(o=h.retryLane);break;case 19:d=n.stateNode;break;default:throw Error(r(314))}d!==null&&d.delete(i),Np(n,o)}var jp;jp=function(n,i,o){if(n!==null)if(n.memoizedProps!==i.pendingProps||Mn.current)zn=!0;else{if((n.lanes&o)===0&&(i.flags&128)===0)return zn=!1,Gx(n,i,o);zn=(n.flags&131072)!==0}else zn=!1,Pt&&(i.flags&1048576)!==0&&lm(i,fa,i.index);switch(i.lanes=0,i.tag){case 2:var d=i.type;ja(n,i),n=i.pendingProps;var h=Gi(i,kn.current);is(i,o),h=Dc(null,i,d,n,h,o);var v=Ac();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,On(d)?(v=!0,ca(i)):v=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,Sc(i),h.updater=Ca,i.stateNode=h,h._reactInternals=i,zc(i,d,n,o),i=Hc(null,i,d,!0,v,o)):(i.tag=0,Pt&&v&&pc(i),Dn(null,i,h,o),i=i.child),i;case 16:d=i.elementType;e:{switch(ja(n,i),n=i.pendingProps,h=d._init,d=h(d._payload),i.type=d,h=i.tag=m_(d),n=yr(d,n),h){case 0:i=Fc(null,i,d,n,o);break e;case 1:i=Jm(null,i,d,n,o);break e;case 11:i=Zm(null,i,d,n,o);break e;case 14:i=Ym(null,i,d,yr(d.type,n),o);break e}throw Error(r(306,d,""))}return i;case 0:return d=i.type,h=i.pendingProps,h=i.elementType===d?h:yr(d,h),Fc(n,i,d,h,o);case 1:return d=i.type,h=i.pendingProps,h=i.elementType===d?h:yr(d,h),Jm(n,i,d,h,o);case 3:e:{if(ep(i),n===null)throw Error(r(387));d=i.pendingProps,v=i.memoizedState,h=v.element,hm(n,i),va(i,d,null,o);var b=i.memoizedState;if(d=b.element,v.isDehydrated)if(v={element:d,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){h=ls(Error(r(423)),i),i=tp(n,i,d,o,h);break e}else if(d!==h){h=ls(Error(r(424)),i),i=tp(n,i,d,o,h);break e}else for(Yn=Gr(i.stateNode.containerInfo.firstChild),Zn=i,Pt=!0,gr=null,o=mm(i,null,d,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(ts(),d===h){i=$r(n,i,o);break e}Dn(n,i,d,o)}i=i.child}return i;case 5:return vm(i),n===null&&yc(i),d=i.type,h=i.pendingProps,v=n!==null?n.memoizedProps:null,b=h.children,oc(d,h)?b=null:v!==null&&oc(d,v)&&(i.flags|=32),Gm(n,i),Dn(n,i,b,o),i.child;case 6:return n===null&&yc(i),null;case 13:return np(n,i,o);case 4:return Cc(i,i.stateNode.containerInfo),d=i.pendingProps,n===null?i.child=ns(i,null,d,o):Dn(n,i,d,o),i.child;case 11:return d=i.type,h=i.pendingProps,h=i.elementType===d?h:yr(d,h),Zm(n,i,d,h,o);case 7:return Dn(n,i,i.pendingProps,o),i.child;case 8:return Dn(n,i,i.pendingProps.children,o),i.child;case 12:return Dn(n,i,i.pendingProps.children,o),i.child;case 10:e:{if(d=i.type._context,h=i.pendingProps,v=i.memoizedProps,b=h.value,Tt(ha,d._currentValue),d._currentValue=b,v!==null)if(hr(v.value,b)){if(v.children===h.children&&!Mn.current){i=$r(n,i,o);break e}}else for(v=i.child,v!==null&&(v.return=i);v!==null;){var A=v.dependencies;if(A!==null){b=v.child;for(var L=A.firstContext;L!==null;){if(L.context===d){if(v.tag===1){L=zr(-1,o&-o),L.tag=2;var U=v.updateQueue;if(U!==null){U=U.shared;var oe=U.pending;oe===null?L.next=L:(L.next=oe.next,oe.next=L),U.pending=L}}v.lanes|=o,L=v.alternate,L!==null&&(L.lanes|=o),wc(v.return,o,i),A.lanes|=o;break}L=L.next}}else if(v.tag===10)b=v.type===i.type?null:v.child;else if(v.tag===18){if(b=v.return,b===null)throw Error(r(341));b.lanes|=o,A=b.alternate,A!==null&&(A.lanes|=o),wc(b,o,i),b=v.sibling}else b=v.child;if(b!==null)b.return=v;else for(b=v;b!==null;){if(b===i){b=null;break}if(v=b.sibling,v!==null){v.return=b.return,b=v;break}b=b.return}v=b}Dn(n,i,h.children,o),i=i.child}return i;case 9:return h=i.type,d=i.pendingProps.children,is(i,o),h=sr(h),d=d(h),i.flags|=1,Dn(n,i,d,o),i.child;case 14:return d=i.type,h=yr(d,i.pendingProps),h=yr(d.type,h),Ym(n,i,d,h,o);case 15:return Qm(n,i,i.type,i.pendingProps,o);case 17:return d=i.type,h=i.pendingProps,h=i.elementType===d?h:yr(d,h),ja(n,i),i.tag=1,On(d)?(n=!0,ca(i)):n=!1,is(i,o),Fm(i,d,h),zc(i,d,h,o),Hc(null,i,d,!0,n,o);case 19:return ip(n,i,o);case 22:return Xm(n,i,o)}throw Error(r(156,i.tag))};function Ep(n,i){return af(n,i)}function f_(n,i,o,d){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function or(n,i,o,d){return new f_(n,i,o,d)}function ou(n){return n=n.prototype,!(!n||!n.isReactComponent)}function m_(n){if(typeof n=="function")return ou(n)?1:0;if(n!=null){if(n=n.$$typeof,n===ne)return 11;if(n===X)return 14}return 2}function ci(n,i){var o=n.alternate;return o===null?(o=or(n.tag,i,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=i,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&14680064,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,i=n.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o}function za(n,i,o,d,h,v){var b=2;if(d=n,typeof n=="function")ou(n)&&(b=1);else if(typeof n=="string")b=5;else e:switch(n){case B:return Ai(o.children,h,v,i);case Q:b=8,h|=8;break;case te:return n=or(12,o,i,h|2),n.elementType=te,n.lanes=v,n;case _e:return n=or(13,o,i,h),n.elementType=_e,n.lanes=v,n;case ie:return n=or(19,o,i,h),n.elementType=ie,n.lanes=v,n;case ve:return $a(o,h,v,i);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case O:b=10;break e;case W:b=9;break e;case ne:b=11;break e;case X:b=14;break e;case J:b=16,d=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return i=or(b,o,i,h),i.elementType=n,i.type=d,i.lanes=v,i}function Ai(n,i,o,d){return n=or(7,n,d,i),n.lanes=o,n}function $a(n,i,o,d){return n=or(22,n,d,i),n.elementType=ve,n.lanes=o,n.stateNode={isHidden:!1},n}function cu(n,i,o){return n=or(6,n,null,i),n.lanes=o,n}function uu(n,i,o){return i=or(4,n.children!==null?n.children:[],n.key,i),i.lanes=o,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}function p_(n,i,o,d,h){this.tag=i,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Oo(0),this.expirationTimes=Oo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oo(0),this.identifierPrefix=d,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function du(n,i,o,d,h,v,b,A,L){return n=new p_(n,i,o,A,L),i===1?(i=1,v===!0&&(i|=8)):i=0,v=or(3,null,null,i),n.current=v,v.stateNode=n,v.memoizedState={element:d,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sc(v),n}function h_(n,i,o){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:d==null?null:""+d,children:n,containerInfo:i,implementation:o}}function Tp(n){if(!n)return ei;n=n._reactInternals;e:{if(K(n)!==n||n.tag!==1)throw Error(r(170));var i=n;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(On(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(r(171))}if(n.tag===1){var o=n.type;if(On(o))return rm(n,o,i)}return i}function Ip(n,i,o,d,h,v,b,A,L){return n=du(o,d,!0,n,h,v,b,A,L),n.context=Tp(null),o=n.current,d=An(),h=ai(o),v=zr(d,h),v.callback=i??null,ri(o,v,h),n.current.lanes=h,As(n,h,d),Bn(n,d),n}function Ba(n,i,o,d){var h=i.current,v=An(),b=ai(h);return o=Tp(o),i.context===null?i.context=o:i.pendingContext=o,i=zr(v,b),i.payload={element:n},d=d===void 0?null:d,d!==null&&(i.callback=d),n=ri(h,i,b),n!==null&&(_r(n,h,b,v),ya(n,h,b)),b}function Fa(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function Dp(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<i?o:i}}function fu(n,i){Dp(n,i),(n=n.alternate)&&Dp(n,i)}function g_(){return null}var Ap=typeof reportError=="function"?reportError:function(n){console.error(n)};function mu(n){this._internalRoot=n}Ha.prototype.render=mu.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(r(409));Ba(n,i,null,null)},Ha.prototype.unmount=mu.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Ti(function(){Ba(null,n,null,null)}),i[Rr]=null}};function Ha(n){this._internalRoot=n}Ha.prototype.unstable_scheduleHydration=function(n){if(n){var i=hf();n={blockedOn:null,target:n,priority:i};for(var o=0;o<Yr.length&&i!==0&&i<Yr[o].priority;o++);Yr.splice(o,0,n),o===0&&vf(n)}};function pu(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Va(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function Rp(){}function y_(n,i,o,d,h){if(h){if(typeof d=="function"){var v=d;d=function(){var U=Fa(b);v.call(U)}}var b=Ip(i,d,n,0,null,!1,!1,"",Rp);return n._reactRootContainer=b,n[Rr]=b.current,qs(n.nodeType===8?n.parentNode:n),Ti(),b}for(;h=n.lastChild;)n.removeChild(h);if(typeof d=="function"){var A=d;d=function(){var U=Fa(L);A.call(U)}}var L=du(n,0,!1,null,null,!1,!1,"",Rp);return n._reactRootContainer=L,n[Rr]=L.current,qs(n.nodeType===8?n.parentNode:n),Ti(function(){Ba(i,L,o,d)}),L}function Ua(n,i,o,d,h){var v=o._reactRootContainer;if(v){var b=v;if(typeof h=="function"){var A=h;h=function(){var L=Fa(b);A.call(L)}}Ba(i,b,n,h)}else b=y_(o,i,n,h,d);return Fa(b)}mf=function(n){switch(n.tag){case 3:var i=n.stateNode;if(i.current.memoizedState.isDehydrated){var o=Ds(i.pendingLanes);o!==0&&(zo(i,o|1),Bn(i,Qt()),(ct&6)===0&&(cs=Qt()+500,ti()))}break;case 13:Ti(function(){var d=Or(n,1);if(d!==null){var h=An();_r(d,n,1,h)}}),fu(n,1)}},$o=function(n){if(n.tag===13){var i=Or(n,134217728);if(i!==null){var o=An();_r(i,n,134217728,o)}fu(n,134217728)}},pf=function(n){if(n.tag===13){var i=ai(n),o=Or(n,i);if(o!==null){var d=An();_r(o,n,i,d)}fu(n,i)}},hf=function(){return xt},gf=function(n,i){var o=xt;try{return xt=n,i()}finally{xt=o}},Tn=function(n,i,o){switch(i){case"input":if(wt(n,o),i=o.name,o.type==="radio"&&i!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<o.length;i++){var d=o[i];if(d!==n&&d.form===n.form){var h=aa(d);if(!h)throw Error(r(90));Lt(d),wt(d,h)}}}break;case"textarea":ye(n,o);break;case"select":i=o.value,i!=null&&Mt(n,!!o.multiple,i,!1)}},mn=su,on=Ti;var v_={usingClientEntryPoint:!1,Events:[Ys,Qi,aa,zt,Pn,su]},cl={findFiberByHostInstance:ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},x_={bundleType:cl.bundleType,version:cl.version,rendererPackageName:cl.rendererPackageName,rendererConfig:cl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=sf(n),n===null?null:n.stateNode},findFiberByHostInstance:cl.findFiberByHostInstance||g_,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 Wa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wa.isDisabled&&Wa.supportsFiber)try{Hl=Wa.inject(x_),br=Wa}catch{}}return Fn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v_,Fn.createPortal=function(n,i){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!pu(i))throw Error(r(200));return h_(n,i,null,o)},Fn.createRoot=function(n,i){if(!pu(n))throw Error(r(299));var o=!1,d="",h=Ap;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onRecoverableError!==void 0&&(h=i.onRecoverableError)),i=du(n,1,!1,null,null,o,!1,d,h),n[Rr]=i.current,qs(n.nodeType===8?n.parentNode:n),new mu(i)},Fn.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=sf(i),n=n===null?null:n.stateNode,n},Fn.flushSync=function(n){return Ti(n)},Fn.hydrate=function(n,i,o){if(!Va(i))throw Error(r(200));return Ua(null,n,i,!0,o)},Fn.hydrateRoot=function(n,i,o){if(!pu(n))throw Error(r(405));var d=o!=null&&o.hydratedSources||null,h=!1,v="",b=Ap;if(o!=null&&(o.unstable_strictMode===!0&&(h=!0),o.identifierPrefix!==void 0&&(v=o.identifierPrefix),o.onRecoverableError!==void 0&&(b=o.onRecoverableError)),i=Ip(i,null,n,1,o??null,h,!1,v,b),n[Rr]=i.current,qs(n),d)for(n=0;n<d.length;n++)o=d[n],h=o._getVersion,h=h(o._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[o,h]:i.mutableSourceEagerHydrationData.push(o,h);return new Ha(i)},Fn.render=function(n,i,o){if(!Va(i))throw Error(r(200));return Ua(null,n,i,!1,o)},Fn.unmountComponentAtNode=function(n){if(!Va(n))throw Error(r(40));return n._reactRootContainer?(Ti(function(){Ua(null,null,n,!1,function(){n._reactRootContainer=null,n[Rr]=null})}),!0):!1},Fn.unstable_batchedUpdates=su,Fn.unstable_renderSubtreeIntoContainer=function(n,i,o,d){if(!Va(o))throw Error(r(200));if(n==null||n._reactInternals===void 0)throw Error(r(38));return Ua(n,i,o,!1,d)},Fn.version="18.3.1-next-f1338f8080-20240426",Fn}var Fp;function Ag(){if(Fp)return yu.exports;Fp=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),yu.exports=E_(),yu.exports}var Hp;function T_(){if(Hp)return qa;Hp=1;var e=Ag();return qa.createRoot=e.createRoot,qa.hydrateRoot=e.hydrateRoot,qa}var I_=T_();class er extends Error{constructor(r,s,l){super(s);Ri(this,"status");Ri(this,"issues");this.name="ApiError",this.status=r,this.issues=l}}class Gn extends er{constructor(r){super(409,r.error);Ri(this,"serverContent");Ri(this,"serverMtimeMs");this.name="ConflictError",this.serverContent=r.serverContent,this.serverMtimeMs=r.serverMtimeMs}}async function gt(e){if(e.ok)return await e.json();let t={};try{t=await e.json()}catch{}throw new er(e.status,t.error??`エラー (${e.status})`,t.issues)}async function D_(e){return gt(await fetch("/api/board",{signal:e}))}async function A_(){return gt(await fetch("/api/mode"))}async function R_(e){return gt(await fetch("/api/overview",{signal:e}))}async function _d(e){return gt(await fetch("/api/archive",{signal:e}))}async function P_(e){const t=await fetch(`/api/tasks/${encodeURIComponent(e)}/unarchive`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});await gt(t)}async function L_(e){return gt(await fetch("/api/trash",{signal:e}))}async function M_(e,t,r){const s={};t!==void 0&&(s.trashedAt=t),r!==void 0&&(s.overwrite=r);const l=await fetch(`/api/tasks/${encodeURIComponent(e)}/restore`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});await gt(l)}async function O_(e){const t=await fetch("/api/tasks",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});return gt(t)}async function z_(e){const{id:t,...r}=e,s=await fetch(`/api/tasks/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(r)});return gt(s)}async function _u(e,t,r){const s=await fetch(`/api/tasks/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({content:t,baseMtimeMs:r})});if(s.status===409){const l=await s.json();throw typeof l.serverContent=="string"&&typeof l.serverMtimeMs=="number"?new Gn(l):new er(409,l.error??"エラー (409)")}return gt(s)}async function $_(e){const t=await fetch(`/api/tasks/${encodeURIComponent(e)}/approve`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});return gt(t)}async function B_(e,t){const r=await fetch(`/api/tasks/${encodeURIComponent(e)}/reject`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({reason:t})});return gt(r)}async function Rg(e,t,r){const s={};t!==void 0&&(s.reason=t),r!==void 0&&(s.baseMtimeMs=r);const l=await fetch(`/api/tasks/${encodeURIComponent(e)}/revise`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(l.status===409){const a=await l.json();throw typeof a.serverContent=="string"&&typeof a.serverMtimeMs=="number"?new Gn(a):new er(409,a.error??"エラー (409)")}return gt(l)}async function Vp(e){const t=await fetch(`/api/tasks/${encodeURIComponent(e)}/archive`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});return gt(t)}async function F_(e){const t=await fetch(`/api/tasks/${encodeURIComponent(e)}/rename`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});return gt(t)}async function so(){const e=await fetch("/api/config"),t=await gt(e),r=e.headers.get("x-config-mtime-ms"),s=r!==null&&r!==""?Number(r):null;return{config:t,mtimeMs:s!==null&&Number.isFinite(s)?s:null}}async function kd(e,t){const r={"content-type":"application/json"};t!=null&&(r["x-base-mtime-ms"]=String(t));const s=await fetch("/api/config",{method:"PUT",headers:r,body:JSON.stringify(e)});if(s.status===409){const l=await s.json();throw typeof l.serverContent=="string"&&typeof l.serverMtimeMs=="number"?new Gn(l):new er(409,l.error??"エラー (409)")}await gt(s)}async function H_(e,t){const r=await fetch("/api/members/rename",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({from:e,to:t})});return gt(r)}async function V_(e){try{const{config:t,mtimeMs:r}=await so();if(t.language===e)return;await kd({...t,language:e},r)}catch{}}async function Up(e){const{config:t,mtimeMs:r}=await so();await kd({...t,savedViews:e},r)}async function U_(e,t=!1){const r=t?"&scope=global":"";return gt(await fetch(`/api/files?path=${encodeURIComponent(e)}${r}`))}async function W_(e,t,r,s=!1){const l=await fetch("/api/files",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,content:t,baseMtimeMs:r,...s?{scope:"global"}:{}})});return gt(l)}async function q_(){return(await gt(await fetch("/api/files/tree"))).trees}async function Pg(e){return(await gt(await fetch("/api/docs/tree",{signal:e}))).trees}async function Lg(e,t){return gt(await fetch(`/api/docs?path=${encodeURIComponent(e)}`,{signal:t}))}async function K_(e){return(await gt(await fetch("/api/docs/write-tree",{signal:e}))).trees}async function Z_(e,t){const r=await fetch("/api/docs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,content:t})});return gt(r)}async function Y_(e,t,r){const s=await fetch(`/api/docs?path=${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({content:t,baseMtimeMs:r})});if(s.status===409){const l=await s.json();throw typeof l.serverContent=="string"&&typeof l.serverMtimeMs=="number"?new Gn(l):new er(409,l.error??"エラー (409)")}return gt(s)}async function Q_(e){const t=await fetch(`/api/docs?path=${encodeURIComponent(e)}`,{method:"DELETE",headers:{"content-type":"application/json"}});await gt(t)}async function Wp(e=!1){return(await gt(await fetch(`/api/files/catalog${e?"?scope=global":""}`))).items}async function X_(e,t){return(await gt(await fetch(`/api/tasks/${encodeURIComponent(e)}/commits`,{signal:t}))).commits}async function G_(e){const t=await fetch(`/api/tasks/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"content-type":"application/json"}});await gt(t)}async function Mg(e,t,r){const s=await fetch(`/api/tasks/${encodeURIComponent(e)}/comment`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({member:t,message:r})});return gt(s)}function ku(e,t){return e===t}function J_(){const[e,t]=w.useState(null),[r,s]=w.useState(!0),[l,a]=w.useState(null),[c,f]=w.useState(!1),m=w.useRef(0),p=w.useCallback(async()=>{const y=++m.current;try{const g=await D_();ku(y,m.current)&&(t(g),a(null))}catch(g){ku(y,m.current)&&a(g instanceof Error?g.message:"ボードの取得に失敗しました")}finally{ku(y,m.current)&&s(!1)}},[]);return w.useEffect(()=>{p();const y=new EventSource("/api/events");return y.onopen=()=>{f(!0),p()},y.onmessage=g=>{try{const x=JSON.parse(g.data);x.type==="change"?p():x.type==="connected"&&f(!0)}catch{}},y.onerror=()=>{f(!1)},()=>{y.close()}},[p]),{board:e,loading:r,error:l,connected:c,refresh:p}}function ek(e,t){const r=new Map;for(const a of e)r.set(a.id,a);const s=[],l=[];for(const a of t){const c=r.get(a.id);if(c===void 0){s.push(a.id);continue}(a.status!==c.status||tk(a.updated,c.updated))&&l.push(a.id)}return{newIds:s,updatedIds:l,changedIds:new Set([...s,...l])}}function tk(e,t){const r=Date.parse(e),s=Date.parse(t);return Number.isNaN(r)||Number.isNaN(s)?e!==t:r>s}const nk="aizuchi.seen.";function Og(e){const t=(e??"").trim();return`${nk}${t===""?"default":t}`}function qp(e){try{if(typeof localStorage>"u")return{};const t=localStorage.getItem(Og(e));if(t===null)return{};const r=JSON.parse(t);if(r===null||typeof r!="object"||Array.isArray(r))return{};const s={};for(const[l,a]of Object.entries(r))typeof a=="string"&&(s[l]=a);return s}catch{return{}}}function Ka(e,t){try{if(typeof localStorage>"u")return;localStorage.setItem(Og(e),JSON.stringify(t))}catch{}}function to(e){return`${e.updated}|${e.status}`}function rk(e){return{id:e.frontmatter.id,updated:e.frontmatter.updated,status:e.frontmatter.status}}function ik(e,t){if(Object.keys(t).length>0)return t;const r={};for(const s of e)r[s.id]=to(s);return r}function sk(e,t,r){let s=!1;const l={...e};for(const a of t)a in l&&(delete l[a],s=!0);for(const a of Object.keys(l))r.has(a)||(delete l[a],s=!0);return s?l:e}function lk(e,t){const[r,s]=w.useState(()=>qp(t)),l=w.useRef(null),a=w.useRef(t);a.current=t,w.useEffect(()=>{s(qp(t)),l.current=null},[t]),w.useEffect(()=>{if(e===null)return;const p=e.map(rk);if(l.current===null){l.current=p,s(x=>{const _=ik(p,x);return _===x?x:(Ka(a.current,_),_)});return}const y=ek(l.current,p);l.current=p;const g=new Set(p.map(x=>x.id));s(x=>{const _=sk(x,y.changedIds,g);return _===x?x:(Ka(a.current,_),_)})},[e]);const c=w.useMemo(()=>{if(e===null)return new Set;const p=new Set;for(const y of e)r[y.frontmatter.id]!==to(y.frontmatter)&&p.add(y.frontmatter.id);return p},[e,r]),f=w.useCallback(p=>{const y=e==null?void 0:e.find(x=>x.frontmatter.id===p);if(!y)return;const g=to(y.frontmatter);s(x=>{if(x[p]===g)return x;const _={...x,[p]:g};return Ka(a.current,_),_})},[e]),m=w.useCallback(()=>{e!==null&&s(()=>{const p={};for(const y of e)p[y.frontmatter.id]=to(y.frontmatter);return Ka(a.current,p),p})},[e]);return{unreadIds:c,markRead:f,markAllRead:m}}var mt;(function(e){e.assertEqual=l=>{};function t(l){}e.assertIs=t;function r(l){throw new Error}e.assertNever=r,e.arrayToEnum=l=>{const a={};for(const c of l)a[c]=c;return a},e.getValidEnumValues=l=>{const a=e.objectKeys(l).filter(f=>typeof l[l[f]]!="number"),c={};for(const f of a)c[f]=l[f];return e.objectValues(c)},e.objectValues=l=>e.objectKeys(l).map(function(a){return l[a]}),e.objectKeys=typeof Object.keys=="function"?l=>Object.keys(l):l=>{const a=[];for(const c in l)Object.prototype.hasOwnProperty.call(l,c)&&a.push(c);return a},e.find=(l,a)=>{for(const c of l)if(a(c))return c},e.isInteger=typeof Number.isInteger=="function"?l=>Number.isInteger(l):l=>typeof l=="number"&&Number.isFinite(l)&&Math.floor(l)===l;function s(l,a=" | "){return l.map(c=>typeof c=="string"?`'${c}'`:c).join(a)}e.joinValues=s,e.jsonStringifyReplacer=(l,a)=>typeof a=="bigint"?a.toString():a})(mt||(mt={}));var Kp;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Kp||(Kp={}));const Le=mt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),mi=e=>{switch(typeof e){case"undefined":return Le.undefined;case"string":return Le.string;case"number":return Number.isNaN(e)?Le.nan:Le.number;case"boolean":return Le.boolean;case"function":return Le.function;case"bigint":return Le.bigint;case"symbol":return Le.symbol;case"object":return Array.isArray(e)?Le.array:e===null?Le.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Le.promise:typeof Map<"u"&&e instanceof Map?Le.map:typeof Set<"u"&&e instanceof Set?Le.set:typeof Date<"u"&&e instanceof Date?Le.date:Le.object;default:return Le.unknown}},me=mt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Vr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(a){return a.message},s={_errors:[]},l=a=>{for(const c of a.issues)if(c.code==="invalid_union")c.unionErrors.map(l);else if(c.code==="invalid_return_type")l(c.returnTypeError);else if(c.code==="invalid_arguments")l(c.argumentsError);else if(c.path.length===0)s._errors.push(r(c));else{let f=s,m=0;for(;m<c.path.length;){const p=c.path[m];m===c.path.length-1?(f[p]=f[p]||{_errors:[]},f[p]._errors.push(r(c))):f[p]=f[p]||{_errors:[]},f=f[p],m++}}};return l(this),s}static assert(t){if(!(t instanceof Vr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,mt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},s=[];for(const l of this.issues)if(l.path.length>0){const a=l.path[0];r[a]=r[a]||[],r[a].push(t(l))}else s.push(t(l));return{formErrors:s,fieldErrors:r}}get formErrors(){return this.flatten()}}Vr.create=e=>new Vr(e);const qu=(e,t)=>{let r;switch(e.code){case me.invalid_type:e.received===Le.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,mt.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:r=`Unrecognized key(s) in object: ${mt.joinValues(e.keys,", ")}`;break;case me.invalid_union:r="Invalid input";break;case me.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${mt.joinValues(e.options)}`;break;case me.invalid_enum_value:r=`Invalid enum value. Expected ${mt.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:r="Invalid function arguments";break;case me.invalid_return_type:r="Invalid function return type";break;case me.invalid_date:r="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:mt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case me.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case me.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case me.custom:r="Invalid input";break;case me.invalid_intersection_types:r="Intersection results could not be merged";break;case me.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:r="Number must be finite";break;default:r=t.defaultError,mt.assertNever(e)}return{message:r}};let ak=qu;function ok(){return ak}const ck=e=>{const{data:t,path:r,errorMaps:s,issueData:l}=e,a=[...r,...l.path||[]],c={...l,path:a};if(l.message!==void 0)return{...l,path:a,message:l.message};let f="";const m=s.filter(p=>!!p).slice().reverse();for(const p of m)f=p(c,{data:t,defaultError:f}).message;return{...l,path:a,message:f}};function Ee(e,t){const r=ok(),s=ck({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===qu?void 0:qu].filter(l=>!!l)});e.common.issues.push(s)}class tr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const s=[];for(const l of r){if(l.status==="aborted")return qe;l.status==="dirty"&&t.dirty(),s.push(l.value)}return{status:t.value,value:s}}static async mergeObjectAsync(t,r){const s=[];for(const l of r){const a=await l.key,c=await l.value;s.push({key:a,value:c})}return tr.mergeObjectSync(t,s)}static mergeObjectSync(t,r){const s={};for(const l of r){const{key:a,value:c}=l;if(a.status==="aborted"||c.status==="aborted")return qe;a.status==="dirty"&&t.dirty(),c.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof c.value<"u"||l.alwaysSet)&&(s[a.value]=c.value)}return{status:t.value,value:s}}}const qe=Object.freeze({status:"aborted"}),gl=e=>({status:"dirty",value:e}),fr=e=>({status:"valid",value:e}),Zp=e=>e.status==="aborted",Yp=e=>e.status==="dirty",vs=e=>e.status==="valid",lo=e=>typeof Promise<"u"&&e instanceof Promise;var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Oe||(Oe={}));class yi{constructor(t,r,s,l){this._cachedPath=[],this.parent=t,this.data=r,this._path=s,this._key=l}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Qp=(e,t)=>{if(vs(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Vr(e.common.issues);return this._error=r,this._error}}};function tt(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:s,description:l}=e;if(t&&(r||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:l}:{errorMap:(c,f)=>{const{message:m}=e;return c.code==="invalid_enum_value"?{message:m??f.defaultError}:typeof f.data>"u"?{message:m??s??f.defaultError}:c.code!=="invalid_type"?{message:f.defaultError}:{message:m??r??f.defaultError}},description:l}}class ut{get description(){return this._def.description}_getType(t){return mi(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new tr,ctx:{common:t.parent.common,data:t.data,parsedType:mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(lo(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const s=this.safeParse(t,r);if(s.success)return s.data;throw s.error}safeParse(t,r){const s={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:mi(t)},l=this._parseSync({data:t,path:s.path,parent:s});return Qp(s,l)}"~validate"(t){var s,l;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:mi(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:r});return vs(a)?{value:a.value}:{issues:r.common.issues}}catch(a){(l=(s=a==null?void 0:a.message)==null?void 0:s.toLowerCase())!=null&&l.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(a=>vs(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(t,r){const s=await this.safeParseAsync(t,r);if(s.success)return s.data;throw s.error}async safeParseAsync(t,r){const s={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:mi(t)},l=this._parse({data:t,path:s.path,parent:s}),a=await(lo(l)?l:Promise.resolve(l));return Qp(s,a)}refine(t,r){const s=l=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(l):r;return this._refinement((l,a)=>{const c=t(l),f=()=>a.addIssue({code:me.custom,...s(l)});return typeof Promise<"u"&&c instanceof Promise?c.then(m=>m?!0:(f(),!1)):c?!0:(f(),!1)})}refinement(t,r){return this._refinement((s,l)=>t(s)?!0:(l.addIssue(typeof r=="function"?r(s,l):r),!1))}_refinement(t){return new ks({schema:this,typeName:Ke.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return gi.create(this,this._def)}nullable(){return ws.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ir.create(this)}promise(){return uo.create(this,this._def)}or(t){return oo.create([this,t],this._def)}and(t){return co.create(this,t,this._def)}transform(t){return new ks({...tt(this._def),schema:this,typeName:Ke.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Yu({...tt(this._def),innerType:this,defaultValue:r,typeName:Ke.ZodDefault})}brand(){return new Ak({typeName:Ke.ZodBranded,type:this,...tt(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Qu({...tt(this._def),innerType:this,catchValue:r,typeName:Ke.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return wd.create(this,t)}readonly(){return Xu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const uk=/^c[^\s-]{8,}$/i,dk=/^[0-9a-z]+$/,fk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,mk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,pk=/^[a-z0-9_-]{21}$/i,hk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,yk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let wu;const xk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_k=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,kk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,wk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Sk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,zg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ck=new RegExp(`^${zg}$`);function $g(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Nk(e){return new RegExp(`^${$g(e)}$`)}function jk(e){let t=`${zg}T${$g(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Ek(e,t){return!!((t==="v4"||!t)&&xk.test(e)||(t==="v6"||!t)&&kk.test(e))}function Tk(e,t){if(!hk.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const s=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),l=JSON.parse(atob(s));return!(typeof l!="object"||l===null||"typ"in l&&(l==null?void 0:l.typ)!=="JWT"||!l.alg||t&&l.alg!==t)}catch{return!1}}function Ik(e,t){return!!((t==="v4"||!t)&&_k.test(e)||(t==="v6"||!t)&&wk.test(e))}class hi extends ut{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Le.string){const a=this._getOrReturnCtx(t);return Ee(a,{code:me.invalid_type,expected:Le.string,received:a.parsedType}),qe}const s=new tr;let l;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(l=this._getOrReturnCtx(t,l),Ee(l,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")t.data.length>a.value&&(l=this._getOrReturnCtx(t,l),Ee(l,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const c=t.data.length>a.value,f=t.data.length<a.value;(c||f)&&(l=this._getOrReturnCtx(t,l),c?Ee(l,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):f&&Ee(l,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")yk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"email",code:me.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")wu||(wu=new RegExp(vk,"u")),wu.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"emoji",code:me.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")mk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"uuid",code:me.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")pk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"nanoid",code:me.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")uk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"cuid",code:me.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")dk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"cuid2",code:me.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")fk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"ulid",code:me.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{l=this._getOrReturnCtx(t,l),Ee(l,{validation:"url",code:me.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"regex",code:me.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(l=this._getOrReturnCtx(t,l),Ee(l,{code:me.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(l=this._getOrReturnCtx(t,l),Ee(l,{code:me.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(l=this._getOrReturnCtx(t,l),Ee(l,{code:me.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?jk(a).test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{code:me.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?Ck.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{code:me.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?Nk(a).test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{code:me.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?gk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"duration",code:me.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?Ek(t.data,a.version)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"ip",code:me.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?Tk(t.data,a.alg)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"jwt",code:me.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?Ik(t.data,a.version)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"cidr",code:me.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?bk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"base64",code:me.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?Sk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ee(l,{validation:"base64url",code:me.invalid_string,message:a.message}),s.dirty()):mt.assertNever(a);return{status:s.value,value:t.data}}_regex(t,r,s){return this.refinement(l=>t.test(l),{validation:r,code:me.invalid_string,...Oe.errToObj(s)})}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Oe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Oe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Oe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Oe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Oe.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Oe.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Oe.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Oe.errToObj(r)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new hi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new hi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new hi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}hi.create=e=>new hi({checks:[],typeName:Ke.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...tt(e)});function Dk(e,t){const r=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,l=r>s?r:s,a=Number.parseInt(e.toFixed(l).replace(".","")),c=Number.parseInt(t.toFixed(l).replace(".",""));return a%c/10**l}class xs extends ut{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Le.number){const a=this._getOrReturnCtx(t);return Ee(a,{code:me.invalid_type,expected:Le.number,received:a.parsedType}),qe}let s;const l=new tr;for(const a of this._def.checks)a.kind==="int"?mt.isInteger(t.data)||(s=this._getOrReturnCtx(t,s),Ee(s,{code:me.invalid_type,expected:"integer",received:"float",message:a.message}),l.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(s=this._getOrReturnCtx(t,s),Ee(s,{code:me.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),l.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(s=this._getOrReturnCtx(t,s),Ee(s,{code:me.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),l.dirty()):a.kind==="multipleOf"?Dk(t.data,a.value)!==0&&(s=this._getOrReturnCtx(t,s),Ee(s,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),l.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(s=this._getOrReturnCtx(t,s),Ee(s,{code:me.not_finite,message:a.message}),l.dirty()):mt.assertNever(a);return{status:l.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Oe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Oe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Oe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Oe.toString(r))}setLimit(t,r,s,l){return new xs({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:Oe.toString(l)}]})}_addCheck(t){return new xs({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&mt.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(r===null||s.value>r)&&(r=s.value):s.kind==="max"&&(t===null||s.value<t)&&(t=s.value)}return Number.isFinite(r)&&Number.isFinite(t)}}xs.create=e=>new xs({checks:[],typeName:Ke.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...tt(e)});class Cl extends ut{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Le.bigint)return this._getInvalidInput(t);let s;const l=new tr;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(s=this._getOrReturnCtx(t,s),Ee(s,{code:me.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),l.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(s=this._getOrReturnCtx(t,s),Ee(s,{code:me.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),l.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(t,s),Ee(s,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),l.dirty()):mt.assertNever(a);return{status:l.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return Ee(r,{code:me.invalid_type,expected:Le.bigint,received:r.parsedType}),qe}gte(t,r){return this.setLimit("min",t,!0,Oe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Oe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Oe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Oe.toString(r))}setLimit(t,r,s,l){return new Cl({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:Oe.toString(l)}]})}_addCheck(t){return new Cl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Cl.create=e=>new Cl({checks:[],typeName:Ke.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...tt(e)});class Ku extends ut{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Le.boolean){const s=this._getOrReturnCtx(t);return Ee(s,{code:me.invalid_type,expected:Le.boolean,received:s.parsedType}),qe}return fr(t.data)}}Ku.create=e=>new Ku({typeName:Ke.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...tt(e)});class ao extends ut{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Le.date){const a=this._getOrReturnCtx(t);return Ee(a,{code:me.invalid_type,expected:Le.date,received:a.parsedType}),qe}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Ee(a,{code:me.invalid_date}),qe}const s=new tr;let l;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(l=this._getOrReturnCtx(t,l),Ee(l,{code:me.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(l=this._getOrReturnCtx(t,l),Ee(l,{code:me.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):mt.assertNever(a);return{status:s.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ao({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}ao.create=e=>new ao({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ke.ZodDate,...tt(e)});class Xp extends ut{_parse(t){if(this._getType(t)!==Le.symbol){const s=this._getOrReturnCtx(t);return Ee(s,{code:me.invalid_type,expected:Le.symbol,received:s.parsedType}),qe}return fr(t.data)}}Xp.create=e=>new Xp({typeName:Ke.ZodSymbol,...tt(e)});class Gp extends ut{_parse(t){if(this._getType(t)!==Le.undefined){const s=this._getOrReturnCtx(t);return Ee(s,{code:me.invalid_type,expected:Le.undefined,received:s.parsedType}),qe}return fr(t.data)}}Gp.create=e=>new Gp({typeName:Ke.ZodUndefined,...tt(e)});class Jp extends ut{_parse(t){if(this._getType(t)!==Le.null){const s=this._getOrReturnCtx(t);return Ee(s,{code:me.invalid_type,expected:Le.null,received:s.parsedType}),qe}return fr(t.data)}}Jp.create=e=>new Jp({typeName:Ke.ZodNull,...tt(e)});class eh extends ut{constructor(){super(...arguments),this._any=!0}_parse(t){return fr(t.data)}}eh.create=e=>new eh({typeName:Ke.ZodAny,...tt(e)});class th extends ut{constructor(){super(...arguments),this._unknown=!0}_parse(t){return fr(t.data)}}th.create=e=>new th({typeName:Ke.ZodUnknown,...tt(e)});class vi extends ut{_parse(t){const r=this._getOrReturnCtx(t);return Ee(r,{code:me.invalid_type,expected:Le.never,received:r.parsedType}),qe}}vi.create=e=>new vi({typeName:Ke.ZodNever,...tt(e)});class nh extends ut{_parse(t){if(this._getType(t)!==Le.undefined){const s=this._getOrReturnCtx(t);return Ee(s,{code:me.invalid_type,expected:Le.void,received:s.parsedType}),qe}return fr(t.data)}}nh.create=e=>new nh({typeName:Ke.ZodVoid,...tt(e)});class Ir extends ut{_parse(t){const{ctx:r,status:s}=this._processInputParams(t),l=this._def;if(r.parsedType!==Le.array)return Ee(r,{code:me.invalid_type,expected:Le.array,received:r.parsedType}),qe;if(l.exactLength!==null){const c=r.data.length>l.exactLength.value,f=r.data.length<l.exactLength.value;(c||f)&&(Ee(r,{code:c?me.too_big:me.too_small,minimum:f?l.exactLength.value:void 0,maximum:c?l.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:l.exactLength.message}),s.dirty())}if(l.minLength!==null&&r.data.length<l.minLength.value&&(Ee(r,{code:me.too_small,minimum:l.minLength.value,type:"array",inclusive:!0,exact:!1,message:l.minLength.message}),s.dirty()),l.maxLength!==null&&r.data.length>l.maxLength.value&&(Ee(r,{code:me.too_big,maximum:l.maxLength.value,type:"array",inclusive:!0,exact:!1,message:l.maxLength.message}),s.dirty()),r.common.async)return Promise.all([...r.data].map((c,f)=>l.type._parseAsync(new yi(r,c,r.path,f)))).then(c=>tr.mergeArray(s,c));const a=[...r.data].map((c,f)=>l.type._parseSync(new yi(r,c,r.path,f)));return tr.mergeArray(s,a)}get element(){return this._def.type}min(t,r){return new Ir({...this._def,minLength:{value:t,message:Oe.toString(r)}})}max(t,r){return new Ir({...this._def,maxLength:{value:t,message:Oe.toString(r)}})}length(t,r){return new Ir({...this._def,exactLength:{value:t,message:Oe.toString(r)}})}nonempty(t){return this.min(1,t)}}Ir.create=(e,t)=>new Ir({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ke.ZodArray,...tt(t)});function hs(e){if(e instanceof en){const t={};for(const r in e.shape){const s=e.shape[r];t[r]=gi.create(hs(s))}return new en({...e._def,shape:()=>t})}else return e instanceof Ir?new Ir({...e._def,type:hs(e.element)}):e instanceof gi?gi.create(hs(e.unwrap())):e instanceof ws?ws.create(hs(e.unwrap())):e instanceof $i?$i.create(e.items.map(t=>hs(t))):e}class en extends ut{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=mt.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==Le.object){const p=this._getOrReturnCtx(t);return Ee(p,{code:me.invalid_type,expected:Le.object,received:p.parsedType}),qe}const{status:s,ctx:l}=this._processInputParams(t),{shape:a,keys:c}=this._getCached(),f=[];if(!(this._def.catchall instanceof vi&&this._def.unknownKeys==="strip"))for(const p in l.data)c.includes(p)||f.push(p);const m=[];for(const p of c){const y=a[p],g=l.data[p];m.push({key:{status:"valid",value:p},value:y._parse(new yi(l,g,l.path,p)),alwaysSet:p in l.data})}if(this._def.catchall instanceof vi){const p=this._def.unknownKeys;if(p==="passthrough")for(const y of f)m.push({key:{status:"valid",value:y},value:{status:"valid",value:l.data[y]}});else if(p==="strict")f.length>0&&(Ee(l,{code:me.unrecognized_keys,keys:f}),s.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const y of f){const g=l.data[y];m.push({key:{status:"valid",value:y},value:p._parse(new yi(l,g,l.path,y)),alwaysSet:y in l.data})}}return l.common.async?Promise.resolve().then(async()=>{const p=[];for(const y of m){const g=await y.key,x=await y.value;p.push({key:g,value:x,alwaysSet:y.alwaysSet})}return p}).then(p=>tr.mergeObjectSync(s,p)):tr.mergeObjectSync(s,m)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new en({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,s)=>{var a,c;const l=((c=(a=this._def).errorMap)==null?void 0:c.call(a,r,s).message)??s.defaultError;return r.code==="unrecognized_keys"?{message:Oe.errToObj(t).message??l}:{message:l}}}:{}})}strip(){return new en({...this._def,unknownKeys:"strip"})}passthrough(){return new en({...this._def,unknownKeys:"passthrough"})}extend(t){return new en({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new en({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ke.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new en({...this._def,catchall:t})}pick(t){const r={};for(const s of mt.objectKeys(t))t[s]&&this.shape[s]&&(r[s]=this.shape[s]);return new en({...this._def,shape:()=>r})}omit(t){const r={};for(const s of mt.objectKeys(this.shape))t[s]||(r[s]=this.shape[s]);return new en({...this._def,shape:()=>r})}deepPartial(){return hs(this)}partial(t){const r={};for(const s of mt.objectKeys(this.shape)){const l=this.shape[s];t&&!t[s]?r[s]=l:r[s]=l.optional()}return new en({...this._def,shape:()=>r})}required(t){const r={};for(const s of mt.objectKeys(this.shape))if(t&&!t[s])r[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof gi;)a=a._def.innerType;r[s]=a}return new en({...this._def,shape:()=>r})}keyof(){return Bg(mt.objectKeys(this.shape))}}en.create=(e,t)=>new en({shape:()=>e,unknownKeys:"strip",catchall:vi.create(),typeName:Ke.ZodObject,...tt(t)});en.strictCreate=(e,t)=>new en({shape:()=>e,unknownKeys:"strict",catchall:vi.create(),typeName:Ke.ZodObject,...tt(t)});en.lazycreate=(e,t)=>new en({shape:e,unknownKeys:"strip",catchall:vi.create(),typeName:Ke.ZodObject,...tt(t)});class oo extends ut{_parse(t){const{ctx:r}=this._processInputParams(t),s=this._def.options;function l(a){for(const f of a)if(f.result.status==="valid")return f.result;for(const f of a)if(f.result.status==="dirty")return r.common.issues.push(...f.ctx.common.issues),f.result;const c=a.map(f=>new Vr(f.ctx.common.issues));return Ee(r,{code:me.invalid_union,unionErrors:c}),qe}if(r.common.async)return Promise.all(s.map(async a=>{const c={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(l);{let a;const c=[];for(const m of s){const p={...r,common:{...r.common,issues:[]},parent:null},y=m._parseSync({data:r.data,path:r.path,parent:p});if(y.status==="valid")return y;y.status==="dirty"&&!a&&(a={result:y,ctx:p}),p.common.issues.length&&c.push(p.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const f=c.map(m=>new Vr(m));return Ee(r,{code:me.invalid_union,unionErrors:f}),qe}}get options(){return this._def.options}}oo.create=(e,t)=>new oo({options:e,typeName:Ke.ZodUnion,...tt(t)});function Zu(e,t){const r=mi(e),s=mi(t);if(e===t)return{valid:!0,data:e};if(r===Le.object&&s===Le.object){const l=mt.objectKeys(t),a=mt.objectKeys(e).filter(f=>l.indexOf(f)!==-1),c={...e,...t};for(const f of a){const m=Zu(e[f],t[f]);if(!m.valid)return{valid:!1};c[f]=m.data}return{valid:!0,data:c}}else if(r===Le.array&&s===Le.array){if(e.length!==t.length)return{valid:!1};const l=[];for(let a=0;a<e.length;a++){const c=e[a],f=t[a],m=Zu(c,f);if(!m.valid)return{valid:!1};l.push(m.data)}return{valid:!0,data:l}}else return r===Le.date&&s===Le.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class co extends ut{_parse(t){const{status:r,ctx:s}=this._processInputParams(t),l=(a,c)=>{if(Zp(a)||Zp(c))return qe;const f=Zu(a.value,c.value);return f.valid?((Yp(a)||Yp(c))&&r.dirty(),{status:r.value,value:f.data}):(Ee(s,{code:me.invalid_intersection_types}),qe)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,c])=>l(a,c)):l(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}co.create=(e,t,r)=>new co({left:e,right:t,typeName:Ke.ZodIntersection,...tt(r)});class $i extends ut{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==Le.array)return Ee(s,{code:me.invalid_type,expected:Le.array,received:s.parsedType}),qe;if(s.data.length<this._def.items.length)return Ee(s,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),qe;!this._def.rest&&s.data.length>this._def.items.length&&(Ee(s,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...s.data].map((c,f)=>{const m=this._def.items[f]||this._def.rest;return m?m._parse(new yi(s,c,s.path,f)):null}).filter(c=>!!c);return s.common.async?Promise.all(a).then(c=>tr.mergeArray(r,c)):tr.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new $i({...this._def,rest:t})}}$i.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $i({items:e,typeName:Ke.ZodTuple,rest:null,...tt(t)})};class rh extends ut{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==Le.map)return Ee(s,{code:me.invalid_type,expected:Le.map,received:s.parsedType}),qe;const l=this._def.keyType,a=this._def.valueType,c=[...s.data.entries()].map(([f,m],p)=>({key:l._parse(new yi(s,f,s.path,[p,"key"])),value:a._parse(new yi(s,m,s.path,[p,"value"]))}));if(s.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const m of c){const p=await m.key,y=await m.value;if(p.status==="aborted"||y.status==="aborted")return qe;(p.status==="dirty"||y.status==="dirty")&&r.dirty(),f.set(p.value,y.value)}return{status:r.value,value:f}})}else{const f=new Map;for(const m of c){const p=m.key,y=m.value;if(p.status==="aborted"||y.status==="aborted")return qe;(p.status==="dirty"||y.status==="dirty")&&r.dirty(),f.set(p.value,y.value)}return{status:r.value,value:f}}}}rh.create=(e,t,r)=>new rh({valueType:t,keyType:e,typeName:Ke.ZodMap,...tt(r)});class Nl extends ut{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==Le.set)return Ee(s,{code:me.invalid_type,expected:Le.set,received:s.parsedType}),qe;const l=this._def;l.minSize!==null&&s.data.size<l.minSize.value&&(Ee(s,{code:me.too_small,minimum:l.minSize.value,type:"set",inclusive:!0,exact:!1,message:l.minSize.message}),r.dirty()),l.maxSize!==null&&s.data.size>l.maxSize.value&&(Ee(s,{code:me.too_big,maximum:l.maxSize.value,type:"set",inclusive:!0,exact:!1,message:l.maxSize.message}),r.dirty());const a=this._def.valueType;function c(m){const p=new Set;for(const y of m){if(y.status==="aborted")return qe;y.status==="dirty"&&r.dirty(),p.add(y.value)}return{status:r.value,value:p}}const f=[...s.data.values()].map((m,p)=>a._parse(new yi(s,m,s.path,p)));return s.common.async?Promise.all(f).then(m=>c(m)):c(f)}min(t,r){return new Nl({...this._def,minSize:{value:t,message:Oe.toString(r)}})}max(t,r){return new Nl({...this._def,maxSize:{value:t,message:Oe.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Nl.create=(e,t)=>new Nl({valueType:e,minSize:null,maxSize:null,typeName:Ke.ZodSet,...tt(t)});class ih extends ut{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ih.create=(e,t)=>new ih({getter:e,typeName:Ke.ZodLazy,...tt(t)});class sh extends ut{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Ee(r,{received:r.data,code:me.invalid_literal,expected:this._def.value}),qe}return{status:"valid",value:t.data}}get value(){return this._def.value}}sh.create=(e,t)=>new sh({value:e,typeName:Ke.ZodLiteral,...tt(t)});function Bg(e,t){return new _s({values:e,typeName:Ke.ZodEnum,...tt(t)})}class _s extends ut{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),s=this._def.values;return Ee(r,{expected:mt.joinValues(s),received:r.parsedType,code:me.invalid_type}),qe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),s=this._def.values;return Ee(r,{received:r.data,code:me.invalid_enum_value,options:s}),qe}return fr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return _s.create(t,{...this._def,...r})}exclude(t,r=this._def){return _s.create(this.options.filter(s=>!t.includes(s)),{...this._def,...r})}}_s.create=Bg;class lh extends ut{_parse(t){const r=mt.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==Le.string&&s.parsedType!==Le.number){const l=mt.objectValues(r);return Ee(s,{expected:mt.joinValues(l),received:s.parsedType,code:me.invalid_type}),qe}if(this._cache||(this._cache=new Set(mt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const l=mt.objectValues(r);return Ee(s,{received:s.data,code:me.invalid_enum_value,options:l}),qe}return fr(t.data)}get enum(){return this._def.values}}lh.create=(e,t)=>new lh({values:e,typeName:Ke.ZodNativeEnum,...tt(t)});class uo extends ut{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Le.promise&&r.common.async===!1)return Ee(r,{code:me.invalid_type,expected:Le.promise,received:r.parsedType}),qe;const s=r.parsedType===Le.promise?r.data:Promise.resolve(r.data);return fr(s.then(l=>this._def.type.parseAsync(l,{path:r.path,errorMap:r.common.contextualErrorMap})))}}uo.create=(e,t)=>new uo({type:e,typeName:Ke.ZodPromise,...tt(t)});class ks extends ut{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:s}=this._processInputParams(t),l=this._def.effect||null,a={addIssue:c=>{Ee(s,c),c.fatal?r.abort():r.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),l.type==="preprocess"){const c=l.transform(s.data,a);if(s.common.async)return Promise.resolve(c).then(async f=>{if(r.value==="aborted")return qe;const m=await this._def.schema._parseAsync({data:f,path:s.path,parent:s});return m.status==="aborted"?qe:m.status==="dirty"||r.value==="dirty"?gl(m.value):m});{if(r.value==="aborted")return qe;const f=this._def.schema._parseSync({data:c,path:s.path,parent:s});return f.status==="aborted"?qe:f.status==="dirty"||r.value==="dirty"?gl(f.value):f}}if(l.type==="refinement"){const c=f=>{const m=l.refinement(f,a);if(s.common.async)return Promise.resolve(m);if(m instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(s.common.async===!1){const f=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return f.status==="aborted"?qe:(f.status==="dirty"&&r.dirty(),c(f.value),{status:r.value,value:f.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(f=>f.status==="aborted"?qe:(f.status==="dirty"&&r.dirty(),c(f.value).then(()=>({status:r.value,value:f.value}))))}if(l.type==="transform")if(s.common.async===!1){const c=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!vs(c))return qe;const f=l.transform(c.value,a);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:f}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(c=>vs(c)?Promise.resolve(l.transform(c.value,a)).then(f=>({status:r.value,value:f})):qe);mt.assertNever(l)}}ks.create=(e,t,r)=>new ks({schema:e,typeName:Ke.ZodEffects,effect:t,...tt(r)});ks.createWithPreprocess=(e,t,r)=>new ks({schema:t,effect:{type:"preprocess",transform:e},typeName:Ke.ZodEffects,...tt(r)});class gi extends ut{_parse(t){return this._getType(t)===Le.undefined?fr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:Ke.ZodOptional,...tt(t)});class ws extends ut{_parse(t){return this._getType(t)===Le.null?fr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ws.create=(e,t)=>new ws({innerType:e,typeName:Ke.ZodNullable,...tt(t)});class Yu extends ut{_parse(t){const{ctx:r}=this._processInputParams(t);let s=r.data;return r.parsedType===Le.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Yu.create=(e,t)=>new Yu({innerType:e,typeName:Ke.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...tt(t)});class Qu extends ut{_parse(t){const{ctx:r}=this._processInputParams(t),s={...r,common:{...r.common,issues:[]}},l=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return lo(l)?l.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Vr(s.common.issues)},input:s.data})})):{status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Vr(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Qu.create=(e,t)=>new Qu({innerType:e,typeName:Ke.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...tt(t)});class ah extends ut{_parse(t){if(this._getType(t)!==Le.nan){const s=this._getOrReturnCtx(t);return Ee(s,{code:me.invalid_type,expected:Le.nan,received:s.parsedType}),qe}return{status:"valid",value:t.data}}}ah.create=e=>new ah({typeName:Ke.ZodNaN,...tt(e)});class Ak extends ut{_parse(t){const{ctx:r}=this._processInputParams(t),s=r.data;return this._def.type._parse({data:s,path:r.path,parent:r})}unwrap(){return this._def.type}}class wd extends ut{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?qe:a.status==="dirty"?(r.dirty(),gl(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const l=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?qe:l.status==="dirty"?(r.dirty(),{status:"dirty",value:l.value}):this._def.out._parseSync({data:l.value,path:s.path,parent:s})}}static create(t,r){return new wd({in:t,out:r,typeName:Ke.ZodPipeline})}}class Xu extends ut{_parse(t){const r=this._def.innerType._parse(t),s=l=>(vs(l)&&(l.value=Object.freeze(l.value)),l);return lo(r)?r.then(l=>s(l)):s(r)}unwrap(){return this._def.innerType}}Xu.create=(e,t)=>new Xu({innerType:e,typeName:Ke.ZodReadonly,...tt(t)});var Ke;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ke||(Ke={}));const Te=hi.create,qt=xs.create,wo=Ku.create;vi.create;const Vt=Ir.create,it=en.create;oo.create;co.create;$i.create;const an=_s.create;uo.create;gi.create;ws.create;const Cs=["proposed","backlog","todo","in_progress","pending","done"],bd=["decision","external","dependency"],jl=["high","medium","low"],Fg=["human","ai"],Rk=["planned","active","done"],Hg=["en","ja"],Pk=5151,oh=Te().datetime({offset:!0,message:"ISO 8601 (タイムゾーン付き) の文字列で指定する (例: 2026-06-10T10:00:00+09:00)"}),ch=Te().regex(/^[A-Za-z0-9_]+-\d{3,}$/,"タスク ID は <接頭辞>-<3 桁以上の数字> 形式 (例: TASK-001)"),Bi=Te().min(1).regex(/^[^\r\n]+$/,"1 行で書く (改行不可)"),Lk=it({id:Te().min(1).regex(/^[^\]\r\n]+$/,"member id に ] や改行は使えません"),label:Te().min(1).optional(),type:an(Fg)}),Mk=it({id:Te().min(1),label:Te().min(1).optional(),hideWhenEmpty:wo().optional(),wipLimit:qt().int().positive().optional()}),Ok=it({id:Te().min(1),title:Te().min(1),order:qt().int().default(0),status:an(Rk).default("planned")}),zk=it({name:Te().min(1),title:Te().optional(),body:Te().optional(),labels:Vt(Te().min(1)).optional(),priority:an(jl).optional()}).strict(),$k=it({name:Te().min(1),query:Te().optional(),label:Te().optional(),assignee:Te().optional(),statuses:Vt(an(Cs)).optional()}).strict(),Vg=it({projectName:Te().min(1).default("project"),idPrefix:Te().regex(/^[A-Za-z0-9_]+$/,"idPrefix は英数字とアンダースコアのみ").default("TASK"),port:qt().int().min(1).max(65535).default(Pk),aiTaskCreation:an(["free","proposal"]).default("free"),language:an(Hg).optional(),members:Vt(Lk).min(1).default([{id:"member1",type:"human"},{id:"member2",type:"human"},{id:"claude",type:"ai"},{id:"codex",type:"ai"}]).superRefine((e,t)=>{const r=new Set;for(const s of e)r.has(s.id)&&t.addIssue({code:me.custom,message:`member id が重複しています: ${s.id}`}),r.add(s.id)}),columns:Vt(Mk).min(1).default([{id:"proposed",hideWhenEmpty:!0},{id:"backlog"},{id:"todo"},{id:"in_progress",wipLimit:2},{id:"pending"},{id:"done"}]),instructionTemplate:Te().default("タスク {id} の内容を {path} で確認し、CLAUDE.md の運用規約に従って実行してください。"),aiConfigPaths:it({settingsFiles:Vt(Te()).default([".claude/settings.json",".claude/settings.local.json"]),browseDirs:Vt(Te()).default([".claude/skills",".claude/rules",".claude/agents"]),rootFiles:Vt(Te()).default(["CLAUDE.md"])}).default({}),milestones:Vt(Ok).default([]),taskTemplates:Vt(zk).default([]),savedViews:Vt($k).default([]),views:Vt(it({id:Te().min(1),hidden:wo().optional()})).default([]),docsDirs:Vt(Te().min(1)).default([]),docsWriteDirs:Vt(Te().min(1)).default([]),trashKeep:qt().int().positive().optional(),stallThresholds:it({in_progress:qt().int().positive(),todo:qt().int().positive(),pending:qt().int().positive()}).strict().partial().optional()}),Bk=it({id:ch,title:Bi,status:an(Cs),assignee:Te().min(1).nullable().default(null),created_by:Te().min(1),priority:an(jl).default("medium"),labels:Vt(Te().min(1)).default([]),blocked_type:an(bd).nullable().default(null),blocked_reason:Te().min(1).nullable().default(null),depends_on:Vt(ch).default([]),milestone:Te().min(1).nullable().default(null),related_docs:Vt(Te().min(1)).optional(),created:oh,updated:oh}).strict().superRefine((e,t)=>{e.status==="pending"&&(e.blocked_type===null&&t.addIssue({code:me.custom,path:["blocked_type"],message:"pending のタスクは blocked_type (decision / external / dependency) が必須"}),(e.blocked_reason===null||e.blocked_reason.trim().length===0)&&t.addIssue({code:me.custom,path:["blocked_reason"],message:"pending のタスクは blocked_reason (誰の・何待ちか) が必須"}))}),Fk=["invalid_task","duplicate_id","unregistered_member","invalid_config","mode_violation"],Hk=it({kind:an(Fk),path:Te(),taskId:Te().nullable(),message:Te()}),Vk=it({frontmatter:Bk,path:Te(),body:Te(),raw:Te(),mtimeMs:qt()});it({tasks:Vt(Vk),config:Vg,warnings:Vt(Hk)});it({title:Bi,created_by:Te().min(1),assignee:Te().min(1).nullable().optional(),priority:an(jl).optional(),labels:Vt(Te().min(1)).optional(),body:Te().optional(),related_docs:Vt(Te().min(1)).optional()}).strict();it({status:an(Cs),blocked_type:an(bd).nullable().optional(),blocked_reason:Bi.nullable().optional()}).strict().superRefine((e,t)=>{if(e.status==="pending"){e.blocked_reason!=null&&e.blocked_reason.trim().length===0&&t.addIssue({code:me.custom,path:["blocked_reason"],message:"blocked_reason は空白のみでは指定できません"});return}e.blocked_type!=null&&t.addIssue({code:me.custom,path:["blocked_type"],message:"pending 以外への移動では blocked_type を指定しない"}),e.blocked_reason!=null&&t.addIssue({code:me.custom,path:["blocked_reason"],message:"pending 以外への移動では blocked_reason を指定しない"})});it({content:Te().min(1),baseMtimeMs:qt()}).strict();it({error:Te(),serverContent:Te(),serverMtimeMs:qt()});it({type:an(["connected","change"])});const Uk=it({proposed:qt().int().nonnegative(),backlog:qt().int().nonnegative(),todo:qt().int().nonnegative(),in_progress:qt().int().nonnegative(),pending:qt().int().nonnegative(),done:qt().int().nonnegative()}),Wk=it({name:Te().min(1),dir:Te().min(1),root:Te().min(1),statusCounts:Uk,warningCount:qt().int().nonnegative(),wipExceeded:wo()}),qk=it({id:Te().min(1),title:Te(),status:an(["in_progress","pending","proposed"]),assignee:Te().nullable(),blocked_type:an(bd).nullable(),blocked_reason:Te().nullable(),project:Te().min(1)});it({projects:Vt(Wk),attention:Vt(qk)});it({mode:an(["board","overview"])});it({reason:Bi}).strict();it({reason:Te().max(2e3).optional(),baseMtimeMs:qt().optional()}).strict();it({path:Te(),content:Te(),mtimeMs:qt()});it({path:Te().min(1),content:Te(),baseMtimeMs:qt(),scope:an(["local","global"]).optional()}).strict();it({path:Te(),name:Te().nullable(),description:Te().nullable()});it({hash:Te(),subject:Te(),authorDate:Te()});it({member:Te().min(1),message:Bi}).strict();it({}).strict();const Kk=it({id:Te().min(1),trashedAt:qt().int().nonnegative(),title:Te().nullable(),status:an(Cs).nullable(),body:Te()});it({items:Vt(Kk)});it({trashedAt:qt().int().nonnegative().optional(),overwrite:wo().optional()}).strict();it({from:Bi,to:Bi}).strict().refine(e=>e.from!==e.to,{message:"from と to が同じです"});const Ug={"header.live":"Live","header.live.title":"Live updates are active","header.reconnecting":"Reconnecting","header.reconnecting.title":"Reconnecting…","header.addTask":"+ Add task","header.settings":"Settings","header.help":"Keyboard shortcuts (?)","shortcuts.title":"Keyboard shortcuts","shortcuts.palette":"Open the command palette","shortcuts.help":"Show this help","shortcuts.openCard":"Open the focused card","shortcuts.grabCard":"Grab / drop the focused card","shortcuts.moveCard":"Move the grabbed card between columns","shortcuts.close":"Close the dialog / palette","shortcuts.aiInstruction.title":"Onboard your AI agent","shortcuts.aiInstruction.desc":"Copy an instruction that tells your AI agent (Claude etc.) how to take part in this project via AIzuchi.","shortcuts.aiInstruction.copy":"Copy AI instruction","shortcuts.aiInstruction.copied":"Copied","shortcuts.aiInstruction.failed":"Copy failed","banner.close":"Close","board.loading":"Loading…","board.unavailable":"Unable to display the board.","error.view.title":"Something went wrong displaying this view.","error.view.detail":"Try switching tabs or retrying. Your tasks are unaffected — this is only a display error.","error.view.retry":"Retry","board.empty.title":"No tasks yet","board.empty.lead":"Create your first task to get started. You (or your AI agent) manage tasks as plain Markdown files under .kanban/tasks/ — this board is just a view of them.","board.empty.addFirst":"+ Create the first task","board.empty.aiNote":"Working with an AI agent? The conventions are already in your project CLAUDE.md. Copy the prompt below and paste it into your AI session — it will read the rules and file the first task for you.","board.empty.copyInstruction":"Copy AI prompt","board.empty.copied":"Copied","board.empty.copyFailed":"Copy failed","board.empty.aiInstruction":'This project is managed with AIzuchi. Read the "AIzuchi operating conventions" section in CLAUDE.md, then create the first task under .kanban/tasks/ following the frontmatter schema (id = TASK-001, set created / updated to the current time with timezone). Pick a small, concrete first task and put it in the todo column.',"view.home":"Home","view.board":"Board","view.critical":"Critical path","view.milestones":"Milestones","view.digest":"Daily digest","view.files":"AI config","view.stats":"Statistics","view.docs":"Related docs","view.archive":"Archive","view.trash":"Trash","detail.tab.meta":"Meta","meta.priority":"Priority","meta.priority.hint":"Save or discard your edits in the Edit tab before changing the priority.","meta.priority.saveError":"Failed to save the priority","meta.dependsOn":"Depends on","meta.dependsOn.empty":"No dependencies.","meta.dependsOn.add":"+ Add dependency","meta.dependsOn.remove":"Remove dependency {id}","meta.dependsOn.pickerTitle":"Add a dependency","meta.dependsOn.pickerEmpty":"No other tasks to depend on.","meta.dependsOn.saveError":"Failed to save the dependencies","meta.dirtyHint":"Save or discard your edits in the Edit tab before changing meta fields.","meta.conflict":"The task was changed externally, so the update was not applied. The board has been refreshed — please try again.","meta.noChange":"Could not apply the change to this task file (unexpected file format).","detail.tab.docs":"Related docs","docs.empty":"No related docs linked yet.","docs.add":"+ Add a doc","docs.remove":"Remove","docs.broken":"Broken link","docs.pickerTitle":"Add a related doc","docs.pickerEmpty":"No .md files found under docsDirs.","docs.dirtyHint":"Save or discard your edits in the Edit tab before changing related docs.","docs.loadError":"Failed to load the document.","docs.treeError":"Failed to load the document list.","docs.conflict":"The task was changed externally, so the update was not applied. The list has been refreshed — please try again.","docs.noChange":"Could not apply the change to this task file (unexpected file format).","docs.view.treeTitle":"Documents","docs.view.selectPrompt":"Select a document to preview.","docs.view.referencedBy":"Tasks referencing this doc","docs.view.noRefs":"No tasks reference this doc yet.","docsEdit.new":"+ New doc","docsEdit.unsaved":"(unsaved new document)","docsEdit.editAria":"Document source (Markdown)","docsEdit.createTask":"Create task from this doc","docsEdit.delete":"Delete","docsEdit.deleteConfirm":"Delete this document?","docsEdit.deleteYes":"Delete","docsEdit.dirtyConfirm":"You have unsaved changes. Discard and continue?","docsSave.title":"Save new document","docsSave.parent":"Parent folder","docsSave.parentRoot":"(write root)","docsSave.newFolder":"New folder (optional)","docsSave.newFolder.placeholder":"e.g. design","docsSave.fileName":"File name","docsSave.fileName.placeholder":"e.g. spec.md","docsSave.confirm":"Save","files.settings":"Settings files","files.browse":"Browse","files.treeLoadError":"Failed to load the file tree / catalog. Individual file operations still work.","files.catalog":"Catalog","files.rootFiles":"Root files","files.selectPrompt":"Select a file to view or edit.","files.save":"Save","files.saving":"Saving…","files.saved":"Saved (.bak created)","files.saveError":"Failed to save","files.loadError":"Failed to load","files.notFound":"File not found (will be created on save).","files.invalidJson":"Invalid JSON","files.conflict":"Changed externally. Reload before saving.","files.reload":"Reload","files.restartNotice":"Changes take effect from a new AI session; restart any running session.","files.confirmSave.title":"Confirm save","files.confirmSave.intro":"Save the following changes to {file}? (a .bak is created on save)","files.confirmSave.diffAria":"Changes to be saved","files.confirmSave.confirm":"Save","files.confirmSave.cancel":"Cancel","files.catalogEmpty":"No skills / agents found.","files.globalCatalog":"Global (skills / agents)","files.globalCatalogEmpty":"No global skills / agents in ~/.claude.","files.globalBadge":"🌐 Global (~/.claude)","files.globalWarn":"This is a GLOBAL config (~/.claude). Saving affects ALL projects, not just this one.","files.noName":"(no name)","search.placeholder":"Search (title / labels / assignee)…","search.label":"Label","search.assignee":"Assignee","search.all":"All","archive.action":"Archive","archive.archiveDone":"Archive all Done","archive.confirm":"Archive {n} done task(s)?","archive.error":"Failed to archive","archive.view.listTitle":"Archived tasks","archive.view.searchPlaceholder":"Search (title / ID / labels / assignee / body)…","archive.view.empty":"No archived tasks yet.","archive.view.noMatch":"No archived tasks match your search.","archive.view.noMonth":"(no month)","archive.view.loadError":"Failed to load the archive.","archive.view.selectPrompt":"Select an archived task to preview.","archive.view.restore":"Restore to board","archive.view.restoreConfirm":"Restore {id} to the board?","archive.view.restoreError":"Failed to restore the task.","trash.view.listTitle":"Trashed snapshots","trash.view.searchPlaceholder":"Search (ID / title / body)…","trash.view.empty":"Nothing in the trash. Snapshots are saved before destructive edits.","trash.view.noMatch":"No snapshots match your search.","trash.view.loadError":"Failed to load the trash.","trash.view.selectPrompt":"Select a snapshot to preview.","trash.view.trashedAt":"Saved at {time}","trash.view.restore":"Restore to board","trash.view.restoreConfirm":"Restore {id} from this snapshot? (The board file must not already exist.)","trash.view.restoreOverwriteConfirm":"Overwrite the current {id} and restore from this snapshot? (The current version is also moved to the trash.)","trash.view.restoreError":"Failed to restore the snapshot.","trash.view.restoreConflict":"{id} already exists on the board, so it was not restored. Delete or rename it first.","trash.view.diffTitle":"Changes since this snapshot (snapshot → current)","trash.view.diff.add":"+ lines in the current task","trash.view.diff.remove":"- lines from the snapshot","trash.view.noDiff":"This snapshot is identical to the current task.","trash.view.noCurrent":"No task with this ID is on the board, so there is nothing to compare.","trash.view.previewTitle":"Snapshot content","bulkInstruction.select":"Select multiple","bulkInstruction.exit":"Done","bulkInstruction.selectedCount":"{n} selected","bulkInstruction.copy":"Copy combined instruction","bulkInstruction.clear":"Clear selection","bulkInstruction.copied":"Copied","bulkInstruction.copyFailed":"Copy failed","bulkInstruction.hint":"Click cards to select; copy them as one dependency-ordered instruction.","bulkInstruction.wrapper":"Please handle the following {n} task(s) in dependency order (do the earlier ones first).","bulkInstruction.checkbox":"Select {id}","savedView.save":"+ Save as view","savedView.saveHint":"Apply a filter first, then save it as a view.","savedView.namePlaceholder":"View name…","savedView.delete":'Delete view "{name}"',"savedView.saveError":"Failed to save the view","savedView.conflict":"config.json was changed externally, so the view was not saved. The board has been refreshed — please try again.","savedView.palette":"View: {name}","rename.action":"Rename to free ID","rename.error":"Failed to rename","comment.title":"Comments","comment.member":"Commenter","comment.placeholder":"Write a comment (use @member to address)…","comment.send":"Send","comment.empty":"No comments yet.","comment.error":"Failed to add comment","quickComment.button":"Comment","quickComment.title":"Quick comment","quickComment.sending":"Sending…","quickComment.sent":"Sent","detail.tab.commits":"Commits","commits.empty":"No commits reference this task (or this is not a git repo).","commits.error":"Failed to load commits.","commits.copyHash":"Copy the full commit hash","commits.copied":"Copied","detail.tab.timeline":"Timeline","timeline.empty":"Nothing has happened on this task yet.","timeline.kind.log":"log","timeline.kind.comment":"comment","timeline.kind.commit":"commit","cp.empty":"No incomplete tasks (done tasks are excluded).","cp.level":"Level {n}","cp.dependsOn":"depends on:","cp.criticalPath":"critical path","cp.cycleWarning":"Circular dependency detected: {ids}. Fix depends_on (this chain cannot be ordered).","cp.cycleLevel":"Cycle","cp.copyReorg":"Copy reorganization request","cp.copied":"Copied","cp.copyFailed":"Copy failed","digest.empty":"No work log entries yet.","digest.entries":"{n} entries","digest.days":"Days","stats.empty":"No tasks yet. Statistics will appear once tasks exist.","stats.summary.title":"Overview","stats.summary.total":"Total tasks","stats.summary.done":"Completed","stats.completions.title":"Completions over time","stats.completions.byDay":"By day","stats.completions.byWeek":"By week (Mon)","stats.completions.empty":"No completed tasks yet.","stats.completions.barAria":"{count} completed on {key}","stats.completions.date":"Date","stats.completions.granularity":"Granularity","stats.cycleTime.title":"Cycle time (created → completed)","stats.cycleTime.median":"Median","stats.cycleTime.mean":"Mean","stats.cycleTime.sample":"Sample: {n} task(s)","stats.cycleTime.empty":"Not enough completed tasks to compute cycle time.","stats.days":"{n}d","stats.dwell.title":"Time in current status (approx.)","stats.dwell.note":"Approximation: there is no structured transition log, so this is the time elapsed in the current status only.","stats.dwell.status":"Status","stats.dwell.count":"Tasks","stats.dwell.avg":"Avg","stats.dwell.max":"Max","stats.member.title":"Completions by member","stats.member.name":"Member","stats.member.unassigned":"Unassigned","stats.member.empty":"No completed tasks yet.","stats.bottlenecks.title":"Bottlenecks (longest-pending)","stats.bottlenecks.empty":"No pending tasks.","stats.bottlenecks.task":"Task","stats.bottlenecks.dwell":"Pending for","stats.bottlenecks.type":"Type","stats.bottlenecks.reason":"Reason","heatmap.title":"Activity heatmap (by day of week × hour)","heatmap.note":"Counts work-log entries by day of week and hour. Timezone: local interpretation (no offset in work-log timestamps).","heatmap.empty":"No work-log entries yet.","heatmap.dow.0":"Sun","heatmap.dow.1":"Mon","heatmap.dow.2":"Tue","heatmap.dow.3":"Wed","heatmap.dow.4":"Thu","heatmap.dow.5":"Fri","heatmap.dow.6":"Sat","heatmap.cellAria":"{count} entries on {dow} {hour}:00","heatmap.col.dow":"Day of week","heatmap.col.hour":"Hour","heatmap.col.count":"Count","stalled.title":"Quiet tasks (stalled)","stalled.note":"Tasks where the time since the last activity (work log / comments) exceeds the per-status threshold (in_progress / todo / pending). Tune them via stallThresholds in config.json (unit: days).","stalled.empty":"No stalled tasks. Everything is moving.","stalled.task":"Task","stalled.status":"Status","stalled.idle":"Idle for","stalled.badge":"Stalled","stalled.cardTitle":"No activity for {n}d (stalled)","stalled.palette":"Jump to stalled task: {id} — {title}","progress.label":"Progress {done}/{total}","newActivity.badge":"New","newActivity.cardTitle":"Changed while you were away (open it to mark as read)","newActivity.markAllRead":"Mark all read ({n})","newActivity.markAllRead.title":"Mark all new activity as read","decisionWaits.badge":"Awaiting decision: {n}","decisionWaits.title":"Tasks awaiting your decision","decisionWaits.empty":"No tasks are awaiting a decision.","decisionWaits.open":"Show tasks awaiting a decision","decisionWaits.assignee":"Assignee","decisionWaits.noReason":"No reason provided","home.pinned.title":"Pinned","home.pinned.empty":"No pinned tasks. Click 📌 on a card or in the detail panel to pin.","home.pinned.doneHidden":"(done tasks are hidden)","home.pin.toggle":"Pin this task","home.pin.unpin":"Unpin this task","home.lead":"What needs your attention, and what to do next.","home.empty":'No tasks yet — use "+ Add task" above to create your first one.',"home.allClear.title":"All clear","home.allClear.detail":"Nothing is waiting on you, nothing is stalled, and no column is over its WIP limit.","home.next.title":"Next action (critical path)","home.next.empty":"No active tasks — nothing is blocking progress.","home.next.startHere":"Start here","home.next.cycle":"A dependency cycle was detected. Open the Critical path view to resolve it.","home.wip.title":"WIP overflow","home.wip.empty":"No column is over its WIP limit.","home.wip.row":"{label}: {count} / limit {limit}","home.unread.title":"New since you were away","home.unread.empty":"Nothing new.","home.idleDays":"idle {n}d","home.openAria":"Open {id}","milestone.empty":"No milestones defined. Add a milestones[] array to config.json.","milestone.roadmap":"Roadmap","milestone.history":"History","milestone.unassignedTasks":"No milestone","milestone.tasks":"Tasks","milestone.status.planned":"planned","milestone.status.active":"active","milestone.status.done":"done","column.empty":"(no tasks)","column.wipLimit":"WIP limit {limit}","column.wipExceeded":"WIP limit {limit} exceeded","card.unassigned":"Unassigned","card.unregisteredMember":"Unregistered member","card.memberType":"Type: {type}","card.lastUpdated":"Updated {elapsed}","member.human":"human","member.ai":"AI","time.justNow":"just now","time.minutesAgo":"{n}m ago","time.hoursAgo":"{n}h ago","time.daysAgo":"{n}d ago","blocked.decision":"Awaiting decision","blocked.external":"Awaiting external","blocked.dependency":"Awaiting dependency","blocked.decision.option":"decision (waiting on a person)","blocked.external.option":"external (waiting on something external)","blocked.dependency.option":"dependency (waiting on another task)","revise.button":"Request rework","revise.dialog.title":"Request rework","revise.dialog.intro":'Send "{title}" back to Todo.',"revise.dialog.reason":"Reason (optional, multiple lines OK)","revise.dialog.placeholder":"e.g. The error handling does not cover the timeout case — please revisit it.","revise.dialog.confirm":"Send back to Todo","revise.error":"Failed to request rework","revise.conflict":"The task was changed externally, so the rework request was not applied. The board has been refreshed — please try again.","blockedDialog.title":"Reason for putting on hold","blockedDialog.intro":'Moving "{title}" to Pending.',"blockedDialog.type":"Type","blockedDialog.reason":"Reason (who / what you are waiting for, one line)","blockedDialog.reason.placeholder":"e.g. Waiting for RYU to review","blockedDialog.confirm":"Move to Pending","addTask.title":"Add a task","addTask.field.title":"Title (required)","addTask.field.title.placeholder":"e.g. Add validation to the login API","addTask.field.createdBy":"Reporter","addTask.field.assignee":"Assignee (optional)","addTask.field.priority":"Priority","addTask.field.labels":"Labels (optional, comma-separated)","addTask.field.labels.placeholder":"e.g. backend, auth","addTask.field.template":"Template (optional)","addTask.template.none":"(no template)","addTask.field.body":"Body (optional)","addTask.field.body.placeholder":"Task description / acceptance criteria…","addTask.submit":"Create","addTask.submitting":"Creating…","addTask.error":"Failed to create the task","addTask.field.fromDoc":"Linked from doc","palette.title":"Command palette","palette.placeholder":"Search tasks, switch views, create…","palette.empty":"No matching commands.","palette.go":"Go to","palette.addTask":"Add a task","palette.settings":"Open settings","status.proposed":"Proposed","status.backlog":"Backlog","status.todo":"Todo","status.in_progress":"In progress","status.pending":"Pending","status.done":"Done","overview.title":"Cross-project overview (read-only)","overview.projects":"Projects","overview.attention.title":"Attention tasks (in progress / pending / proposed)","overview.attention.empty":"No tasks in progress, pending, or proposed.","overview.col.project":"Project","overview.col.task":"Task","overview.col.status":"Status","overview.col.assignee":"Assignee","overview.col.blocked":"Blocked","overview.warnings":"{n} warning(s)","overview.wipExceeded":"WIP exceeded","overview.loadError":"Failed to load the overview.","mode.connectError":"Could not connect to the AIzuchi server. Check that it is running, then reload.","aiHealth.title":"AI onboarding diagnostics","aiHealth.noAiMembers":"No AI members are registered. Add an AI member (type: ai) to config.json.","aiHealth.allClear":"No issues — all AI members are properly configured.","aiHealth.member":"Member","aiHealth.warnings":"{n} warning(s)","aiHealth.noWarnings":"No issues","aiHealth.kind.invalid_task":"Invalid task file","aiHealth.kind.duplicate_id":"Duplicate task ID","aiHealth.kind.unregistered_member":"Unregistered member reference","aiHealth.kind.invalid_config":"Config error","aiHealth.kind.mode_violation":"Mode violation (proposal)","aiHealth.fix.invalid_task":"Fix the YAML frontmatter in the listed task file(s) so they conform to the schema (required fields, correct enum values).","aiHealth.fix.duplicate_id":'Rename the duplicate task ID using the "Rename to free ID" action in the Warnings banner, or manually change the id field in one of the files.',"aiHealth.fix.unregistered_member":"Add this member ID to config.json members[], or correct the created_by / assignee field in the task file.","aiHealth.fix.invalid_config":"Fix config.json so it parses as valid JSON and all fields conform to the schema. Open it from the AI config tab.","aiHealth.fix.mode_violation":'The AI filed a task outside the proposal workflow. Either approve / reject it via the board, or switch aiTaskCreation to "free" in config.json.',"common.cancel":"Cancel","common.save":"Save","common.saving":"Saving…","common.discard":"Discard changes","common.unset":"(unset)","move.error":"Failed to change the status","detail.aria":"Details of {id}","detail.close":"Close","detail.tab.preview":"Preview","detail.tab.edit":"Edit","detail.tab.split":"Split","detail.tab.log":"Work log","detail.editAria":"Edit the task file","detail.log.empty":"No work log yet.","detail.dirty":"You have unsaved changes","detail.saveError":"Failed to save","detail.copyInstruction":"Copy instruction for AI","detail.copyInstruction.done":"Copied","detail.copyInstruction.failed":"Copy failed","detail.copyInstruction.title":"Copy a ready-to-paste instruction for the AI to your clipboard","detail.delete":"Delete permanently","detail.delete.confirm":"Permanently delete {id}? (A snapshot is saved to the trash before deletion.)","detail.delete.error":"Failed to delete the task","conflict.title":"Save conflict","conflict.intro":"This task was changed externally (by an editor or AI) after you started editing. Below is the diff of your edits against the server version (the base).","conflict.diffAria":"Conflict diff","conflict.legend.add":"+ your additions","conflict.legend.remove":"- lines from the server","conflict.reload":"Reload server version (discard edits)","conflict.overwrite":"Overwrite with my changes","warning.summary":"{n} warning(s) (the board keeps showing)","warning.kind.invalid_task":"Invalid task","warning.kind.duplicate_id":"Duplicate ID","warning.kind.unregistered_member":"Unregistered member","warning.kind.invalid_config":"Config error","warning.kind.mode_violation":"Mode violation","proposal.approve":"Approve","proposal.reject":"Reject","proposal.reject.prompt":"Reason for rejection (recorded in the work log)","proposal.approve.error":"Failed to approve","proposal.reject.error":"Failed to reject","viewer.label":"You are","viewer.none":"(not set)","filter.assignedToMe":"Assigned to me","settings.title":"Settings","settings.aiTaskCreation":"AI task creation mode","settings.aiTaskCreation.free":"free (AI may create directly)","settings.aiTaskCreation.proposal":"proposal (approval required)","settings.language":"Language","settings.language.en":"English","settings.language.ja":"日本語","settings.projectName":"Project name","settings.idPrefix":"ID prefix","settings.instructionTemplate":"Instruction template ({id} / {path} are expanded)","settings.members":"Members","settings.members.add":"+ Add member","settings.members.idPlaceholder":"ID (slug)","settings.members.labelPlaceholder":"Display name (optional)","settings.members.typePlaceholder":"Type","settings.migrate.title":"These member changes affect existing tasks","settings.migrate.rename":"{from} → {to}: reassign {n} referencing task(s)","settings.migrate.removed":"Removing {id} ({n} referencing task(s)). Reassign to:","settings.migrate.noTransfer":"Do not reassign (tasks will show warnings)","settings.migrate.execute":"Save and apply","settings.migrate.skipped":"Some task files could not be updated: {files}","settings.migrate.swap":"Swapping member IDs in one save is not supported. Save in two steps.","settings.migrate.failed":"Settings were saved, but reassigning task references failed. Save again to retry the rest.","settings.members.duplicate":"Duplicate member IDs: {ids}","settings.columns":"Columns","settings.columns.idPlaceholder":"id (e.g. todo)","settings.columns.labelPlaceholder":"Display name (optional)","settings.columns.wipPlaceholder":"WIP","settings.columns.wipAria":"WIP limit","settings.columns.hideWhenEmpty":"Hide when empty","settings.columns.moveUp":"Move up","settings.columns.moveDown":"Move down","settings.columns.remove":"Remove column","settings.columns.add":"+ Add column","settings.paths.settingsFiles":"AI config: settings files","settings.paths.browseDirs":"AI config: browse directories","settings.paths.rootFiles":"AI config: root files","settings.paths.placeholder":"Path from the project root","settings.paths.remove":"Remove path","settings.paths.add":"+ Add path","settings.docsDirs":"Related docs: read directories (docsDirs)","settings.docsDirs.placeholder":"Relative path from the project root (e.g. _docs)","settings.docsWriteDirs":"Related docs: write directories (docsWriteDirs)","settings.docsWriteDirs.placeholder":"Relative path from the project root (e.g. _docs)","settings.docsWriteDirs.note":"Adding a directory here enables document creation, saving, and deletion within it. Leave empty to disable write access.","settings.views":"Tabs (views)","settings.views.show":"Show","settings.views.moveUp":"Move up","settings.views.moveDown":"Move down","settings.advanced":"Advanced (raw JSON)","settings.advanced.aria":"Advanced settings (raw JSON)","settings.save":"Save","settings.saving":"Saving…","settings.saved":"Saved","settings.error":"Failed to save the settings","settings.reload":"Reload","settings.loadError":"Failed to load the settings","settings.conflict":"config.json was changed externally (by an editor or AI). Close and reopen Settings to reload, then save again."},Zk={"header.live":"ライブ","header.live.title":"ライブ反映が有効です","header.reconnecting":"再接続中","header.reconnecting.title":"再接続中…","header.addTask":"+ タスク追加","header.settings":"設定","header.help":"キーボードショートカット (?)","shortcuts.title":"キーボードショートカット","shortcuts.palette":"コマンドパレットを開く","shortcuts.help":"このヘルプを表示","shortcuts.openCard":"フォーカス中のカードを開く","shortcuts.grabCard":"フォーカス中のカードを掴む / 置く","shortcuts.moveCard":"掴んだカードを列間で移動","shortcuts.close":"ダイアログ / パレットを閉じる","shortcuts.aiInstruction.title":"AI への導入指示","shortcuts.aiInstruction.desc":"AI エージェント (Claude 等) にこのプロジェクトへ AIzuchi 経由で参加してもらうための指示文をコピーします。","shortcuts.aiInstruction.copy":"AI への指示をコピー","shortcuts.aiInstruction.copied":"コピーしました","shortcuts.aiInstruction.failed":"コピーに失敗しました","banner.close":"閉じる","board.loading":"読み込み中…","board.unavailable":"ボードを表示できません。","error.view.title":"このビューの表示中にエラーが発生しました。","error.view.detail":"タブを切り替えるか、再試行してください。タスクには影響しません(表示のみのエラーです)。","error.view.retry":"再試行","board.empty.title":"まだタスクがありません","board.empty.lead":"最初のタスクを起票して始めましょう。タスクは .kanban/tasks/ 配下のプレーンな Markdown ファイルとして、あなた (または AI エージェント) が管理します。このボードはそれを表示しているだけです。","board.empty.addFirst":"+ 最初のタスクを起票","board.empty.aiNote":"AI エージェントと一緒に進めますか? 運用規約はすでにプロジェクトの CLAUDE.md に追記済みです。下のプロンプトをコピーして AI セッションに貼り付ければ、規約を読んで最初のタスクを起票してくれます。","board.empty.copyInstruction":"AI へのプロンプトをコピー","board.empty.copied":"コピーしました","board.empty.copyFailed":"コピーに失敗しました","board.empty.aiInstruction":"このプロジェクトは AIzuchi でタスク管理しています。CLAUDE.md の「AIzuchi 運用規約」セクションを読んでから、.kanban/tasks/ 配下に最初のタスクを frontmatter スキーマに従って起票してください (id = TASK-001、created / updated は現在時刻をタイムゾーン付きで)。小さく具体的な最初のタスクを選び、todo カラムに置いてください。","view.home":"ホーム","view.board":"ボード","view.critical":"クリティカルパス","view.milestones":"マイルストーン","view.digest":"日次ダイジェスト","view.files":"AI 設定","view.stats":"統計","view.docs":"関連資料","view.archive":"アーカイブ","view.trash":"ごみ箱","detail.tab.meta":"メタ","meta.priority":"優先度","meta.priority.hint":"優先度を変更する前に、編集タブの変更を保存または破棄してください。","meta.priority.saveError":"優先度の保存に失敗しました","meta.dependsOn":"依存タスク","meta.dependsOn.empty":"依存タスクはありません。","meta.dependsOn.add":"+ 依存タスクを追加","meta.dependsOn.remove":"依存 {id} を削除","meta.dependsOn.pickerTitle":"依存タスクを追加","meta.dependsOn.pickerEmpty":"依存できる他のタスクがありません。","meta.dependsOn.saveError":"依存タスクの保存に失敗しました","meta.dirtyHint":"メタフィールドを変更する前に、編集タブの変更を保存または破棄してください。","meta.conflict":"外部で変更されたため反映できませんでした。ボードを最新化したので、もう一度操作してください。","meta.noChange":"タスクファイルへ変更を反映できませんでした(想定外のファイル形式です)。","detail.tab.docs":"関連資料","docs.empty":"関連資料はまだありません。","docs.add":"+ 資料を追加","docs.remove":"削除","docs.broken":"リンク切れ","docs.pickerTitle":"関連資料を追加","docs.pickerEmpty":"docsDirs 配下に .md ファイルがありません。","docs.dirtyHint":"編集タブの変更を保存または破棄してから関連資料を変更してください。","docs.loadError":"資料の読み込みに失敗しました。","docs.treeError":"資料一覧の読み込みに失敗しました。","docs.conflict":"外部で変更されたため反映できませんでした。一覧を最新化したので、もう一度操作してください。","docs.noChange":"タスクファイルへ変更を反映できませんでした(想定外のファイル形式です)。","docs.view.treeTitle":"資料","docs.view.selectPrompt":"プレビューする資料を選んでください。","docs.view.referencedBy":"この資料を参照しているタスク","docs.view.noRefs":"この資料を参照しているタスクはまだありません。","docsEdit.new":"+ 新規資料","docsEdit.unsaved":"(未保存の新規資料)","docsEdit.editAria":"資料のソース(Markdown)","docsEdit.createTask":"このファイルから起票","docsEdit.delete":"削除","docsEdit.deleteConfirm":"この資料を削除しますか?","docsEdit.deleteYes":"削除する","docsEdit.dirtyConfirm":"未保存の変更があります。破棄して続けますか?","docsSave.title":"新規資料を保存","docsSave.parent":"親フォルダ","docsSave.parentRoot":"(書込ルート)","docsSave.newFolder":"新規フォルダ(任意)","docsSave.newFolder.placeholder":"例: design","docsSave.fileName":"ファイル名","docsSave.fileName.placeholder":"例: spec.md","docsSave.confirm":"保存","files.settings":"設定ファイル","files.browse":"閲覧","files.treeLoadError":"ファイルツリー / カタログの読み込みに失敗しました。個別ファイルの操作は引き続き可能です。","files.catalog":"カタログ","files.rootFiles":"ルートファイル","files.selectPrompt":"閲覧・編集するファイルを選んでください。","files.save":"保存","files.saving":"保存中…","files.saved":"保存しました (.bak 作成)","files.saveError":"保存に失敗しました","files.loadError":"読み込みに失敗しました","files.notFound":"ファイルがありません (保存時に作成されます)。","files.invalidJson":"不正な JSON","files.conflict":"外部で変更されています。再読み込みしてから保存してください。","files.reload":"再読み込み","files.restartNotice":"変更は新しい AI セッションから有効です。実行中のセッションは再起動が必要です。","files.confirmSave.title":"保存前の確認","files.confirmSave.intro":"{file} に以下の変更を保存します。(保存時に .bak を作成します)","files.confirmSave.diffAria":"保存する変更の差分","files.confirmSave.confirm":"この内容で保存","files.confirmSave.cancel":"キャンセル","files.catalogEmpty":"skill / agent が見つかりません。","files.globalCatalog":"グローバル (skills / agents)","files.globalCatalogEmpty":"~/.claude/skills, agents に skill / agent がありません。","files.globalBadge":"🌐 グローバル (~/.claude)","files.globalWarn":"これはグローバル設定 (~/.claude) です。保存するとこのプロジェクトだけでなく全プロジェクトに影響します。","files.noName":"(名前なし)","search.placeholder":"検索 (タイトル / ラベル / 担当)…","search.label":"ラベル","search.assignee":"担当","search.all":"すべて","archive.action":"アーカイブ","archive.archiveDone":"完了した項目を一括アーカイブする","archive.confirm":"完了したタスク {n} 件をアーカイブしますか?","archive.error":"アーカイブに失敗しました","archive.view.listTitle":"アーカイブ済みタスク","archive.view.searchPlaceholder":"検索 (タイトル / ID / ラベル / 担当 / 本文)…","archive.view.empty":"アーカイブ済みのタスクはまだありません。","archive.view.noMatch":"検索条件に一致するアーカイブはありません。","archive.view.noMonth":"(月なし)","archive.view.loadError":"アーカイブの読み込みに失敗しました。","archive.view.selectPrompt":"プレビューするアーカイブを選んでください。","archive.view.restore":"ボードに戻す","archive.view.restoreConfirm":"{id} をボードに戻しますか?","archive.view.restoreError":"タスクの復元に失敗しました。","trash.view.listTitle":"退避した旧版","trash.view.searchPlaceholder":"検索 (ID / タイトル / 本文)…","trash.view.empty":"ごみ箱は空です。破壊的な編集の直前に旧版が自動退避されます。","trash.view.noMatch":"検索条件に一致する退避はありません。","trash.view.loadError":"ごみ箱の読み込みに失敗しました。","trash.view.selectPrompt":"プレビューする退避を選んでください。","trash.view.trashedAt":"退避日時 {time}","trash.view.restore":"ボードに戻す","trash.view.restoreConfirm":"この退避から {id} を復元しますか? (同じ ID がボードに無いことが前提です)","trash.view.restoreOverwriteConfirm":"現在の {id} を上書きして、この退避から復元しますか? (現行もごみ箱へ退避されます)","trash.view.restoreError":"退避の復元に失敗しました。","trash.view.restoreConflict":"{id} は既にボードに存在するため復元しませんでした。先に削除かリネームしてください。","trash.view.diffTitle":"この退避からの変更 (退避版 → 現行)","trash.view.diff.add":"+ 現行タスクにある行","trash.view.diff.remove":"- 退避版にあった行","trash.view.noDiff":"この退避は現行タスクと同一です。","trash.view.noCurrent":"この ID のタスクはボードに無いため、比較対象がありません。","trash.view.previewTitle":"退避内容","bulkInstruction.select":"複数選択","bulkInstruction.exit":"完了","bulkInstruction.selectedCount":"{n} 件選択中","bulkInstruction.copy":"まとめて指示をコピー","bulkInstruction.clear":"選択解除","bulkInstruction.copied":"コピーしました","bulkInstruction.copyFailed":"コピーに失敗","bulkInstruction.hint":"カードをクリックして選び、依存順の 1 つの指示文としてコピーします。","bulkInstruction.wrapper":"次の {n} 件を依存順に (先行するものから順に) 対応してください。","bulkInstruction.checkbox":"{id} を選択","savedView.save":"+ ビューとして保存","savedView.saveHint":"先に絞り込みを設定してから、ビューとして保存できます。","savedView.namePlaceholder":"ビュー名…","savedView.delete":"ビュー「{name}」を削除","savedView.saveError":"ビューの保存に失敗しました","savedView.conflict":"config.json が外部で変更されたため保存できませんでした。ボードを最新化したので、もう一度操作してください。","savedView.palette":"ビュー: {name}","rename.action":"空き ID にリネーム","rename.error":"リネームに失敗しました","comment.title":"やりとり","comment.member":"投稿者","comment.placeholder":"コメントを書く (@member で宛先指定)…","comment.send":"送信","comment.empty":"コメントはまだありません。","comment.error":"コメントの追加に失敗しました","quickComment.button":"コメント","quickComment.title":"クイックコメント","quickComment.sending":"送信中…","quickComment.sent":"送信済み","detail.tab.commits":"コミット","commits.empty":"このタスクを参照しているコミットはありません (または git リポジトリではありません)。","commits.error":"コミットの読み込みに失敗しました。","commits.copyHash":"コミットハッシュ全体をコピー","commits.copied":"コピーしました","detail.tab.timeline":"タイムライン","timeline.empty":"このタスクではまだ何も起きていません。","timeline.kind.log":"作業ログ","timeline.kind.comment":"やりとり","timeline.kind.commit":"コミット","cp.empty":"未完了タスクがありません (done は除外)。","cp.level":"レベル {n}","cp.dependsOn":"依存:","cp.criticalPath":"クリティカルパス","cp.cycleWarning":"循環依存を検出しました: {ids}。depends_on を見直してください (この鎖は順序付けできません)。","cp.cycleLevel":"循環","cp.copyReorg":"再編成指示をコピー","cp.copied":"コピーしました","cp.copyFailed":"コピーに失敗","digest.empty":"作業ログがまだありません。","digest.entries":"{n} 件","digest.days":"日付","stats.empty":"タスクがまだありません。タスクができると統計が表示されます。","stats.summary.title":"概要","stats.summary.total":"タスク総数","stats.summary.done":"完了","stats.completions.title":"完了数の推移","stats.completions.byDay":"日別","stats.completions.byWeek":"週別 (月曜起点)","stats.completions.empty":"完了したタスクがまだありません。","stats.completions.barAria":"{key} に {count} 件完了","stats.completions.date":"日付","stats.completions.granularity":"集計粒度","stats.cycleTime.title":"サイクルタイム (作成 → 完了)","stats.cycleTime.median":"中央値","stats.cycleTime.mean":"平均","stats.cycleTime.sample":"対象: {n} 件","stats.cycleTime.empty":"サイクルタイムを算出できる完了タスクが足りません。","stats.days":"{n} 日","stats.dwell.title":"現ステータスでの滞留時間 (近似)","stats.dwell.note":"近似値: 構造化された遷移ログがないため、現在のステータスでの経過時間のみを示します。","stats.dwell.status":"ステータス","stats.dwell.count":"タスク数","stats.dwell.avg":"平均","stats.dwell.max":"最大","stats.member.title":"メンバー別完了数","stats.member.name":"メンバー","stats.member.unassigned":"未割り当て","stats.member.empty":"完了したタスクがまだありません。","stats.bottlenecks.title":"ボトルネック (滞留の長い保留)","stats.bottlenecks.empty":"保留中のタスクはありません。","stats.bottlenecks.task":"タスク","stats.bottlenecks.dwell":"保留期間","stats.bottlenecks.type":"種別","stats.bottlenecks.reason":"理由","heatmap.title":"稼働ヒートマップ (曜日 × 時間帯)","heatmap.note":"作業ログを曜日・時間帯で集計します。タイムゾーン: 作業ログの時刻は offset 無しのためローカル解釈されます。","heatmap.empty":"作業ログがまだありません。","heatmap.dow.0":"日","heatmap.dow.1":"月","heatmap.dow.2":"火","heatmap.dow.3":"水","heatmap.dow.4":"木","heatmap.dow.5":"金","heatmap.dow.6":"土","heatmap.cellAria":"{dow} {hour}時台: {count} 件","heatmap.col.dow":"曜日","heatmap.col.hour":"時間帯","heatmap.col.count":"件数","stalled.title":"静かなタスク (停滞)","stalled.note":"最後の活動 (作業ログ・やりとり) からの経過がステータス別の閾値 (in_progress / todo / pending) を超えたタスクです。config.json の stallThresholds で調整できます (単位: 日)。","stalled.empty":"停滞しているタスクはありません。すべて動いています。","stalled.task":"タスク","stalled.status":"ステータス","stalled.idle":"停滞期間","stalled.badge":"停滞","stalled.cardTitle":"{n} 日更新なし (停滞)","stalled.palette":"停滞タスクへジャンプ: {id} — {title}","progress.label":"進捗 {done}/{total}","newActivity.badge":"新着","newActivity.cardTitle":"見ていない間に変わりました (開くと既読になります)","newActivity.markAllRead":"すべて既読 ({n})","newActivity.markAllRead.title":"新着をすべて既読にする","decisionWaits.badge":"判断待ち {n} 件","decisionWaits.title":"あなたの判断待ちのタスク","decisionWaits.empty":"判断待ちのタスクはありません。","decisionWaits.open":"判断待ちのタスクを表示","decisionWaits.assignee":"担当","decisionWaits.noReason":"理由の記載なし","home.pinned.title":"ピン留め","home.pinned.empty":"ピン留め中のタスクはありません。カードまたは詳細パネルの 📌 でピン留めできます。","home.pinned.doneHidden":"(完了タスクは非表示)","home.pin.toggle":"このタスクをピン留め","home.pin.unpin":"ピン留めを解除","home.lead":"今あなたの注意が必要なこと、そして次にやるべきこと。","home.empty":"まだタスクがありません。上の「+ タスク追加」から最初のタスクを作成してください。","home.allClear.title":"すべて順調","home.allClear.detail":"判断待ち・停滞はなく、WIP 上限を超えた列もありません。","home.next.title":"次の一手(クリティカルパス)","home.next.empty":"未完了タスクはありません(進行を止めているものはなし)。","home.next.startHere":"ここから着手","home.next.cycle":"依存関係に循環があります。クリティカルパスビューで解消してください。","home.wip.title":"WIP 超過","home.wip.empty":"WIP 上限を超えた列はありません。","home.wip.row":"{label}: {count} / 上限 {limit}","home.unread.title":"離席中の新着","home.unread.empty":"新着はありません。","home.idleDays":"{n}日 停滞","home.openAria":"{id} を開く","milestone.empty":"マイルストーンが未定義です。config.json に milestones[] を追加してください。","milestone.roadmap":"予定表","milestone.history":"対応履歴","milestone.unassignedTasks":"マイルストーン未設定","milestone.tasks":"所属タスク","milestone.status.planned":"予定","milestone.status.active":"進行中","milestone.status.done":"完了","column.empty":"(タスクなし)","column.wipLimit":"WIP 上限 {limit}","column.wipExceeded":"WIP 上限 {limit} 超過","card.unassigned":"未割当","card.unregisteredMember":"未登録のメンバー","card.memberType":"種別: {type}","card.lastUpdated":"最終更新 {elapsed}","member.human":"人間","member.ai":"AI","time.justNow":"たった今","time.minutesAgo":"{n}分前","time.hoursAgo":"{n}時間前","time.daysAgo":"{n}日前","blocked.decision":"判断待ち","blocked.external":"外部待ち","blocked.dependency":"依存待ち","blocked.decision.option":"decision(人の判断待ち)","blocked.external.option":"external(外部待ち)","blocked.dependency.option":"dependency(依存タスク待ち)","revise.button":"やり直しを依頼","revise.dialog.title":"やり直しを依頼","revise.dialog.intro":"「{title}」を Todo に差し戻します。","revise.dialog.reason":"理由(任意・複数行可)","revise.dialog.placeholder":"例: エラー処理がタイムアウト時を考慮できていないので見直してください。","revise.dialog.confirm":"Todo へ差し戻す","revise.error":"やり直し依頼に失敗しました","revise.conflict":"外部で変更されたため差し戻しを反映できませんでした。ボードを最新化したので、もう一度操作してください。","blockedDialog.title":"保留にする理由","blockedDialog.intro":"「{title}」を Pending に移動します。","blockedDialog.type":"種別","blockedDialog.reason":"理由(誰の・何待ちか。1 行)","blockedDialog.reason.placeholder":"例: RYU のレビュー待ち","blockedDialog.confirm":"Pending へ移動","addTask.title":"タスクを追加","addTask.field.title":"タイトル(必須)","addTask.field.title.placeholder":"例: ログインAPIのバリデーション追加","addTask.field.createdBy":"起票者","addTask.field.assignee":"担当者(任意)","addTask.field.priority":"優先度","addTask.field.labels":"ラベル(任意・カンマ区切り)","addTask.field.labels.placeholder":"例: backend, auth","addTask.field.template":"テンプレート(任意)","addTask.template.none":"(テンプレートなし)","addTask.field.body":"本文(任意)","addTask.field.body.placeholder":"タスクの説明 / 受け入れ条件など…","addTask.submit":"作成","addTask.submitting":"作成中…","addTask.error":"起票に失敗しました","addTask.field.fromDoc":"起票元の資料","palette.title":"コマンドパレット","palette.placeholder":"タスク検索・ビュー切替・起票…","palette.empty":"一致するコマンドがありません。","palette.go":"移動","palette.addTask":"タスクを追加","palette.settings":"設定を開く","status.proposed":"提案","status.backlog":"バックログ","status.todo":"未着手","status.in_progress":"進行中","status.pending":"保留","status.done":"完了","overview.title":"案件横断ビュー(閲覧専用)","overview.projects":"プロジェクト","overview.attention.title":"注目タスク(進行中 / 保留 / 提案)","overview.attention.empty":"進行中・保留・提案のタスクはありません。","overview.col.project":"案件","overview.col.task":"タスク","overview.col.status":"ステータス","overview.col.assignee":"担当","overview.col.blocked":"ブロック理由","overview.warnings":"警告 {n} 件","overview.wipExceeded":"WIP 超過","overview.loadError":"横断ビューの取得に失敗しました。","mode.connectError":"AIzuchi サーバーに接続できません。起動していることを確認して再読み込みしてください。","aiHealth.title":"AI オンボーディング診断","aiHealth.noAiMembers":"AI メンバーが登録されていません。config.json に type: ai のメンバーを追加してください。","aiHealth.allClear":"問題なし — 全 AI メンバーが正しく設定されています。","aiHealth.member":"メンバー","aiHealth.warnings":"警告 {n} 件","aiHealth.noWarnings":"問題なし","aiHealth.kind.invalid_task":"不正なタスクファイル","aiHealth.kind.duplicate_id":"タスク ID の重複","aiHealth.kind.unregistered_member":"未登録メンバーの参照","aiHealth.kind.invalid_config":"設定エラー","aiHealth.kind.mode_violation":"モード違反(提案制)","aiHealth.fix.invalid_task":"対象タスクの YAML frontmatter をスキーマに合わせて修正してください(必須フィールドの追加・enum 値の修正など)。","aiHealth.fix.duplicate_id":"警告バナーの「空き ID にリネーム」で重複を解消するか、タスクファイルの id フィールドを手動で修正してください。","aiHealth.fix.unregistered_member":"config.json の members[] にこのメンバー ID を追加するか、タスクファイルの created_by / assignee を修正してください。","aiHealth.fix.invalid_config":"config.json を正しい JSON に修正し、全フィールドがスキーマに合致するようにしてください。「AI 設定」タブから開けます。","aiHealth.fix.mode_violation":"AI が提案ワークフロー外でタスクを起票しました。ボードで承認・却下するか、config.json の aiTaskCreation を「free」に変更してください。","common.cancel":"キャンセル","common.save":"保存","common.saving":"保存中…","common.discard":"変更を取り消す","common.unset":"(未設定)","move.error":"ステータス変更に失敗しました","detail.aria":"{id} の詳細","detail.close":"閉じる","detail.tab.preview":"プレビュー","detail.tab.edit":"編集","detail.tab.split":"横並び","detail.tab.log":"作業ログ","detail.editAria":"タスクファイルの編集","detail.log.empty":"作業ログがありません。","detail.dirty":"未保存の変更があります","detail.saveError":"保存に失敗しました","detail.copyInstruction":"AI への指示をコピー","detail.copyInstruction.done":"コピーしました","detail.copyInstruction.failed":"コピーに失敗","detail.copyInstruction.title":"AI に渡せる指示文をクリップボードへコピーします","detail.delete":"完全に削除","detail.delete.confirm":"{id} を完全に削除しますか? (削除前にごみ箱へ退避されます)","detail.delete.error":"タスクの削除に失敗しました","conflict.title":"保存が競合しました","conflict.intro":"このタスクは、あなたが編集を始めた後に外部(エディタや AI)で変更されています。以下はサーバー側の内容(基準)に対する、あなたの編集の差分です。","conflict.diffAria":"競合の差分","conflict.legend.add":"+ あなたの追加","conflict.legend.remove":"- サーバー側にあった行","conflict.reload":"サーバー側を読み込み直す(編集を破棄)","conflict.overwrite":"自分の内容で上書き","warning.summary":"{n} 件の警告(ボードは表示を継続しています)","warning.kind.invalid_task":"不正なタスク","warning.kind.duplicate_id":"重複 ID","warning.kind.unregistered_member":"未登録メンバー","warning.kind.invalid_config":"設定エラー","warning.kind.mode_violation":"モード違反","proposal.approve":"承認","proposal.reject":"却下","proposal.reject.prompt":"却下理由(作業ログに記録されます)","proposal.approve.error":"承認に失敗しました","proposal.reject.error":"却下に失敗しました","viewer.label":"自分は","viewer.none":"(未設定)","filter.assignedToMe":"自分宛","settings.title":"設定","settings.aiTaskCreation":"AI 起票モード","settings.aiTaskCreation.free":"free(AI が直接起票してよい)","settings.aiTaskCreation.proposal":"proposal(承認制)","settings.language":"言語","settings.language.en":"English","settings.language.ja":"日本語","settings.projectName":"プロジェクト名","settings.idPrefix":"ID 接頭辞","settings.instructionTemplate":"指示テンプレート({id} / {path} が展開されます)","settings.members":"メンバー","settings.members.add":"+ メンバー追加","settings.members.idPlaceholder":"ID(スラッグ)","settings.members.labelPlaceholder":"表示名(任意)","settings.members.typePlaceholder":"種別","settings.migrate.title":"このメンバー変更は既存タスクに影響します","settings.migrate.rename":"{from} → {to}: 参照タスク {n} 件を付け替えます","settings.migrate.removed":"{id} を削除します(参照タスク {n} 件)。移譲先:","settings.migrate.noTransfer":"移譲しない(警告表示のまま)","settings.migrate.execute":"保存して実行","settings.migrate.skipped":"一部のタスクを書き換えられませんでした: {files}","settings.migrate.swap":"メンバー ID の入れ替えは 1 回の保存では実行できません。2 回に分けて保存してください。","settings.migrate.failed":"設定は保存済みです。参照の付け替えに失敗しました — もう一度保存すると残りを再実行します。","settings.members.duplicate":"メンバー ID が重複しています: {ids}","settings.columns":"カラム","settings.columns.idPlaceholder":"id (例: todo)","settings.columns.labelPlaceholder":"表示名 (任意)","settings.columns.wipPlaceholder":"WIP","settings.columns.wipAria":"WIP 上限","settings.columns.hideWhenEmpty":"空のとき隠す","settings.columns.moveUp":"上へ","settings.columns.moveDown":"下へ","settings.columns.remove":"カラムを削除","settings.columns.add":"+ カラムを追加","settings.paths.settingsFiles":"AI 設定: 設定ファイル","settings.paths.browseDirs":"AI 設定: 閲覧ディレクトリ","settings.paths.rootFiles":"AI 設定: ルートファイル","settings.paths.placeholder":"プロジェクトルートからのパス","settings.paths.remove":"パスを削除","settings.paths.add":"+ パスを追加","settings.docsDirs":"関連資料: 閲覧ディレクトリ (docsDirs)","settings.docsDirs.placeholder":"プロジェクトルートからの相対パス(例: _docs)","settings.docsWriteDirs":"関連資料: 書込ディレクトリ (docsWriteDirs)","settings.docsWriteDirs.placeholder":"プロジェクトルートからの相対パス(例: _docs)","settings.docsWriteDirs.note":"ここにディレクトリを追加すると、その配下で資料の作成・保存・削除が有効になります。空のままにすると書込を無効にできます。","settings.views":"タブ (ビュー)","settings.views.show":"表示","settings.views.moveUp":"上へ","settings.views.moveDown":"下へ","settings.advanced":"詳細(生 JSON)","settings.advanced.aria":"詳細設定(生 JSON)","settings.save":"保存","settings.saving":"保存中…","settings.saved":"保存しました","settings.error":"設定の保存に失敗しました","settings.reload":"再読み込み","settings.loadError":"設定の読み込みに失敗しました","settings.conflict":"config.json が外部 (エディタや AI) で変更されました。設定を一度閉じて開き直して再読み込みしてから、保存し直してください。"},Sd=Hg,Wg="aizuchi.lang",Yk={en:Ug,ja:Zk};function Qk(e,t){return t?e.replace(/\{(\w+)\}/g,(r,s)=>Object.prototype.hasOwnProperty.call(t,s)?String(t[s]):r):e}function qg(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(Wg);return e==="en"||e==="ja"?e:null}catch{return null}}function Xk(){return qg()!==null}const Kg=w.createContext(null);function Gk({children:e}){const[t,r]=w.useState(()=>qg()??"en"),s=w.useRef(!1),l=w.useCallback(p=>{r(p),typeof document<"u"&&(document.documentElement.lang=p)},[]),a=w.useCallback(p=>{s.current=!0,r(p);try{typeof localStorage<"u"&&localStorage.setItem(Wg,p)}catch{}typeof document<"u"&&(document.documentElement.lang=p)},[]),c=w.useCallback(()=>s.current||Xk(),[]),f=w.useCallback((p,y)=>{const x=Yk[t][p]??Ug[p]??p;return Qk(x,y)},[t]),m=w.useMemo(()=>({lang:t,setLang:a,applyLang:l,hasUserChoice:c,t:f}),[t,a,l,c,f]);return u.jsx(Kg.Provider,{value:m,children:e})}function pt(){const e=w.useContext(Kg);if(!e)throw new Error("useI18n は I18nProvider の内側で使ってください");return e}function Jk(e,t){switch(t.unit){case"justNow":return e("time.justNow");case"minutes":return e("time.minutesAgo",{n:t.n});case"hours":return e("time.hoursAgo",{n:t.n});case"days":return e("time.daysAgo",{n:t.n})}}const ew=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function tw(e){return Array.from(e.querySelectorAll(ew)).filter(r=>!r.hasAttribute("disabled")&&r.tabIndex!==-1)}function bo(e,t=!0){w.useEffect(()=>{if(!t)return;const r=e.current;if(!r)return;const s=l=>{if(l.key!=="Tab")return;const a=tw(r);if(a.length===0){l.preventDefault(),r.focus();return}const c=a[0],f=a[a.length-1],m=document.activeElement;l.shiftKey?(m===c||m===r||!r.contains(m))&&(l.preventDefault(),f.focus()):m===f&&(l.preventDefault(),c.focus())};return r.addEventListener("keydown",s),()=>r.removeEventListener("keydown",s)},[e,t])}const nw="_overlay_9olz3_1",rw="_dialog_9olz3_12",iw="_dialogWide_9olz3_23",sw="_title_9olz3_27",lw="_field_9olz3_32",aw="_label_9olz3_39",ow="_input_9olz3_45",cw="_select_9olz3_46",uw="_textarea_9olz3_47",dw="_actions_9olz3_69",fw="_btn_9olz3_76",mw="_btnPrimary_9olz3_88",pw="_btnDanger_9olz3_108",hw="_error_9olz3_114",re={overlay:nw,dialog:rw,dialogWide:iw,title:sw,field:lw,label:aw,input:ow,select:cw,textarea:uw,actions:dw,btn:fw,btnPrimary:mw,btnDanger:pw,error:hw};function Cd(e,t){return e===t}function Ur({title:e,onClose:t,children:r,wide:s}){const l=w.useRef(null);return bo(l),w.useEffect(()=>{var f;const a=document.activeElement,c=m=>{m.key==="Escape"&&t()};return document.addEventListener("keydown",c),(f=l.current)==null||f.focus(),()=>{var m;document.removeEventListener("keydown",c),(m=a==null?void 0:a.focus)==null||m.call(a)}},[t]),u.jsx("div",{className:re.overlay,onClick:a=>{Cd(a.target,a.currentTarget)&&(a.stopPropagation(),t())},children:u.jsxs("div",{ref:l,className:`${re.dialog} ${s?re.dialogWide:""}`,role:"dialog","aria-modal":"true","aria-label":e,tabIndex:-1,children:[u.jsx("h2",{className:re.title,children:e}),r]})})}const uh="aizuchi.createdBy",gw=["high","medium","low"];function yw({members:e,templates:t=[],initialRelatedDocs:r=[],onCancel:s,onSubmit:l}){var X;const{t:a}=pt(),c=typeof localStorage<"u"?localStorage.getItem(uh):null,f=c&&e.some(J=>J.id===c)?c:((X=e[0])==null?void 0:X.id)??"",[m,p]=w.useState(""),[y,g]=w.useState(f),[x,_]=w.useState(""),[k,C]=w.useState("medium"),[D,S]=w.useState(""),[R,T]=w.useState(""),[M,I]=w.useState(-1),[j,B]=w.useState(null),[Q,te]=w.useState(!1),O=J=>{if(I(J),J<0||J>=t.length){p(""),T(""),S(""),C("medium");return}const ve=t[J];p((ve.title??"").replace(/[\r\n]/g,"")),T(ve.body??""),S((ve.labels??[]).join(", ")),C(ve.priority??"medium")},W=w.useRef(!0);w.useEffect(()=>()=>{W.current=!1},[]);const ne=m.trim(),_e=ne.length>0&&y.length>0&&!Q,ie=async()=>{if(_e){te(!0),B(null);try{const J=D.split(",").map(ee=>ee.trim()).filter(ee=>ee.length>0),ve={title:ne,created_by:y,assignee:x||null,priority:k,labels:J,...R.length>0?{body:R}:{},...r.length>0?{related_docs:r}:{}};await l(ve),typeof localStorage<"u"&&localStorage.setItem(uh,y)}catch(J){W.current&&(B(J instanceof Error?J.message:a("addTask.error")),te(!1))}}};return u.jsxs(Ur,{title:a("addTask.title"),onClose:s,children:[j&&u.jsx("p",{className:re.error,children:j}),u.jsxs("form",{onSubmit:J=>{J.preventDefault(),ie()},children:[t.length>0&&u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"new-template",children:a("addTask.field.template")}),u.jsxs("select",{id:"new-template",className:re.select,value:M,onChange:J=>O(Number(J.target.value)),children:[u.jsx("option",{value:-1,children:a("addTask.template.none")}),t.map((J,ve)=>u.jsx("option",{value:ve,children:J.name},ve))]})]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"new-title",children:a("addTask.field.title")}),u.jsx("input",{id:"new-title",className:re.input,value:m,onChange:J=>p(J.target.value.replace(/[\r\n]/g,"")),placeholder:a("addTask.field.title.placeholder"),autoFocus:!0})]}),r.length>0&&u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,children:a("addTask.field.fromDoc")}),r.map(J=>u.jsx("p",{className:re.label,children:J},J))]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"new-created-by",children:a("addTask.field.createdBy")}),u.jsx("select",{id:"new-created-by",className:re.select,value:y,onChange:J=>g(J.target.value),children:e.map(J=>u.jsxs("option",{value:J.id,children:[J.label??J.id,"(",J.type,")"]},J.id))})]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"new-assignee",children:a("addTask.field.assignee")}),u.jsxs("select",{id:"new-assignee",className:re.select,value:x,onChange:J=>_(J.target.value),children:[u.jsx("option",{value:"",children:a("card.unassigned")}),e.map(J=>u.jsxs("option",{value:J.id,children:[J.label??J.id,"(",J.type,")"]},J.id))]})]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"new-priority",children:a("addTask.field.priority")}),u.jsx("select",{id:"new-priority",className:re.select,value:k,onChange:J=>C(J.target.value),children:gw.map(J=>u.jsx("option",{value:J,children:J},J))})]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"new-labels",children:a("addTask.field.labels")}),u.jsx("input",{id:"new-labels",className:re.input,value:D,onChange:J=>S(J.target.value.replace(/[\r\n]/g,"")),placeholder:a("addTask.field.labels.placeholder")})]}),t.length>0&&u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"new-body",children:a("addTask.field.body")}),u.jsx("textarea",{id:"new-body",className:re.textarea,value:R,onChange:J=>T(J.target.value),placeholder:a("addTask.field.body.placeholder")})]}),u.jsxs("div",{className:re.actions,children:[u.jsx("button",{type:"button",className:re.btn,onClick:s,children:a("common.cancel")}),u.jsx("button",{type:"submit",className:`${re.btn} ${re.btnPrimary}`,disabled:!_e,children:a(Q?"addTask.submitting":"addTask.submit")})]})]})]})}function vw(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const xw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_w=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kw={};function dh(e,t){return(kw.jsx?_w:xw).test(e)}const ww=/[ \t\n\f\r]/g;function bw(e){return typeof e=="object"?e.type==="text"?fh(e.value):!1:fh(e)}function fh(e){return e.replace(ww,"")===""}class Al{constructor(t,r,s){this.normal=r,this.property=t,s&&(this.space=s)}}Al.prototype.normal={};Al.prototype.property={};Al.prototype.space=void 0;function Zg(e,t){const r={},s={};for(const l of e)Object.assign(r,l.property),Object.assign(s,l.normal);return new Al(r,s,t)}function Gu(e){return e.toLowerCase()}class Vn{constructor(t,r){this.attribute=r,this.property=t}}Vn.prototype.attribute="";Vn.prototype.booleanish=!1;Vn.prototype.boolean=!1;Vn.prototype.commaOrSpaceSeparated=!1;Vn.prototype.commaSeparated=!1;Vn.prototype.defined=!1;Vn.prototype.mustUseProperty=!1;Vn.prototype.number=!1;Vn.prototype.overloadedBoolean=!1;Vn.prototype.property="";Vn.prototype.spaceSeparated=!1;Vn.prototype.space=void 0;let Sw=0;const We=Hi(),Jt=Hi(),Ju=Hi(),pe=Hi(),St=Hi(),Mi=Hi(),Xn=Hi();function Hi(){return 2**++Sw}const ed=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Jt,commaOrSpaceSeparated:Xn,commaSeparated:Mi,number:pe,overloadedBoolean:Ju,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),bu=Object.keys(ed);class Nd extends Vn{constructor(t,r,s,l){let a=-1;if(super(t,r),mh(this,"space",l),typeof s=="number")for(;++a<bu.length;){const c=bu[a];mh(this,bu[a],(s&ed[c])===ed[c])}}}Nd.prototype.defined=!0;function mh(e,t,r){r&&(e[t]=r)}function Ns(e){const t={},r={};for(const[s,l]of Object.entries(e.properties)){const a=new Nd(s,e.transform(e.attributes||{},s),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(a.mustUseProperty=!0),t[s]=a,r[Gu(s)]=s,r[Gu(a.attribute)]=s}return new Al(t,r,e.space)}const Yg=Ns({properties:{ariaActiveDescendant:null,ariaAtomic:Jt,ariaAutoComplete:null,ariaBusy:Jt,ariaChecked:Jt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:St,ariaCurrent:null,ariaDescribedBy:St,ariaDetails:null,ariaDisabled:Jt,ariaDropEffect:St,ariaErrorMessage:null,ariaExpanded:Jt,ariaFlowTo:St,ariaGrabbed:Jt,ariaHasPopup:null,ariaHidden:Jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:St,ariaLevel:pe,ariaLive:null,ariaModal:Jt,ariaMultiLine:Jt,ariaMultiSelectable:Jt,ariaOrientation:null,ariaOwns:St,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Jt,ariaReadOnly:Jt,ariaRelevant:null,ariaRequired:Jt,ariaRoleDescription:St,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Jt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Qg(e,t){return t in e?e[t]:t}function Xg(e,t){return Qg(e,t.toLowerCase())}const Cw=Ns({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Mi,acceptCharset:St,accessKey:St,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:St,autoFocus:We,autoPlay:We,blocking:St,capture:null,charSet:null,checked:We,cite:null,className:St,closedBy:null,colorSpace:null,cols:pe,colSpan:pe,command:null,commandFor:null,content:null,contentEditable:Jt,controls:We,controlsList:St,coords:pe|Mi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:Ju,draggable:Jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:St,height:pe,hidden:Ju,high:pe,href:null,hrefLang:null,htmlFor:St,httpEquiv:St,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:St,itemRef:St,itemScope:We,itemType:St,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:pe,pattern:null,ping:St,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:St,required:We,reversed:We,rows:pe,rowSpan:pe,sandbox:St,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Jt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:St,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Jt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:Mi,part:St,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:Xg}),Nw=Ns({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:Xn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:St,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Mi,g2:Mi,glyphName:Mi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Xn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:St,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xn,rev:Xn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xn,requiredFeatures:Xn,requiredFonts:Xn,requiredFormats:Xn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Xn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Qg}),Gg=Ns({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()}}),Jg=Ns({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xg}),ey=Ns({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),jw={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"},Ew=/[A-Z]/g,ph=/-[a-z]/g,Tw=/^data[-\w.:]+$/i;function Iw(e,t){const r=Gu(t);let s=t,l=Vn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Tw.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ph,Aw);s="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ph.test(a)){let c=a.replace(Ew,Dw);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}l=Nd}return new l(s,t)}function Dw(e){return"-"+e.toLowerCase()}function Aw(e){return e.charAt(1).toUpperCase()}const Rw=Zg([Yg,Cw,Gg,Jg,ey],"html"),jd=Zg([Yg,Nw,Gg,Jg,ey],"svg");function Pw(e){return e.join(" ").trim()}var ds={},Su,hh;function Lw(){if(hh)return Su;hh=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
|
|
41
|
+
`,p="/",y="*",g="",x="comment",_="declaration";function k(D,S){if(typeof D!="string")throw new TypeError("First argument must be a string");if(!D)return[];S=S||{};var R=1,T=1;function M(ie){var X=ie.match(t);X&&(R+=X.length);var J=ie.lastIndexOf(m);T=~J?ie.length-J:T+ie.length}function I(){var ie={line:R,column:T};return function(X){return X.position=new j(ie),te(),X}}function j(ie){this.start=ie,this.end={line:R,column:T},this.source=S.source}j.prototype.content=D;function B(ie){var X=new Error(S.source+":"+R+":"+T+": "+ie);if(X.reason=ie,X.filename=S.source,X.line=R,X.column=T,X.source=D,!S.silent)throw X}function Q(ie){var X=ie.exec(D);if(X){var J=X[0];return M(J),D=D.slice(J.length),X}}function te(){Q(r)}function O(ie){var X;for(ie=ie||[];X=W();)X!==!1&&ie.push(X);return ie}function W(){var ie=I();if(!(p!=D.charAt(0)||y!=D.charAt(1))){for(var X=2;g!=D.charAt(X)&&(y!=D.charAt(X)||p!=D.charAt(X+1));)++X;if(X+=2,g===D.charAt(X-1))return B("End of comment missing");var J=D.slice(2,X-2);return T+=2,M(J),D=D.slice(X),T+=2,ie({type:x,comment:J})}}function ne(){var ie=I(),X=Q(s);if(X){if(W(),!Q(l))return B("property missing ':'");var J=Q(a),ve=ie({type:_,property:C(X[0].replace(e,g)),value:J?C(J[0].replace(e,g)):g});return Q(c),ve}}function _e(){var ie=[];O(ie);for(var X;X=ne();)X!==!1&&(ie.push(X),O(ie));return ie}return te(),_e()}function C(D){return D?D.replace(f,g):g}return Su=k,Su}var gh;function Mw(){if(gh)return ds;gh=1;var e=ds&&ds.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=r;const t=e(Lw());function r(s,l){let a=null;if(!s||typeof s!="string")return a;const c=(0,t.default)(s),f=typeof l=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:p,value:y}=m;f?l(p,y,m):y&&(a=a||{},a[p]=y)}),a}return ds}var dl={},yh;function Ow(){if(yh)return dl;yh=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(p){return!p||r.test(p)||e.test(p)},c=function(p,y){return y.toUpperCase()},f=function(p,y){return"".concat(y,"-")},m=function(p,y){return y===void 0&&(y={}),a(p)?p:(p=p.toLowerCase(),y.reactCompat?p=p.replace(l,f):p=p.replace(s,f),p.replace(t,c))};return dl.camelCase=m,dl}var fl,vh;function zw(){if(vh)return fl;vh=1;var e=fl&&fl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(Mw()),r=Ow();function s(l,a){var c={};return!l||typeof l!="string"||(0,t.default)(l,function(f,m){f&&m&&(c[(0,r.camelCase)(f,a)]=m)}),c}return s.default=s,fl=s,fl}var $w=zw();const Bw=vd($w),ty=ny("end"),Ed=ny("start");function ny(e){return t;function t(r){const s=r&&r.position&&r.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function Fw(e){const t=Ed(e),r=ty(e);if(t&&r)return{start:t,end:r}}function vl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?xh(e.position):"start"in e||"end"in e?xh(e):"line"in e||"column"in e?td(e):""}function td(e){return _h(e&&e.line)+":"+_h(e&&e.column)}function xh(e){return td(e&&e.start)+"-"+td(e&&e.end)}function _h(e){return e&&typeof e=="number"?e:1}class En extends Error{constructor(t,r,s){super(),typeof r=="string"&&(s=r,r=void 0);let l="",a={},c=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?l=t:!a.cause&&t&&(c=!0,l=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof s=="string"){const m=s.indexOf(":");m===-1?a.ruleId=s:(a.source=s.slice(0,m),a.ruleId=s.slice(m+1))}if(!a.place&&a.ancestors&&a.ancestors){const m=a.ancestors[a.ancestors.length-1];m&&(a.place=m.position)}const f=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=vl(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=c&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}En.prototype.file="";En.prototype.name="";En.prototype.reason="";En.prototype.message="";En.prototype.stack="";En.prototype.column=void 0;En.prototype.line=void 0;En.prototype.ancestors=void 0;En.prototype.cause=void 0;En.prototype.fatal=void 0;En.prototype.place=void 0;En.prototype.ruleId=void 0;En.prototype.source=void 0;const Td={}.hasOwnProperty,Hw=new Map,Vw=/[A-Z]/g,Uw=new Set(["table","tbody","thead","tfoot","tr"]),Ww=new Set(["td","th"]),ry="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qw(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=eb(r,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");s=Jw(r,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?jd:Rw,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=iy(l,e,void 0);return a&&typeof a!="string"?a:l.create(e,l.Fragment,{children:a||void 0},void 0)}function iy(e,t,r){if(t.type==="element")return Kw(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Zw(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Qw(e,t,r);if(t.type==="mdxjsEsm")return Yw(e,t);if(t.type==="root")return Xw(e,t,r);if(t.type==="text")return Gw(e,t)}function Kw(e,t,r){const s=e.schema;let l=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(l=jd,e.schema=l),e.ancestors.push(t);const a=ly(e,t.tagName,!1),c=tb(e,t);let f=Dd(e,t);return Uw.has(t.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!bw(m):!0})),sy(e,c,a,t),Id(c,f),e.ancestors.pop(),e.schema=s,e.create(t,a,c,r)}function Zw(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}El(e,t.position)}function Yw(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);El(e,t.position)}function Qw(e,t,r){const s=e.schema;let l=s;t.name==="svg"&&s.space==="html"&&(l=jd,e.schema=l),e.ancestors.push(t);const a=t.name===null?e.Fragment:ly(e,t.name,!0),c=nb(e,t),f=Dd(e,t);return sy(e,c,a,t),Id(c,f),e.ancestors.pop(),e.schema=s,e.create(t,a,c,r)}function Xw(e,t,r){const s={};return Id(s,Dd(e,t)),e.create(t,e.Fragment,s,r)}function Gw(e,t){return t.value}function sy(e,t,r,s){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=s)}function Id(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function Jw(e,t,r){return s;function s(l,a,c,f){const p=Array.isArray(c.children)?r:t;return f?p(a,c,f):p(a,c)}}function eb(e,t){return r;function r(s,l,a,c){const f=Array.isArray(a.children),m=Ed(s);return t(l,a,c,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function tb(e,t){const r={};let s,l;for(l in t.properties)if(l!=="children"&&Td.call(t.properties,l)){const a=rb(e,l,t.properties[l]);if(a){const[c,f]=a;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&Ww.has(t.tagName)?s=f:r[c]=f}}if(s){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return r}function nb(e,t){const r={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const a=s.data.estree.body[0];a.type;const c=a.expression;c.type;const f=c.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else El(e,t.position);else{const l=s.name;let a;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const f=s.value.data.estree.body[0];f.type,a=e.evaluater.evaluateExpression(f.expression)}else El(e,t.position);else a=s.value===null?!0:s.value;r[l]=a}return r}function Dd(e,t){const r=[];let s=-1;const l=e.passKeys?new Map:Hw;for(;++s<t.children.length;){const a=t.children[s];let c;if(e.passKeys){const m=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(m){const p=l.get(m)||0;c=m+"-"+p,l.set(m,p+1)}}const f=iy(e,a,c);f!==void 0&&r.push(f)}return r}function rb(e,t,r){const s=Iw(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=s.commaSeparated?vw(r):Pw(r)),s.property==="style"){let l=typeof r=="object"?r:ib(e,String(r));return e.stylePropertyNameCase==="css"&&(l=sb(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&s.space?jw[s.property]||s.property:s.attribute,r]}}function ib(e,t){try{return Bw(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const s=r,l=new En("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=ry+"#cannot-parse-style-attribute",l}}function ly(e,t,r){let s;if(!r)s={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let a=-1,c;for(;++a<l.length;){const f=dh(l[a])?{type:"Identifier",name:l[a]}:{type:"Literal",value:l[a]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(a&&f.type==="Literal"),optional:!1}:f}s=c}else s=dh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const l=s.value;return Td.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(s);El(e)}function El(e,t){const r=new En("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=ry+"#cannot-handle-mdx-estrees-without-createevaluater",r}function sb(e){const t={};let r;for(r in e)Td.call(e,r)&&(t[lb(r)]=e[r]);return t}function lb(e){let t=e.replace(Vw,ab);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ab(e){return"-"+e.toLowerCase()}const Cu={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"]},ob={};function Ad(e,t){const r=ob,s=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return ay(e,s,l)}function ay(e,t,r){if(cb(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return kh(e.children,t,r)}return Array.isArray(e)?kh(e,t,r):""}function kh(e,t,r){const s=[];let l=-1;for(;++l<e.length;)s[l]=ay(e[l],t,r);return s.join("")}function cb(e){return!!(e&&typeof e=="object")}const wh=document.createElement("i");function Rd(e){const t="&"+e+";";wh.innerHTML=t;const r=wh.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Jn(e,t,r,s){const l=e.length;let a=0,c;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,r=r>0?r:0,s.length<1e4)c=Array.from(s),c.unshift(t,r),e.splice(...c);else for(r&&e.splice(t,r);a<s.length;)c=s.slice(a,a+1e4),c.unshift(t,0),e.splice(...c),a+=1e4,t+=1e4}function dr(e,t){return e.length>0?(Jn(e,e.length,0,t),e):t}const bh={}.hasOwnProperty;function oy(e){const t={};let r=-1;for(;++r<e.length;)ub(t,e[r]);return t}function ub(e,t){let r;for(r in t){const l=(bh.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let c;if(a)for(c in a){bh.call(l,c)||(l[c]=[]);const f=a[c];db(l[c],Array.isArray(f)?f:f?[f]:[])}}}function db(e,t){let r=-1;const s=[];for(;++r<t.length;)(t[r].add==="after"?e:s).push(t[r]);Jn(e,0,0,s)}function cy(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function kr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rn=_i(/[A-Za-z]/),jn=_i(/[\dA-Za-z]/),fb=_i(/[#-'*+\--9=?A-Z^-~]/);function fo(e){return e!==null&&(e<32||e===127)}const nd=_i(/\d/),mb=_i(/[\dA-Fa-f]/),pb=_i(/[!-/:-@[-`{-~]/);function Fe(e){return e!==null&&e<-2}function Ct(e){return e!==null&&(e<0||e===32)}function nt(e){return e===-2||e===-1||e===32}const So=_i(new RegExp("\\p{P}|\\p{S}","u")),Fi=_i(/\s/);function _i(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function js(e){const t=[];let r=-1,s=0,l=0;for(;++r<e.length;){const a=e.charCodeAt(r);let c="";if(a===37&&jn(e.charCodeAt(r+1))&&jn(e.charCodeAt(r+2)))l=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(c=String.fromCharCode(a));else if(a>55295&&a<57344){const f=e.charCodeAt(r+1);a<56320&&f>56319&&f<57344?(c=String.fromCharCode(a,f),l=1):c="�"}else c=String.fromCharCode(a);c&&(t.push(e.slice(s,r),encodeURIComponent(c)),s=r+l+1,c=""),l&&(r+=l,l=0)}return t.join("")+e.slice(s)}function at(e,t,r,s){const l=s?s-1:Number.POSITIVE_INFINITY;let a=0;return c;function c(m){return nt(m)?(e.enter(r),f(m)):t(m)}function f(m){return nt(m)&&a++<l?(e.consume(m),f):(e.exit(r),t(m))}}const hb={tokenize:gb};function gb(e){const t=e.attempt(this.parser.constructs.contentInitial,s,l);let r;return t;function s(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),at(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),a(f)}function a(f){const m=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Fe(f)?(e.consume(f),e.exit("chunkText"),a):(e.consume(f),c)}}const yb={tokenize:vb},Sh={tokenize:xb};function vb(e){const t=this,r=[];let s=0,l,a,c;return f;function f(T){if(s<r.length){const M=r[s];return t.containerState=M[1],e.attempt(M[0].continuation,m,p)(T)}return p(T)}function m(T){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&R();const M=t.events.length;let I=M,j;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){j=t.events[I][1].end;break}S(s);let B=M;for(;B<t.events.length;)t.events[B][1].end={...j},B++;return Jn(t.events,I+1,0,t.events.slice(M)),t.events.length=B,p(T)}return f(T)}function p(T){if(s===r.length){if(!l)return x(T);if(l.currentConstruct&&l.currentConstruct.concrete)return k(T);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Sh,y,g)(T)}function y(T){return l&&R(),S(s),x(T)}function g(T){return t.parser.lazy[t.now().line]=s!==r.length,c=t.now().offset,k(T)}function x(T){return t.containerState={},e.attempt(Sh,_,k)(T)}function _(T){return s++,r.push([t.currentConstruct,t.containerState]),x(T)}function k(T){if(T===null){l&&R(),S(0),e.consume(T);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:a}),C(T)}function C(T){if(T===null){D(e.exit("chunkFlow"),!0),S(0),e.consume(T);return}return Fe(T)?(e.consume(T),D(e.exit("chunkFlow")),s=0,t.interrupt=void 0,f):(e.consume(T),C)}function D(T,M){const I=t.sliceStream(T);if(M&&I.push(null),T.previous=a,a&&(a.next=T),a=T,l.defineSkip(T.start),l.write(I),t.parser.lazy[T.start.line]){let j=l.events.length;for(;j--;)if(l.events[j][1].start.offset<c&&(!l.events[j][1].end||l.events[j][1].end.offset>c))return;const B=t.events.length;let Q=B,te,O;for(;Q--;)if(t.events[Q][0]==="exit"&&t.events[Q][1].type==="chunkFlow"){if(te){O=t.events[Q][1].end;break}te=!0}for(S(s),j=B;j<t.events.length;)t.events[j][1].end={...O},j++;Jn(t.events,Q+1,0,t.events.slice(B)),t.events.length=j}}function S(T){let M=r.length;for(;M-- >T;){const I=r[M];t.containerState=I[1],I[0].exit.call(t,e)}r.length=T}function R(){l.write([null]),a=void 0,l=void 0,t.containerState._closeFlow=void 0}}function xb(e,t,r){return at(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function bs(e){if(e===null||Ct(e)||Fi(e))return 1;if(So(e))return 2}function Co(e,t,r){const s=[];let l=-1;for(;++l<e.length;){const a=e[l].resolveAll;a&&!s.includes(a)&&(t=a(t,r),s.push(a))}return t}const rd={name:"attention",resolveAll:_b,tokenize:kb};function _b(e,t){let r=-1,s,l,a,c,f,m,p,y;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(s=r;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[s][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;m=e[s][1].end.offset-e[s][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const g={...e[s][1].end},x={...e[r][1].start};Ch(g,-m),Ch(x,m),c={type:m>1?"strongSequence":"emphasisSequence",start:g,end:{...e[s][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:x},a={type:m>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[r][1].start}},l={type:m>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[s][1].end={...c.start},e[r][1].start={...f.end},p=[],e[s][1].end.offset-e[s][1].start.offset&&(p=dr(p,[["enter",e[s][1],t],["exit",e[s][1],t]])),p=dr(p,[["enter",l,t],["enter",c,t],["exit",c,t],["enter",a,t]]),p=dr(p,Co(t.parser.constructs.insideSpan.null,e.slice(s+1,r),t)),p=dr(p,[["exit",a,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[r][1].end.offset-e[r][1].start.offset?(y=2,p=dr(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):y=0,Jn(e,s-1,r-s+3,p),r=s+p.length-y-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function kb(e,t){const r=this.parser.constructs.attentionMarkers.null,s=this.previous,l=bs(s);let a;return c;function c(m){return a=m,e.enter("attentionSequence"),f(m)}function f(m){if(m===a)return e.consume(m),f;const p=e.exit("attentionSequence"),y=bs(m),g=!y||y===2&&l||r.includes(m),x=!l||l===2&&y||r.includes(s);return p._open=!!(a===42?g:g&&(l||!x)),p._close=!!(a===42?x:x&&(y||!g)),t(m)}}function Ch(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wb={name:"autolink",tokenize:bb};function bb(e,t,r){let s=0;return l;function l(_){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(_),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(_){return Rn(_)?(e.consume(_),c):_===64?r(_):p(_)}function c(_){return _===43||_===45||_===46||jn(_)?(s=1,f(_)):p(_)}function f(_){return _===58?(e.consume(_),s=0,m):(_===43||_===45||_===46||jn(_))&&s++<32?(e.consume(_),f):(s=0,p(_))}function m(_){return _===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(_),e.exit("autolinkMarker"),e.exit("autolink"),t):_===null||_===32||_===60||fo(_)?r(_):(e.consume(_),m)}function p(_){return _===64?(e.consume(_),y):fb(_)?(e.consume(_),p):r(_)}function y(_){return jn(_)?g(_):r(_)}function g(_){return _===46?(e.consume(_),s=0,y):_===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(_),e.exit("autolinkMarker"),e.exit("autolink"),t):x(_)}function x(_){if((_===45||jn(_))&&s++<63){const k=_===45?x:g;return e.consume(_),k}return r(_)}}const Rl={partial:!0,tokenize:Sb};function Sb(e,t,r){return s;function s(a){return nt(a)?at(e,l,"linePrefix")(a):l(a)}function l(a){return a===null||Fe(a)?t(a):r(a)}}const uy={continuation:{tokenize:Nb},exit:jb,name:"blockQuote",tokenize:Cb};function Cb(e,t,r){const s=this;return l;function l(c){if(c===62){const f=s.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),a}return r(c)}function a(c){return nt(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function Nb(e,t,r){const s=this;return l;function l(c){return nt(c)?at(e,a,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):a(c)}function a(c){return e.attempt(uy,t,r)(c)}}function jb(e){e.exit("blockQuote")}const dy={name:"characterEscape",tokenize:Eb};function Eb(e,t,r){return s;function s(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),l}function l(a){return pb(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const fy={name:"characterReference",tokenize:Tb};function Tb(e,t,r){const s=this;let l=0,a,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),m}function m(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,c=jn,y(g))}function p(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,c=mb,y):(e.enter("characterReferenceValue"),a=7,c=nd,y(g))}function y(g){if(g===59&&l){const x=e.exit("characterReferenceValue");return c===jn&&!Rd(s.sliceSerialize(x))?r(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(g)&&l++<a?(e.consume(g),y):r(g)}}const Nh={partial:!0,tokenize:Db},jh={concrete:!0,name:"codeFenced",tokenize:Ib};function Ib(e,t,r){const s=this,l={partial:!0,tokenize:I};let a=0,c=0,f;return m;function m(j){return p(j)}function p(j){const B=s.events[s.events.length-1];return a=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(j)}function y(j){return j===f?(c++,e.consume(j),y):c<3?r(j):(e.exit("codeFencedFenceSequence"),nt(j)?at(e,g,"whitespace")(j):g(j))}function g(j){return j===null||Fe(j)?(e.exit("codeFencedFence"),s.interrupt?t(j):e.check(Nh,C,M)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(j))}function x(j){return j===null||Fe(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(j)):nt(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,_,"whitespace")(j)):j===96&&j===f?r(j):(e.consume(j),x)}function _(j){return j===null||Fe(j)?g(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(j))}function k(j){return j===null||Fe(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(j)):j===96&&j===f?r(j):(e.consume(j),k)}function C(j){return e.attempt(l,M,D)(j)}function D(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),S}function S(j){return a>0&&nt(j)?at(e,R,"linePrefix",a+1)(j):R(j)}function R(j){return j===null||Fe(j)?e.check(Nh,C,M)(j):(e.enter("codeFlowValue"),T(j))}function T(j){return j===null||Fe(j)?(e.exit("codeFlowValue"),R(j)):(e.consume(j),T)}function M(j){return e.exit("codeFenced"),t(j)}function I(j,B,Q){let te=0;return O;function O(X){return j.enter("lineEnding"),j.consume(X),j.exit("lineEnding"),W}function W(X){return j.enter("codeFencedFence"),nt(X)?at(j,ne,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):ne(X)}function ne(X){return X===f?(j.enter("codeFencedFenceSequence"),_e(X)):Q(X)}function _e(X){return X===f?(te++,j.consume(X),_e):te>=c?(j.exit("codeFencedFenceSequence"),nt(X)?at(j,ie,"whitespace")(X):ie(X)):Q(X)}function ie(X){return X===null||Fe(X)?(j.exit("codeFencedFence"),B(X)):Q(X)}}}function Db(e,t,r){const s=this;return l;function l(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a)}function a(c){return s.parser.lazy[s.now().line]?r(c):t(c)}}const Nu={name:"codeIndented",tokenize:Rb},Ab={partial:!0,tokenize:Pb};function Rb(e,t,r){const s=this;return l;function l(p){return e.enter("codeIndented"),at(e,a,"linePrefix",5)(p)}function a(p){const y=s.events[s.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(p):r(p)}function c(p){return p===null?m(p):Fe(p)?e.attempt(Ab,c,m)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||Fe(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),f)}function m(p){return e.exit("codeIndented"),t(p)}}function Pb(e,t,r){const s=this;return l;function l(c){return s.parser.lazy[s.now().line]?r(c):Fe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):at(e,a,"linePrefix",5)(c)}function a(c){const f=s.events[s.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Fe(c)?l(c):r(c)}}const Lb={name:"codeText",previous:Ob,resolve:Mb,tokenize:zb};function Mb(e){let t=e.length-4,r=3,s,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=r;++s<t;)if(e[s][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(s=r-1,t++;++s<=t;)l===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(l=s):(s===t||e[s][1].type==="lineEnding")&&(e[l][1].type="codeTextData",s!==l+2&&(e[l][1].end=e[s-1][1].end,e.splice(l+2,s-l-2),t-=s-l-2,s=l+2),l=void 0);return e}function Ob(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function zb(e,t,r){let s=0,l,a;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),s++,f):(e.exit("codeTextSequence"),m(g))}function m(g){return g===null?r(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),m):g===96?(a=e.enter("codeTextSequence"),l=0,y(g)):Fe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),m):(e.enter("codeTextData"),p(g))}function p(g){return g===null||g===32||g===96||Fe(g)?(e.exit("codeTextData"),m(g)):(e.consume(g),p)}function y(g){return g===96?(e.consume(g),l++,y):l===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(a.type="codeTextData",p(g))}}class $b{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,r){const s=r??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,r,s){const l=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return s&&ml(this.left,s),a.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),ml(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ml(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 r=this.left.splice(t,Number.POSITIVE_INFINITY);ml(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ml(this.left,r.reverse())}}}function ml(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function my(e){const t={};let r=-1,s,l,a,c,f,m,p;const y=new $b(e);for(;++r<y.length;){for(;r in t;)r=t[r];if(s=y.get(r),r&&s[1].type==="chunkFlow"&&y.get(r-1)[1].type==="listItemPrefix"&&(m=s[1]._tokenizer.events,a=0,a<m.length&&m[a][1].type==="lineEndingBlank"&&(a+=2),a<m.length&&m[a][1].type==="content"))for(;++a<m.length&&m[a][1].type!=="content";)m[a][1].type==="chunkText"&&(m[a][1]._isInFirstContentOfListItem=!0,a++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,Bb(y,r)),r=t[r],p=!0);else if(s[1]._container){for(a=r,l=void 0;a--;)if(c=y.get(a),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(y.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=a);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(s[1].end={...y.get(l)[1].start},f=y.slice(l,r),f.unshift(s),y.splice(l,r-l+1,f))}}return Jn(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!p}function Bb(e,t){const r=e.get(t)[1],s=e.get(t)[2];let l=t-1;const a=[];let c=r._tokenizer;c||(c=s.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,m=[],p={};let y,g,x=-1,_=r,k=0,C=0;const D=[C];for(;_;){for(;e.get(++l)[1]!==_;);a.push(l),_._tokenizer||(y=s.sliceStream(_),_.next||y.push(null),g&&c.defineSkip(_.start),_._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),_._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=_,_=_.next}for(_=r;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(C=x+1,D.push(C),_._tokenizer=void 0,_.previous=void 0,_=_.next);for(c.events=[],_?(_._tokenizer=void 0,_.previous=void 0):D.pop(),x=D.length;x--;){const S=f.slice(D[x],D[x+1]),R=a.pop();m.push([R,R+S.length-1]),e.splice(R,2,S)}for(m.reverse(),x=-1;++x<m.length;)p[k+m[x][0]]=k+m[x][1],k+=m[x][1]-m[x][0]-1;return p}const Fb={resolve:Vb,tokenize:Ub},Hb={partial:!0,tokenize:Wb};function Vb(e){return my(e),e}function Ub(e,t){let r;return s;function s(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?a(f):Fe(f)?e.check(Hb,c,a)(f):(e.consume(f),l)}function a(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function Wb(e,t,r){const s=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),at(e,a,"linePrefix")}function a(c){if(c===null||Fe(c))return r(c);const f=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(s.parser.constructs.flow,r,t)(c)}}function py(e,t,r,s,l,a,c,f,m){const p=m||Number.POSITIVE_INFINITY;let y=0;return g;function g(S){return S===60?(e.enter(s),e.enter(l),e.enter(a),e.consume(S),e.exit(a),x):S===null||S===32||S===41||fo(S)?r(S):(e.enter(s),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),C(S))}function x(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(l),e.exit(s),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),_(S))}function _(S){return S===62?(e.exit("chunkString"),e.exit(f),x(S)):S===null||S===60||Fe(S)?r(S):(e.consume(S),S===92?k:_)}function k(S){return S===60||S===62||S===92?(e.consume(S),_):_(S)}function C(S){return!y&&(S===null||S===41||Ct(S))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(s),t(S)):y<p&&S===40?(e.consume(S),y++,C):S===41?(e.consume(S),y--,C):S===null||S===32||S===40||fo(S)?r(S):(e.consume(S),S===92?D:C)}function D(S){return S===40||S===41||S===92?(e.consume(S),C):C(S)}}function hy(e,t,r,s,l,a){const c=this;let f=0,m;return p;function p(_){return e.enter(s),e.enter(l),e.consume(_),e.exit(l),e.enter(a),y}function y(_){return f>999||_===null||_===91||_===93&&!m||_===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?r(_):_===93?(e.exit(a),e.enter(l),e.consume(_),e.exit(l),e.exit(s),t):Fe(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(_))}function g(_){return _===null||_===91||_===93||Fe(_)||f++>999?(e.exit("chunkString"),y(_)):(e.consume(_),m||(m=!nt(_)),_===92?x:g)}function x(_){return _===91||_===92||_===93?(e.consume(_),f++,g):g(_)}}function gy(e,t,r,s,l,a){let c;return f;function f(x){return x===34||x===39||x===40?(e.enter(s),e.enter(l),e.consume(x),e.exit(l),c=x===40?41:x,m):r(x)}function m(x){return x===c?(e.enter(l),e.consume(x),e.exit(l),e.exit(s),t):(e.enter(a),p(x))}function p(x){return x===c?(e.exit(a),m(c)):x===null?r(x):Fe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),at(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===c||x===null||Fe(x)?(e.exit("chunkString"),p(x)):(e.consume(x),x===92?g:y)}function g(x){return x===c||x===92?(e.consume(x),y):y(x)}}function xl(e,t){let r;return s;function s(l){return Fe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,s):nt(l)?at(e,s,r?"linePrefix":"lineSuffix")(l):t(l)}}const qb={name:"definition",tokenize:Zb},Kb={partial:!0,tokenize:Yb};function Zb(e,t,r){const s=this;let l;return a;function a(_){return e.enter("definition"),c(_)}function c(_){return hy.call(s,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(_)}function f(_){return l=kr(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),_===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),m):r(_)}function m(_){return Ct(_)?xl(e,p)(_):p(_)}function p(_){return py(e,y,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(_)}function y(_){return e.attempt(Kb,g,g)(_)}function g(_){return nt(_)?at(e,x,"whitespace")(_):x(_)}function x(_){return _===null||Fe(_)?(e.exit("definition"),s.parser.defined.push(l),t(_)):r(_)}}function Yb(e,t,r){return s;function s(f){return Ct(f)?xl(e,l)(f):r(f)}function l(f){return gy(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function a(f){return nt(f)?at(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Fe(f)?t(f):r(f)}}const Qb={name:"hardBreakEscape",tokenize:Xb};function Xb(e,t,r){return s;function s(a){return e.enter("hardBreakEscape"),e.consume(a),l}function l(a){return Fe(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const Gb={name:"headingAtx",resolve:Jb,tokenize:e1};function Jb(e,t){let r=e.length-2,s=3,l,a;return e[s][1].type==="whitespace"&&(s+=2),r-2>s&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(s===r-1||r-4>s&&e[r-2][1].type==="whitespace")&&(r-=s+1===r?2:4),r>s&&(l={type:"atxHeadingText",start:e[s][1].start,end:e[r][1].end},a={type:"chunkText",start:e[s][1].start,end:e[r][1].end,contentType:"text"},Jn(e,s,r-s+1,[["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t]])),e}function e1(e,t,r){let s=0;return l;function l(y){return e.enter("atxHeading"),a(y)}function a(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&s++<6?(e.consume(y),c):y===null||Ct(y)?(e.exit("atxHeadingSequence"),f(y)):r(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),m(y)):y===null||Fe(y)?(e.exit("atxHeading"),t(y)):nt(y)?at(e,f,"whitespace")(y):(e.enter("atxHeadingText"),p(y))}function m(y){return y===35?(e.consume(y),m):(e.exit("atxHeadingSequence"),f(y))}function p(y){return y===null||y===35||Ct(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),p)}}const t1=["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"],Eh=["pre","script","style","textarea"],n1={concrete:!0,name:"htmlFlow",resolveTo:s1,tokenize:l1},r1={partial:!0,tokenize:o1},i1={partial:!0,tokenize:a1};function s1(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 l1(e,t,r){const s=this;let l,a,c,f,m;return p;function p(E){return y(E)}function y(E){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(E),g}function g(E){return E===33?(e.consume(E),x):E===47?(e.consume(E),a=!0,C):E===63?(e.consume(E),l=3,s.interrupt?t:N):Rn(E)?(e.consume(E),c=String.fromCharCode(E),D):r(E)}function x(E){return E===45?(e.consume(E),l=2,_):E===91?(e.consume(E),l=5,f=0,k):Rn(E)?(e.consume(E),l=4,s.interrupt?t:N):r(E)}function _(E){return E===45?(e.consume(E),s.interrupt?t:N):r(E)}function k(E){const ce="CDATA[";return E===ce.charCodeAt(f++)?(e.consume(E),f===ce.length?s.interrupt?t:ne:k):r(E)}function C(E){return Rn(E)?(e.consume(E),c=String.fromCharCode(E),D):r(E)}function D(E){if(E===null||E===47||E===62||Ct(E)){const ce=E===47,Se=c.toLowerCase();return!ce&&!a&&Eh.includes(Se)?(l=1,s.interrupt?t(E):ne(E)):t1.includes(c.toLowerCase())?(l=6,ce?(e.consume(E),S):s.interrupt?t(E):ne(E)):(l=7,s.interrupt&&!s.parser.lazy[s.now().line]?r(E):a?R(E):T(E))}return E===45||jn(E)?(e.consume(E),c+=String.fromCharCode(E),D):r(E)}function S(E){return E===62?(e.consume(E),s.interrupt?t:ne):r(E)}function R(E){return nt(E)?(e.consume(E),R):O(E)}function T(E){return E===47?(e.consume(E),O):E===58||E===95||Rn(E)?(e.consume(E),M):nt(E)?(e.consume(E),T):O(E)}function M(E){return E===45||E===46||E===58||E===95||jn(E)?(e.consume(E),M):I(E)}function I(E){return E===61?(e.consume(E),j):nt(E)?(e.consume(E),I):T(E)}function j(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(e.consume(E),m=E,B):nt(E)?(e.consume(E),j):Q(E)}function B(E){return E===m?(e.consume(E),m=null,te):E===null||Fe(E)?r(E):(e.consume(E),B)}function Q(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||Ct(E)?I(E):(e.consume(E),Q)}function te(E){return E===47||E===62||nt(E)?T(E):r(E)}function O(E){return E===62?(e.consume(E),W):r(E)}function W(E){return E===null||Fe(E)?ne(E):nt(E)?(e.consume(E),W):r(E)}function ne(E){return E===45&&l===2?(e.consume(E),J):E===60&&l===1?(e.consume(E),ve):E===62&&l===4?(e.consume(E),P):E===63&&l===3?(e.consume(E),N):E===93&&l===5?(e.consume(E),fe):Fe(E)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(r1,F,_e)(E)):E===null||Fe(E)?(e.exit("htmlFlowData"),_e(E)):(e.consume(E),ne)}function _e(E){return e.check(i1,ie,F)(E)}function ie(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),X}function X(E){return E===null||Fe(E)?_e(E):(e.enter("htmlFlowData"),ne(E))}function J(E){return E===45?(e.consume(E),N):ne(E)}function ve(E){return E===47?(e.consume(E),c="",ee):ne(E)}function ee(E){if(E===62){const ce=c.toLowerCase();return Eh.includes(ce)?(e.consume(E),P):ne(E)}return Rn(E)&&c.length<8?(e.consume(E),c+=String.fromCharCode(E),ee):ne(E)}function fe(E){return E===93?(e.consume(E),N):ne(E)}function N(E){return E===62?(e.consume(E),P):E===45&&l===2?(e.consume(E),N):ne(E)}function P(E){return E===null||Fe(E)?(e.exit("htmlFlowData"),F(E)):(e.consume(E),P)}function F(E){return e.exit("htmlFlow"),t(E)}}function a1(e,t,r){const s=this;return l;function l(c){return Fe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):r(c)}function a(c){return s.parser.lazy[s.now().line]?r(c):t(c)}}function o1(e,t,r){return s;function s(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Rl,t,r)}}const c1={name:"htmlText",tokenize:u1};function u1(e,t,r){const s=this;let l,a,c;return f;function f(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),m}function m(N){return N===33?(e.consume(N),p):N===47?(e.consume(N),I):N===63?(e.consume(N),T):Rn(N)?(e.consume(N),Q):r(N)}function p(N){return N===45?(e.consume(N),y):N===91?(e.consume(N),a=0,k):Rn(N)?(e.consume(N),R):r(N)}function y(N){return N===45?(e.consume(N),_):r(N)}function g(N){return N===null?r(N):N===45?(e.consume(N),x):Fe(N)?(c=g,ve(N)):(e.consume(N),g)}function x(N){return N===45?(e.consume(N),_):g(N)}function _(N){return N===62?J(N):N===45?x(N):g(N)}function k(N){const P="CDATA[";return N===P.charCodeAt(a++)?(e.consume(N),a===P.length?C:k):r(N)}function C(N){return N===null?r(N):N===93?(e.consume(N),D):Fe(N)?(c=C,ve(N)):(e.consume(N),C)}function D(N){return N===93?(e.consume(N),S):C(N)}function S(N){return N===62?J(N):N===93?(e.consume(N),S):C(N)}function R(N){return N===null||N===62?J(N):Fe(N)?(c=R,ve(N)):(e.consume(N),R)}function T(N){return N===null?r(N):N===63?(e.consume(N),M):Fe(N)?(c=T,ve(N)):(e.consume(N),T)}function M(N){return N===62?J(N):T(N)}function I(N){return Rn(N)?(e.consume(N),j):r(N)}function j(N){return N===45||jn(N)?(e.consume(N),j):B(N)}function B(N){return Fe(N)?(c=B,ve(N)):nt(N)?(e.consume(N),B):J(N)}function Q(N){return N===45||jn(N)?(e.consume(N),Q):N===47||N===62||Ct(N)?te(N):r(N)}function te(N){return N===47?(e.consume(N),J):N===58||N===95||Rn(N)?(e.consume(N),O):Fe(N)?(c=te,ve(N)):nt(N)?(e.consume(N),te):J(N)}function O(N){return N===45||N===46||N===58||N===95||jn(N)?(e.consume(N),O):W(N)}function W(N){return N===61?(e.consume(N),ne):Fe(N)?(c=W,ve(N)):nt(N)?(e.consume(N),W):te(N)}function ne(N){return N===null||N===60||N===61||N===62||N===96?r(N):N===34||N===39?(e.consume(N),l=N,_e):Fe(N)?(c=ne,ve(N)):nt(N)?(e.consume(N),ne):(e.consume(N),ie)}function _e(N){return N===l?(e.consume(N),l=void 0,X):N===null?r(N):Fe(N)?(c=_e,ve(N)):(e.consume(N),_e)}function ie(N){return N===null||N===34||N===39||N===60||N===61||N===96?r(N):N===47||N===62||Ct(N)?te(N):(e.consume(N),ie)}function X(N){return N===47||N===62||Ct(N)?te(N):r(N)}function J(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):r(N)}function ve(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),ee}function ee(N){return nt(N)?at(e,fe,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):fe(N)}function fe(N){return e.enter("htmlTextData"),c(N)}}const Pd={name:"labelEnd",resolveAll:p1,resolveTo:h1,tokenize:g1},d1={tokenize:y1},f1={tokenize:v1},m1={tokenize:x1};function p1(e){let t=-1;const r=[];for(;++t<e.length;){const s=e[t][1];if(r.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const l=s.type==="labelImage"?4:2;s.type="data",t+=l}}return e.length!==r.length&&Jn(e,0,e.length,r),e}function h1(e,t){let r=e.length,s=0,l,a,c,f;for(;r--;)if(l=e[r][1],a){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(a=r,l.type!=="labelLink")){s=2;break}}else l.type==="labelEnd"&&(c=r);const m={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[a][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[a+s+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",m,t],["enter",p,t]],f=dr(f,e.slice(a+1,a+s+3)),f=dr(f,[["enter",y,t]]),f=dr(f,Co(t.parser.constructs.insideSpan.null,e.slice(a+s+4,c-3),t)),f=dr(f,[["exit",y,t],e[c-2],e[c-1],["exit",p,t]]),f=dr(f,e.slice(c+1)),f=dr(f,[["exit",m,t]]),Jn(e,a,e.length,f),e}function g1(e,t,r){const s=this;let l=s.events.length,a,c;for(;l--;)if((s.events[l][1].type==="labelImage"||s.events[l][1].type==="labelLink")&&!s.events[l][1]._balanced){a=s.events[l][1];break}return f;function f(x){return a?a._inactive?g(x):(c=s.parser.defined.includes(kr(s.sliceSerialize({start:a.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),m):r(x)}function m(x){return x===40?e.attempt(d1,y,c?y:g)(x):x===91?e.attempt(f1,y,c?p:g)(x):c?y(x):g(x)}function p(x){return e.attempt(m1,y,g)(x)}function y(x){return t(x)}function g(x){return a._balanced=!0,r(x)}}function y1(e,t,r){return s;function s(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),l}function l(g){return Ct(g)?xl(e,a)(g):a(g)}function a(g){return g===41?y(g):py(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return Ct(g)?xl(e,m)(g):y(g)}function f(g){return r(g)}function m(g){return g===34||g===39||g===40?gy(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function p(g){return Ct(g)?xl(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):r(g)}}function v1(e,t,r){const s=this;return l;function l(f){return hy.call(s,e,a,c,"reference","referenceMarker","referenceString")(f)}function a(f){return s.parser.defined.includes(kr(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(f):r(f)}function c(f){return r(f)}}function x1(e,t,r){return s;function s(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),l}function l(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const _1={name:"labelStartImage",resolveAll:Pd.resolveAll,tokenize:k1};function k1(e,t,r){const s=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),a}function a(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):r(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in s.parser.constructs?r(f):t(f)}}const w1={name:"labelStartLink",resolveAll:Pd.resolveAll,tokenize:b1};function b1(e,t,r){const s=this;return l;function l(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),a}function a(c){return c===94&&"_hiddenFootnoteSupport"in s.parser.constructs?r(c):t(c)}}const ju={name:"lineEnding",tokenize:S1};function S1(e,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),at(e,t,"linePrefix")}}const no={name:"thematicBreak",tokenize:C1};function C1(e,t,r){let s=0,l;return a;function a(p){return e.enter("thematicBreak"),c(p)}function c(p){return l=p,f(p)}function f(p){return p===l?(e.enter("thematicBreakSequence"),m(p)):s>=3&&(p===null||Fe(p))?(e.exit("thematicBreak"),t(p)):r(p)}function m(p){return p===l?(e.consume(p),s++,m):(e.exit("thematicBreakSequence"),nt(p)?at(e,f,"whitespace")(p):f(p))}}const Hn={continuation:{tokenize:T1},exit:D1,name:"list",tokenize:E1},N1={partial:!0,tokenize:A1},j1={partial:!0,tokenize:I1};function E1(e,t,r){const s=this,l=s.events[s.events.length-1];let a=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(_){const k=s.containerState.type||(_===42||_===43||_===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!s.containerState.marker||_===s.containerState.marker:nd(_)){if(s.containerState.type||(s.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),_===42||_===45?e.check(no,r,p)(_):p(_);if(!s.interrupt||_===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(_)}return r(_)}function m(_){return nd(_)&&++c<10?(e.consume(_),m):(!s.interrupt||c<2)&&(s.containerState.marker?_===s.containerState.marker:_===41||_===46)?(e.exit("listItemValue"),p(_)):r(_)}function p(_){return e.enter("listItemMarker"),e.consume(_),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||_,e.check(Rl,s.interrupt?r:y,e.attempt(N1,x,g))}function y(_){return s.containerState.initialBlankLine=!0,a++,x(_)}function g(_){return nt(_)?(e.enter("listItemPrefixWhitespace"),e.consume(_),e.exit("listItemPrefixWhitespace"),x):r(_)}function x(_){return s.containerState.size=a+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(_)}}function T1(e,t,r){const s=this;return s.containerState._closeFlow=void 0,e.check(Rl,l,a);function l(f){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,at(e,t,"listItemIndent",s.containerState.size+1)(f)}function a(f){return s.containerState.furtherBlankLines||!nt(f)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,c(f)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(j1,t,c)(f))}function c(f){return s.containerState._closeFlow=!0,s.interrupt=void 0,at(e,e.attempt(Hn,t,r),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function I1(e,t,r){const s=this;return at(e,l,"listItemIndent",s.containerState.size+1);function l(a){const c=s.events[s.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===s.containerState.size?t(a):r(a)}}function D1(e){e.exit(this.containerState.type)}function A1(e,t,r){const s=this;return at(e,l,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(a){const c=s.events[s.events.length-1];return!nt(a)&&c&&c[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const Th={name:"setextUnderline",resolveTo:R1,tokenize:P1};function R1(e,t){let r=e.length,s,l,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){s=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const c={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",a?(e.splice(l,0,["enter",c,t]),e.splice(a+1,0,["exit",e[s][1],t]),e[s][1].end={...e[a][1].end}):e[s][1]=c,e.push(["exit",c,t]),e}function P1(e,t,r){const s=this;let l;return a;function a(p){let y=s.events.length,g;for(;y--;)if(s.events[y][1].type!=="lineEnding"&&s.events[y][1].type!=="linePrefix"&&s.events[y][1].type!=="content"){g=s.events[y][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||g)?(e.enter("setextHeadingLine"),l=p,c(p)):r(p)}function c(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===l?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),nt(p)?at(e,m,"lineSuffix")(p):m(p))}function m(p){return p===null||Fe(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}const L1={tokenize:M1};function M1(e){const t=this,r=e.attempt(Rl,s,e.attempt(this.parser.constructs.flowInitial,l,at(e,e.attempt(this.parser.constructs.flow,l,e.attempt(Fb,l)),"linePrefix")));return r;function s(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function l(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const O1={resolveAll:vy()},z1=yy("string"),$1=yy("text");function yy(e){return{resolveAll:vy(e==="text"?B1:void 0),tokenize:t};function t(r){const s=this,l=this.parser.constructs[e],a=r.attempt(l,c,f);return c;function c(y){return p(y)?a(y):f(y)}function f(y){if(y===null){r.consume(y);return}return r.enter("data"),r.consume(y),m}function m(y){return p(y)?(r.exit("data"),a(y)):(r.consume(y),m)}function p(y){if(y===null)return!0;const g=l[y];let x=-1;if(g)for(;++x<g.length;){const _=g[x];if(!_.previous||_.previous.call(s,s.previous))return!0}return!1}}}function vy(e){return t;function t(r,s){let l=-1,a;for(;++l<=r.length;)a===void 0?r[l]&&r[l][1].type==="data"&&(a=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==a+2&&(r[a][1].end=r[l-1][1].end,r.splice(a+2,l-a-2),l=a+2),a=void 0);return e?e(r,s):r}}function B1(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const s=e[r-1][1],l=t.sliceStream(s);let a=l.length,c=-1,f=0,m;for(;a--;){const p=l[a];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(p===-2)m=!0,f++;else if(p!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(f=0),f){const p={type:r===e.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?c:s.start._bufferIndex+c,_index:s.start._index+a,line:s.end.line,column:s.end.column-f,offset:s.end.offset-f},end:{...s.end}};s.end={...p.start},s.start.offset===s.end.offset?Object.assign(s,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}const F1={42:Hn,43:Hn,45:Hn,48:Hn,49:Hn,50:Hn,51:Hn,52:Hn,53:Hn,54:Hn,55:Hn,56:Hn,57:Hn,62:uy},H1={91:qb},V1={[-2]:Nu,[-1]:Nu,32:Nu},U1={35:Gb,42:no,45:[Th,no],60:n1,61:Th,95:no,96:jh,126:jh},W1={38:fy,92:dy},q1={[-5]:ju,[-4]:ju,[-3]:ju,33:_1,38:fy,42:rd,60:[wb,c1],91:w1,92:[Qb,dy],93:Pd,95:rd,96:Lb},K1={null:[rd,O1]},Z1={null:[42,95]},Y1={null:[]},Q1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Z1,contentInitial:H1,disable:Y1,document:F1,flow:U1,flowInitial:V1,insideSpan:K1,string:W1,text:q1},Symbol.toStringTag,{value:"Module"}));function X1(e,t,r){let s={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},a=[];let c=[],f=[];const m={attempt:B(I),check:B(j),consume:R,enter:T,exit:M,interrupt:B(j,{interrupt:!0})},p={code:null,containerState:{},defineSkip:C,events:[],now:k,parser:e,previous:null,sliceSerialize:x,sliceStream:_,write:g};let y=t.tokenize.call(p,m);return t.resolveAll&&a.push(t),p;function g(W){return c=dr(c,W),D(),c[c.length-1]!==null?[]:(Q(t,0),p.events=Co(a,p.events,p),p.events)}function x(W,ne){return J1(_(W),ne)}function _(W){return G1(c,W)}function k(){const{_bufferIndex:W,_index:ne,line:_e,column:ie,offset:X}=s;return{_bufferIndex:W,_index:ne,line:_e,column:ie,offset:X}}function C(W){l[W.line]=W.column,O()}function D(){let W;for(;s._index<c.length;){const ne=c[s._index];if(typeof ne=="string")for(W=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===W&&s._bufferIndex<ne.length;)S(ne.charCodeAt(s._bufferIndex));else S(ne)}}function S(W){y=y(W)}function R(W){Fe(W)?(s.line++,s.column=1,s.offset+=W===-3?2:1,O()):W!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===c[s._index].length&&(s._bufferIndex=-1,s._index++)),p.previous=W}function T(W,ne){const _e=ne||{};return _e.type=W,_e.start=k(),p.events.push(["enter",_e,p]),f.push(_e),_e}function M(W){const ne=f.pop();return ne.end=k(),p.events.push(["exit",ne,p]),ne}function I(W,ne){Q(W,ne.from)}function j(W,ne){ne.restore()}function B(W,ne){return _e;function _e(ie,X,J){let ve,ee,fe,N;return Array.isArray(ie)?F(ie):"tokenize"in ie?F([ie]):P(ie);function P(ge){return xe;function xe(ze){const de=ze!==null&&ge[ze],ke=ze!==null&&ge.null,Nt=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(ke)?ke:ke?[ke]:[]];return F(Nt)(ze)}}function F(ge){return ve=ge,ee=0,ge.length===0?J:E(ge[ee])}function E(ge){return xe;function xe(ze){return N=te(),fe=ge,ge.partial||(p.currentConstruct=ge),ge.name&&p.parser.constructs.disable.null.includes(ge.name)?Se():ge.tokenize.call(ne?Object.assign(Object.create(p),ne):p,m,ce,Se)(ze)}}function ce(ge){return W(fe,N),X}function Se(ge){return N.restore(),++ee<ve.length?E(ve[ee]):J}}}function Q(W,ne){W.resolveAll&&!a.includes(W)&&a.push(W),W.resolve&&Jn(p.events,ne,p.events.length-ne,W.resolve(p.events.slice(ne),p)),W.resolveTo&&(p.events=W.resolveTo(p.events,p))}function te(){const W=k(),ne=p.previous,_e=p.currentConstruct,ie=p.events.length,X=Array.from(f);return{from:ie,restore:J};function J(){s=W,p.previous=ne,p.currentConstruct=_e,p.events.length=ie,f=X,O()}}function O(){s.line in l&&s.column<2&&(s.column=l[s.line],s.offset+=l[s.line]-1)}}function G1(e,t){const r=t.start._index,s=t.start._bufferIndex,l=t.end._index,a=t.end._bufferIndex;let c;if(r===l)c=[e[r].slice(s,a)];else{if(c=e.slice(r,l),s>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(s):c.shift()}a>0&&c.push(e[l].slice(0,a))}return c}function J1(e,t){let r=-1;const s=[];let l;for(;++r<e.length;){const a=e[r];let c;if(typeof a=="string")c=a;else switch(a){case-5:{c="\r";break}case-4:{c=`
|
|
42
|
+
`;break}case-3:{c=`\r
|
|
43
|
+
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&l)continue;c=" ";break}default:c=String.fromCharCode(a)}l=a===-2,s.push(c)}return s.join("")}function e0(e){const s={constructs:oy([Q1,...(e||{}).extensions||[]]),content:l(hb),defined:[],document:l(yb),flow:l(L1),lazy:{},string:l(z1),text:l($1)};return s;function l(a){return c;function c(f){return X1(s,a,f)}}}function t0(e){for(;!my(e););return e}const Ih=/[\0\t\n\r]/g;function n0(){let e=1,t="",r=!0,s;return l;function l(a,c,f){const m=[];let p,y,g,x,_;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(c||void 0).decode(a)),g=0,t="",r&&(a.charCodeAt(0)===65279&&g++,r=void 0);g<a.length;){if(Ih.lastIndex=g,p=Ih.exec(a),x=p&&p.index!==void 0?p.index:a.length,_=a.charCodeAt(x),!p){t=a.slice(g);break}if(_===10&&g===x&&s)m.push(-3),s=void 0;else switch(s&&(m.push(-5),s=void 0),g<x&&(m.push(a.slice(g,x)),e+=x-g),_){case 0:{m.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,m.push(-2);e++<y;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:s=!0,e=1}g=x+1}return f&&(s&&m.push(-5),t&&m.push(t),m.push(null)),m}}const r0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function i0(e){return e.replace(r0,s0)}function s0(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),a=l===120||l===88;return cy(r.slice(a?2:1),a?16:10)}return Rd(r)||e}const xy={}.hasOwnProperty;function l0(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),a0(r)(t0(e0(r).document().write(n0()(e,t,!0))))}function a0(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Zt),autolinkProtocol:te,autolinkEmail:te,atxHeading:a(se),blockQuote:a(ke),characterEscape:te,characterReference:te,codeFenced:a(Nt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(Nt,c),codeText:a(Lt,c),codeTextData:te,data:te,codeFlowValue:te,definition:a(Kt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(jt),hardBreakEscape:a(Ge),hardBreakTrailing:a(Ge),htmlFlow:a(wt,c),htmlFlowData:te,htmlText:a(wt,c),htmlTextData:te,image:a(tn),label:c,link:a(Zt),listItem:a(Mt),listItemValue:x,listOrdered:a(bt,g),listUnordered:a(bt),paragraph:a(yt),reference:E,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(se),strong:a(Yt),thematicBreak:a(Ce)},exit:{atxHeading:m(),atxHeadingSequence:I,autolink:m(),autolinkEmail:de,autolinkProtocol:ze,blockQuote:m(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:ge,characterReference:xe,codeFenced:m(D),codeFencedFence:C,codeFencedFenceInfo:_,codeFencedFenceMeta:k,codeFlowValue:O,codeIndented:m(S),codeText:m(X),codeTextData:O,data:O,definition:m(),definitionDestinationString:M,definitionLabelString:R,definitionTitleString:T,emphasis:m(),hardBreakEscape:m(ne),hardBreakTrailing:m(ne),htmlFlow:m(_e),htmlFlowData:O,htmlText:m(ie),htmlTextData:O,image:m(ve),label:fe,labelText:ee,lineEnding:W,link:m(J),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:ce,resourceDestinationString:N,resourceTitleString:P,resource:F,setextHeading:m(Q),setextHeadingLineSequence:B,setextHeadingText:j,strong:m(),thematicBreak:m()}};_y(t,(e||{}).mdastExtensions||[]);const r={};return s;function s($){let Z={type:"root",children:[]};const q={stack:[Z],tokenStack:[],config:t,enter:f,exit:p,buffer:c,resume:y,data:r},we=[];let Ve=-1;for(;++Ve<$.length;)if($[Ve][1].type==="listOrdered"||$[Ve][1].type==="listUnordered")if($[Ve][0]==="enter")we.push(Ve);else{const st=we.pop();Ve=l($,st,Ve)}for(Ve=-1;++Ve<$.length;){const st=t[$[Ve][0]];xy.call(st,$[Ve][1].type)&&st[$[Ve][1].type].call(Object.assign({sliceSerialize:$[Ve][2].sliceSerialize},q),$[Ve][1])}if(q.tokenStack.length>0){const st=q.tokenStack[q.tokenStack.length-1];(st[1]||Dh).call(q,void 0,st[0])}for(Z.position={start:di($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:di($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve<t.transforms.length;)Z=t.transforms[Ve](Z)||Z;return Z}function l($,Z,q){let we=Z-1,Ve=-1,st=!1,Ot,Ut,yn,vn;for(;++we<=q;){const Y=$[we];switch(Y[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Y[0]==="enter"?Ve++:Ve--,vn=void 0;break}case"lineEndingBlank":{Y[0]==="enter"&&(Ot&&!vn&&!Ve&&!yn&&(yn=we),vn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:vn=void 0}if(!Ve&&Y[0]==="enter"&&Y[1].type==="listItemPrefix"||Ve===-1&&Y[0]==="exit"&&(Y[1].type==="listUnordered"||Y[1].type==="listOrdered")){if(Ot){let le=we;for(Ut=void 0;le--;){const Ne=$[le];if(Ne[1].type==="lineEnding"||Ne[1].type==="lineEndingBlank"){if(Ne[0]==="exit")continue;Ut&&($[Ut][1].type="lineEndingBlank",st=!0),Ne[1].type="lineEnding",Ut=le}else if(!(Ne[1].type==="linePrefix"||Ne[1].type==="blockQuotePrefix"||Ne[1].type==="blockQuotePrefixWhitespace"||Ne[1].type==="blockQuoteMarker"||Ne[1].type==="listItemIndent"))break}yn&&(!Ut||yn<Ut)&&(Ot._spread=!0),Ot.end=Object.assign({},Ut?$[Ut][1].start:Y[1].end),$.splice(Ut||we,0,["exit",Ot,Y[2]]),we++,q++}if(Y[1].type==="listItemPrefix"){const le={type:"listItem",_spread:!1,start:Object.assign({},Y[1].start),end:void 0};Ot=le,$.splice(we,0,["enter",le,Y[2]]),we++,q++,yn=void 0,vn=!0}}}return $[Z][1]._spread=st,q}function a($,Z){return q;function q(we){f.call(this,$(we),we),Z&&Z.call(this,we)}}function c(){this.stack.push({type:"fragment",children:[]})}function f($,Z,q){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([Z,q||void 0]),$.position={start:di(Z.start),end:void 0}}function m($){return Z;function Z(q){$&&$.call(this,q),p.call(this,q)}}function p($,Z){const q=this.stack.pop(),we=this.tokenStack.pop();if(we)we[0].type!==$.type&&(Z?Z.call(this,$,we[0]):(we[1]||Dh).call(this,$,we[0]));else throw new Error("Cannot close `"+$.type+"` ("+vl({start:$.start,end:$.end})+"): it’s not open");q.position.end=di($.end)}function y(){return Ad(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x($){if(this.data.expectingFirstListItemValue){const Z=this.stack[this.stack.length-2];Z.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function _(){const $=this.resume(),Z=this.stack[this.stack.length-1];Z.lang=$}function k(){const $=this.resume(),Z=this.stack[this.stack.length-1];Z.meta=$}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function D(){const $=this.resume(),Z=this.stack[this.stack.length-1];Z.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const $=this.resume(),Z=this.stack[this.stack.length-1];Z.value=$.replace(/(\r?\n|\r)$/g,"")}function R($){const Z=this.resume(),q=this.stack[this.stack.length-1];q.label=Z,q.identifier=kr(this.sliceSerialize($)).toLowerCase()}function T(){const $=this.resume(),Z=this.stack[this.stack.length-1];Z.title=$}function M(){const $=this.resume(),Z=this.stack[this.stack.length-1];Z.url=$}function I($){const Z=this.stack[this.stack.length-1];if(!Z.depth){const q=this.sliceSerialize($).length;Z.depth=q}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function B($){const Z=this.stack[this.stack.length-1];Z.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function Q(){this.data.setextHeadingSlurpLineEnding=void 0}function te($){const q=this.stack[this.stack.length-1].children;let we=q[q.length-1];(!we||we.type!=="text")&&(we=ye(),we.position={start:di($.start),end:void 0},q.push(we)),this.stack.push(we)}function O($){const Z=this.stack.pop();Z.value+=this.sliceSerialize($),Z.position.end=di($.end)}function W($){const Z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const q=Z.children[Z.children.length-1];q.position.end=di($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Z.type)&&(te.call(this,$),O.call(this,$))}function ne(){this.data.atHardBreak=!0}function _e(){const $=this.resume(),Z=this.stack[this.stack.length-1];Z.value=$}function ie(){const $=this.resume(),Z=this.stack[this.stack.length-1];Z.value=$}function X(){const $=this.resume(),Z=this.stack[this.stack.length-1];Z.value=$}function J(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=Z,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function ve(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=Z,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function ee($){const Z=this.sliceSerialize($),q=this.stack[this.stack.length-2];q.label=i0(Z),q.identifier=kr(Z).toLowerCase()}function fe(){const $=this.stack[this.stack.length-1],Z=this.resume(),q=this.stack[this.stack.length-1];if(this.data.inReference=!0,q.type==="link"){const we=$.children;q.children=we}else q.alt=Z}function N(){const $=this.resume(),Z=this.stack[this.stack.length-1];Z.url=$}function P(){const $=this.resume(),Z=this.stack[this.stack.length-1];Z.title=$}function F(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function ce($){const Z=this.resume(),q=this.stack[this.stack.length-1];q.label=Z,q.identifier=kr(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function Se($){this.data.characterReferenceType=$.type}function ge($){const Z=this.sliceSerialize($),q=this.data.characterReferenceType;let we;q?(we=cy(Z,q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):we=Rd(Z);const Ve=this.stack[this.stack.length-1];Ve.value+=we}function xe($){const Z=this.stack.pop();Z.position.end=di($.end)}function ze($){O.call(this,$);const Z=this.stack[this.stack.length-1];Z.url=this.sliceSerialize($)}function de($){O.call(this,$);const Z=this.stack[this.stack.length-1];Z.url="mailto:"+this.sliceSerialize($)}function ke(){return{type:"blockquote",children:[]}}function Nt(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function Kt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function jt(){return{type:"emphasis",children:[]}}function se(){return{type:"heading",depth:0,children:[]}}function Ge(){return{type:"break"}}function wt(){return{type:"html",value:""}}function tn(){return{type:"image",title:null,url:"",alt:null}}function Zt(){return{type:"link",title:null,url:"",children:[]}}function bt($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function Mt($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function yt(){return{type:"paragraph",children:[]}}function Yt(){return{type:"strong",children:[]}}function ye(){return{type:"text",value:""}}function Ce(){return{type:"thematicBreak"}}}function di(e){return{line:e.line,column:e.column,offset:e.offset}}function _y(e,t){let r=-1;for(;++r<t.length;){const s=t[r];Array.isArray(s)?_y(e,s):o0(e,s)}}function o0(e,t){let r;for(r in t)if(xy.call(t,r))switch(r){case"canContainEols":{const s=t[r];s&&e[r].push(...s);break}case"transforms":{const s=t[r];s&&e[r].push(...s);break}case"enter":case"exit":{const s=t[r];s&&Object.assign(e[r],s);break}}}function Dh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+vl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+vl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+vl({start:t.start,end:t.end})+") is still open")}function c0(e){const t=this;t.parser=r;function r(s){return l0(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function u0(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function d0(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
44
|
+
`}]}function f0(e,t){const r=t.value?t.value+`
|
|
45
|
+
`:"",s={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(s.className=["language-"+l[0]]);let a={type:"element",tagName:"code",properties:s,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function m0(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function p0(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function h0(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),l=js(s.toLowerCase()),a=e.footnoteOrder.indexOf(s);let c,f=e.footnoteCounts.get(s);f===void 0?(f=0,e.footnoteOrder.push(s),c=e.footnoteOrder.length):c=a+1,f+=1,e.footnoteCounts.set(s,f);const m={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,m);const p={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(t,p),e.applyData(t,p)}function g0(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function y0(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function ky(e,t){const r=t.referenceType;let s="]";if(r==="collapsed"?s+="[]":r==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const l=e.all(t),a=l[0];a&&a.type==="text"?a.value="["+a.value:l.unshift({type:"text",value:"["});const c=l[l.length-1];return c&&c.type==="text"?c.value+=s:l.push({type:"text",value:s}),l}function v0(e,t){const r=String(t.identifier).toUpperCase(),s=e.definitionById.get(r);if(!s)return ky(e,t);const l={src:js(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(l.title=s.title);const a={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,a),e.applyData(t,a)}function x0(e,t){const r={src:js(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const s={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,s),e.applyData(t,s)}function _0(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const s={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,s),e.applyData(t,s)}function k0(e,t){const r=String(t.identifier).toUpperCase(),s=e.definitionById.get(r);if(!s)return ky(e,t);const l={href:js(s.url||"")};s.title!==null&&s.title!==void 0&&(l.title=s.title);const a={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function w0(e,t){const r={href:js(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const s={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function b0(e,t,r){const s=e.all(t),l=r?S0(r):wy(t),a={},c=[];if(typeof t.checked=="boolean"){const y=s[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},s.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let f=-1;for(;++f<s.length;){const y=s[f];(l||f!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
|
|
46
|
+
`}),y.type==="element"&&y.tagName==="p"&&!l?c.push(...y.children):c.push(y)}const m=s[s.length-1];m&&(l||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
47
|
+
`});const p={type:"element",tagName:"li",properties:a,children:c};return e.patch(t,p),e.applyData(t,p)}function S0(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let s=-1;for(;!t&&++s<r.length;)t=wy(r[s])}return t}function wy(e){const t=e.spread;return t??e.children.length>1}function C0(e,t){const r={},s=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++l<s.length;){const c=s[l];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function N0(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function j0(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function E0(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function T0(e,t){const r=e.all(t),s=r.shift(),l=[];if(s){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],c),l.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=Ed(t.children[1]),m=ty(t.children[t.children.length-1]);f&&m&&(c.position={start:f,end:m}),l.push(c)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,a),e.applyData(t,a)}function I0(e,t,r){const s=r?r.children:void 0,a=(s?s.indexOf(t):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,f=c?c.length:t.children.length;let m=-1;const p=[];for(;++m<f;){const g=t.children[m],x={},_=c?c[m]:void 0;_&&(x.align=_);let k={type:"element",tagName:a,properties:x,children:[]};g&&(k.children=e.all(g),e.patch(g,k),k=e.applyData(g,k)),p.push(k)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,y),e.applyData(t,y)}function D0(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const Ah=9,Rh=32;function A0(e){const t=String(e),r=/\r?\n|\r/g;let s=r.exec(t),l=0;const a=[];for(;s;)a.push(Ph(t.slice(l,s.index),l>0,!0),s[0]),l=s.index+s[0].length,s=r.exec(t);return a.push(Ph(t.slice(l),l>0,!1)),a.join("")}function Ph(e,t,r){let s=0,l=e.length;if(t){let a=e.codePointAt(s);for(;a===Ah||a===Rh;)s++,a=e.codePointAt(s)}if(r){let a=e.codePointAt(l-1);for(;a===Ah||a===Rh;)l--,a=e.codePointAt(l-1)}return l>s?e.slice(s,l):""}function R0(e,t){const r={type:"text",value:A0(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function P0(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const L0={blockquote:u0,break:d0,code:f0,delete:m0,emphasis:p0,footnoteReference:h0,heading:g0,html:y0,imageReference:v0,image:x0,inlineCode:_0,linkReference:k0,link:w0,listItem:b0,list:C0,paragraph:N0,root:j0,strong:E0,table:T0,tableCell:D0,tableRow:I0,text:R0,thematicBreak:P0,toml:Za,yaml:Za,definition:Za,footnoteDefinition:Za};function Za(){}const by=-1,No=0,_l=1,mo=2,Ld=3,Md=4,Od=5,zd=6,Sy=7,Cy=8,M0=typeof self=="object"?self:globalThis,Lh=(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 M0[e](t)},O0=(e,t)=>{const r=(l,a)=>(e.set(a,l),l),s=l=>{if(e.has(l))return e.get(l);const[a,c]=t[l];switch(a){case No:case by:return r(c,l);case _l:{const f=r([],l);for(const m of c)f.push(s(m));return f}case mo:{const f=r({},l);for(const[m,p]of c)f[s(m)]=s(p);return f}case Ld:return r(new Date(c),l);case Md:{const{source:f,flags:m}=c;return r(new RegExp(f,m),l)}case Od:{const f=r(new Map,l);for(const[m,p]of c)f.set(s(m),s(p));return f}case zd:{const f=r(new Set,l);for(const m of c)f.add(s(m));return f}case Sy:{const{name:f,message:m}=c;return r(Lh(f,m),l)}case Cy:return r(BigInt(c),l);case"BigInt":return r(Object(BigInt(c)),l);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return r(new DataView(f),c)}}return r(Lh(a,c),l)};return s},Mh=e=>O0(new Map,e)(0),fs="",{toString:z0}={},{keys:$0}=Object,pl=e=>{const t=typeof e;if(t!=="object"||!e)return[No,t];const r=z0.call(e).slice(8,-1);switch(r){case"Array":return[_l,fs];case"Object":return[mo,fs];case"Date":return[Ld,fs];case"RegExp":return[Md,fs];case"Map":return[Od,fs];case"Set":return[zd,fs];case"DataView":return[_l,r]}return r.includes("Array")?[_l,r]:r.includes("Error")?[Sy,r]:[mo,r]},Ya=([e,t])=>e===No&&(t==="function"||t==="symbol"),B0=(e,t,r,s)=>{const l=(c,f)=>{const m=s.push(c)-1;return r.set(f,m),m},a=c=>{if(r.has(c))return r.get(c);let[f,m]=pl(c);switch(f){case No:{let y=c;switch(m){case"bigint":f=Cy,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);y=null;break;case"undefined":return l([by],c)}return l([f,y],c)}case _l:{if(m){let x=c;return m==="DataView"?x=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(x=new Uint8Array(c)),l([m,[...x]],c)}const y=[],g=l([f,y],c);for(const x of c)y.push(a(x));return g}case mo:{if(m)switch(m){case"BigInt":return l([m,c.toString()],c);case"Boolean":case"Number":case"String":return l([m,c.valueOf()],c)}if(t&&"toJSON"in c)return a(c.toJSON());const y=[],g=l([f,y],c);for(const x of $0(c))(e||!Ya(pl(c[x])))&&y.push([a(x),a(c[x])]);return g}case Ld:return l([f,c.toISOString()],c);case Md:{const{source:y,flags:g}=c;return l([f,{source:y,flags:g}],c)}case Od:{const y=[],g=l([f,y],c);for(const[x,_]of c)(e||!(Ya(pl(x))||Ya(pl(_))))&&y.push([a(x),a(_)]);return g}case zd:{const y=[],g=l([f,y],c);for(const x of c)(e||!Ya(pl(x)))&&y.push(a(x));return g}}const{message:p}=c;return l([f,{name:m,message:p}],c)};return a},Oh=(e,{json:t,lossy:r}={})=>{const s=[];return B0(!(t||r),!!t,new Map,s)(e),s},po=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Mh(Oh(e,t)):structuredClone(e):(e,t)=>Mh(Oh(e,t));function F0(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function H0(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function V0(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||F0,s=e.options.footnoteBackLabel||H0,l=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let m=-1;for(;++m<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[m]);if(!p)continue;const y=e.all(p),g=String(p.identifier).toUpperCase(),x=js(g.toLowerCase());let _=0;const k=[],C=e.footnoteCounts.get(g);for(;C!==void 0&&++_<=C;){k.length>0&&k.push({type:"text",value:" "});let R=typeof r=="string"?r:r(m,_);typeof R=="string"&&(R={type:"text",value:R}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(_>1?"-"+_:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(m,_),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const D=y[y.length-1];if(D&&D.type==="element"&&D.tagName==="p"){const R=D.children[D.children.length-1];R&&R.type==="text"?R.value+=" ":D.children.push({type:"text",value:" "}),D.children.push(...k)}else y.push(...k);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(y,!0)};e.patch(p,S),f.push(S)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...po(c),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
|
|
48
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
49
|
+
`}]}}const jo=(function(e){if(e==null)return K0;if(typeof e=="function")return Eo(e);if(typeof e=="object")return Array.isArray(e)?U0(e):W0(e);if(typeof e=="string")return q0(e);throw new Error("Expected function, string, or object as test")});function U0(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=jo(e[r]);return Eo(s);function s(...l){let a=-1;for(;++a<t.length;)if(t[a].apply(this,l))return!0;return!1}}function W0(e){const t=e;return Eo(r);function r(s){const l=s;let a;for(a in e)if(l[a]!==t[a])return!1;return!0}}function q0(e){return Eo(t);function t(r){return r&&r.type===e}}function Eo(e){return t;function t(r,s,l){return!!(Z0(r)&&e.call(this,r,typeof s=="number"?s:void 0,l||void 0))}}function K0(){return!0}function Z0(e){return e!==null&&typeof e=="object"&&"type"in e}const Ny=[],Y0=!0,id=!1,Q0="skip";function jy(e,t,r,s){let l;typeof t=="function"&&typeof r!="function"?(s=r,r=t):l=t;const a=jo(l),c=s?-1:1;f(e,void 0,[])();function f(m,p,y){const g=m&&typeof m=="object"?m:{};if(typeof g.type=="string"){const _=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(m.type+(_?"<"+_+">":""))+")"})}return x;function x(){let _=Ny,k,C,D;if((!t||a(m,p,y[y.length-1]||void 0))&&(_=X0(r(m,y)),_[0]===id))return _;if("children"in m&&m.children){const S=m;if(S.children&&_[0]!==Q0)for(C=(s?S.children.length:-1)+c,D=y.concat(S);C>-1&&C<S.children.length;){const R=S.children[C];if(k=f(R,C,D)(),k[0]===id)return k;C=typeof k[1]=="number"?k[1]:C+c}}return _}}}function X0(e){return Array.isArray(e)?e:typeof e=="number"?[Y0,e]:e==null?Ny:[e]}function $d(e,t,r,s){let l,a,c;typeof t=="function"&&typeof r!="function"?(a=void 0,c=t,l=r):(a=t,c=r,l=s),jy(e,a,f,l);function f(m,p){const y=p[p.length-1],g=y?y.children.indexOf(m):void 0;return c(m,g,y)}}const sd={}.hasOwnProperty,G0={};function J0(e,t){const r=t||G0,s=new Map,l=new Map,a=new Map,c={...L0,...r.handlers},f={all:p,applyData:tS,definitionById:s,footnoteById:l,footnoteCounts:a,footnoteOrder:[],handlers:c,one:m,options:r,patch:eS,wrap:rS};return $d(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?s:l,x=String(y.identifier).toUpperCase();g.has(x)||g.set(x,y)}}),f;function m(y,g){const x=y.type,_=f.handlers[x];if(sd.call(f.handlers,x)&&_)return _(f,y,g);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in y){const{children:C,...D}=y,S=po(D);return S.children=f.all(y),S}return po(y)}return(f.options.unknownHandler||nS)(f,y,g)}function p(y){const g=[];if("children"in y){const x=y.children;let _=-1;for(;++_<x.length;){const k=f.one(x[_],y);if(k){if(_&&x[_-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=zh(k.value)),!Array.isArray(k)&&k.type==="element")){const C=k.children[0];C&&C.type==="text"&&(C.value=zh(C.value))}Array.isArray(k)?g.push(...k):g.push(k)}}}return g}}function eS(e,t){e.position&&(t.position=Fw(e))}function tS(e,t){let r=t;if(e&&e.data){const s=e.data.hName,l=e.data.hChildren,a=e.data.hProperties;if(typeof s=="string")if(r.type==="element")r.tagName=s;else{const c="children"in r?r.children:[r];r={type:"element",tagName:s,properties:{},children:c}}r.type==="element"&&a&&Object.assign(r.properties,po(a)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function nS(e,t){const r=t.data||{},s="value"in t&&!(sd.call(r,"hProperties")||sd.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function rS(e,t){const r=[];let s=-1;for(t&&r.push({type:"text",value:`
|
|
50
|
+
`});++s<e.length;)s&&r.push({type:"text",value:`
|
|
51
|
+
`}),r.push(e[s]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
52
|
+
`}),r}function zh(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function $h(e,t){const r=J0(e,t),s=r.one(e,void 0),l=V0(r),a=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return l&&a.children.push({type:"text",value:`
|
|
53
|
+
`},l),a}function iS(e,t){return e&&"run"in e?async function(r,s){const l=$h(r,{file:s,...t});await e.run(l,s)}:function(r,s){return $h(r,{file:s,...e||t})}}function Bh(e){if(e)throw e}var Eu,Fh;function sS(){if(Fh)return Eu;Fh=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},a=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var y=e.call(p,"constructor"),g=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!y&&!g)return!1;var x;for(x in p);return typeof x>"u"||e.call(p,x)},c=function(p,y){r&&y.name==="__proto__"?r(p,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):p[y.name]=y.newValue},f=function(p,y){if(y==="__proto__")if(e.call(p,y)){if(s)return s(p,y).value}else return;return p[y]};return Eu=function m(){var p,y,g,x,_,k,C=arguments[0],D=1,S=arguments.length,R=!1;for(typeof C=="boolean"&&(R=C,C=arguments[1]||{},D=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});D<S;++D)if(p=arguments[D],p!=null)for(y in p)g=f(C,y),x=f(p,y),C!==x&&(R&&x&&(a(x)||(_=l(x)))?(_?(_=!1,k=g&&l(g)?g:[]):k=g&&a(g)?g:{},c(C,{name:y,newValue:m(R,k,x)})):typeof x<"u"&&c(C,{name:y,newValue:x}));return C},Eu}var lS=sS();const Tu=vd(lS);function ld(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 aS(){const e=[],t={run:r,use:s};return t;function r(...l){let a=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...l);function f(m,...p){const y=e[++a];let g=-1;if(m){c(m);return}for(;++g<l.length;)(p[g]===null||p[g]===void 0)&&(p[g]=l[g]);l=p,y?oS(y,f)(...p):c(null,...p)}}function s(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function oS(e,t){let r;return s;function s(...c){const f=e.length>c.length;let m;f&&c.push(l);try{m=e.apply(this,c)}catch(p){const y=p;if(f&&r)throw y;return l(y)}f||(m&&m.then&&typeof m.then=="function"?m.then(a,l):m instanceof Error?l(m):a(m))}function l(c,...f){r||(r=!0,t(c,...f))}function a(c){l(null,c)}}const Tr={basename:cS,dirname:uS,extname:dS,join:fS,sep:"/"};function cS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pl(e);let r=0,s=-1,l=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(a){r=l+1;break}}else s<0&&(a=!0,s=l+1);return s<0?"":e.slice(r,s)}if(t===e)return"";let c=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(a){r=l+1;break}}else c<0&&(a=!0,c=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(s=l):(f=-1,s=c));return r===s?s=c:s<0&&(s=e.length),e.slice(r,s)}function uS(e){if(Pl(e),e.length===0)return".";let t=-1,r=e.length,s;for(;--r;)if(e.codePointAt(r)===47){if(s){t=r;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function dS(e){Pl(e);let t=e.length,r=-1,s=0,l=-1,a=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){s=t+1;break}continue}r<0&&(c=!0,r=t+1),f===46?l<0?l=t:a!==1&&(a=1):l>-1&&(a=-1)}return l<0||r<0||a===0||a===1&&l===r-1&&l===s+1?"":e.slice(l,r)}function fS(...e){let t=-1,r;for(;++t<e.length;)Pl(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":mS(r)}function mS(e){Pl(e);const t=e.codePointAt(0)===47;let r=pS(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function pS(e,t){let r="",s=0,l=-1,a=0,c=-1,f,m;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(l===c-1||a===1))if(l!==c-1&&a===2){if(r.length<2||s!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",s=0):(r=r.slice(0,m),s=r.length-1-r.lastIndexOf("/")),l=c,a=0;continue}}else if(r.length>0){r="",s=0,l=c,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",s=2)}else r.length>0?r+="/"+e.slice(l+1,c):r=e.slice(l+1,c),s=c-l-1;l=c,a=0}else f===46&&a>-1?a++:a=-1}return r}function Pl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const hS={cwd:gS};function gS(){return"/"}function ad(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function yS(e){if(typeof e=="string")e=new URL(e);else if(!ad(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 vS(e)}function vS(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const s=t.codePointAt(r+2);if(s===70||s===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Iu=["history","path","basename","stem","extname","dirname"];class Ey{constructor(t){let r;t?ad(t)?r={path:t}:typeof t=="string"||xS(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":hS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<Iu.length;){const a=Iu[s];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let l;for(l in r)Iu.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?Tr.basename(this.path):void 0}set basename(t){Au(t,"basename"),Du(t,"basename"),this.path=Tr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Tr.dirname(this.path):void 0}set dirname(t){Hh(this.basename,"dirname"),this.path=Tr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Tr.extname(this.path):void 0}set extname(t){if(Du(t,"extname"),Hh(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=Tr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ad(t)&&(t=yS(t)),Au(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Tr.basename(this.path,this.extname):void 0}set stem(t){Au(t,"stem"),Du(t,"stem"),this.path=Tr.join(this.dirname||"",t+(this.extname||""))}fail(t,r,s){const l=this.message(t,r,s);throw l.fatal=!0,l}info(t,r,s){const l=this.message(t,r,s);return l.fatal=void 0,l}message(t,r,s){const l=new En(t,r,s);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Du(e,t){if(e&&e.includes(Tr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Tr.sep+"`")}function Au(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function xS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _S=(function(e){const s=this.constructor.prototype,l=s[e],a=function(){return l.apply(a,arguments)};return Object.setPrototypeOf(a,s),a}),kS={}.hasOwnProperty;class Bd extends _S{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=aS()}copy(){const t=new Bd;let r=-1;for(;++r<this.attachers.length;){const s=this.attachers[r];t.use(...s)}return t.data(Tu(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Lu("data",this.frozen),this.namespace[t]=r,this):kS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Lu("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[r,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const l=r.call(t,...s);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Qa(t),s=this.parser||this.Parser;return Ru("parse",s),s(String(r),r)}process(t,r){const s=this;return this.freeze(),Ru("process",this.parser||this.Parser),Pu("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(a,c){const f=Qa(t),m=s.parse(f);s.run(m,f,function(y,g,x){if(y||!g||!x)return p(y);const _=g,k=s.stringify(_,x);SS(k)?x.value=k:x.result=k,p(y,x)});function p(y,g){y||!g?c(y):a?a(g):r(void 0,g)}}}processSync(t){let r=!1,s;return this.freeze(),Ru("processSync",this.parser||this.Parser),Pu("processSync",this.compiler||this.Compiler),this.process(t,l),Uh("processSync","process",r),s;function l(a,c){r=!0,Bh(a),s=c}}run(t,r,s){Vh(t),this.freeze();const l=this.transformers;return!s&&typeof r=="function"&&(s=r,r=void 0),s?a(void 0,s):new Promise(a);function a(c,f){const m=Qa(r);l.run(t,m,p);function p(y,g,x){const _=g||t;y?f(y):c?c(_):s(void 0,_,x)}}}runSync(t,r){let s=!1,l;return this.run(t,r,a),Uh("runSync","run",s),l;function a(c,f){Bh(c),l=f,s=!0}}stringify(t,r){this.freeze();const s=Qa(r),l=this.compiler||this.Compiler;return Pu("stringify",l),Vh(t),l(t,s)}use(t,...r){const s=this.attachers,l=this.namespace;if(Lu("use",this.frozen),t!=null)if(typeof t=="function")m(t,r);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(p){if(typeof p=="function")m(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[y,...g]=p;m(y,g)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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");f(p.plugins),p.settings&&(l.settings=Tu(!0,l.settings,p.settings))}function f(p){let y=-1;if(p!=null)if(Array.isArray(p))for(;++y<p.length;){const g=p[y];a(g)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function m(p,y){let g=-1,x=-1;for(;++g<s.length;)if(s[g][0]===p){x=g;break}if(x===-1)s.push([p,...y]);else if(y.length>0){let[_,...k]=y;const C=s[x][1];ld(C)&&ld(_)&&(_=Tu(!0,C,_)),s[x]=[p,_,...k]}}}}const wS=new Bd().freeze();function Ru(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Pu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Lu(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 Vh(e){if(!ld(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Uh(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qa(e){return bS(e)?e:new Ey(e)}function bS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function SS(e){return typeof e=="string"||CS(e)}function CS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Wh=[],qh={allowDangerousHtml:!0},jS=/^(https?|ircs?|mailto|xmpp)$/i,ES=[{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 Oi(e){const t=TS(e),r=IS(e);return DS(t.runSync(t.parse(r),r),e)}function TS(e){const t=e.rehypePlugins||Wh,r=e.remarkPlugins||Wh,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qh}:qh;return wS().use(c0).use(r).use(iS,s).use(t)}function IS(e){const t=e.children||"",r=new Ey;return typeof t=="string"&&(r.value=t),r}function DS(e,t){const r=t.allowedElements,s=t.allowElement,l=t.components,a=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,m=t.urlTransform||AS;for(const y of ES)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+NS+y.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),$d(e,p),qw(e,{Fragment:u.Fragment,components:l,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function p(y,g,x){if(y.type==="raw"&&x&&typeof g=="number")return c?x.children.splice(g,1):x.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let _;for(_ in Cu)if(Object.hasOwn(Cu,_)&&Object.hasOwn(y.properties,_)){const k=y.properties[_],C=Cu[_];(C===null||C.includes(y.tagName))&&(y.properties[_]=m(String(k||""),_,y))}}if(y.type==="element"){let _=r?!r.includes(y.tagName):a?a.includes(y.tagName):!1;if(!_&&s&&typeof g=="number"&&(_=!s(y,g,x)),_&&x&&typeof g=="number")return f&&y.children?x.children.splice(g,1,...y.children):x.children.splice(g,1),g}}}function AS(e){const t=e.indexOf(":"),r=e.indexOf("?"),s=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||r!==-1&&t>r||s!==-1&&t>s||jS.test(e.slice(0,t))?e:""}function Kh(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,l=r.indexOf(t);for(;l!==-1;)s++,l=r.indexOf(t,l+t.length);return s}function RS(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function PS(e,t,r){const l=jo((r||{}).ignore||[]),a=LS(t);let c=-1;for(;++c<a.length;)jy(e,"text",f);function f(p,y){let g=-1,x;for(;++g<y.length;){const _=y[g],k=x?x.children:void 0;if(l(_,k?k.indexOf(_):void 0,x))return;x=_}if(x)return m(p,y)}function m(p,y){const g=y[y.length-1],x=a[c][0],_=a[c][1];let k=0;const D=g.children.indexOf(p);let S=!1,R=[];x.lastIndex=0;let T=x.exec(p.value);for(;T;){const M=T.index,I={index:T.index,input:T.input,stack:[...y,p]};let j=_(...T,I);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?x.lastIndex=M+1:(k!==M&&R.push({type:"text",value:p.value.slice(k,M)}),Array.isArray(j)?R.push(...j):j&&R.push(j),k=M+T[0].length,S=!0),!x.global)break;T=x.exec(p.value)}return S?(k<p.value.length&&R.push({type:"text",value:p.value.slice(k)}),g.children.splice(D,1,...R)):R=[p],D+R.length}}function LS(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let s=-1;for(;++s<r.length;){const l=r[s];t.push([MS(l[0]),OS(l[1])])}return t}function MS(e){return typeof e=="string"?new RegExp(RS(e),"g"):e}function OS(e){return typeof e=="function"?e:function(){return e}}const Mu="phrasing",Ou=["autolink","link","image","label"];function zS(){return{transforms:[WS],enter:{literalAutolink:BS,literalAutolinkEmail:zu,literalAutolinkHttp:zu,literalAutolinkWww:zu},exit:{literalAutolink:US,literalAutolinkEmail:VS,literalAutolinkHttp:FS,literalAutolinkWww:HS}}}function $S(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mu,notInConstruct:Ou},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mu,notInConstruct:Ou},{character:":",before:"[ps]",after:"\\/",inConstruct:Mu,notInConstruct:Ou}]}}function BS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function zu(e){this.config.enter.autolinkProtocol.call(this,e)}function FS(e){this.config.exit.autolinkProtocol.call(this,e)}function HS(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 VS(e){this.config.exit.autolinkEmail.call(this,e)}function US(e){this.exit(e)}function WS(e){PS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,qS],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),KS]],{ignore:["link","linkReference"]})}function qS(e,t,r,s,l){let a="";if(!Ty(l)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!ZS(r)))return!1;const c=YS(r+s);if(!c[0])return!1;const f={type:"link",title:null,url:a+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function KS(e,t,r,s){return!Ty(s,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function ZS(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 YS(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],s=r.indexOf(")");const l=Kh(e,"(");let a=Kh(e,")");for(;s!==-1&&l>a;)e+=r.slice(0,s+1),r=r.slice(s+1),s=r.indexOf(")"),a++;return[e,r]}function Ty(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Fi(r)||So(r))&&(!t||r!==47)}Iy.peek=iC;function QS(){this.buffer()}function XS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function GS(){this.buffer()}function JS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function eC(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=kr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function tC(e){this.exit(e)}function nC(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=kr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function rC(e){this.exit(e)}function iC(){return"["}function Iy(e,t,r,s){const l=r.createTracker(s);let a=l.move("[^");const c=r.enter("footnoteReference"),f=r.enter("reference");return a+=l.move(r.safe(r.associationId(e),{after:"]",before:a})),f(),c(),a+=l.move("]"),a}function sC(){return{enter:{gfmFootnoteCallString:QS,gfmFootnoteCall:XS,gfmFootnoteDefinitionLabelString:GS,gfmFootnoteDefinition:JS},exit:{gfmFootnoteCallString:eC,gfmFootnoteCall:tC,gfmFootnoteDefinitionLabelString:nC,gfmFootnoteDefinition:rC}}}function lC(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:Iy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(s,l,a,c){const f=a.createTracker(c);let m=f.move("[^");const p=a.enter("footnoteDefinition"),y=a.enter("label");return m+=f.move(a.safe(a.associationId(s),{before:m,after:"]"})),y(),m+=f.move("]:"),s.children&&s.children.length>0&&(f.shift(4),m+=f.move((t?`
|
|
54
|
+
`:" ")+a.indentLines(a.containerFlow(s,f.current()),t?Dy:aC))),p(),m}}function aC(e,t,r){return t===0?e:Dy(e,t,r)}function Dy(e,t,r){return(r?"":" ")+e}const oC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ay.peek=mC;function cC(){return{canContainEols:["delete"],enter:{strikethrough:dC},exit:{strikethrough:fC}}}function uC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:oC}],handlers:{delete:Ay}}}function dC(e){this.enter({type:"delete",children:[]},e)}function fC(e){this.exit(e)}function Ay(e,t,r,s){const l=r.createTracker(s),a=r.enter("strikethrough");let c=l.move("~~");return c+=r.containerPhrasing(e,{...l.current(),before:c,after:"~"}),c+=l.move("~~"),a(),c}function mC(){return"~"}function pC(e){return e.length}function hC(e,t){const r=t||{},s=(r.align||[]).concat(),l=r.stringLength||pC,a=[],c=[],f=[],m=[];let p=0,y=-1;for(;++y<e.length;){const C=[],D=[];let S=-1;for(e[y].length>p&&(p=e[y].length);++S<e[y].length;){const R=gC(e[y][S]);if(r.alignDelimiters!==!1){const T=l(R);D[S]=T,(m[S]===void 0||T>m[S])&&(m[S]=T)}C.push(R)}c[y]=C,f[y]=D}let g=-1;if(typeof s=="object"&&"length"in s)for(;++g<p;)a[g]=Zh(s[g]);else{const C=Zh(s);for(;++g<p;)a[g]=C}g=-1;const x=[],_=[];for(;++g<p;){const C=a[g];let D="",S="";C===99?(D=":",S=":"):C===108?D=":":C===114&&(S=":");let R=r.alignDelimiters===!1?1:Math.max(1,m[g]-D.length-S.length);const T=D+"-".repeat(R)+S;r.alignDelimiters!==!1&&(R=D.length+R+S.length,R>m[g]&&(m[g]=R),_[g]=R),x[g]=T}c.splice(1,0,x),f.splice(1,0,_),y=-1;const k=[];for(;++y<c.length;){const C=c[y],D=f[y];g=-1;const S=[];for(;++g<p;){const R=C[g]||"";let T="",M="";if(r.alignDelimiters!==!1){const I=m[g]-(D[g]||0),j=a[g];j===114?T=" ".repeat(I):j===99?I%2?(T=" ".repeat(I/2+.5),M=" ".repeat(I/2-.5)):(T=" ".repeat(I/2),M=T):M=" ".repeat(I)}r.delimiterStart!==!1&&!g&&S.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&R==="")&&(r.delimiterStart!==!1||g)&&S.push(" "),r.alignDelimiters!==!1&&S.push(T),S.push(R),r.alignDelimiters!==!1&&S.push(M),r.padding!==!1&&S.push(" "),(r.delimiterEnd!==!1||g!==p-1)&&S.push("|")}k.push(r.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return k.join(`
|
|
55
|
+
`)}function gC(e){return e==null?"":String(e)}function Zh(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function yC(e,t,r,s){const l=r.enter("blockquote"),a=r.createTracker(s);a.move("> "),a.shift(2);const c=r.indentLines(r.containerFlow(e,a.current()),vC);return l(),c}function vC(e,t,r){return">"+(r?"":" ")+e}function xC(e,t){return Yh(e,t.inConstruct,!0)&&!Yh(e,t.notInConstruct,!1)}function Yh(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let s=-1;for(;++s<t.length;)if(e.includes(t[s]))return!0;return!1}function Qh(e,t,r,s){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
|
|
56
|
+
`&&xC(r.stack,r.unsafe[l]))return/[ \t]/.test(s.before)?"":" ";return`\\
|
|
57
|
+
`}function _C(e,t){const r=String(e);let s=r.indexOf(t),l=s,a=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===l?++a>c&&(c=a):a=1,l=s+t.length,s=r.indexOf(t,l);return c}function kC(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function wC(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 bC(e,t,r,s){const l=wC(r),a=e.value||"",c=l==="`"?"GraveAccent":"Tilde";if(kC(e,r)){const g=r.enter("codeIndented"),x=r.indentLines(a,SC);return g(),x}const f=r.createTracker(s),m=l.repeat(Math.max(_C(a,l)+1,3)),p=r.enter("codeFenced");let y=f.move(m);if(e.lang){const g=r.enter(`codeFencedLang${c}`);y+=f.move(r.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=r.enter(`codeFencedMeta${c}`);y+=f.move(" "),y+=f.move(r.safe(e.meta,{before:y,after:`
|
|
58
|
+
`,encode:["`"],...f.current()})),g()}return y+=f.move(`
|
|
59
|
+
`),a&&(y+=f.move(a+`
|
|
60
|
+
`)),y+=f.move(m),p(),y}function SC(e,t,r){return(r?"":" ")+e}function Fd(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 CC(e,t,r,s){const l=Fd(r),a=l==='"'?"Quote":"Apostrophe",c=r.enter("definition");let f=r.enter("label");const m=r.createTracker(s);let p=m.move("[");return p+=m.move(r.safe(r.associationId(e),{before:p,after:"]",...m.current()})),p+=m.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(r.safe(e.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(f=r.enter("destinationRaw"),p+=m.move(r.safe(e.url,{before:p,after:e.title?" ":`
|
|
61
|
+
`,...m.current()}))),f(),e.title&&(f=r.enter(`title${a}`),p+=m.move(" "+l),p+=m.move(r.safe(e.title,{before:p,after:l,...m.current()})),p+=m.move(l),f()),c(),p}function NC(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 Tl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ho(e,t,r){const s=bs(e),l=bs(t);return s===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ry.peek=jC;function Ry(e,t,r,s){const l=NC(r),a=r.enter("emphasis"),c=r.createTracker(s),f=c.move(l);let m=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const p=m.charCodeAt(0),y=ho(s.before.charCodeAt(s.before.length-1),p,l);y.inside&&(m=Tl(p)+m.slice(1));const g=m.charCodeAt(m.length-1),x=ho(s.after.charCodeAt(0),g,l);x.inside&&(m=m.slice(0,-1)+Tl(g));const _=c.move(l);return a(),r.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+m+_}function jC(e,t,r){return r.options.emphasis||"*"}function EC(e,t){let r=!1;return $d(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return r=!0,id}),!!((!e.depth||e.depth<3)&&Ad(e)&&(t.options.setext||r))}function TC(e,t,r,s){const l=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(s);if(EC(e,r)){const y=r.enter("headingSetext"),g=r.enter("phrasing"),x=r.containerPhrasing(e,{...a.current(),before:`
|
|
62
|
+
`,after:`
|
|
63
|
+
`});return g(),y(),x+`
|
|
64
|
+
`+(l===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
65
|
+
`))+1))}const c="#".repeat(l),f=r.enter("headingAtx"),m=r.enter("phrasing");a.move(c+" ");let p=r.containerPhrasing(e,{before:"# ",after:`
|
|
66
|
+
`,...a.current()});return/^[\t ]/.test(p)&&(p=Tl(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,r.options.closeAtx&&(p+=" "+c),m(),f(),p}Py.peek=IC;function Py(e){return e.value||""}function IC(){return"<"}Ly.peek=DC;function Ly(e,t,r,s){const l=Fd(r),a=l==='"'?"Quote":"Apostrophe",c=r.enter("image");let f=r.enter("label");const m=r.createTracker(s);let p=m.move("![");return p+=m.move(r.safe(e.alt,{before:p,after:"]",...m.current()})),p+=m.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(r.safe(e.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(f=r.enter("destinationRaw"),p+=m.move(r.safe(e.url,{before:p,after:e.title?" ":")",...m.current()}))),f(),e.title&&(f=r.enter(`title${a}`),p+=m.move(" "+l),p+=m.move(r.safe(e.title,{before:p,after:l,...m.current()})),p+=m.move(l),f()),p+=m.move(")"),c(),p}function DC(){return"!"}My.peek=AC;function My(e,t,r,s){const l=e.referenceType,a=r.enter("imageReference");let c=r.enter("label");const f=r.createTracker(s);let m=f.move("![");const p=r.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(p+"]["),c();const y=r.stack;r.stack=[],c=r.enter("reference");const g=r.safe(r.associationId(e),{before:m,after:"]",...f.current()});return c(),r.stack=y,a(),l==="full"||!p||p!==g?m+=f.move(g+"]"):l==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function AC(){return"!"}Oy.peek=RC;function Oy(e,t,r){let s=e.value||"",l="`",a=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(s);)l+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++a<r.unsafe.length;){const c=r.unsafe[a],f=r.compilePattern(c);let m;if(c.atBreak)for(;m=f.exec(s);){let p=m.index;s.charCodeAt(p)===10&&s.charCodeAt(p-1)===13&&p--,s=s.slice(0,p)+" "+s.slice(m.index+1)}}return l+s+l}function RC(){return"`"}function zy(e,t){const r=Ad(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}$y.peek=PC;function $y(e,t,r,s){const l=Fd(r),a=l==='"'?"Quote":"Apostrophe",c=r.createTracker(s);let f,m;if(zy(e,r)){const y=r.stack;r.stack=[],f=r.enter("autolink");let g=c.move("<");return g+=c.move(r.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),r.stack=y,g}f=r.enter("link"),m=r.enter("label");let p=c.move("[");return p+=c.move(r.containerPhrasing(e,{before:p,after:"](",...c.current()})),p+=c.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=r.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(r.safe(e.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(m=r.enter("destinationRaw"),p+=c.move(r.safe(e.url,{before:p,after:e.title?" ":")",...c.current()}))),m(),e.title&&(m=r.enter(`title${a}`),p+=c.move(" "+l),p+=c.move(r.safe(e.title,{before:p,after:l,...c.current()})),p+=c.move(l),m()),p+=c.move(")"),f(),p}function PC(e,t,r){return zy(e,r)?"<":"["}By.peek=LC;function By(e,t,r,s){const l=e.referenceType,a=r.enter("linkReference");let c=r.enter("label");const f=r.createTracker(s);let m=f.move("[");const p=r.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(p+"]["),c();const y=r.stack;r.stack=[],c=r.enter("reference");const g=r.safe(r.associationId(e),{before:m,after:"]",...f.current()});return c(),r.stack=y,a(),l==="full"||!p||p!==g?m+=f.move(g+"]"):l==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function LC(){return"["}function Hd(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 MC(e){const t=Hd(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function OC(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 Fy(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 zC(e,t,r,s){const l=r.enter("list"),a=r.bulletCurrent;let c=e.ordered?OC(r):Hd(r);const f=e.ordered?c==="."?")":".":MC(r);let m=t&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(m=!0),Fy(r)===c&&y){let g=-1;for(;++g<e.children.length;){const x=e.children[g];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(c=f),r.bulletCurrent=c;const p=r.containerFlow(e,s);return r.bulletLastUsed=c,r.bulletCurrent=a,l(),p}function $C(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 BC(e,t,r,s){const l=$C(r);let a=r.bulletCurrent||Hd(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let c=a.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=r.createTracker(s);f.move(a+" ".repeat(c-a.length)),f.shift(c);const m=r.enter("listItem"),p=r.indentLines(r.containerFlow(e,f.current()),y);return m(),p;function y(g,x,_){return x?(_?"":" ".repeat(c))+g:(_?a:a+" ".repeat(c-a.length))+g}}function FC(e,t,r,s){const l=r.enter("paragraph"),a=r.enter("phrasing"),c=r.containerPhrasing(e,s);return a(),l(),c}const HC=jo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function VC(e,t,r,s){return(e.children.some(function(c){return HC(c)})?r.containerPhrasing:r.containerFlow).call(r,e,s)}function UC(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Hy.peek=WC;function Hy(e,t,r,s){const l=UC(r),a=r.enter("strong"),c=r.createTracker(s),f=c.move(l+l);let m=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const p=m.charCodeAt(0),y=ho(s.before.charCodeAt(s.before.length-1),p,l);y.inside&&(m=Tl(p)+m.slice(1));const g=m.charCodeAt(m.length-1),x=ho(s.after.charCodeAt(0),g,l);x.inside&&(m=m.slice(0,-1)+Tl(g));const _=c.move(l+l);return a(),r.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+m+_}function WC(e,t,r){return r.options.strong||"*"}function qC(e,t,r,s){return r.safe(e.value,s)}function KC(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 ZC(e,t,r){const s=(Fy(r)+(r.options.ruleSpaces?" ":"")).repeat(KC(r));return r.options.ruleSpaces?s.slice(0,-1):s}const Vy={blockquote:yC,break:Qh,code:bC,definition:CC,emphasis:Ry,hardBreak:Qh,heading:TC,html:Py,image:Ly,imageReference:My,inlineCode:Oy,link:$y,linkReference:By,list:zC,listItem:BC,paragraph:FC,root:VC,strong:Hy,text:qC,thematicBreak:ZC};function YC(){return{enter:{table:QC,tableData:Xh,tableHeader:Xh,tableRow:GC},exit:{codeText:JC,table:XC,tableData:$u,tableHeader:$u,tableRow:$u}}}function QC(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function XC(e){this.exit(e),this.data.inTable=void 0}function GC(e){this.enter({type:"tableRow",children:[]},e)}function $u(e){this.exit(e)}function Xh(e){this.enter({type:"tableCell",children:[]},e)}function JC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,eN));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function eN(e,t){return t==="|"?t:e}function tN(e){const t=e||{},r=t.tableCellPadding,s=t.tablePipeAlign,l=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
67
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:m,tableRow:f}};function c(_,k,C,D){return p(y(_,C,D),_.align)}function f(_,k,C,D){const S=g(_,C,D),R=p([S]);return R.slice(0,R.indexOf(`
|
|
68
|
+
`))}function m(_,k,C,D){const S=C.enter("tableCell"),R=C.enter("phrasing"),T=C.containerPhrasing(_,{...D,before:a,after:a});return R(),S(),T}function p(_,k){return hC(_,{align:k,alignDelimiters:s,padding:r,stringLength:l})}function y(_,k,C){const D=_.children;let S=-1;const R=[],T=k.enter("table");for(;++S<D.length;)R[S]=g(D[S],k,C);return T(),R}function g(_,k,C){const D=_.children;let S=-1;const R=[],T=k.enter("tableRow");for(;++S<D.length;)R[S]=m(D[S],_,k,C);return T(),R}function x(_,k,C){let D=Vy.inlineCode(_,k,C);return C.stack.includes("tableCell")&&(D=D.replace(/\|/g,"\\$&")),D}}function nN(){return{exit:{taskListCheckValueChecked:Gh,taskListCheckValueUnchecked:Gh,paragraph:iN}}}function rN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sN}}}function Gh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function iN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const s=r.children[0];if(s&&s.type==="text"){const l=t.children;let a=-1,c;for(;++a<l.length;){const f=l[a];if(f.type==="paragraph"){c=f;break}}c===r&&(s.value=s.value.slice(1),s.value.length===0?r.children.shift():r.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,r.position.start=Object.assign({},s.position.start)))}}this.exit(e)}function sN(e,t,r,s){const l=e.children[0],a=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=r.createTracker(s);a&&f.move(c);let m=Vy.listItem(e,t,r,{...s,...f.current()});return a&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),m;function p(y){return y+c}}function lN(){return[zS(),sC(),cC(),YC(),nN()]}function aN(e){return{extensions:[$S(),lC(e),uC(),tN(e),rN()]}}const oN={tokenize:pN,partial:!0},Uy={tokenize:hN,partial:!0},Wy={tokenize:gN,partial:!0},qy={tokenize:yN,partial:!0},cN={tokenize:vN,partial:!0},Ky={name:"wwwAutolink",tokenize:fN,previous:Yy},Zy={name:"protocolAutolink",tokenize:mN,previous:Qy},Wr={name:"emailAutolink",tokenize:dN,previous:Xy},Dr={};function uN(){return{text:Dr}}let Pi=48;for(;Pi<123;)Dr[Pi]=Wr,Pi++,Pi===58?Pi=65:Pi===91&&(Pi=97);Dr[43]=Wr;Dr[45]=Wr;Dr[46]=Wr;Dr[95]=Wr;Dr[72]=[Wr,Zy];Dr[104]=[Wr,Zy];Dr[87]=[Wr,Ky];Dr[119]=[Wr,Ky];function dN(e,t,r){const s=this;let l,a;return c;function c(g){return!od(g)||!Xy.call(s,s.previous)||Vd(s.events)?r(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return od(g)?(e.consume(g),f):g===64?(e.consume(g),m):r(g)}function m(g){return g===46?e.check(cN,y,p)(g):g===45||g===95||jn(g)?(a=!0,e.consume(g),m):y(g)}function p(g){return e.consume(g),l=!0,m}function y(g){return a&&l&&Rn(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):r(g)}}function fN(e,t,r){const s=this;return l;function l(c){return c!==87&&c!==119||!Yy.call(s,s.previous)||Vd(s.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(oN,e.attempt(Uy,e.attempt(Wy,a),r),r)(c))}function a(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function mN(e,t,r){const s=this;let l="",a=!1;return c;function c(g){return(g===72||g===104)&&Qy.call(s,s.previous)&&!Vd(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(g),e.consume(g),f):r(g)}function f(g){if(Rn(g)&&l.length<5)return l+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const x=l.toLowerCase();if(x==="http"||x==="https")return e.consume(g),m}return r(g)}function m(g){return g===47?(e.consume(g),a?p:(a=!0,m)):r(g)}function p(g){return g===null||fo(g)||Ct(g)||Fi(g)||So(g)?r(g):e.attempt(Uy,e.attempt(Wy,y),r)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function pN(e,t,r){let s=0;return l;function l(c){return(c===87||c===119)&&s<3?(s++,e.consume(c),l):c===46&&s===3?(e.consume(c),a):r(c)}function a(c){return c===null?r(c):t(c)}}function hN(e,t,r){let s,l,a;return c;function c(p){return p===46||p===95?e.check(qy,m,f)(p):p===null||Ct(p)||Fi(p)||p!==45&&So(p)?m(p):(a=!0,e.consume(p),c)}function f(p){return p===95?s=!0:(l=s,s=void 0),e.consume(p),c}function m(p){return l||s||!a?r(p):t(p)}}function gN(e,t){let r=0,s=0;return l;function l(c){return c===40?(r++,e.consume(c),l):c===41&&s<r?a(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(qy,t,a)(c):c===null||Ct(c)||Fi(c)?t(c):(e.consume(c),l)}function a(c){return c===41&&s++,e.consume(c),l}}function yN(e,t,r){return s;function s(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),s):f===38?(e.consume(f),a):f===93?(e.consume(f),l):f===60||f===null||Ct(f)||Fi(f)?t(f):r(f)}function l(f){return f===null||f===40||f===91||Ct(f)||Fi(f)?t(f):s(f)}function a(f){return Rn(f)?c(f):r(f)}function c(f){return f===59?(e.consume(f),s):Rn(f)?(e.consume(f),c):r(f)}}function vN(e,t,r){return s;function s(a){return e.consume(a),l}function l(a){return jn(a)?r(a):t(a)}}function Yy(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ct(e)}function Qy(e){return!Rn(e)}function Xy(e){return!(e===47||od(e))}function od(e){return e===43||e===45||e===46||e===95||jn(e)}function Vd(e){let t=e.length,r=!1;for(;t--;){const s=e[t][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){r=!0;break}if(s._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const xN={tokenize:jN,partial:!0};function _N(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:SN,continuation:{tokenize:CN},exit:NN}},text:{91:{name:"gfmFootnoteCall",tokenize:bN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:kN,resolveTo:wN}}}}function kN(e,t,r){const s=this;let l=s.events.length;const a=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let c;for(;l--;){const m=s.events[l][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return f;function f(m){if(!c||!c._balanced)return r(m);const p=kr(s.sliceSerialize({start:c.end,end:s.now()}));return p.codePointAt(0)!==94||!a.includes(p.slice(1))?r(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),t(m))}}function wN(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const s={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},f=[e[r+1],e[r+2],["enter",s,t],e[r+3],e[r+4],["enter",l,t],["exit",l,t],["enter",a,t],["enter",c,t],["exit",c,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(r,e.length-r+1,...f),e}function bN(e,t,r){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let a=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),m}function m(g){return g!==94?r(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(g){if(a>999||g===93&&!c||g===null||g===91||Ct(g))return r(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return l.includes(kr(s.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(g)}return Ct(g)||(c=!0),a++,e.consume(g),g===92?y:p}function y(g){return g===91||g===92||g===93?(e.consume(g),a++,p):p(g)}}function SN(e,t,r){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let a,c=0,f;return m;function m(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):r(k)}function y(k){if(c>999||k===93&&!f||k===null||k===91||Ct(k))return r(k);if(k===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return a=kr(s.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Ct(k)||(f=!0),c++,e.consume(k),k===92?g:y}function g(k){return k===91||k===92||k===93?(e.consume(k),c++,y):y(k)}function x(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),l.includes(a)||l.push(a),at(e,_,"gfmFootnoteDefinitionWhitespace")):r(k)}function _(k){return t(k)}}function CN(e,t,r){return e.check(Rl,t,e.attempt(xN,t,r))}function NN(e){e.exit("gfmFootnoteDefinition")}function jN(e,t,r){const s=this;return at(e,l,"gfmFootnoteDefinitionIndent",5);function l(a){const c=s.events[s.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(a):r(a)}}function EN(e){let r=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:a,resolveAll:l};return r==null&&(r=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function l(c,f){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let p=m;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[m][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[m][1].end)},g={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[m][1].start)},x=[["enter",y,f],["enter",c[p][1],f],["exit",c[p][1],f],["enter",g,f]],_=f.parser.constructs.insideSpan.null;_&&Jn(x,x.length,0,Co(_,c.slice(p+1,m),f)),Jn(x,x.length,0,[["exit",g,f],["enter",c[m][1],f],["exit",c[m][1],f],["exit",y,f]]),Jn(c,p-1,m-p+3,x),m=p+x.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function a(c,f,m){const p=this.previous,y=this.events;let g=0;return x;function x(k){return p===126&&y[y.length-1][1].type!=="characterEscape"?m(k):(c.enter("strikethroughSequenceTemporary"),_(k))}function _(k){const C=bs(p);if(k===126)return g>1?m(k):(c.consume(k),g++,_);if(g<2&&!r)return m(k);const D=c.exit("strikethroughSequenceTemporary"),S=bs(k);return D._open=!S||S===2&&!!C,D._close=!C||C===2&&!!S,f(k)}}}class TN{constructor(){this.map=[]}add(t,r,s){IN(this,t,r,s)}consume(t){if(this.map.sort(function(a,c){return a[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const s=[];for(;r>0;)r-=1,s.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];s.push(t.slice()),t.length=0;let l=s.pop();for(;l;){for(const a of l)t.push(a);l=s.pop()}this.map.length=0}}function IN(e,t,r,s){let l=0;if(!(r===0&&s.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=r,e.map[l][2].push(...s);return}l+=1}e.map.push([t,r,s])}}function DN(e,t){let r=!1;const s=[];for(;t<e.length;){const l=e[t];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&s.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=s.length-1;s[a]=s[a]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return s}function AN(){return{flow:{null:{name:"table",tokenize:RN,resolveAll:PN}}}}function RN(e,t,r){const s=this;let l=0,a=0,c;return f;function f(O){let W=s.events.length-1;for(;W>-1;){const ie=s.events[W][1].type;if(ie==="lineEnding"||ie==="linePrefix")W--;else break}const ne=W>-1?s.events[W][1].type:null,_e=ne==="tableHead"||ne==="tableRow"?j:m;return _e===j&&s.parser.lazy[s.now().line]?r(O):_e(O)}function m(O){return e.enter("tableHead"),e.enter("tableRow"),p(O)}function p(O){return O===124||(c=!0,a+=1),y(O)}function y(O){return O===null?r(O):Fe(O)?a>1?(a=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),_):r(O):nt(O)?at(e,y,"whitespace")(O):(a+=1,c&&(c=!1,l+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(O)))}function g(O){return O===null||O===124||Ct(O)?(e.exit("data"),y(O)):(e.consume(O),O===92?x:g)}function x(O){return O===92||O===124?(e.consume(O),g):g(O)}function _(O){return s.interrupt=!1,s.parser.lazy[s.now().line]?r(O):(e.enter("tableDelimiterRow"),c=!1,nt(O)?at(e,k,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):k(O))}function k(O){return O===45||O===58?D(O):O===124?(c=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),C):I(O)}function C(O){return nt(O)?at(e,D,"whitespace")(O):D(O)}function D(O){return O===58?(a+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),S):O===45?(a+=1,S(O)):O===null||Fe(O)?M(O):I(O)}function S(O){return O===45?(e.enter("tableDelimiterFiller"),R(O)):I(O)}function R(O){return O===45?(e.consume(O),R):O===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(O))}function T(O){return nt(O)?at(e,M,"whitespace")(O):M(O)}function M(O){return O===124?k(O):O===null||Fe(O)?!c||l!==a?I(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):I(O)}function I(O){return r(O)}function j(O){return e.enter("tableRow"),B(O)}function B(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),B):O===null||Fe(O)?(e.exit("tableRow"),t(O)):nt(O)?at(e,B,"whitespace")(O):(e.enter("data"),Q(O))}function Q(O){return O===null||O===124||Ct(O)?(e.exit("data"),B(O)):(e.consume(O),O===92?te:Q)}function te(O){return O===92||O===124?(e.consume(O),Q):Q(O)}}function PN(e,t){let r=-1,s=!0,l=0,a=[0,0,0,0],c=[0,0,0,0],f=!1,m=0,p,y,g;const x=new TN;for(;++r<e.length;){const _=e[r],k=_[1];_[0]==="enter"?k.type==="tableHead"?(f=!1,m!==0&&(Jh(x,t,m,p,y),y=void 0,m=0),p={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},x.add(r,0,[["enter",p,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(s=!0,g=void 0,a=[0,0,0,0],c=[0,r+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},x.add(r,0,[["enter",y,t]])),l=k.type==="tableDelimiterRow"?2:y?3:1):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(s=!1,c[2]===0&&(a[1]!==0&&(c[0]=c[1],g=Xa(x,t,a,l,void 0,g),a=[0,0,0,0]),c[2]=r)):k.type==="tableCellDivider"&&(s?s=!1:(a[1]!==0&&(c[0]=c[1],g=Xa(x,t,a,l,void 0,g)),a=c,c=[a[1],r,0,0])):k.type==="tableHead"?(f=!0,m=r):k.type==="tableRow"||k.type==="tableDelimiterRow"?(m=r,a[1]!==0?(c[0]=c[1],g=Xa(x,t,a,l,r,g)):c[1]!==0&&(g=Xa(x,t,c,l,r,g)),l=0):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=r)}for(m!==0&&Jh(x,t,m,p,y),x.consume(t.events),r=-1;++r<t.events.length;){const _=t.events[r];_[0]==="enter"&&_[1].type==="table"&&(_[1]._align=DN(t.events,r))}return e}function Xa(e,t,r,s,l,a){const c=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(a.end=Object.assign({},gs(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const m=gs(t.events,r[1]);if(a={type:c,start:Object.assign({},m),end:Object.assign({},m)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const p=gs(t.events,r[2]),y=gs(t.events,r[3]),g={type:f,start:Object.assign({},p),end:Object.assign({},y)};if(e.add(r[2],0,[["enter",g,t]]),s!==2){const x=t.events[r[2]],_=t.events[r[3]];if(x[1].end=Object.assign({},_[1].end),x[1].type="chunkText",x[1].contentType="text",r[3]>r[2]+1){const k=r[2]+1,C=r[3]-r[2]-1;e.add(k,C,[])}}e.add(r[3]+1,0,[["exit",g,t]])}return l!==void 0&&(a.end=Object.assign({},gs(t.events,l)),e.add(l,0,[["exit",a,t]]),a=void 0),a}function Jh(e,t,r,s,l){const a=[],c=gs(t.events,r);l&&(l.end=Object.assign({},c),a.push(["exit",l,t])),s.end=Object.assign({},c),a.push(["exit",s,t]),e.add(r+1,0,a)}function gs(e,t){const r=e[t],s=r[0]==="enter"?"start":"end";return r[1][s]}const LN={name:"tasklistCheck",tokenize:ON};function MN(){return{text:{91:LN}}}function ON(e,t,r){const s=this;return l;function l(m){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?r(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),a)}function a(m){return Ct(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),c):r(m)}function c(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(m)}function f(m){return Fe(m)?t(m):nt(m)?e.check({tokenize:zN},t,r)(m):r(m)}}function zN(e,t,r){return at(e,s,"whitespace");function s(l){return l===null?r(l):t(l)}}function $N(e){return oy([uN(),_N(),EN(e),AN(),MN()])}const BN={};function zi(e){const t=this,r=e||BN,s=t.data(),l=s.micromarkExtensions||(s.micromarkExtensions=[]),a=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),c=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);l.push($N(r)),a.push(lN()),c.push(aN(r))}const go={proposed:"status.proposed",backlog:"status.backlog",todo:"status.todo",in_progress:"status.in_progress",pending:"status.pending",done:"status.done"};function Ud(e,t){if(t.label!==void 0)return t.label;const r=go[t.id];return r!==void 0?e(r):t.id}function Ll(e,t){const r=new Map(t.map(s=>[s.id,Ud(e,s)]));return s=>r.get(s)??e(go[s])}function Es(e){const t=new Map(e.map(r=>[r.id,r.label??r.id]));return r=>t.get(r)??r}const FN="_view_m86i2_1",HN="_list_m86i2_8",VN="_search_m86i2_18",UN="_searchInput_m86i2_23",WN="_listScroll_m86i2_39",qN="_monthGroup_m86i2_45",KN="_monthName_m86i2_49",ZN="_taskList_m86i2_57",YN="_taskBtn_m86i2_73",QN="_taskBtnActive_m86i2_96",XN="_taskId_m86i2_106",GN="_taskTitle_m86i2_112",JN="_detail_m86i2_120",ej="_detailHeader_m86i2_127",tj="_detailHeadText_m86i2_134",nj="_detailTitle_m86i2_139",rj="_meta_m86i2_146",ij="_metaId_m86i2_155",sj="_labels_m86i2_159",lj="_label_m86i2_159",aj="_restoreBtn_m86i2_171",oj="_markdown_m86i2_198",cj="_muted_m86i2_217",uj="_error_m86i2_222",It={view:FN,list:HN,search:VN,searchInput:UN,listScroll:WN,monthGroup:qN,monthName:KN,taskList:ZN,taskBtn:YN,taskBtnActive:QN,taskId:XN,taskTitle:GN,detail:JN,detailHeader:ej,detailHeadText:tj,detailTitle:nj,meta:rj,metaId:ij,labels:sj,label:lj,restoreBtn:aj,markdown:oj,muted:cj,error:uj};function dj({board:e,onChanged:t,onError:r}){const{t:s}=pt(),[l,a]=w.useState(null),[c,f]=w.useState(!1),[m,p]=w.useState(""),[y,g]=w.useState(null),[x,_]=w.useState(!1);w.useEffect(()=>{let M=!0;const I=new AbortController;return(async()=>{try{const j=await _d(I.signal);M&&(a(j.tasks),f(!1))}catch{M&&(a([]),f(!0))}})(),()=>{M=!1,I.abort()}},[e]);const k=w.useMemo(()=>Ll(s,e.config.columns),[s,e.config.columns]),C=w.useMemo(()=>Es(e.config.members),[e.config.members]),D=w.useMemo(()=>{const M=l??[],I=m.trim().toLowerCase();return I===""?M:M.filter(j=>[j.id,j.title??"",(j.labels??[]).join(" "),j.assignee??"",j.body].some(Q=>Q.toLowerCase().includes(I)))},[l,m]),S=w.useMemo(()=>{const M=new Map;for(const I of D){const j=I.month??"",B=M.get(j);B?B.push(I):M.set(j,[I])}return[...M.entries()].sort((I,j)=>I[0]===""&&j[0]===""?0:I[0]===""?1:j[0]===""?-1:j[0].localeCompare(I[0])).map(([I,j])=>({month:I,tasks:j.slice().sort((B,Q)=>B.id.localeCompare(Q.id,"en",{numeric:!0}))}))},[D]),R=y!==null?D.find(M=>M.id===y)??null:null,T=async M=>{if(!(typeof window<"u"&&!window.confirm(s("archive.view.restoreConfirm",{id:M})))){_(!0);try{await P_(M),g(null),t()}catch(I){const j=I instanceof er||I instanceof Error?I.message:s("archive.view.restoreError");r(j)}finally{_(!1)}}};return u.jsxs("div",{className:It.view,children:[u.jsxs("nav",{className:It.list,"aria-label":s("archive.view.listTitle"),children:[u.jsx("div",{className:It.search,children:u.jsx("input",{className:It.searchInput,type:"search",value:m,onChange:M=>p(M.target.value),placeholder:s("archive.view.searchPlaceholder"),"aria-label":s("archive.view.searchPlaceholder")})}),u.jsx("div",{className:It.listScroll,children:c?u.jsx("p",{className:It.error,role:"alert",children:s("archive.view.loadError")}):l===null?u.jsx("p",{className:It.muted,children:s("board.loading")}):D.length===0?u.jsx("p",{className:It.muted,children:m.trim()===""?s("archive.view.empty"):s("archive.view.noMatch")}):S.map(M=>u.jsxs("div",{className:It.monthGroup,children:[u.jsx("span",{className:It.monthName,children:M.month||s("archive.view.noMonth")}),u.jsx("ul",{className:It.taskList,children:M.tasks.map(I=>u.jsx("li",{children:u.jsxs("button",{type:"button",className:`${It.taskBtn} ${y===I.id?It.taskBtnActive:""}`,onClick:()=>g(I.id),"aria-current":y===I.id?"true":void 0,children:[u.jsx("span",{className:It.taskId,children:I.id})," ",u.jsx("span",{className:It.taskTitle,children:I.title??I.id})]})},I.id))})]},M.month||"__none__"))})]}),u.jsx("section",{className:It.detail,"aria-label":s("view.archive"),children:R===null?u.jsx("p",{className:It.muted,children:s("archive.view.selectPrompt")}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:It.detailHeader,children:[u.jsxs("div",{className:It.detailHeadText,children:[u.jsx("h2",{className:It.detailTitle,children:R.title??R.id}),u.jsxs("p",{className:It.meta,children:[u.jsx("span",{className:It.metaId,children:R.id}),R.status!==void 0&&u.jsx("span",{children:k(R.status)}),R.month!==null&&u.jsx("span",{children:R.month}),R.assignee!=null&&R.assignee!==""&&u.jsx("span",{children:C(R.assignee)}),R.labels!==void 0&&R.labels.length>0&&u.jsx("span",{className:It.labels,children:R.labels.map(M=>u.jsx("span",{className:It.label,children:M},M))})]})]}),u.jsx("button",{type:"button",className:It.restoreBtn,onClick:()=>void T(R.id),disabled:x,children:s("archive.view.restore")})]}),u.jsx("div",{className:It.markdown,children:u.jsx(Oi,{remarkPlugins:[zi],children:R.body})})]})})]})}var yl=Ag();const To=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ts(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Wd(e){return"nodeType"in e}function Un(e){var t,r;return e?Ts(e)?e:Wd(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function qd(e){const{Document:t}=Un(e);return e instanceof t}function Ml(e){return Ts(e)?!1:e instanceof Un(e).HTMLElement}function Gy(e){return e instanceof Un(e).SVGElement}function Is(e){return e?Ts(e)?e.document:Wd(e)?qd(e)?e:Ml(e)||Gy(e)?e.ownerDocument:document:document:document}const xi=To?w.useLayoutEffect:w.useEffect;function Kd(e){const t=w.useRef(e);return xi(()=>{t.current=e}),w.useCallback(function(){for(var r=arguments.length,s=new Array(r),l=0;l<r;l++)s[l]=arguments[l];return t.current==null?void 0:t.current(...s)},[])}function fj(){const e=w.useRef(null),t=w.useCallback((s,l)=>{e.current=setInterval(s,l)},[]),r=w.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Il(e,t){t===void 0&&(t=[e]);const r=w.useRef(e);return xi(()=>{r.current!==e&&(r.current=e)},t),r}function Ol(e,t){const r=w.useRef();return w.useMemo(()=>{const s=e(r.current);return r.current=s,s},[...t])}function yo(e){const t=Kd(e),r=w.useRef(null),s=w.useCallback(l=>{l!==r.current&&(t==null||t(l,r.current)),r.current=l},[]);return[r,s]}function cd(e){const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current}let Bu={};function Io(e,t){return w.useMemo(()=>{if(t)return t;const r=Bu[e]==null?0:Bu[e]+1;return Bu[e]=r,e+"-"+r},[e,t])}function Jy(e){return function(t){for(var r=arguments.length,s=new Array(r>1?r-1:0),l=1;l<r;l++)s[l-1]=arguments[l];return s.reduce((a,c)=>{const f=Object.entries(c);for(const[m,p]of f){const y=a[m];y!=null&&(a[m]=y+e*p)}return a},{...t})}}const ys=Jy(1),vo=Jy(-1);function mj(e){return"clientX"in e&&"clientY"in e}function ev(e){if(!e)return!1;const{KeyboardEvent:t}=Un(e.target);return t&&e instanceof t}function pj(e){if(!e)return!1;const{TouchEvent:t}=Un(e.target);return t&&e instanceof t}function ud(e){if(pj(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return mj(e)?{x:e.clientX,y:e.clientY}:null}const dd=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[dd.Translate.toString(e),dd.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:s}=e;return t+" "+r+"ms "+s}}}),eg="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function hj(e){return e.matches(eg)?e:e.querySelector(eg)}const gj={display:"none"};function yj(e){let{id:t,value:r}=e;return ur.createElement("div",{id:t,style:gj},r)}function vj(e){let{id:t,announcement:r,ariaLiveType:s="assertive"}=e;const l={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ur.createElement("div",{id:t,style:l,role:"status","aria-live":s,"aria-atomic":!0},r)}function xj(){const[e,t]=w.useState("");return{announce:w.useCallback(s=>{s!=null&&t(s)},[]),announcement:e}}const tv=w.createContext(null);function _j(e){const t=w.useContext(tv);w.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function kj(){const[e]=w.useState(()=>new Set),t=w.useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[w.useCallback(s=>{let{type:l,event:a}=s;e.forEach(c=>{var f;return(f=c[l])==null?void 0:f.call(c,a)})},[e]),t]}const wj={draggable:`
|
|
69
|
+
To pick up a draggable item, press the space bar.
|
|
70
|
+
While dragging, use the arrow keys to move the item.
|
|
71
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
72
|
+
`},bj={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Sj(e){let{announcements:t=bj,container:r,hiddenTextDescribedById:s,screenReaderInstructions:l=wj}=e;const{announce:a,announcement:c}=xj(),f=Io("DndLiveRegion"),[m,p]=w.useState(!1);if(w.useEffect(()=>{p(!0)},[]),_j(w.useMemo(()=>({onDragStart(g){let{active:x}=g;a(t.onDragStart({active:x}))},onDragMove(g){let{active:x,over:_}=g;t.onDragMove&&a(t.onDragMove({active:x,over:_}))},onDragOver(g){let{active:x,over:_}=g;a(t.onDragOver({active:x,over:_}))},onDragEnd(g){let{active:x,over:_}=g;a(t.onDragEnd({active:x,over:_}))},onDragCancel(g){let{active:x,over:_}=g;a(t.onDragCancel({active:x,over:_}))}}),[a,t])),!m)return null;const y=ur.createElement(ur.Fragment,null,ur.createElement(yj,{id:s,value:l.draggable}),ur.createElement(vj,{id:f,announcement:c}));return r?yl.createPortal(y,r):y}var ln;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ln||(ln={}));function xo(){}function tg(e,t){return w.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Cj(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return w.useMemo(()=>[...t].filter(s=>s!=null),[...t])}const wr=Object.freeze({x:0,y:0});function Nj(e,t){let{data:{value:r}}=e,{data:{value:s}}=t;return s-r}function jj(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function Ej(e,t){const r=Math.max(t.top,e.top),s=Math.max(t.left,e.left),l=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),c=l-s,f=a-r;if(s<l&&r<a){const m=t.width*t.height,p=e.width*e.height,y=c*f,g=y/(m+p-y);return Number(g.toFixed(4))}return 0}const Tj=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:s}=e;const l=[];for(const a of s){const{id:c}=a,f=r.get(c);if(f){const m=Ej(f,t);m>0&&l.push({id:c,data:{droppableContainer:a,value:m}})}}return l.sort(Nj)};function Ij(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function nv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:wr}function Dj(e){return function(r){for(var s=arguments.length,l=new Array(s>1?s-1:0),a=1;a<s;a++)l[a-1]=arguments[a];return l.reduce((c,f)=>({...c,top:c.top+e*f.y,bottom:c.bottom+e*f.y,left:c.left+e*f.x,right:c.right+e*f.x}),{...r})}}const Aj=Dj(1);function Rj(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Pj(e,t,r){const s=Rj(t);if(!s)return e;const{scaleX:l,scaleY:a,x:c,y:f}=s,m=e.left-c-(1-l)*parseFloat(r),p=e.top-f-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),y=l?e.width/l:e.width,g=a?e.height/a:e.height;return{width:y,height:g,top:p,right:m+y,bottom:p+g,left:m}}const Lj={ignoreTransform:!1};function zl(e,t){t===void 0&&(t=Lj);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:p,transformOrigin:y}=Un(e).getComputedStyle(e);p&&(r=Pj(r,p,y))}const{top:s,left:l,width:a,height:c,bottom:f,right:m}=r;return{top:s,left:l,width:a,height:c,bottom:f,right:m}}function ng(e){return zl(e,{ignoreTransform:!0})}function Mj(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function Oj(e,t){return t===void 0&&(t=Un(e).getComputedStyle(e)),t.position==="fixed"}function zj(e,t){t===void 0&&(t=Un(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(l=>{const a=t[l];return typeof a=="string"?r.test(a):!1})}function Zd(e,t){const r=[];function s(l){if(t!=null&&r.length>=t||!l)return r;if(qd(l)&&l.scrollingElement!=null&&!r.includes(l.scrollingElement))return r.push(l.scrollingElement),r;if(!Ml(l)||Gy(l)||r.includes(l))return r;const a=Un(e).getComputedStyle(l);return l!==e&&zj(l,a)&&r.push(l),Oj(l,a)?r:s(l.parentNode)}return e?s(e):r}function rv(e){const[t]=Zd(e,1);return t??null}function Fu(e){return!To||!e?null:Ts(e)?e:Wd(e)?qd(e)||e===Is(e).scrollingElement?window:Ml(e)?e:null:null}function iv(e){return Ts(e)?e.scrollX:e.scrollLeft}function sv(e){return Ts(e)?e.scrollY:e.scrollTop}function fd(e){return{x:iv(e),y:sv(e)}}var fn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(fn||(fn={}));function lv(e){return!To||!e?!1:e===document.scrollingElement}function av(e){const t={x:0,y:0},r=lv(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},l=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,c=e.scrollTop>=s.y,f=e.scrollLeft>=s.x;return{isTop:l,isLeft:a,isBottom:c,isRight:f,maxScroll:s,minScroll:t}}const $j={x:.2,y:.2};function Bj(e,t,r,s,l){let{top:a,left:c,right:f,bottom:m}=r;s===void 0&&(s=10),l===void 0&&(l=$j);const{isTop:p,isBottom:y,isLeft:g,isRight:x}=av(e),_={x:0,y:0},k={x:0,y:0},C={height:t.height*l.y,width:t.width*l.x};return!p&&a<=t.top+C.height?(_.y=fn.Backward,k.y=s*Math.abs((t.top+C.height-a)/C.height)):!y&&m>=t.bottom-C.height&&(_.y=fn.Forward,k.y=s*Math.abs((t.bottom-C.height-m)/C.height)),!x&&f>=t.right-C.width?(_.x=fn.Forward,k.x=s*Math.abs((t.right-C.width-f)/C.width)):!g&&c<=t.left+C.width&&(_.x=fn.Backward,k.x=s*Math.abs((t.left+C.width-c)/C.width)),{direction:_,speed:k}}function Fj(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:c}=window;return{top:0,left:0,right:a,bottom:c,width:a,height:c}}const{top:t,left:r,right:s,bottom:l}=e.getBoundingClientRect();return{top:t,left:r,right:s,bottom:l,width:e.clientWidth,height:e.clientHeight}}function ov(e){return e.reduce((t,r)=>ys(t,fd(r)),wr)}function Hj(e){return e.reduce((t,r)=>t+iv(r),0)}function Vj(e){return e.reduce((t,r)=>t+sv(r),0)}function Uj(e,t){if(t===void 0&&(t=zl),!e)return;const{top:r,left:s,bottom:l,right:a}=t(e);rv(e)&&(l<=0||a<=0||r>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Wj=[["x",["left","right"],Hj],["y",["top","bottom"],Vj]];class Yd{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const s=Zd(r),l=ov(s);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,c,f]of Wj)for(const m of c)Object.defineProperty(this,m,{get:()=>{const p=f(s),y=l[a]-p;return this.rect[m]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class kl{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...r)})},this.target=t}add(t,r,s){var l;(l=this.target)==null||l.addEventListener(t,r,s),this.listeners.push([t,r,s])}}function qj(e){const{EventTarget:t}=Un(e);return e instanceof t?e:Is(e)}function Hu(e,t){const r=Math.abs(e.x),s=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+s**2)>t:"x"in t&&"y"in t?r>t.x&&s>t.y:"x"in t?r>t.x:"y"in t?s>t.y:!1}var cr;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(cr||(cr={}));function rg(e){e.preventDefault()}function Kj(e){e.stopPropagation()}var ht;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ht||(ht={}));const cv={start:[ht.Space,ht.Enter],cancel:[ht.Esc],end:[ht.Space,ht.Enter,ht.Tab]},Zj=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case ht.Right:return{...r,x:r.x+25};case ht.Left:return{...r,x:r.x-25};case ht.Down:return{...r,y:r.y+25};case ht.Up:return{...r,y:r.y-25}}};class Qd{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new kl(Is(r)),this.windowListeners=new kl(Un(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(cr.Resize,this.handleCancel),this.windowListeners.add(cr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(cr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,s=t.node.current;s&&Uj(s),r(wr)}handleKeyDown(t){if(ev(t)){const{active:r,context:s,options:l}=this.props,{keyboardCodes:a=cv,coordinateGetter:c=Zj,scrollBehavior:f="smooth"}=l,{code:m}=t;if(a.end.includes(m)){this.handleEnd(t);return}if(a.cancel.includes(m)){this.handleCancel(t);return}const{collisionRect:p}=s.current,y=p?{x:p.left,y:p.top}:wr;this.referenceCoordinates||(this.referenceCoordinates=y);const g=c(t,{active:r,context:s.current,currentCoordinates:y});if(g){const x=vo(g,y),_={x:0,y:0},{scrollableAncestors:k}=s.current;for(const C of k){const D=t.code,{isTop:S,isRight:R,isLeft:T,isBottom:M,maxScroll:I,minScroll:j}=av(C),B=Fj(C),Q={x:Math.min(D===ht.Right?B.right-B.width/2:B.right,Math.max(D===ht.Right?B.left:B.left+B.width/2,g.x)),y:Math.min(D===ht.Down?B.bottom-B.height/2:B.bottom,Math.max(D===ht.Down?B.top:B.top+B.height/2,g.y))},te=D===ht.Right&&!R||D===ht.Left&&!T,O=D===ht.Down&&!M||D===ht.Up&&!S;if(te&&Q.x!==g.x){const W=C.scrollLeft+x.x,ne=D===ht.Right&&W<=I.x||D===ht.Left&&W>=j.x;if(ne&&!x.y){C.scrollTo({left:W,behavior:f});return}ne?_.x=C.scrollLeft-W:_.x=D===ht.Right?C.scrollLeft-I.x:C.scrollLeft-j.x,_.x&&C.scrollBy({left:-_.x,behavior:f});break}else if(O&&Q.y!==g.y){const W=C.scrollTop+x.y,ne=D===ht.Down&&W<=I.y||D===ht.Up&&W>=j.y;if(ne&&!x.x){C.scrollTo({top:W,behavior:f});return}ne?_.y=C.scrollTop-W:_.y=D===ht.Down?C.scrollTop-I.y:C.scrollTop-j.y,_.y&&C.scrollBy({top:-_.y,behavior:f});break}}this.handleMove(t,ys(vo(g,this.referenceCoordinates),_))}}}handleMove(t,r){const{onMove:s}=this.props;t.preventDefault(),s(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Qd.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:s=cv,onActivation:l}=t,{active:a}=r;const{code:c}=e.nativeEvent;if(s.start.includes(c)){const f=a.activatorNode.current;return f&&e.target!==f?!1:(e.preventDefault(),l==null||l({event:e.nativeEvent}),!0)}return!1}}];function ig(e){return!!(e&&"distance"in e)}function sg(e){return!!(e&&"delay"in e)}class Xd{constructor(t,r,s){var l;s===void 0&&(s=qj(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:a}=t,{target:c}=a;this.props=t,this.events=r,this.document=Is(c),this.documentListeners=new kl(this.document),this.listeners=new kl(s),this.windowListeners=new kl(Un(c)),this.initialCoordinates=(l=ud(a))!=null?l:wr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:s}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(cr.Resize,this.handleCancel),this.windowListeners.add(cr.DragStart,rg),this.windowListeners.add(cr.VisibilityChange,this.handleCancel),this.windowListeners.add(cr.ContextMenu,rg),this.documentListeners.add(cr.Keydown,this.handleKeydown),r){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(sg(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(ig(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:s,onPending:l}=this.props;l(s,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(cr.Click,Kj,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(cr.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:s,initialCoordinates:l,props:a}=this,{onMove:c,options:{activationConstraint:f}}=a;if(!l)return;const m=(r=ud(t))!=null?r:wr,p=vo(l,m);if(!s&&f){if(ig(f)){if(f.tolerance!=null&&Hu(p,f.tolerance))return this.handleCancel();if(Hu(p,f.distance))return this.handleStart()}if(sg(f)&&Hu(p,f.tolerance))return this.handleCancel();this.handlePending(f,p);return}t.cancelable&&t.preventDefault(),c(m)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===ht.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Yj={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Gd extends Xd{constructor(t){const{event:r}=t,s=Is(r.target);super(t,Yj,s)}}Gd.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:s}=t;return!r.isPrimary||r.button!==0?!1:(s==null||s({event:r}),!0)}}];const Qj={move:{name:"mousemove"},end:{name:"mouseup"}};var md;(function(e){e[e.RightClick=2]="RightClick"})(md||(md={}));class Xj extends Xd{constructor(t){super(t,Qj,Is(t.event.target))}}Xj.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:s}=t;return r.button===md.RightClick?!1:(s==null||s({event:r}),!0)}}];const Vu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Gj extends Xd{constructor(t){super(t,Vu)}static setup(){return window.addEventListener(Vu.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Vu.move.name,t)};function t(){}}}Gj.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:s}=t;const{touches:l}=r;return l.length>1?!1:(s==null||s({event:r}),!0)}}];var wl;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(wl||(wl={}));var _o;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(_o||(_o={}));function Jj(e){let{acceleration:t,activator:r=wl.Pointer,canScroll:s,draggingRect:l,enabled:a,interval:c=5,order:f=_o.TreeOrder,pointerCoordinates:m,scrollableAncestors:p,scrollableAncestorRects:y,delta:g,threshold:x}=e;const _=tE({delta:g,disabled:!a}),[k,C]=fj(),D=w.useRef({x:0,y:0}),S=w.useRef({x:0,y:0}),R=w.useMemo(()=>{switch(r){case wl.Pointer:return m?{top:m.y,bottom:m.y,left:m.x,right:m.x}:null;case wl.DraggableRect:return l}},[r,l,m]),T=w.useRef(null),M=w.useCallback(()=>{const j=T.current;if(!j)return;const B=D.current.x*S.current.x,Q=D.current.y*S.current.y;j.scrollBy(B,Q)},[]),I=w.useMemo(()=>f===_o.TreeOrder?[...p].reverse():p,[f,p]);w.useEffect(()=>{if(!a||!p.length||!R){C();return}for(const j of I){if((s==null?void 0:s(j))===!1)continue;const B=p.indexOf(j),Q=y[B];if(!Q)continue;const{direction:te,speed:O}=Bj(j,Q,R,t,x);for(const W of["x","y"])_[W][te[W]]||(O[W]=0,te[W]=0);if(O.x>0||O.y>0){C(),T.current=j,k(M,c),D.current=O,S.current=te;return}}D.current={x:0,y:0},S.current={x:0,y:0},C()},[t,M,s,C,a,c,JSON.stringify(R),JSON.stringify(_),k,p,I,y,JSON.stringify(x)])}const eE={x:{[fn.Backward]:!1,[fn.Forward]:!1},y:{[fn.Backward]:!1,[fn.Forward]:!1}};function tE(e){let{delta:t,disabled:r}=e;const s=cd(t);return Ol(l=>{if(r||!s||!l)return eE;const a={x:Math.sign(t.x-s.x),y:Math.sign(t.y-s.y)};return{x:{[fn.Backward]:l.x[fn.Backward]||a.x===-1,[fn.Forward]:l.x[fn.Forward]||a.x===1},y:{[fn.Backward]:l.y[fn.Backward]||a.y===-1,[fn.Forward]:l.y[fn.Forward]||a.y===1}}},[r,t,s])}function nE(e,t){const r=t!=null?e.get(t):void 0,s=r?r.node.current:null;return Ol(l=>{var a;return t==null?null:(a=s??l)!=null?a:null},[s,t])}function rE(e,t){return w.useMemo(()=>e.reduce((r,s)=>{const{sensor:l}=s,a=l.activators.map(c=>({eventName:c.eventName,handler:t(c.handler,s)}));return[...r,...a]},[]),[e,t])}var Dl;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Dl||(Dl={}));var pd;(function(e){e.Optimized="optimized"})(pd||(pd={}));const lg=new Map;function iE(e,t){let{dragging:r,dependencies:s,config:l}=t;const[a,c]=w.useState(null),{frequency:f,measure:m,strategy:p}=l,y=w.useRef(e),g=D(),x=Il(g),_=w.useCallback(function(S){S===void 0&&(S=[]),!x.current&&c(R=>R===null?S:R.concat(S.filter(T=>!R.includes(T))))},[x]),k=w.useRef(null),C=Ol(S=>{if(g&&!r)return lg;if(!S||S===lg||y.current!==e||a!=null){const R=new Map;for(let T of e){if(!T)continue;if(a&&a.length>0&&!a.includes(T.id)&&T.rect.current){R.set(T.id,T.rect.current);continue}const M=T.node.current,I=M?new Yd(m(M),M):null;T.rect.current=I,I&&R.set(T.id,I)}return R}return S},[e,a,r,g,m]);return w.useEffect(()=>{y.current=e},[e]),w.useEffect(()=>{g||_()},[r,g]),w.useEffect(()=>{a&&a.length>0&&c(null)},[JSON.stringify(a)]),w.useEffect(()=>{g||typeof f!="number"||k.current!==null||(k.current=setTimeout(()=>{_(),k.current=null},f))},[f,g,_,...s]),{droppableRects:C,measureDroppableContainers:_,measuringScheduled:a!=null};function D(){switch(p){case Dl.Always:return!1;case Dl.BeforeDragging:return r;default:return!r}}}function uv(e,t){return Ol(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function sE(e,t){return uv(e,t)}function lE(e){let{callback:t,disabled:r}=e;const s=Kd(t),l=w.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(s)},[s,r]);return w.useEffect(()=>()=>l==null?void 0:l.disconnect(),[l]),l}function Do(e){let{callback:t,disabled:r}=e;const s=Kd(t),l=w.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(s)},[r]);return w.useEffect(()=>()=>l==null?void 0:l.disconnect(),[l]),l}function aE(e){return new Yd(zl(e),e)}function ag(e,t,r){t===void 0&&(t=aE);const[s,l]=w.useState(null);function a(){l(m=>{if(!e)return null;if(e.isConnected===!1){var p;return(p=m??r)!=null?p:null}const y=t(e);return JSON.stringify(m)===JSON.stringify(y)?m:y})}const c=lE({callback(m){if(e)for(const p of m){const{type:y,target:g}=p;if(y==="childList"&&g instanceof HTMLElement&&g.contains(e)){a();break}}}}),f=Do({callback:a});return xi(()=>{a(),e?(f==null||f.observe(e),c==null||c.observe(document.body,{childList:!0,subtree:!0})):(f==null||f.disconnect(),c==null||c.disconnect())},[e]),s}function oE(e){const t=uv(e);return nv(e,t)}const og=[];function cE(e){const t=w.useRef(e),r=Ol(s=>e?s&&s!==og&&e&&t.current&&e.parentNode===t.current.parentNode?s:Zd(e):og,[e]);return w.useEffect(()=>{t.current=e},[e]),r}function uE(e){const[t,r]=w.useState(null),s=w.useRef(e),l=w.useCallback(a=>{const c=Fu(a.target);c&&r(f=>f?(f.set(c,fd(c)),new Map(f)):null)},[]);return w.useEffect(()=>{const a=s.current;if(e!==a){c(a);const f=e.map(m=>{const p=Fu(m);return p?(p.addEventListener("scroll",l,{passive:!0}),[p,fd(p)]):null}).filter(m=>m!=null);r(f.length?new Map(f):null),s.current=e}return()=>{c(e),c(a)};function c(f){f.forEach(m=>{const p=Fu(m);p==null||p.removeEventListener("scroll",l)})}},[l,e]),w.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,c)=>ys(a,c),wr):ov(e):wr,[e,t])}function cg(e,t){t===void 0&&(t=[]);const r=w.useRef(null);return w.useEffect(()=>{r.current=null},t),w.useEffect(()=>{const s=e!==wr;s&&!r.current&&(r.current=e),!s&&r.current&&(r.current=null)},[e]),r.current?vo(e,r.current):wr}function dE(e){w.useEffect(()=>{if(!To)return;const t=e.map(r=>{let{sensor:s}=r;return s.setup==null?void 0:s.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function fE(e,t){return w.useMemo(()=>e.reduce((r,s)=>{let{eventName:l,handler:a}=s;return r[l]=c=>{a(c,t)},r},{}),[e,t])}function dv(e){return w.useMemo(()=>e?Mj(e):null,[e])}const ug=[];function mE(e,t){t===void 0&&(t=zl);const[r]=e,s=dv(r?Un(r):null),[l,a]=w.useState(ug);function c(){a(()=>e.length?e.map(m=>lv(m)?s:new Yd(t(m),m)):ug)}const f=Do({callback:c});return xi(()=>{f==null||f.disconnect(),c(),e.forEach(m=>f==null?void 0:f.observe(m))},[e]),l}function pE(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ml(t)?t:e}function hE(e){let{measure:t}=e;const[r,s]=w.useState(null),l=w.useCallback(p=>{for(const{target:y}of p)if(Ml(y)){s(g=>{const x=t(y);return g?{...g,width:x.width,height:x.height}:x});break}},[t]),a=Do({callback:l}),c=w.useCallback(p=>{const y=pE(p);a==null||a.disconnect(),y&&(a==null||a.observe(y)),s(y?t(y):null)},[t,a]),[f,m]=yo(c);return w.useMemo(()=>({nodeRef:f,rect:r,setRef:m}),[r,f,m])}const gE=[{sensor:Gd,options:{}},{sensor:Qd,options:{}}],yE={current:{}},ro={draggable:{measure:ng},droppable:{measure:ng,strategy:Dl.WhileDragging,frequency:pd.Optimized},dragOverlay:{measure:zl}};class bl extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,s;return(r=(s=this.get(t))==null?void 0:s.node.current)!=null?r:void 0}}const vE={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new bl,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:xo},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ro,measureDroppableContainers:xo,windowRect:null,measuringScheduled:!1},xE={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:xo,draggableNodes:new Map,over:null,measureDroppableContainers:xo},Ao=w.createContext(xE),_E=w.createContext(vE);function kE(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new bl}}}function wE(e,t){switch(t.type){case ln.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ln.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ln.DragEnd:case ln.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ln.RegisterDroppable:{const{element:r}=t,{id:s}=r,l=new bl(e.droppable.containers);return l.set(s,r),{...e,droppable:{...e.droppable,containers:l}}}case ln.SetDroppableDisabled:{const{id:r,key:s,disabled:l}=t,a=e.droppable.containers.get(r);if(!a||s!==a.key)return e;const c=new bl(e.droppable.containers);return c.set(r,{...a,disabled:l}),{...e,droppable:{...e.droppable,containers:c}}}case ln.UnregisterDroppable:{const{id:r,key:s}=t,l=e.droppable.containers.get(r);if(!l||s!==l.key)return e;const a=new bl(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function bE(e){let{disabled:t}=e;const{active:r,activatorEvent:s,draggableNodes:l}=w.useContext(Ao),a=cd(s),c=cd(r==null?void 0:r.id);return w.useEffect(()=>{if(!t&&!s&&a&&c!=null){if(!ev(a)||document.activeElement===a.target)return;const f=l.get(c);if(!f)return;const{activatorNode:m,node:p}=f;if(!m.current&&!p.current)return;requestAnimationFrame(()=>{for(const y of[m.current,p.current]){if(!y)continue;const g=hj(y);if(g){g.focus();break}}})}},[s,t,l,c,a]),null}function SE(e,t){let{transform:r,...s}=t;return e!=null&&e.length?e.reduce((l,a)=>a({transform:l,...s}),r):r}function CE(e){return w.useMemo(()=>({draggable:{...ro.draggable,...e==null?void 0:e.draggable},droppable:{...ro.droppable,...e==null?void 0:e.droppable},dragOverlay:{...ro.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function NE(e){let{activeNode:t,measure:r,initialRect:s,config:l=!0}=e;const a=w.useRef(!1),{x:c,y:f}=typeof l=="boolean"?{x:l,y:l}:l;xi(()=>{if(!c&&!f||!t){a.current=!1;return}if(a.current||!s)return;const p=t==null?void 0:t.node.current;if(!p||p.isConnected===!1)return;const y=r(p),g=nv(y,s);if(c||(g.x=0),f||(g.y=0),a.current=!0,Math.abs(g.x)>0||Math.abs(g.y)>0){const x=rv(p);x&&x.scrollBy({top:g.y,left:g.x})}},[t,c,f,s,r])}const fv=w.createContext({...wr,scaleX:1,scaleY:1});var pi;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(pi||(pi={}));const jE=w.memo(function(t){var r,s,l,a;let{id:c,accessibility:f,autoScroll:m=!0,children:p,sensors:y=gE,collisionDetection:g=Tj,measuring:x,modifiers:_,...k}=t;const C=w.useReducer(wE,void 0,kE),[D,S]=C,[R,T]=kj(),[M,I]=w.useState(pi.Uninitialized),j=M===pi.Initialized,{draggable:{active:B,nodes:Q,translate:te},droppable:{containers:O}}=D,W=B!=null?Q.get(B):null,ne=w.useRef({initial:null,translated:null}),_e=w.useMemo(()=>{var ot;return B!=null?{id:B,data:(ot=W==null?void 0:W.data)!=null?ot:yE,rect:ne}:null},[B,W]),ie=w.useRef(null),[X,J]=w.useState(null),[ve,ee]=w.useState(null),fe=Il(k,Object.values(k)),N=Io("DndDescribedBy",c),P=w.useMemo(()=>O.getEnabled(),[O]),F=CE(x),{droppableRects:E,measureDroppableContainers:ce,measuringScheduled:Se}=iE(P,{dragging:j,dependencies:[te.x,te.y],config:F.droppable}),ge=nE(Q,B),xe=w.useMemo(()=>ve?ud(ve):null,[ve]),ze=vt(),de=sE(ge,F.draggable.measure);NE({activeNode:B!=null?Q.get(B):null,config:ze.layoutShiftCompensation,initialRect:de,measure:F.draggable.measure});const ke=ag(ge,F.draggable.measure,de),Nt=ag(ge?ge.parentElement:null),Lt=w.useRef({activatorEvent:null,active:null,activeNode:ge,collisionRect:null,collisions:null,droppableRects:E,draggableNodes:Q,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Kt=O.getNodeFor((r=Lt.current.over)==null?void 0:r.id),jt=hE({measure:F.dragOverlay.measure}),se=(s=jt.nodeRef.current)!=null?s:ge,Ge=j?(l=jt.rect)!=null?l:ke:null,wt=!!(jt.nodeRef.current&&jt.rect),tn=oE(wt?null:ke),Zt=dv(se?Un(se):null),bt=cE(j?Kt??ge:null),Mt=mE(bt),yt=SE(_,{transform:{x:te.x-tn.x,y:te.y-tn.y,scaleX:1,scaleY:1},activatorEvent:ve,active:_e,activeNodeRect:ke,containerNodeRect:Nt,draggingNodeRect:Ge,over:Lt.current.over,overlayNodeRect:jt.rect,scrollableAncestors:bt,scrollableAncestorRects:Mt,windowRect:Zt}),Yt=xe?ys(xe,te):null,ye=uE(bt),Ce=cg(ye),$=cg(ye,[ke]),Z=ys(yt,Ce),q=Ge?Aj(Ge,yt):null,we=_e&&q?g({active:_e,collisionRect:q,droppableRects:E,droppableContainers:P,pointerCoordinates:Yt}):null,Ve=jj(we,"id"),[st,Ot]=w.useState(null),Ut=wt?yt:ys(yt,$),yn=Ij(Ut,(a=st==null?void 0:st.rect)!=null?a:null,ke),vn=w.useRef(null),Y=w.useCallback((ot,Et)=>{let{sensor:zt,options:Pn}=Et;if(ie.current==null)return;const mn=Q.get(ie.current);if(!mn)return;const on=ot.nativeEvent,xn=new zt({active:ie.current,activeNode:mn,event:on,options:Pn,context:Lt,onAbort(Dt){if(!Q.get(Dt))return;const{onDragAbort:nn}=fe.current,Ln={id:Dt};nn==null||nn(Ln),R({type:"onDragAbort",event:Ln})},onPending(Dt,In,nn,Ln){if(!Q.get(Dt))return;const{onDragPending:nr}=fe.current,_n={id:Dt,constraint:In,initialCoordinates:nn,offset:Ln};nr==null||nr(_n),R({type:"onDragPending",event:_n})},onStart(Dt){const In=ie.current;if(In==null)return;const nn=Q.get(In);if(!nn)return;const{onDragStart:Ln}=fe.current,Wn={activatorEvent:on,active:{id:In,data:nn.data,rect:ne}};yl.unstable_batchedUpdates(()=>{Ln==null||Ln(Wn),I(pi.Initializing),S({type:ln.DragStart,initialCoordinates:Dt,active:In}),R({type:"onDragStart",event:Wn}),J(vn.current),ee(on)})},onMove(Dt){S({type:ln.DragMove,coordinates:Dt})},onEnd:mr(ln.DragEnd),onCancel:mr(ln.DragCancel)});vn.current=xn;function mr(Dt){return async function(){const{active:nn,collisions:Ln,over:Wn,scrollAdjustedTranslate:nr}=Lt.current;let _n=null;if(nn&&nr){const{cancelDrop:qn}=fe.current;_n={activatorEvent:on,active:nn,collisions:Ln,delta:nr,over:Wn},Dt===ln.DragEnd&&typeof qn=="function"&&await Promise.resolve(qn(_n))&&(Dt=ln.DragCancel)}ie.current=null,yl.unstable_batchedUpdates(()=>{S({type:Dt}),I(pi.Uninitialized),Ot(null),J(null),ee(null),vn.current=null;const qn=Dt===ln.DragEnd?"onDragEnd":"onDragCancel";if(_n){const Ar=fe.current[qn];Ar==null||Ar(_n),R({type:qn,event:_n})}})}}},[Q]),le=w.useCallback((ot,Et)=>(zt,Pn)=>{const mn=zt.nativeEvent,on=Q.get(Pn);if(ie.current!==null||!on||mn.dndKit||mn.defaultPrevented)return;const xn={active:on};ot(zt,Et.options,xn)===!0&&(mn.dndKit={capturedBy:Et.sensor},ie.current=Pn,Y(zt,Et))},[Q,Y]),Ne=rE(y,le);dE(y),xi(()=>{ke&&M===pi.Initializing&&I(pi.Initialized)},[ke,M]),w.useEffect(()=>{const{onDragMove:ot}=fe.current,{active:Et,activatorEvent:zt,collisions:Pn,over:mn}=Lt.current;if(!Et||!zt)return;const on={active:Et,activatorEvent:zt,collisions:Pn,delta:{x:Z.x,y:Z.y},over:mn};yl.unstable_batchedUpdates(()=>{ot==null||ot(on),R({type:"onDragMove",event:on})})},[Z.x,Z.y]),w.useEffect(()=>{const{active:ot,activatorEvent:Et,collisions:zt,droppableContainers:Pn,scrollAdjustedTranslate:mn}=Lt.current;if(!ot||ie.current==null||!Et||!mn)return;const{onDragOver:on}=fe.current,xn=Pn.get(Ve),mr=xn&&xn.rect.current?{id:xn.id,rect:xn.rect.current,data:xn.data,disabled:xn.disabled}:null,Dt={active:ot,activatorEvent:Et,collisions:zt,delta:{x:mn.x,y:mn.y},over:mr};yl.unstable_batchedUpdates(()=>{Ot(mr),on==null||on(Dt),R({type:"onDragOver",event:Dt})})},[Ve]),xi(()=>{Lt.current={activatorEvent:ve,active:_e,activeNode:ge,collisionRect:q,collisions:we,droppableRects:E,draggableNodes:Q,draggingNode:se,draggingNodeRect:Ge,droppableContainers:O,over:st,scrollableAncestors:bt,scrollAdjustedTranslate:Z},ne.current={initial:Ge,translated:q}},[_e,ge,we,q,Q,se,Ge,E,O,st,bt,Z]),Jj({...ze,delta:te,draggingRect:q,pointerCoordinates:Yt,scrollableAncestors:bt,scrollableAncestorRects:Mt});const Xe=w.useMemo(()=>({active:_e,activeNode:ge,activeNodeRect:ke,activatorEvent:ve,collisions:we,containerNodeRect:Nt,dragOverlay:jt,draggableNodes:Q,droppableContainers:O,droppableRects:E,over:st,measureDroppableContainers:ce,scrollableAncestors:bt,scrollableAncestorRects:Mt,measuringConfiguration:F,measuringScheduled:Se,windowRect:Zt}),[_e,ge,ke,ve,we,Nt,jt,Q,O,E,st,ce,bt,Mt,F,Se,Zt]),Tn=w.useMemo(()=>({activatorEvent:ve,activators:Ne,active:_e,activeNodeRect:ke,ariaDescribedById:{draggable:N},dispatch:S,draggableNodes:Q,over:st,measureDroppableContainers:ce}),[ve,Ne,_e,ke,S,N,Q,st,ce]);return ur.createElement(tv.Provider,{value:T},ur.createElement(Ao.Provider,{value:Tn},ur.createElement(_E.Provider,{value:Xe},ur.createElement(fv.Provider,{value:yn},p)),ur.createElement(bE,{disabled:(f==null?void 0:f.restoreFocus)===!1})),ur.createElement(Sj,{...f,hiddenTextDescribedById:N}));function vt(){const ot=(X==null?void 0:X.autoScrollEnabled)===!1,Et=typeof m=="object"?m.enabled===!1:m===!1,zt=j&&!ot&&!Et;return typeof m=="object"?{...m,enabled:zt}:{enabled:zt}}}),EE=w.createContext(null),dg="button",TE="Draggable";function IE(e){let{id:t,data:r,disabled:s=!1,attributes:l}=e;const a=Io(TE),{activators:c,activatorEvent:f,active:m,activeNodeRect:p,ariaDescribedById:y,draggableNodes:g,over:x}=w.useContext(Ao),{role:_=dg,roleDescription:k="draggable",tabIndex:C=0}=l??{},D=(m==null?void 0:m.id)===t,S=w.useContext(D?fv:EE),[R,T]=yo(),[M,I]=yo(),j=fE(c,t),B=Il(r);xi(()=>(g.set(t,{id:t,key:a,node:R,activatorNode:M,data:B}),()=>{const te=g.get(t);te&&te.key===a&&g.delete(t)}),[g,t]);const Q=w.useMemo(()=>({role:_,tabIndex:C,"aria-disabled":s,"aria-pressed":D&&_===dg?!0:void 0,"aria-roledescription":k,"aria-describedby":y.draggable}),[s,_,C,D,k,y.draggable]);return{active:m,activatorEvent:f,activeNodeRect:p,attributes:Q,isDragging:D,listeners:s?void 0:j,node:R,over:x,setNodeRef:T,setActivatorNodeRef:I,transform:S}}const DE="Droppable",AE={timeout:25};function RE(e){let{data:t,disabled:r=!1,id:s,resizeObserverConfig:l}=e;const a=Io(DE),{active:c,dispatch:f,over:m,measureDroppableContainers:p}=w.useContext(Ao),y=w.useRef({disabled:r}),g=w.useRef(!1),x=w.useRef(null),_=w.useRef(null),{disabled:k,updateMeasurementsFor:C,timeout:D}={...AE,...l},S=Il(C??s),R=w.useCallback(()=>{if(!g.current){g.current=!0;return}_.current!=null&&clearTimeout(_.current),_.current=setTimeout(()=>{p(Array.isArray(S.current)?S.current:[S.current]),_.current=null},D)},[D]),T=Do({callback:R,disabled:k||!c}),M=w.useCallback((Q,te)=>{T&&(te&&(T.unobserve(te),g.current=!1),Q&&T.observe(Q))},[T]),[I,j]=yo(M),B=Il(t);return w.useEffect(()=>{!T||!I.current||(T.disconnect(),g.current=!1,T.observe(I.current))},[I,T]),w.useEffect(()=>(f({type:ln.RegisterDroppable,element:{id:s,key:a,disabled:r,node:I,rect:x,data:B}}),()=>f({type:ln.UnregisterDroppable,key:a,id:s})),[s]),w.useEffect(()=>{r!==y.current.disabled&&(f({type:ln.SetDroppableDisabled,id:s,key:a,disabled:r}),y.current.disabled=r)},[s,a,r,f]),{active:c,rect:x,isOver:(m==null?void 0:m.id)===s,node:I,over:m,setNodeRef:j}}const PE=/^\s*[-*]\s*(\d{4}-\d{2}-\d{2})\s+(\d{2}:\d{2})\s+\[([^\]]+)\]\s*(.*)$/;function Ro(e){const t=[];for(const r of e.split(`
|
|
73
|
+
`)){const s=r.match(PE);if(!s)continue;const[,l,a,c,f]=s;t.push({date:l,time:a,member:c,message:f})}return t}function LE(e){const t=new Map;for(const s of e)for(const{date:l,time:a,member:c,message:f}of Ro(s.body)){const m=t.get(l)??[];m.push({taskId:s.id,time:a,member:c,message:f}),t.set(l,m)}const r=[...t.entries()].map(([s,l])=>({date:s,entries:l.sort((a,c)=>a.time.localeCompare(c.time)||a.taskId.localeCompare(c.taskId,"en",{numeric:!0}))}));return r.sort((s,l)=>l.date.localeCompare(s.date)),r}const Jd=1440*60*1e3,ME=5,OE=["in_progress","todo","pending"],zE={in_progress:2,todo:7,pending:5};function mv(e){return e.filter(t=>t.status==="pending"&&t.blocked_type==="decision").map(t=>({id:t.id,title:t.title,blocked_reason:t.blocked_reason,assignee:t.assignee})).sort((t,r)=>t.id.localeCompare(r.id,"en",{numeric:!0}))}function $E(e){return OE.includes(e)}const BE=/^\s{0,3}#{1,6}\s+作業ログ\s*$/,FE=/^\s{0,3}#{1,6}\s+/;function pv(e){const t=e.split(`
|
|
74
|
+
`);let r=-1;for(let l=0;l<t.length;l++)if(BE.test(t[l])){r=l+1;break}if(r===-1)return e;const s=[];for(let l=r;l<t.length&&!FE.test(t[l]);l++)s.push(t[l]);return s.join(`
|
|
75
|
+
`)}function HE(e){const t=Ro(pv(e.body));let r=null;for(const l of t){const a=`${l.date}T${l.time}`,c=Date.parse(a);Number.isNaN(c)||(r===null||c>r.ms)&&(r={ms:c,iso:a})}if(r!==null)return r;const s=Sl(e.updated);return s===null?null:{ms:s,iso:e.updated}}function Po(e,t,r={}){const s=[];for(const l of e){if(!$E(l.status))continue;const a=HE(l);if(a===null)continue;const c=r[l.status]??zE[l.status],f=t-a.ms;f<=c*Jd||s.push({id:l.id,title:l.title,status:l.status,lastActivityIso:a.iso,idleDays:io(f)})}return s.sort((l,a)=>a.idleDays-l.idleDays||l.id.localeCompare(a.id,"en",{numeric:!0}))}const VE=/未完了|未完|完了予定|完了見込|完了せず|undone|not\s+(done|finished|closed)|n['’]t\s+(done|finished|closed)/i,UE=/完了(した|しました|です|済)?[。.!!]?\s*$/,WE=/\b(done|closed|finished)\b[.!]?\s*$/i;function io(e){return Math.max(0,Math.round(e/Jd*10)/10)}function Sl(e){const t=Date.parse(e);return Number.isNaN(t)?null:t}function qE(e){const t=e.trim();return VE.test(t)?!1:UE.test(t)||WE.test(t)}function KE(e){const t=Ro(pv(e.body));let r=null;for(const s of t){if(!qE(s.message))continue;const l=Date.parse(`${s.date}T${s.time}`);Number.isNaN(l)||(r===null||l>r)&&(r=l)}return r!==null?r:Sl(e.updated)}function hd(e){const t=new Date(e),r=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),l=String(t.getDate()).padStart(2,"0");return`${r}-${s}-${l}`}function fg(e){const t=new Date(e);t.setHours(0,0,0,0);const r=(t.getDay()+6)%7;return t.setDate(t.getDate()-r),hd(t.getTime())}function ZE(e){const t=e.length;if(t===0)return 0;const r=Math.floor(t/2);return t%2===0?(e[r-1]+e[r])/2:e[r]}function mg(e){return[...e.entries()].map(([t,r])=>({key:t,count:r})).sort((t,r)=>t.key.localeCompare(r.key))}function YE(e,t,r={}){const s=r.maxBottlenecks??ME,l=e.filter(k=>k.status==="done"),a=new Map,c=new Map,f=[],m=new Map;for(const k of l){const C=KE(k);if(m.set(k.assignee,(m.get(k.assignee)??0)+1),C===null)continue;a.set(hd(C),(a.get(hd(C))??0)+1),c.set(fg(C),(c.get(fg(C))??0)+1);const D=Sl(k.created);D!==null&&C>=D&&f.push((C-D)/Jd)}const p=[...f].sort((k,C)=>k-C),y={sampleSize:p.length,medianDays:p.length>0?Math.round(ZE(p)*10)/10:null,meanDays:p.length>0?Math.round(p.reduce((k,C)=>k+C,0)/p.length*10)/10:null},g=Cs.map(k=>{const C=e.filter(T=>T.status===k),D=C.map(T=>Sl(T.updated)).filter(T=>T!==null).map(T=>t-T);if(D.length===0)return{status:k,count:C.length,avgDays:null,maxDays:null};const S=D.reduce((T,M)=>T+M,0)/D.length,R=D.reduce((T,M)=>M>T?M:T,D[0]);return{status:k,count:C.length,avgDays:io(S),maxDays:io(R)}}),x=[...m.entries()].map(([k,C])=>({member:k,count:C})).sort((k,C)=>C.count-k.count||(k.member??"").localeCompare(C.member??"")),_=e.filter(k=>k.status==="pending").map(k=>{const C=Sl(k.updated);return{id:k.id,title:k.title,blockedType:k.blocked_type,blockedReason:k.blocked_reason,dwellDays:C!==null?io(t-C):0}}).sort((k,C)=>C.dwellDays-k.dwellDays||k.id.localeCompare(C.id,"en",{numeric:!0})).slice(0,s);return{totalTasks:e.length,doneTasks:l.length,completionsByDay:mg(a),completionsByWeek:mg(c),cycleTime:y,dwellByStatus:g,completionsByMember:x,bottlenecks:_}}function hv(e,t,r){const s=t.query.trim().toLowerCase(),l=t.statuses;return e.filter(a=>{const c=a.frontmatter;if(t.label!==""&&!c.labels.includes(t.label)||t.assignee!==""&&c.assignee!==t.assignee||l!==void 0&&l.length>0&&!l.includes(c.status))return!1;if(s==="")return!0;const f=c.assignee!==null?[c.assignee,(r==null?void 0:r(c.assignee))??""]:[""];return[c.id,c.title,...f,...c.labels].join(" ").toLowerCase().includes(s)})}function QE(e){const t=new Set;for(const r of e)for(const s of r.frontmatter.labels)t.add(s);return[...t].sort((r,s)=>r.localeCompare(s))}const XE=/@([A-Za-z0-9_-]+)/g;function gv(e,t){const r=[];let s=0;for(const l of e.matchAll(XE)){const a=l[1],c=l.index??0,f=c===0?"":e[c-1];!(c===0||/\s/.test(f))||!t.has(a)||(c>s&&r.push({kind:"text",value:e.slice(s,c)}),r.push({kind:"mention",id:a}),s=c+l[0].length)}return s<e.length&&r.push({kind:"text",value:e.slice(s)}),r}function GE(e,t){const r=new Set,s=[];for(const l of gv(e,t))l.kind==="mention"&&!r.has(l.id)&&(r.add(l.id),s.push(l.id));return s}function JE(e,t,r){if(!t)return!1;const s=e.frontmatter;return!!(s.assignee===t||GE(e.body,r).includes(t)||s.created_by===t&&s.status==="proposed")}function ef(e){const t=new Set(e.map(T=>T.id)),r=new Map;for(const T of e)r.set(T.id,T.dependsOn.filter(M=>t.has(M)&&M!==T.id));const s=0,l=1,a=2,c=new Map,f=new Set;for(const T of t)c.set(T,s);const m=[],p=new Set,y=T=>{c.set(T,l),m.push(T),p.add(T);for(const M of r.get(T)??[])if(c.get(M)===l){const I=m.indexOf(M);for(let j=I;j<m.length;j++)f.add(m[j])}else c.get(M)===s&&y(M);c.set(T,a),m.pop(),p.delete(T)};for(const T of t)c.get(T)===s&&y(T);const g=new Map,x=new Set,_=T=>{if(f.has(T))return null;if(g.has(T))return g.get(T)??null;if(x.has(T))return null;x.add(T);let M=-1;for(const j of r.get(T)??[]){const B=_(j);if(B===null)return x.delete(T),g.set(T,null),null;B>M&&(M=B)}x.delete(T);const I=M+1;return g.set(T,I),I};let k=-1;for(const T of t){const M=_(T);M!==null&&M>k&&(k=M)}const C=(T,M)=>T.localeCompare(M,"en",{numeric:!0});let D=[];if(k>=0){const T=[...t].filter(M=>g.get(M)===k).sort(C);if(T.length>0){const M=[];let I=T[0];for(;I!==void 0;){M.push(I);const j=g.get(I);I=(r.get(I)??[]).filter(Q=>g.get(Q)===(j??0)-1).sort(C)[0]}D=M.reverse()}}const S=new Set(D);return{nodes:e.map(T=>({id:T.id,level:g.get(T.id)??null,dependsOn:r.get(T.id)??[],onCriticalPath:S.has(T.id)})).sort((T,M)=>T.id.localeCompare(M.id,"en",{numeric:!0})),criticalPath:D,cycleNodes:[...f].sort((T,M)=>T.localeCompare(M,"en",{numeric:!0})),maxLevel:k}}function yv(e,t,r,s){const l=e.replaceAll("{id}",()=>t).replaceAll("{path}",()=>r),a=(s??"").trim();return a.length>0?`${l}
|
|
76
|
+
|
|
77
|
+
差し戻し理由: ${a}`:l}function vv(e){return`.kanban/tasks/${e}.md`}function eT(e={}){const t=(e.projectName??"").trim()||"このプロジェクト",r=(e.aiMemberId??"").trim()||"claude",s=e.aiTaskCreation==="proposal"?"起票モードは「proposal」です。新規タスクは status=proposed で起票し、承認されるまで作業を進めないでください。":"起票モードは「free」です。新規タスクは backlog / todo へ直接起票してかまいません。";return[`「${t}」は AIzuchi(ローカル専用カンバン)でタスクを管理しています。あなた(AI エージェント)も参加してください。`,"","- タスクは .kanban/tasks/<ID>.md(Markdown + YAML frontmatter)が唯一の正です。",`- あなたのメンバー ID は \`${r}\` です(created_by / assignee / 作業ログに使用)。`,"- 運用規約と frontmatter スキーマの正典は CLAUDE.md の「AIzuchi 運用規約」セクションです。必ず読んで従ってください。","","タスク操作(CLI が安全・推奨。生ファイル直接編集も可):","- 読取: npx aizuchi task list / show <ID> / next(next は次に着手できるタスクを依存順に提示)",'- 書込: npx aizuchi task add / move <ID> <status> / done <ID> / block <ID> --type --reason / log <ID> "msg" / comment <ID> "msg"',"- いずれも --json 対応。終了コード 0 成功 / 1 入力エラー / 2 不在 / 3 競合。","","進め方: 着手で status=in_progress(assignee 未設定なら自分に)+ 作業ログに着手記録 → 進展ごとに作業ログを 1 行追記 →","完了で受け入れ条件のチェックを更新し status=done。ブロックは status=pending + blocked_type(decision/external/dependency) + blocked_reason。","",s].join(`
|
|
78
|
+
`)}function tT(e,t,r={}){if(e.length===0)return"";const s=nT(e),l=s.map((f,m)=>{const p=yv(t,f.id,vv(f.id));return`${m+1}. ${p}`}),a=(r.wrapper??"").trim(),c=a.length>0?a.replaceAll("{n}",()=>String(s.length)):"";return c.length>0?`${c}
|
|
79
|
+
|
|
80
|
+
${l.join(`
|
|
81
|
+
|
|
82
|
+
`)}`:l.join(`
|
|
83
|
+
|
|
84
|
+
`)}function nT(e){const t=ef(e.map(l=>({id:l.id,dependsOn:l.dependsOn}))),r=new Map(t.nodes.map(l=>[l.id,l.level])),s=l=>{const a=r.get(l);return a??Number.POSITIVE_INFINITY};return[...e].sort((l,a)=>{const c=s(l.id),f=s(a.id);return c!==f?c-f:l.id.localeCompare(a.id,"en",{numeric:!0})})}async function Ss(e){var t;try{if(typeof navigator<"u"&&((t=navigator.clipboard)!=null&&t.writeText))return await navigator.clipboard.writeText(e),!0}catch{}try{if(typeof document>"u")return!1;const r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.focus(),r.select();const s=document.execCommand("copy");return document.body.removeChild(r),s}catch{return!1}}const pg=25,hg=e=>({x:e.left+e.width/2,y:e.top+e.height/2});function rT(e,t,r){if(e.length===0)return;if(r==="up")return{x:t.x,y:t.y-pg};if(r==="down")return{x:t.x,y:t.y+pg};const s=[...e].sort((f,m)=>f.left-m.left);let l=0,a=Number.POSITIVE_INFINITY;for(let f=0;f<s.length;f++){const m=Math.abs(hg(s[f]).x-t.x);m<a&&(a=m,l=f)}const c=r==="left"?l-1:l+1;if(!(c<0||c>=s.length))return hg(s[c])}const iT='[role="button"], button, input, select, textarea, a',sT=5;function lT(e,t){return Math.abs(t-e)>=sT}function aT(e){if(e===null)return!0;const t=e;return typeof t.closest!="function"?!0:t.closest(iT)!==null}function oT(e,t,r){return e-(r-t)}function cT(e,t,r){const s=e.getBoundingClientRect();return t>s.left+e.clientWidth||r>s.top+e.clientHeight}function uT(){const e=w.useRef(null),t=w.useRef(null),r=w.useCallback(a=>{const c=e.current,f=t.current;if(!(c===null||f===null||f.pointerId!==a.pointerId)&&(t.current=null,!!f.active)){try{c.releasePointerCapture(a.pointerId)}catch{}c.style.cursor="",c.style.userSelect=""}},[]),s=w.useCallback(a=>{const c=e.current;c!==null&&(a.pointerType!=="mouse"||a.button!==0||aT(a.target)||a.target instanceof Element&&cT(a.target,a.clientX,a.clientY)||(t.current={pointerId:a.pointerId,startX:a.clientX,startScrollLeft:c.scrollLeft,active:!1}))},[]),l=w.useCallback(a=>{const c=e.current,f=t.current;if(!(c===null||f===null||f.pointerId!==a.pointerId)){if(!f.active){if(!lT(f.startX,a.clientX))return;f.active=!0,f.startX=a.clientX,f.startScrollLeft=c.scrollLeft;try{c.setPointerCapture(a.pointerId)}catch{}c.style.cursor="grabbing",c.style.userSelect="none";return}c.scrollLeft=oT(f.startScrollLeft,f.startX,a.clientX)}},[]);return{ref:e,handlers:{onPointerDown:s,onPointerMove:l,onPointerUp:r,onPointerCancel:r}}}function xv(e=3e4){const[t,r]=w.useState(()=>Date.now());return w.useEffect(()=>{const s=setInterval(()=>r(Date.now()),e);return()=>clearInterval(s)},[e]),t}const dT=[{value:"decision",labelKey:"blocked.decision.option"},{value:"external",labelKey:"blocked.external.option"},{value:"dependency",labelKey:"blocked.dependency.option"}];function fT({taskTitle:e,onCancel:t,onConfirm:r}){const{t:s}=pt(),[l,a]=w.useState("decision"),[c,f]=w.useState(""),m=c.trim(),p=m.length>0;return u.jsxs(Ur,{title:s("blockedDialog.title"),onClose:t,children:[u.jsx("p",{className:re.label,style:{marginBottom:12},children:s("blockedDialog.intro",{title:e})}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"blocked-type",children:s("blockedDialog.type")}),u.jsx("select",{id:"blocked-type",className:re.select,value:l,onChange:y=>a(y.target.value),children:dT.map(y=>u.jsx("option",{value:y.value,children:s(y.labelKey)},y.value))})]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"blocked-reason",children:s("blockedDialog.reason")}),u.jsx("input",{id:"blocked-reason",className:re.input,value:c,onChange:y=>f(y.target.value.replace(/[\r\n]/g,"")),placeholder:s("blockedDialog.reason.placeholder"),autoFocus:!0})]}),u.jsxs("div",{className:re.actions,children:[u.jsx("button",{type:"button",className:re.btn,onClick:t,children:s("common.cancel")}),u.jsx("button",{type:"button",className:`${re.btn} ${re.btnPrimary}`,disabled:!p,onClick:()=>r(l,m),children:s("blockedDialog.confirm")})]})]})}function mT(e,t=Date.now()){const r=Date.parse(e);if(Number.isNaN(r))return null;const s=Math.max(0,Math.floor((t-r)/1e3));if(s<60)return{unit:"justNow"};const l=Math.floor(s/60);if(l<60)return{unit:"minutes",n:l};const a=Math.floor(l/60);return a<24?{unit:"hours",n:a}:{unit:"days",n:Math.floor(a/24)}}const pT=/^-\s*(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2})\s+\[([^\]]+)\]\s*(.*)$/,hT=/^#{1,6}\s*(?:作業ログ|work log)\s*$/i,gT=/^#{1,6}\s*(?:やりとり|comments?|discussion)\s*$/i;function _v(e,t){const r=e.split(`
|
|
85
|
+
`),s=r.findIndex(a=>t.test(a.trim()));if(s===-1)return[];const l=[];for(let a=s+1;a<r.length;a++){const c=r[a];if(/^#{1,6}\s/.test(c))break;if(c.trim()==="")continue;const f=c.match(pT);f?l.push({raw:c,timestamp:f[1],member:f[2],message:f[3]}):c.trim().startsWith("-")&&l.push({raw:c,timestamp:null,member:null,message:c.replace(/^-\s*/,"")})}return l}function tf(e){return _v(e,hT)}function yT(e){return _v(e,gT)}const vT=/^差し戻し(?:[::]\s*(.*))?$/;function xT(e){const t=tf(e);for(let r=t.length-1;r>=0;r--){const s=t[r].message.match(vT);if(!s)continue;const l=(s[1]??"").trim();return l.length>0?l:null}return null}const _T=/^\s*[-*]\s+\[([ xX])\]\s/;function kT(e){let t=0,r=0;for(const s of e.split(`
|
|
86
|
+
`)){const l=s.match(_T);l&&(r+=1,l[1]!==" "&&(t+=1))}return{done:t,total:r}}const wT="_wrap_12hxw_1",bT="_track_12hxw_7",ST="_fill_12hxw_15",CT="_fillComplete_12hxw_22",NT="_label_12hxw_26",hl={wrap:wT,track:bT,fill:ST,fillComplete:CT,label:NT};function kv({done:e,total:t,label:r}){const{t:s}=pt(),l=t>0?Math.round(e/t*100):0,a=t>0&&e>=t,c=r??s("progress.label",{done:e,total:t});return u.jsxs("div",{className:hl.wrap,children:[u.jsx("div",{className:hl.track,role:"progressbar","aria-label":c,"aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,"aria-valuetext":t>0?`${e}/${t}`:"—",children:u.jsx("div",{className:`${hl.fill} ${a?hl.fillComplete:""}`,style:{width:`${l}%`}})}),u.jsx("span",{className:hl.label,children:t>0?`${e}/${t}`:"—"})]})}const jT="_popover_1gg77_3",ET="_header_1gg77_21",TT="_title_1gg77_27",IT="_closeBtn_1gg77_34",DT="_memberSelect_1gg77_53",AT="_textarea_1gg77_68",RT="_error_1gg77_91",PT="_footer_1gg77_97",LT="_sendBtn_1gg77_102",Fr={popover:jT,header:ET,title:TT,closeBtn:IT,memberSelect:DT,textarea:AT,error:RT,footer:PT,sendBtn:LT},gg="aizuchi.commentMember";function MT({task:e,members:t,onClose:r,triggerRef:s}){var M;const{t:l}=pt(),a=w.useRef(null),c=w.useRef(null),f=typeof localStorage<"u"?localStorage.getItem(gg):null,[m,p]=w.useState(f&&t.some(I=>I.id===f)?f:((M=t[0])==null?void 0:M.id)??""),[y,g]=w.useState(""),[x,_]=w.useState(!1),[k,C]=w.useState(!1),[D,S]=w.useState(null);bo(a,!0),w.useEffect(()=>{var I;(I=c.current)==null||I.focus()},[]),w.useEffect(()=>{const I=j=>{j.key==="Escape"&&(j.stopPropagation(),r())};return document.addEventListener("keydown",I,{capture:!0}),()=>document.removeEventListener("keydown",I,{capture:!0})},[r]),w.useEffect(()=>{const I=j=>{var O,W;const B=j.target,Q=((O=a.current)==null?void 0:O.contains(B))??!1,te=((W=s==null?void 0:s.current)==null?void 0:W.contains(B))??!1;!Q&&!te&&r()};return document.addEventListener("pointerdown",I),()=>document.removeEventListener("pointerdown",I)},[r,s]);const R=async()=>{const I=y.trim();if(!(I.length===0||m===""||x)){_(!0),S(null);try{await Mg(e.frontmatter.id,m,I),typeof localStorage<"u"&&localStorage.setItem(gg,m),g(""),C(!0),setTimeout(r,800)}catch(j){S(j instanceof Error?j.message:l("comment.error")),_(!1)}}},T=I=>{(I.ctrlKey||I.metaKey)&&I.key==="Enter"&&(I.preventDefault(),R())};return u.jsxs("div",{ref:a,className:Fr.popover,role:"dialog","aria-modal":"true","aria-label":l("quickComment.title"),onPointerDown:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),onKeyDown:I=>I.stopPropagation(),children:[u.jsxs("div",{className:Fr.header,children:[u.jsx("span",{className:Fr.title,children:l("quickComment.title")}),u.jsx("button",{type:"button",className:Fr.closeBtn,"aria-label":"Close",onClick:r,children:"×"})]}),t.length>1&&u.jsx("select",{className:Fr.memberSelect,value:m,onChange:I=>p(I.target.value),"aria-label":l("comment.member"),disabled:x||k,children:t.map(I=>u.jsx("option",{value:I.id,children:I.label??I.id},I.id))}),u.jsx("textarea",{ref:c,className:Fr.textarea,value:y,onChange:I=>g(I.target.value.replace(/[\r\n]/g,"")),onKeyDown:T,placeholder:l("comment.placeholder"),"aria-label":l("comment.placeholder"),rows:2,disabled:x||k}),D&&u.jsx("p",{className:Fr.error,children:D}),u.jsx("div",{className:Fr.footer,children:u.jsx("button",{type:"button",className:Fr.sendBtn,onClick:()=>void R(),disabled:y.trim().length===0||x||k,children:l(k?"quickComment.sent":x?"quickComment.sending":"comment.send")})})]})}const OT="_card_1trqe_1",zT="_dragging_1trqe_30",$T="_inProgress_1trqe_36",BT="_unread_1trqe_43",FT="_unreadFade_1trqe_1",HT="_selected_1trqe_59",VT="_selectBox_1trqe_66",UT="_selectBoxOn_1trqe_81",WT="_unreadBadge_1trqe_87",qT="_unreadDot_1trqe_99",KT="_topRow_1trqe_107",ZT="_id_1trqe_114",YT="_stalledBadge_1trqe_122",QT="_stalledDot_1trqe_135",XT="_priority_1trqe_143",GT="_priorityhigh_1trqe_151",JT="_prioritymedium_1trqe_156",eI="_prioritylow_1trqe_161",tI="_title_1trqe_166",nI="_metaRow_1trqe_173",rI="_assignee_1trqe_180",iI="_memberDot_1trqe_188",sI="_memberhuman_1trqe_195",lI="_memberai_1trqe_199",aI="_memberunknown_1trqe_203",oI="_labels_1trqe_207",cI="_label_1trqe_207",uI="_elapsed_1trqe_221",dI="_elapsedStrong_1trqe_227",fI="_blocked_1trqe_232",mI="_blockedBadge_1trqe_240",pI="_blockeddecision_1trqe_248",hI="_blockedexternal_1trqe_253",gI="_blockeddependency_1trqe_258",yI="_blockedReason_1trqe_263",vI="_proposalActions_1trqe_269",xI="_actionBtn_1trqe_278",_I="_approveBtn_1trqe_297",kI="_rejectBtn_1trqe_303",wI="_quickCommentArea_1trqe_310",bI="_quickCommentBtn_1trqe_318",Ze={card:OT,dragging:zT,inProgress:$T,unread:BT,unreadFade:FT,selected:HT,selectBox:VT,selectBoxOn:UT,unreadBadge:WT,unreadDot:qT,topRow:KT,id:ZT,stalledBadge:YT,stalledDot:QT,priority:XT,priorityhigh:GT,prioritymedium:JT,prioritylow:eI,title:tI,metaRow:nI,assignee:rI,memberDot:iI,memberhuman:sI,memberai:lI,memberunknown:aI,labels:oI,label:cI,elapsed:uI,elapsedStrong:dI,blocked:fI,blockedBadge:mI,blockeddecision:pI,blockedexternal:hI,blockeddependency:gI,blockedReason:yI,proposalActions:vI,actionBtn:xI,approveBtn:_I,rejectBtn:kI,quickCommentArea:wI,quickCommentBtn:bI},SI={decision:"blocked.decision",external:"blocked.external",dependency:"blocked.dependency"};function CI({task:e,memberType:t,memberLabel:r,now:s,stalledIdleDays:l,unread:a,onOpen:c,onApprove:f,onReject:m,onArchive:p,onRevise:y,members:g,pinned:x,onTogglePin:_,selectionMode:k,selected:C,onToggleSelect:D}){const{t:S}=pt(),[R,T]=w.useState(!1),M=w.useRef(null),{id:I,title:j,status:B,priority:Q,labels:te,assignee:O,blocked_type:W,blocked_reason:ne,updated:_e}=e.frontmatter,{attributes:ie,listeners:X,setNodeRef:J,transform:ve,isDragging:ee}=IE({id:I,data:{status:B},disabled:k}),fe=()=>{k?D==null||D(e):c(e)},N=k?{}:{...X,...ie},P=O?t(O):void 0,F=P==="human"?Ze.memberhuman:P==="ai"?Ze.memberai:Ze.memberunknown,E=mT(_e,s),ce=kT(e.body),Se=l!==void 0,ge=Se?S("stalled.cardTitle",{n:l}):void 0;return u.jsxs("div",{ref:J,className:`${Ze.card} ${ee?Ze.dragging:""} ${B==="in_progress"?Ze.inProgress:""} ${a?Ze.unread:""} ${k&&C?Ze.selected:""}`,style:{transform:dd.Translate.toString(ve)},...N,role:k?"checkbox":"button","aria-checked":k?C:void 0,tabIndex:0,onClick:fe,onKeyDown:xe=>{var ze,de;if(k){(xe.key==="Enter"||xe.key===" ")&&(xe.preventDefault(),D==null||D(e));return}if(ee){(ze=X==null?void 0:X.onKeyDown)==null||ze.call(X,xe);return}if(xe.key==="Enter"){xe.preventDefault(),c(e);return}(de=X==null?void 0:X.onKeyDown)==null||de.call(X,xe)},"aria-label":`${I} ${j}`,children:[u.jsxs("div",{className:Ze.topRow,children:[k&&u.jsx("span",{className:`${Ze.selectBox} ${C?Ze.selectBoxOn:""}`,"aria-hidden":"true",title:S("bulkInstruction.checkbox",{id:I}),children:C?"✓":""}),u.jsx("span",{className:Ze.id,children:I}),a&&u.jsxs("span",{className:Ze.unreadBadge,title:S("newActivity.cardTitle"),children:[u.jsx("span",{className:Ze.unreadDot,"aria-hidden":"true"}),S("newActivity.badge")]}),Se&&u.jsxs("span",{className:Ze.stalledBadge,title:ge,children:[u.jsx("span",{className:Ze.stalledDot,"aria-hidden":"true"}),S("stalled.badge")]}),u.jsx("span",{className:`${Ze.priority} ${Ze[`priority${Q}`]}`,children:Q})]}),u.jsx("div",{className:Ze.title,children:j}),te.length>0&&u.jsx("div",{className:Ze.labels,children:te.map(xe=>u.jsx("span",{className:Ze.label,children:xe},xe))}),ce.total>0&&u.jsx(kv,{done:ce.done,total:ce.total}),u.jsxs("div",{className:Ze.metaRow,children:[O?u.jsxs("span",{className:Ze.assignee,title:P?S("card.memberType",{type:S(P==="human"?"member.human":"member.ai")}):S("card.unregisteredMember"),children:[u.jsx("span",{className:`${Ze.memberDot} ${F}`,"aria-hidden":"true"}),r(O)]}):u.jsx("span",{className:Ze.assignee,children:S("card.unassigned")}),E&&u.jsx("span",{className:`${Ze.elapsed} ${B==="in_progress"?Ze.elapsedStrong:""}`,children:S("card.lastUpdated",{elapsed:Jk(S,E)})})]}),B==="pending"&&(W||ne)&&u.jsxs("div",{className:Ze.blocked,children:[W&&u.jsx("span",{className:`${Ze.blockedBadge} ${Ze[`blocked${W}`]}`,children:S(SI[W])}),ne&&u.jsx("span",{className:Ze.blockedReason,children:ne})]}),!k&&B==="proposed"&&(f||m)&&u.jsxs("div",{className:Ze.proposalActions,onPointerDown:xe=>xe.stopPropagation(),onClick:xe=>xe.stopPropagation(),children:[m&&u.jsx("button",{type:"button",className:`${Ze.actionBtn} ${Ze.rejectBtn}`,onClick:()=>m(e),children:S("proposal.reject")}),f&&u.jsx("button",{type:"button",className:`${Ze.actionBtn} ${Ze.approveBtn}`,onClick:()=>f(e),children:S("proposal.approve")})]}),!k&&(B==="done"||B==="in_progress"||B==="pending")&&(B==="done"&&p||y)&&u.jsxs("div",{className:Ze.proposalActions,onPointerDown:xe=>xe.stopPropagation(),onClick:xe=>xe.stopPropagation(),children:[y&&u.jsx("button",{type:"button",className:Ze.actionBtn,onClick:()=>y(e),children:S("revise.button")}),B==="done"&&p&&u.jsx("button",{type:"button",className:Ze.actionBtn,onClick:()=>p(e),children:S("archive.action")})]}),!k&&_!==void 0&&u.jsx("div",{className:Ze.quickCommentArea,onPointerDown:xe=>xe.stopPropagation(),onClick:xe=>xe.stopPropagation(),children:u.jsx("button",{type:"button",className:Ze.quickCommentBtn,"aria-pressed":x??!1,"aria-label":S(x?"home.pin.unpin":"home.pin.toggle"),onClick:()=>_(e.frontmatter.id),children:"📌"})}),!k&&g&&g.length>0&&u.jsx("div",{className:Ze.quickCommentArea,onPointerDown:xe=>xe.stopPropagation(),onClick:xe=>xe.stopPropagation(),children:u.jsx("button",{ref:M,type:"button",className:Ze.quickCommentBtn,"aria-label":S("quickComment.button"),onClick:()=>T(xe=>!xe),children:S("quickComment.button")})}),R&&g&&g.length>0&&u.jsx(MT,{task:e,members:g,onClose:()=>T(!1),triggerRef:M})]})}const NI="_column_d1l7j_1",jI="_header_d1l7j_13",EI="_columnOver_d1l7j_22",TI="_headerOver_d1l7j_27",II="_label_d1l7j_27",DI="_count_d1l7j_37",AI="_countOver_d1l7j_46",RI="_list_d1l7j_51",PI="_over_d1l7j_60",LI="_empty_d1l7j_67",Er={column:NI,header:jI,columnOver:EI,headerOver:TI,label:II,count:DI,countOver:AI,list:RI,over:PI,empty:LI};function MI({column:e,tasks:t,memberType:r,memberLabel:s,now:l,stalledById:a,unreadIds:c,onOpen:f,onApprove:m,onReject:p,onArchive:y,onRevise:g,members:x,pinnedIds:_,onTogglePin:k,selectionMode:C,selectedIds:D,onToggleSelect:S}){const{t:R}=pt(),{setNodeRef:T,isOver:M}=RE({id:e.id}),I=e.wipLimit!==void 0&&t.length>e.wipLimit,j=Ud(R,e);return u.jsxs("section",{className:`${Er.column} ${I?Er.columnOver:""}`,"aria-label":j,children:[u.jsxs("header",{className:`${Er.header} ${I?Er.headerOver:""}`,children:[u.jsx("span",{className:Er.label,children:j}),u.jsx("span",{className:`${Er.count} ${I?Er.countOver:""}`,title:e.wipLimit!==void 0?I?R("column.wipExceeded",{limit:e.wipLimit}):R("column.wipLimit",{limit:e.wipLimit}):void 0,children:e.wipLimit!==void 0?`${t.length} / ${e.wipLimit}`:t.length})]}),u.jsx("div",{ref:T,className:`${Er.list} ${M?Er.over:""}`,children:t.length===0?u.jsx("div",{className:Er.empty,children:R("column.empty")}):t.map(B=>u.jsx(CI,{task:B,memberType:r,memberLabel:s,now:l,stalledIdleDays:a.get(B.frontmatter.id),unread:c.has(B.frontmatter.id),onOpen:f,onApprove:m,onReject:p,onArchive:y,onRevise:g,members:x,pinned:_==null?void 0:_.has(B.frontmatter.id),onTogglePin:k,selectionMode:C,selected:D==null?void 0:D.has(B.frontmatter.id),onToggleSelect:S},B.frontmatter.id))})]})}function OI({taskTitle:e,onCancel:t,onConfirm:r}){const{t:s}=pt(),[l,a]=w.useState(""),c=l.trim();return u.jsxs(Ur,{title:s("proposal.reject"),onClose:t,children:[u.jsx("p",{className:re.label,style:{marginBottom:12},children:e}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"reject-reason",children:s("proposal.reject.prompt")}),u.jsx("input",{id:"reject-reason",className:re.input,value:l,onChange:f=>a(f.target.value.replace(/[\r\n]/g,"")),autoFocus:!0})]}),u.jsxs("div",{className:re.actions,children:[u.jsx("button",{type:"button",className:re.btn,onClick:t,children:s("common.cancel")}),u.jsx("button",{type:"button",className:`${re.btn} ${re.btnDanger}`,disabled:c.length===0,onClick:()=>r(c),children:s("proposal.reject")})]})]})}function wv({taskTitle:e,onCancel:t,onConfirm:r}){const{t:s}=pt(),[l,a]=w.useState("");return u.jsxs(Ur,{title:s("revise.dialog.title"),onClose:t,children:[u.jsx("p",{className:re.label,style:{marginBottom:12},children:s("revise.dialog.intro",{title:e})}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"revise-reason",children:s("revise.dialog.reason")}),u.jsx("textarea",{id:"revise-reason",className:re.textarea,value:l,onChange:c=>a(c.target.value),placeholder:s("revise.dialog.placeholder"),rows:4,autoFocus:!0})]}),u.jsxs("div",{className:re.actions,children:[u.jsx("button",{type:"button",className:re.btn,onClick:t,children:s("common.cancel")}),u.jsx("button",{type:"button",className:`${re.btn} ${re.btnPrimary}`,onClick:()=>r(l.trim()),children:s("revise.dialog.confirm")})]})]})}const zI="_filterBar_bbl5d_1",$I="_search_bbl5d_12",BI="_filterSpacer_bbl5d_26",FI="_assignedToMeBtn_bbl5d_31",HI="_assignedToMeBtnOn_bbl5d_42",VI="_archiveAllBtn_bbl5d_49",UI="_selectModeBtn_bbl5d_61",WI="_selectModeBtnOn_bbl5d_72",qI="_selectBar_bbl5d_80",KI="_selectCount_bbl5d_90",ZI="_bulkCopyBtn_bbl5d_96",YI="_selectClearBtn_bbl5d_114",QI="_selectHint_bbl5d_131",XI="_viewsBar_bbl5d_137",GI="_chip_bbl5d_147",JI="_chipApply_bbl5d_156",e2="_chipActive_bbl5d_169",t2="_chipDelete_bbl5d_179",n2="_saveViewBtn_bbl5d_198",r2="_saveViewForm_bbl5d_217",i2="_saveViewInput_bbl5d_223",s2="_saveViewConfirm_bbl5d_230",l2="_saveViewCancel_bbl5d_231",a2="_emptyBoard_bbl5d_250",o2="_emptyCard_bbl5d_259",c2="_emptyTitle_bbl5d_269",u2="_emptyLead_bbl5d_275",d2="_emptyAddBtn_bbl5d_281",f2="_emptyAi_bbl5d_295",m2="_emptyAiNote_bbl5d_301",p2="_emptyCopyBtn_bbl5d_308",h2="_board_bbl5d_320",ft={filterBar:zI,search:$I,filterSpacer:BI,assignedToMeBtn:FI,assignedToMeBtnOn:HI,archiveAllBtn:VI,selectModeBtn:UI,selectModeBtnOn:WI,selectBar:qI,selectCount:KI,bulkCopyBtn:ZI,selectClearBtn:YI,selectHint:QI,viewsBar:XI,chip:GI,chipApply:JI,chipActive:e2,chipDelete:t2,saveViewBtn:n2,saveViewForm:r2,saveViewInput:i2,saveViewConfirm:s2,saveViewCancel:l2,emptyBoard:a2,emptyCard:o2,emptyTitle:c2,emptyLead:u2,emptyAddBtn:d2,emptyAi:f2,emptyAiNote:m2,emptyCopyBtn:p2,board:h2};function g2({board:e,onOpen:t,onChanged:r,onError:s,unreadIds:l,applyView:a,onViewApplied:c,onAddTask:f,viewerId:m,pinnedIds:p,onTogglePin:y}){const{t:g}=pt(),x=xv(),[_,k]=w.useState(null),[C,D]=w.useState(null),[S,R]=w.useState(null),[T,M]=w.useState(""),[I,j]=w.useState(""),[B,Q]=w.useState(""),[te,O]=w.useState([]),[W,ne]=w.useState(!1),[_e,ie]=w.useState(null),[X,J]=w.useState(!1),[ve,ee]=w.useState(!1),[fe,N]=w.useState(()=>new Set),[P,F]=w.useState(null),[E,ce]=w.useState(null),Se=e.config.savedViews,ge=Y=>{M(Y.query??""),j(Y.label??""),Q(Y.assignee??""),O(Y.statuses??[])};w.useEffect(()=>{a&&(ge(a),c==null||c())},[a]);const xe={[ht.Left]:"left",[ht.Right]:"right",[ht.Up]:"up",[ht.Down]:"down"},ze=(Y,{currentCoordinates:le,context:Ne})=>{const Xe=xe[Y.code];if(!Xe)return;const Tn=Ne.collisionRect,vt=Tn?{x:Tn.left+Tn.width/2,y:Tn.top+Tn.height/2}:le,ot=[];return Ne.droppableRects.forEach((Et,zt)=>{ot.push({id:String(zt),left:Et.left,top:Et.top,width:Et.width,height:Et.height})}),rT(ot,vt,Xe)},de=Cj(tg(Gd,{activationConstraint:{distance:5}}),tg(Qd,{coordinateGetter:ze})),ke=uT(),Nt=w.useMemo(()=>{const Y=new Map(e.config.members.map(le=>[le.id,le.type]));return le=>Y.get(le)},[e.config.members]),Lt=w.useMemo(()=>Es(e.config.members),[e.config.members]);w.useEffect(()=>{B!==""&&!e.config.members.some(Y=>Y.id===B)&&Q("")},[e.config.members,B]),w.useEffect(()=>{N(Y=>{if(Y.size===0)return Y;const le=new Set([...Y].filter(Ne=>e.tasks.some(Xe=>Xe.frontmatter.id===Ne)));return le.size===Y.size?Y:le})},[e.tasks]);const Kt=w.useMemo(()=>QE(e.tasks),[e.tasks]),jt=w.useMemo(()=>new Set(e.config.members.map(Y=>Y.id)),[e.config.members]),se=w.useMemo(()=>{const Y=hv(e.tasks,{query:T,label:I,assignee:B,statuses:te},Lt);return!W||!m?Y:Y.filter(le=>JE(le,m,jt))},[e.tasks,T,I,B,te,Lt,W,m,jt]),Ge=w.useMemo(()=>{const Y=(le,Ne)=>le.length===Ne.length&&le.every(Xe=>Ne.includes(Xe));return Se.findIndex(le=>(le.query??"")===T&&(le.label??"")===I&&(le.assignee??"")===B&&Y(le.statuses??[],te))},[Se,T,I,B,te]),wt=T!==""||I!==""||B!==""||te.length>0||W,tn=async Y=>{const le=Y.trim();if(le===""||X)return;J(!0);const Ne={name:le};T!==""&&(Ne.query=T),I!==""&&(Ne.label=I),B!==""&&(Ne.assignee=B);try{await Up([...Se,Ne]),ie(null),r()}catch(Xe){Xe instanceof Gn?(s(g("savedView.conflict")),r()):s(Xe instanceof Error?Xe.message:g("savedView.saveError"))}finally{J(!1)}},Zt=async Y=>{if(!X){J(!0);try{await Up(Se.filter((le,Ne)=>Ne!==Y)),r()}catch(le){le instanceof Gn?(s(g("savedView.conflict")),r()):s(le instanceof Error?le.message:g("savedView.saveError"))}finally{J(!1)}}},bt=w.useMemo(()=>{const Y=new Map;for(const le of se){const Ne=Y.get(le.frontmatter.status)??[];Ne.push(le),Y.set(le.frontmatter.status,Ne)}return Y},[se]),Mt=w.useMemo(()=>e.tasks.filter(Y=>Y.frontmatter.status==="done"),[e.tasks]),yt=w.useMemo(()=>{const Y=e.tasks.map(Ne=>({id:Ne.frontmatter.id,title:Ne.frontmatter.title,status:Ne.frontmatter.status,updated:Ne.frontmatter.updated,body:Ne.body})),le=new Map;for(const Ne of Po(Y,x,e.config.stallThresholds))le.set(Ne.id,Ne.idleDays);return le},[e.tasks,e.config.stallThresholds,x]),Yt=e.config.columns.filter(Y=>{var Ne;const le=((Ne=bt.get(Y.id))==null?void 0:Ne.length)??0;return!(Y.hideWhenEmpty&&le===0)}),ye=async(Y,le,Ne)=>{try{await z_({id:Y,status:le,...Ne}),r()}catch(Xe){s(Xe instanceof Error?Xe.message:g("move.error"))}},Ce=async Y=>{try{await $_(Y.frontmatter.id),r()}catch(le){s(le instanceof Error?le.message:g("proposal.approve.error"))}},$=async(Y,le)=>{try{await B_(Y,le),r()}catch(Ne){s(Ne instanceof Error?Ne.message:g("proposal.reject.error"))}},Z=async Y=>{try{await Vp(Y.frontmatter.id),r()}catch(le){s(le instanceof Error?le.message:g("archive.error"))}},q=async(Y,le,Ne)=>{try{await Rg(Y,le.length>0?le:void 0,Ne),r()}catch(Xe){Xe instanceof Gn?(s(g("revise.conflict")),r()):s(Xe instanceof Error?Xe.message:g("revise.error"))}},we=async()=>{if(Mt.length!==0&&!(typeof window<"u"&&!window.confirm(g("archive.confirm",{n:Mt.length})))){for(const Y of Mt)try{await Vp(Y.frontmatter.id)}catch(le){s(le instanceof Error?le.message:g("archive.error"));break}r()}},Ve=()=>{ee(Y=>(Y&&(N(new Set),F(null)),!Y))},st=Y=>{const le=Y.frontmatter.id;N(Ne=>{const Xe=new Set(Ne);return Xe.has(le)?Xe.delete(le):Xe.add(le),Xe})},Ot=()=>{N(new Set),F(null)},Ut=async()=>{if(fe.size===0)return;const Y=e.tasks.filter(Xe=>fe.has(Xe.frontmatter.id)).map(Xe=>({id:Xe.frontmatter.id,dependsOn:Xe.frontmatter.depends_on})),le=tT(Y,e.config.instructionTemplate,{wrapper:g("bulkInstruction.wrapper")}),Ne=await Ss(le);F(Ne?"done":"failed"),window.setTimeout(()=>F(null),2e3)},yn=async()=>{const Y=g("board.empty.aiInstruction"),le=await Ss(Y);ce(le?"done":"failed"),window.setTimeout(()=>ce(null),2e3)},vn=Y=>{var ot;const{active:le,over:Ne}=Y;if(!Ne)return;const Xe=Ne.id,Tn=(ot=le.data.current)==null?void 0:ot.status;if(Xe===Tn)return;const vt=e.tasks.find(Et=>Et.frontmatter.id===le.id);if(vt){if(Xe==="pending"){k({task:vt});return}ye(String(le.id),Xe)}};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:ft.filterBar,children:[u.jsx("input",{className:ft.search,value:T,onChange:Y=>M(Y.target.value),placeholder:g("search.placeholder"),"aria-label":g("search.placeholder")}),u.jsxs("select",{value:I,onChange:Y=>j(Y.target.value),"aria-label":g("search.label"),children:[u.jsxs("option",{value:"",children:[g("search.label"),": ",g("search.all")]}),Kt.map(Y=>u.jsx("option",{value:Y,children:Y},Y))]}),u.jsxs("select",{value:B,onChange:Y=>Q(Y.target.value),"aria-label":g("search.assignee"),children:[u.jsxs("option",{value:"",children:[g("search.assignee"),": ",g("search.all")]}),e.config.members.map(Y=>u.jsx("option",{value:Y.id,children:Y.label??Y.id},Y.id))]}),m&&u.jsx("button",{type:"button",className:`${ft.assignedToMeBtn} ${W?ft.assignedToMeBtnOn:""}`,"aria-pressed":W,onClick:()=>ne(Y=>!Y),children:g("filter.assignedToMe")}),u.jsx("span",{className:ft.filterSpacer}),u.jsx("button",{type:"button",className:`${ft.selectModeBtn} ${ve?ft.selectModeBtnOn:""}`,"aria-pressed":ve,onClick:Ve,children:g(ve?"bulkInstruction.exit":"bulkInstruction.select")}),Mt.length>0&&u.jsx("button",{type:"button",className:ft.archiveAllBtn,onClick:()=>void we(),children:g("archive.archiveDone")})]}),ve&&u.jsxs("div",{className:ft.selectBar,role:"toolbar","aria-label":g("bulkInstruction.select"),children:[u.jsx("span",{className:ft.selectCount,children:g("bulkInstruction.selectedCount",{n:fe.size})}),u.jsx("button",{type:"button",className:ft.bulkCopyBtn,disabled:fe.size===0,onClick:()=>void Ut(),children:g(P==="done"?"bulkInstruction.copied":P==="failed"?"bulkInstruction.copyFailed":"bulkInstruction.copy")}),u.jsx("button",{type:"button",className:ft.selectClearBtn,disabled:fe.size===0,onClick:Ot,children:g("bulkInstruction.clear")}),u.jsx("span",{className:ft.selectHint,children:g("bulkInstruction.hint")})]}),u.jsxs("div",{className:ft.viewsBar,children:[Se.map((Y,le)=>u.jsxs("span",{className:ft.chip,children:[u.jsx("button",{type:"button",className:`${ft.chipApply} ${le===Ge?ft.chipActive:""}`,"aria-pressed":le===Ge,onClick:()=>ge(Y),children:Y.name}),u.jsx("button",{type:"button",className:ft.chipDelete,"aria-label":g("savedView.delete",{name:Y.name}),title:g("savedView.delete",{name:Y.name}),disabled:X,onClick:()=>void Zt(le),children:"×"})]},`${Y.name}-${le}`)),_e===null?u.jsx("button",{type:"button",className:ft.saveViewBtn,disabled:!wt,title:g(wt?"savedView.save":"savedView.saveHint"),onClick:()=>ie(""),children:g("savedView.save")}):u.jsxs("form",{className:ft.saveViewForm,onSubmit:Y=>{Y.preventDefault(),tn(_e)},children:[u.jsx("input",{className:ft.saveViewInput,value:_e,autoFocus:!0,placeholder:g("savedView.namePlaceholder"),"aria-label":g("savedView.namePlaceholder"),onChange:Y=>ie(Y.target.value),onKeyDown:Y=>{Y.key==="Escape"&&(Y.preventDefault(),ie(null))}}),u.jsx("button",{type:"submit",className:ft.saveViewConfirm,disabled:_e.trim()===""||X,children:g(X?"common.saving":"common.save")}),u.jsx("button",{type:"button",className:ft.saveViewCancel,onClick:()=>ie(null),children:g("common.cancel")})]})]}),e.tasks.length===0?u.jsx("div",{className:ft.emptyBoard,children:u.jsxs("div",{className:ft.emptyCard,children:[u.jsx("h2",{className:ft.emptyTitle,children:g("board.empty.title")}),u.jsx("p",{className:ft.emptyLead,children:g("board.empty.lead")}),f&&u.jsx("button",{type:"button",className:ft.emptyAddBtn,onClick:f,children:g("board.empty.addFirst")}),u.jsxs("div",{className:ft.emptyAi,children:[u.jsx("p",{className:ft.emptyAiNote,children:g("board.empty.aiNote")}),u.jsx("button",{type:"button",className:ft.emptyCopyBtn,onClick:()=>void yn(),children:g(E==="done"?"board.empty.copied":E==="failed"?"board.empty.copyFailed":"board.empty.copyInstruction")})]})]})}):u.jsx(jE,{sensors:de,onDragEnd:vn,children:u.jsx("div",{className:ft.board,ref:ke.ref,...ke.handlers,children:Yt.map(Y=>u.jsx(MI,{column:Y,tasks:bt.get(Y.id)??[],memberType:Nt,memberLabel:Lt,now:x,stalledById:yt,unreadIds:l,onOpen:t,onApprove:le=>void Ce(le),onReject:le=>D(le),onArchive:le=>void Z(le),onRevise:le=>R(le),members:e.config.members,pinnedIds:p,onTogglePin:y,selectionMode:ve,selectedIds:fe,onToggleSelect:st},Y.id))})}),_&&u.jsx(fT,{taskTitle:_.task.frontmatter.title,onCancel:()=>k(null),onConfirm:(Y,le)=>{const Ne=_.task.frontmatter.id;k(null),ye(Ne,"pending",{blocked_type:Y,blocked_reason:le})}}),C&&u.jsx(OI,{taskTitle:C.frontmatter.title,onCancel:()=>D(null),onConfirm:Y=>{const le=C.frontmatter.id;D(null),$(le,Y)}}),S&&u.jsx(wv,{taskTitle:S.frontmatter.title,onCancel:()=>R(null),onConfirm:Y=>{const le=S.frontmatter.id,Ne=S.mtimeMs;R(null),q(le,Y,Ne)}})]})}const bv=[{id:"home",labelKey:"view.home"},{id:"board",labelKey:"view.board"},{id:"critical",labelKey:"view.critical"},{id:"milestones",labelKey:"view.milestones"},{id:"digest",labelKey:"view.digest"},{id:"docs",labelKey:"view.docs"},{id:"archive",labelKey:"view.archive"},{id:"trash",labelKey:"view.trash"},{id:"stats",labelKey:"view.stats"},{id:"files",labelKey:"view.files"}],ko=bv.map(e=>e.id),y2=new Map(bv.map(e=>[e.id,e.labelKey]));function nf(e){return y2.get(e)}function Sv(e,t){const r=new Set(e),s=new Set,l=[];for(const a of t)!r.has(a.id)||s.has(a.id)||(s.add(a.id),l.push({id:a.id,hidden:a.hidden??!1}));for(const a of e)s.has(a)||l.push({id:a,hidden:!1});return l}function Cv(e,t){return Sv(e,t).filter(r=>!r.hidden).map(r=>r.id)}const v2="_overlay_dbkt0_1",x2="_palette_dbkt0_12",_2="_input_dbkt0_24",k2="_list_dbkt0_39",w2="_option_dbkt0_46",b2="_optionActive_dbkt0_56",S2="_empty_dbkt0_61",Li={overlay:v2,palette:x2,input:_2,list:k2,option:w2,optionActive:b2,empty:S2},C2=8;function N2({board:e,onClose:t,onSelectView:r,onOpenAdd:s,onOpenSettings:l,onOpenTask:a,onApplySavedView:c}){const{t:f}=pt(),[m,p]=w.useState(""),[y,g]=w.useState(0),[x]=w.useState(()=>Date.now()),_=w.useRef(null),k=w.useRef(null),C=w.useRef(null);bo(C),w.useEffect(()=>{var j;const I=document.activeElement;return(j=_.current)==null||j.focus(),()=>{var B;return(B=I==null?void 0:I.focus)==null?void 0:B.call(I)}},[]);const D=w.useMemo(()=>{const I=e.tasks.map(j=>({id:j.frontmatter.id,title:j.frontmatter.title,status:j.frontmatter.status,updated:j.frontmatter.updated,body:j.body}));return Po(I,x,e.config.stallThresholds).map(j=>({id:`stalled:${j.id}`,kind:"task",label:f("stalled.palette",{id:j.id,title:j.title}),taskId:j.id}))},[e.tasks,e.config.stallThresholds,x,f]),S=w.useMemo(()=>{const I=m.trim().toLowerCase(),j=W=>I===""||W.toLowerCase().includes(I),Q=[...Cv(ko,e.config.views).filter(W=>W!=="docs"||e.config.docsDirs.length>0).map(W=>({id:`view:${W}`,kind:"view",label:`${f("palette.go")}: ${f(nf(W)??"view.board")}`,view:W})),{id:"action:add",kind:"add",label:f("palette.addTask")},{id:"action:settings",kind:"settings",label:f("palette.settings")},...e.config.savedViews.map((W,ne)=>({id:`savedView:${ne}`,kind:"savedView",label:f("savedView.palette",{name:W.name}),savedView:W})),...D].filter(W=>j(W.label)),te=new Set(Q.filter(W=>W.kind==="task").map(W=>W.taskId)),O=I===""?[]:hv(e.tasks,{query:m,label:"",assignee:""}).filter(W=>!te.has(W.frontmatter.id)).slice(0,C2).map(W=>({id:`task:${W.frontmatter.id}`,kind:"task",label:`${W.frontmatter.id} — ${W.frontmatter.title}`,taskId:W.frontmatter.id}));return[...Q,...O]},[m,e.tasks,e.config.docsDirs,e.config.savedViews,e.config.views,D,f]);w.useEffect(()=>{g(0)},[m]),w.useEffect(()=>{var j;const I=(j=k.current)==null?void 0:j.querySelector(`[data-idx="${y}"]`);I==null||I.scrollIntoView({block:"nearest"})},[y]);const R=I=>{if(I){switch(I.kind){case"view":r(I.view);break;case"add":s();break;case"settings":l();break;case"task":a(I.taskId);break;case"savedView":c(I.savedView);break}t()}},T=I=>{I.nativeEvent.isComposing||(I.key==="Escape"?(I.preventDefault(),I.stopPropagation(),t()):I.key==="ArrowDown"?(I.preventDefault(),I.stopPropagation(),g(j=>S.length===0?0:(j+1)%S.length)):I.key==="ArrowUp"?(I.preventDefault(),I.stopPropagation(),g(j=>S.length===0?0:(j-1+S.length)%S.length)):I.key==="Enter"&&(I.preventDefault(),I.stopPropagation(),R(S[y])))},M=S[y]?`cmd-opt-${S[y].id}`:void 0;return u.jsx("div",{className:Li.overlay,onClick:I=>{Cd(I.target,I.currentTarget)&&(I.stopPropagation(),t())},children:u.jsxs("div",{ref:C,className:Li.palette,role:"dialog","aria-modal":"true","aria-label":f("palette.title"),children:[u.jsx("input",{ref:_,className:Li.input,type:"text",role:"combobox","aria-expanded":S.length>0?"true":"false","aria-controls":"cmd-listbox","aria-activedescendant":M,"aria-label":f("palette.title"),placeholder:f("palette.placeholder"),value:m,onChange:I=>p(I.target.value),onKeyDown:T}),S.length===0?u.jsx("p",{className:Li.empty,children:f("palette.empty")}):u.jsx("ul",{id:"cmd-listbox",className:Li.list,role:"listbox","aria-label":f("palette.title"),ref:k,children:S.map((I,j)=>u.jsx("li",{id:`cmd-opt-${I.id}`,"data-idx":j,role:"option","aria-selected":j===y,className:`${Li.option} ${j===y?Li.optionActive:""}`,onMouseDown:B=>{B.preventDefault(),R(I)},onMouseEnter:()=>g(j),children:I.label},I.id))})]})})}const j2="_view_ubr9h_2",E2="_toolbar_ubr9h_12",T2="_cycleWarn_ubr9h_20",I2="_levels_ubr9h_2",D2="_level_ubr9h_2",A2="_levelCycle_ubr9h_55",R2="_levelHeader_ubr9h_60",P2="_levelLabel_ubr9h_69",L2="_levelCount_ubr9h_75",M2="_levelList_ubr9h_85",O2="_node_ubr9h_95",z2="_nodeCp_ubr9h_116",$2="_nodeCycle_ubr9h_121",B2="_statusproposed_ubr9h_127",F2="_statusbacklog_ubr9h_130",H2="_statustodo_ubr9h_133",V2="_statusin_progress_ubr9h_136",U2="_statuspending_ubr9h_139",W2="_nodeTop_ubr9h_143",q2="_nodeId_ubr9h_149",K2="_cpTag_ubr9h_155",Z2="_nodeTitle_ubr9h_161",Y2="_deps_ubr9h_166",Q2="_depsLabel_ubr9h_173",X2="_depChip_ubr9h_178",G2="_pendingBadge_ubr9h_186",J2="_empty_ubr9h_196",eD="_copyBtn_ubr9h_208",_t={view:j2,toolbar:E2,cycleWarn:T2,levels:I2,level:D2,levelCycle:A2,levelHeader:R2,levelLabel:P2,levelCount:L2,levelList:M2,node:O2,nodeCp:z2,nodeCycle:$2,statusproposed:B2,statusbacklog:F2,statustodo:H2,statusin_progress:V2,statuspending:U2,nodeTop:W2,nodeId:q2,cpTag:K2,nodeTitle:Z2,deps:Y2,depsLabel:Q2,depChip:X2,pendingBadge:G2,empty:J2,copyBtn:eD};function tD({board:e,onOpen:t}){const{t:r}=pt(),[s,l]=w.useState(null),a=w.useMemo(()=>e.tasks.filter(_=>_.frontmatter.status!=="done"),[e.tasks]),c=w.useMemo(()=>new Map(a.map(_=>[_.frontmatter.id,_])),[a]),f=w.useMemo(()=>ef(a.map(_=>({id:_.frontmatter.id,dependsOn:_.frontmatter.depends_on}))),[a]),m=w.useMemo(()=>{const _=new Map,k=[];for(const C of f.nodes)if(C.level===null)k.push(C);else{const D=_.get(C.level)??[];D.push(C),_.set(C.level,D)}return{map:_,cyclic:k}},[f.nodes]),p=async()=>{const k=["このプロジェクトのタスク依存関係 (depends_on) を見直し、クリティカルパスを最短化できないか検討してください。","CLAUDE.md の運用規約に従い、各タスクファイルの frontmatter `depends_on` を必要に応じて編集してください。","","現在の未完了タスクと依存:",...a.map(D=>`- ${D.frontmatter.id} (${D.frontmatter.status})`+(D.frontmatter.depends_on.length>0?` depends_on: ${D.frontmatter.depends_on.join(", ")}`:""))].join(`
|
|
87
|
+
`),C=await Ss(k);l(C?"done":"failed"),window.setTimeout(()=>l(null),2e3)},y=[...m.map.keys()].sort((_,k)=>_-k),g=a.length>0,x=_=>{const k=c.get(_.id),C=_.level===null,D=k?_t[`status${k.frontmatter.status}`]:"";return u.jsxs("div",{className:`${_t.node} ${_.onCriticalPath?_t.nodeCp:""} ${C?_t.nodeCycle:D}`,role:"button",tabIndex:0,onClick:()=>k&&t(k),onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&k&&(S.preventDefault(),t(k))},children:[u.jsxs("div",{className:_t.nodeTop,children:[u.jsx("span",{className:_t.nodeId,children:_.id}),_.onCriticalPath&&u.jsxs("span",{className:_t.cpTag,children:["★ ",r("cp.criticalPath")]})]}),u.jsx("div",{className:_t.nodeTitle,children:(k==null?void 0:k.frontmatter.title)??_.id}),(k==null?void 0:k.frontmatter.status)==="pending"&&u.jsx("span",{className:_t.pendingBadge,children:r("status.pending")}),_.dependsOn.length>0&&u.jsxs("div",{className:_t.deps,children:[u.jsx("span",{className:_t.depsLabel,children:r("cp.dependsOn")}),_.dependsOn.map(S=>u.jsx("span",{className:_t.depChip,children:S},S))]})]},_.id)};return u.jsxs("div",{className:_t.view,children:[u.jsx("div",{className:_t.toolbar,children:u.jsx("button",{type:"button",className:_t.copyBtn,onClick:()=>void p(),disabled:!g,children:r(s==="done"?"cp.copied":s==="failed"?"cp.copyFailed":"cp.copyReorg")})}),f.cycleNodes.length>0&&u.jsxs("div",{className:_t.cycleWarn,role:"alert",children:["⚠ ",r("cp.cycleWarning",{ids:f.cycleNodes.join(", ")})]}),g?u.jsxs("div",{className:_t.levels,children:[y.map(_=>{const k=m.map.get(_)??[];return u.jsxs("div",{className:_t.level,children:[u.jsxs("div",{className:_t.levelHeader,children:[u.jsx("span",{className:_t.levelLabel,children:r("cp.level",{n:_})}),u.jsx("span",{className:_t.levelCount,children:k.length})]}),u.jsx("div",{className:_t.levelList,children:k.map(x)})]},_)}),m.cyclic.length>0&&u.jsxs("div",{className:`${_t.level} ${_t.levelCycle}`,children:[u.jsxs("div",{className:_t.levelHeader,children:[u.jsxs("span",{className:_t.levelLabel,children:["⚠ ",r("cp.cycleLevel")]}),u.jsx("span",{className:_t.levelCount,children:m.cyclic.length})]}),u.jsx("div",{className:_t.levelList,children:m.cyclic.map(x)})]})]}):u.jsx("div",{className:_t.empty,children:r("cp.empty")})]})}const nD="_root_y75j1_1",rD="_badge_y75j1_6",iD="_badgeActive_y75j1_28",sD="_badgeMuted_y75j1_39",lD="_badgeDot_y75j1_51",aD="_popover_y75j1_62",oD="_popoverTitle_y75j1_77",cD="_empty_y75j1_84",uD="_list_y75j1_90",dD="_item_y75j1_99",fD="_itemHead_y75j1_124",mD="_itemId_y75j1_130",pD="_itemTitle_y75j1_137",hD="_itemReason_y75j1_143",gD="_itemReasonMuted_y75j1_148",yD="_itemAssignee_y75j1_154",Cn={root:nD,badge:rD,badgeActive:iD,badgeMuted:sD,badgeDot:lD,popover:aD,popoverTitle:oD,empty:cD,list:uD,item:dD,itemHead:fD,itemId:mD,itemTitle:pD,itemReason:hD,itemReasonMuted:gD,itemAssignee:yD};function vD({board:e,onOpenTask:t}){const{t:r}=pt(),[s,l]=w.useState(!1),a=w.useRef(null),c=w.useId(),f=w.useMemo(()=>Es(e.config.members),[e.config.members]),m=w.useMemo(()=>{const g=e.tasks.map(x=>({id:x.frontmatter.id,title:x.frontmatter.title,status:x.frontmatter.status,assignee:x.frontmatter.assignee,blocked_type:x.frontmatter.blocked_type,blocked_reason:x.frontmatter.blocked_reason}));return mv(g)},[e.tasks]),p=m.length;w.useEffect(()=>{p===0&&l(!1)},[p]),w.useEffect(()=>{if(!s)return;const g=_=>{a.current&&!a.current.contains(_.target)&&l(!1)},x=_=>{_.key==="Escape"&&(_.preventDefault(),_.stopPropagation(),l(!1))};return document.addEventListener("pointerdown",g),document.addEventListener("keydown",x,!0),()=>{document.removeEventListener("pointerdown",g),document.removeEventListener("keydown",x,!0)}},[s]);const y=g=>{t(g),l(!1)};return u.jsxs("div",{className:Cn.root,ref:a,children:[u.jsxs("button",{type:"button",className:`${Cn.badge} ${p>0?Cn.badgeActive:Cn.badgeMuted}`,onClick:()=>l(g=>!g),"aria-haspopup":"true","aria-expanded":s,"aria-controls":s?c:void 0,title:r("decisionWaits.open"),children:[u.jsx("span",{className:Cn.badgeDot,"aria-hidden":"true"}),r("decisionWaits.badge",{n:p})]}),s&&u.jsxs("div",{id:c,className:Cn.popover,role:"region","aria-label":r("decisionWaits.title"),children:[u.jsx("h2",{className:Cn.popoverTitle,children:r("decisionWaits.title")}),p===0?u.jsx("p",{className:Cn.empty,children:r("decisionWaits.empty")}):u.jsx("ul",{className:Cn.list,children:m.map(g=>u.jsx("li",{children:u.jsxs("button",{type:"button",className:Cn.item,onClick:()=>y(g.id),children:[u.jsxs("span",{className:Cn.itemHead,children:[u.jsx("span",{className:Cn.itemId,children:g.id}),u.jsx("span",{className:Cn.itemTitle,children:g.title})]}),g.blocked_reason!==null&&g.blocked_reason!==""?u.jsx("span",{className:Cn.itemReason,children:g.blocked_reason}):u.jsx("span",{className:Cn.itemReasonMuted,children:r("decisionWaits.noReason")}),g.assignee!==null&&u.jsxs("span",{className:Cn.itemAssignee,children:[r("decisionWaits.assignee"),": ",f(g.assignee)]})]})},g.id))})]})]})}const xD="_view_71x9d_1",_D="_viewEmpty_71x9d_7",kD="_sidebar_71x9d_19",wD="_sidebarTitle_71x9d_28",bD="_navList_71x9d_34",SD="_navBtn_71x9d_47",CD="_navBtnActive_71x9d_74",ND="_navCount_71x9d_80",jD="_detail_71x9d_90",ED="_day_71x9d_96",TD="_dayHeader_71x9d_100",ID="_date_71x9d_109",DD="_count_71x9d_114",AD="_entry_71x9d_119",RD="_time_71x9d_131",PD="_taskId_71x9d_138",LD="_member_71x9d_145",MD="_memberDot_71x9d_153",OD="_memberhuman_71x9d_159",zD="_memberai_71x9d_163",$D="_memberunknown_71x9d_167",BD="_message_71x9d_171",FD="_empty_71x9d_175",Ft={view:xD,viewEmpty:_D,sidebar:kD,sidebarTitle:wD,navList:bD,navBtn:SD,navBtnActive:CD,navCount:ND,detail:jD,day:ED,dayHeader:TD,date:ID,count:DD,entry:AD,time:RD,taskId:PD,member:LD,memberDot:MD,memberhuman:OD,memberai:zD,memberunknown:$D,message:BD,empty:FD};function HD({board:e}){const{t}=pt(),[r,s]=w.useState([]),[l,a]=w.useState(null);w.useEffect(()=>{let g=!0;const x=new AbortController;return(async()=>{try{const _=await _d(x.signal);g&&s(_.tasks)}catch{g&&s([])}})(),()=>{g=!1,x.abort()}},[e]);const c=w.useMemo(()=>{const g=new Map(e.config.members.map(x=>[x.id,x.type]));return x=>g.get(x)},[e.config.members]),f=w.useMemo(()=>Es(e.config.members),[e.config.members]),m=w.useMemo(()=>{const g=e.tasks.map(k=>({id:k.frontmatter.id,body:k.body})),x=new Set(g.map(k=>k.id)),_=r.filter(k=>!x.has(k.id));return LE([...g,..._])},[e.tasks,r]),p=g=>{const x=c(g);return x==="human"?Ft.memberhuman:x==="ai"?Ft.memberai:Ft.memberunknown},y=m.find(g=>g.date===l)??m[0]??null;return m.length===0||y===null?u.jsx("div",{className:Ft.viewEmpty,children:u.jsx("div",{className:Ft.empty,children:t("digest.empty")})}):u.jsxs("div",{className:Ft.view,children:[u.jsxs("aside",{className:Ft.sidebar,"aria-label":t("digest.days"),children:[u.jsx("p",{className:Ft.sidebarTitle,children:t("digest.days")}),u.jsx("ul",{className:Ft.navList,children:m.map(g=>u.jsx("li",{children:u.jsxs("button",{type:"button",className:`${Ft.navBtn} ${g.date===y.date?Ft.navBtnActive:""}`,onClick:()=>a(g.date),children:[u.jsx("span",{children:g.date}),u.jsx("span",{className:Ft.navCount,children:t("digest.entries",{n:g.entries.length})})]})},g.date))})]}),u.jsx("div",{className:Ft.detail,children:u.jsxs("section",{className:Ft.day,children:[u.jsxs("div",{className:Ft.dayHeader,children:[u.jsx("span",{className:Ft.date,children:y.date}),u.jsx("span",{className:Ft.count,children:t("digest.entries",{n:y.entries.length})})]}),y.entries.map((g,x)=>u.jsxs("div",{className:Ft.entry,children:[u.jsx("span",{className:Ft.time,children:g.time}),u.jsx("span",{className:Ft.taskId,children:g.taskId}),u.jsxs("span",{className:Ft.member,children:[u.jsx("span",{className:`${Ft.memberDot} ${p(g.member)}`,"aria-hidden":"true"}),f(g.member)]}),u.jsx("span",{className:Ft.message,children:g.message})]},x))]})})]})}const VD=/^---[ \t]*\r?\n/,UD=/^---[ \t]*$/,yg="\uFEFF";function WD(e,t){const r=e.startsWith(yg),s=r?e.slice(1):e,l=t(s);return r?yg+l:l}function qD(e){if(!VD.test(e))return null;const t=e.split(`
|
|
88
|
+
`);let r=-1;for(let s=1;s<t.length;s++)if(UD.test(t[s].replace(/\r$/,""))){r=s;break}return r===-1?null:{lines:t,closeIdx:r}}function KD(e,t,r){const s=new RegExp(`^${r}\\s*:`),l=[];let a=1;for(;a<t;){const c=e[a].replace(/\r$/,"");if(s.test(c)){for(a++;a<t&&/^\s*-\s/.test(e[a].replace(/\r$/,""));)a++;continue}l.push(e[a]),a++}return l}function ZD(e,t,r,s){if(s!==null){const c=r.findIndex(f=>/^created\s*:/.test(f.replace(/\r$/,"")));c!==-1?r.splice(c,0,s):r.push(s)}const l=[e[0],...r].join(`
|
|
89
|
+
`),a=e.slice(t).join(`
|
|
90
|
+
`);return`${l}
|
|
91
|
+
${a}`}function rf(e,t,r){return WD(e,s=>{const l=qD(s);if(!l)return s;const{lines:a,closeIdx:c}=l,f=KD(a,c,t),m=r!==null?`${t}: ${r}`:null;return ZD(a,c,f,m)})}function YD(e,t){const r=t.length>0?`[${t.map(s=>JSON.stringify(s)).join(", ")}]`:null;return rf(e,"depends_on",r)}function QD(e,t){return rf(e,"priority",t)}function XD(e,t){return e.filter(r=>(r.related_docs??[]).includes(t)).map(({id:r,title:s,status:l})=>({id:r,title:s,status:l})).sort((r,s)=>r.id.localeCompare(s.id,"en",{numeric:!0}))}function GD(e,t){const r=t.length>0?`[${t.map(s=>JSON.stringify(s)).join(", ")}]`:null;return rf(e,"related_docs",r)}const JD=/^---[ \t]*\r?\n/,eA=/^---[ \t]*$/,tA="\uFEFF";function Uu(e){const r=e.startsWith(tA)?e.slice(1):e;if(!JD.test(r))return e;const s=r.split(`
|
|
92
|
+
`);for(let l=1;l<s.length;l++)if(eA.test(s[l].replace(/\r$/,"")))return s.slice(l+1).join(`
|
|
93
|
+
`).replace(/^\r?\n/,"");return e}const nA=25e4;function Nv(e,t){const r=e.split(`
|
|
94
|
+
`),s=t.split(`
|
|
95
|
+
`),l=r.length,a=s.length;if(l*a>nA){const y=[];for(const g of r)y.push({op:"remove",text:g});for(const g of s)y.push({op:"add",text:g});return y}const c=Array.from({length:l+1},()=>new Array(a+1).fill(0));for(let y=l-1;y>=0;y--)for(let g=a-1;g>=0;g--)c[y][g]=r[y]===s[g]?c[y+1][g+1]+1:Math.max(c[y+1][g],c[y][g+1]);const f=[];let m=0,p=0;for(;m<l&&p<a;)r[m]===s[p]?(f.push({op:"equal",text:r[m]}),m++,p++):c[m+1][p]>=c[m][p+1]?(f.push({op:"remove",text:r[m]}),m++):(f.push({op:"add",text:s[p]}),p++);for(;m<l;)f.push({op:"remove",text:r[m++]});for(;p<a;)f.push({op:"add",text:s[p++]});return f}const rA="_diff_1xtfr_1",iA="_line_1xtfr_12",sA="_sign_1xtfr_19",lA="_equal_1xtfr_25",aA="_add_1xtfr_29",oA="_remove_1xtfr_34",ms={diff:rA,line:iA,sign:sA,equal:lA,add:aA,remove:oA};function jv({before:e,after:t,ariaLabel:r}){const s=w.useMemo(()=>Nv(e,t),[e,t]);return u.jsx("div",{className:ms.diff,role:"region","aria-label":r,children:s.map((l,a)=>u.jsxs("div",{className:`${ms.line} ${l.op==="add"?ms.add:l.op==="remove"?ms.remove:ms.equal}`,children:[u.jsx("span",{className:ms.sign,children:l.op==="add"?"+":l.op==="remove"?"-":" "}),u.jsx("span",{children:l.text})]},a))})}const cA="_intro_u1sm3_1",uA="_legend_u1sm3_8",vg={intro:cA,legend:uA};function Ev({serverContent:e,localContent:t,onClose:r,onOverwrite:s,onReload:l}){const{t:a}=pt();return u.jsxs(Ur,{title:a("conflict.title"),onClose:r,wide:!0,children:[u.jsx("p",{className:vg.intro,children:a("conflict.intro")}),u.jsx(jv,{before:e,after:t,ariaLabel:a("conflict.diffAria")}),u.jsxs("p",{className:vg.legend,children:[u.jsx("span",{children:a("conflict.legend.add")}),u.jsx("span",{children:a("conflict.legend.remove")})]}),u.jsxs("div",{className:re.actions,children:[u.jsx("button",{type:"button",className:re.btn,onClick:l,children:a("conflict.reload")}),u.jsx("button",{type:"button",className:`${re.btn} ${re.btnDanger}`,onClick:s,children:a("conflict.overwrite")})]})]})}const dA="_dirList_82mry_1",fA="_dirBtn_82mry_12",mA="_dirBtnActive_82mry_30",pA="_preview_82mry_36",ps={dirList:dA,dirBtn:fA,dirBtnActive:mA,preview:pA};function hA(e){const t=[],r=s=>{for(const l of s)l.type==="dir"&&(t.push(l.path),l.children&&r(l.children))};return r(e),t.sort((s,l)=>s.localeCompare(l,"en"))}function gA(e){const t=e.trim().replace(/[/\\]/g,"").replace(/ /g,"");return t.length===0?"":t.toLowerCase().endsWith(".md")?t:`${t}.md`}function yA({onCancel:e,onConfirm:t}){const{t:r}=pt(),[s,l]=w.useState(null),[a,c]=w.useState(!1),[f,m]=w.useState(null),[p,y]=w.useState(""),[g,x]=w.useState("");w.useEffect(()=>{let R=!0;return(async()=>{try{const T=await K_();if(!R)return;l(T);const M=T.find(I=>I.type==="dir");m(M?M.path:"")}catch{R&&c(!0)}})(),()=>{R=!1}},[]);const _=w.useMemo(()=>s?hA(s):[],[s]),k=gA(g),C=p.trim().replace(/[/\\]/g,"").replace(/ /g,""),D=[f??"",C,k].filter(R=>R.length>0).join("/"),S=k.length>0&&f!==null;return u.jsxs(Ur,{title:r("docsSave.title"),onClose:e,children:[a&&u.jsx("p",{className:re.error,children:r("docs.treeError")}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,children:r("docsSave.parent")}),s===null?u.jsx("p",{className:re.label,children:r("board.loading")}):u.jsxs("ul",{className:ps.dirList,"aria-label":r("docsSave.parent"),children:[u.jsx("li",{children:u.jsx("button",{type:"button",className:`${ps.dirBtn} ${f===""?ps.dirBtnActive:""}`,"aria-current":f===""?"true":void 0,onClick:()=>m(""),children:r("docsSave.parentRoot")})}),_.map(R=>u.jsx("li",{children:u.jsx("button",{type:"button",className:`${ps.dirBtn} ${f===R?ps.dirBtnActive:""}`,"aria-current":f===R?"true":void 0,onClick:()=>m(R),children:R})},R))]})]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"doc-new-folder",children:r("docsSave.newFolder")}),u.jsx("input",{id:"doc-new-folder",className:re.input,value:p,onChange:R=>y(R.target.value.replace(/[\r\n]/g,"")),placeholder:r("docsSave.newFolder.placeholder")})]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"doc-file-name",children:r("docsSave.fileName")}),u.jsx("input",{id:"doc-file-name",className:re.input,value:g,onChange:R=>x(R.target.value.replace(/[\r\n]/g,"")),placeholder:r("docsSave.fileName.placeholder"),autoFocus:!0})]}),D.length>0&&u.jsx("p",{className:ps.preview,children:D}),u.jsxs("div",{className:re.actions,children:[u.jsx("button",{type:"button",className:re.btn,onClick:e,children:r("common.cancel")}),u.jsx("button",{type:"button",className:`${re.btn} ${re.btnPrimary}`,onClick:()=>t(D),disabled:!S,children:r("docsSave.confirm")})]})]})}function*vA(e){let t=0;for(;t<e.length;){const r=e.indexOf(`
|
|
96
|
+
`,t);if(r===-1){yield{line:e.slice(t),nl:""};break}yield{line:e.slice(t,r),nl:`
|
|
97
|
+
`},t=r+1}}const xA=[{re:/\[([^\]]*)\]\([^)]*\)/,type:"link"},{re:/`[^`]+`/,type:"code"},{re:/\*\*[^*]+\*\*|__[^_]+__/,type:"bold"},{re:/\*[^*]+\*|_[^_]+_/,type:"italic"}];function Wu(e){if(e.length===0)return[];const t=[];let r=e;for(;r.length>0;){let s=-1,l=0,a="text";for(const{re:c,type:f}of xA){const m=c.exec(r);m!==null&&(s===-1||m.index<s)&&(s=m.index,l=m[0].length,a=f)}if(s===-1){t.push({text:r,type:"text"});break}s>0&&t.push({text:r.slice(0,s),type:"text"}),t.push({text:r.slice(s,s+l),type:a}),r=r.slice(s+l)}return t}const _A=/^#{1,6} /,kA=/^(\s*)([-*+])(\s+)/,wA=/^(\s*)(\d+[.)])(\s+)/,bA=/^>/,SA=/^\s*(---+|\*\*\*+|___+)\s*$/,CA=/^```/;function NA(e){if(e.length===0)return[];const t=[];let r=!1;for(const{line:s,nl:l}of vA(e)){const a=l;if(CA.test(s)){t.push({text:s+a,type:"fence"}),r=!r;continue}if(r){t.push({text:s+a,type:"codeblock"});continue}if(SA.test(s)){t.push({text:s+a,type:"hr"});continue}if(_A.test(s)){t.push({text:s+a,type:"heading"});continue}if(bA.test(s)){t.push({text:s+a,type:"blockquote"});continue}const c=kA.exec(s);if(c!==null){const p=c[1]+c[2]+c[3];t.push({text:p,type:"listMarker"});const y=s.slice(p.length);t.push(...Wu(y)),a&&t.push({text:a,type:"text"});continue}const f=wA.exec(s);if(f!==null){const p=f[1]+f[2]+f[3];t.push({text:p,type:"listMarker"});const y=s.slice(p.length);t.push(...Wu(y)),a&&t.push({text:a,type:"text"});continue}const m=Wu(s);t.push(...m),a&&t.push({text:a,type:"text"})}return t}const jA="_wrapper_e02fo_5",EA="_highlight_e02fo_6",TA="_textarea_e02fo_7",IA="_tokenText_e02fo_106",DA="_tokenHeading_e02fo_111",AA="_tokenBold_e02fo_116",RA="_tokenItalic_e02fo_121",PA="_tokenCode_e02fo_126",LA="_tokenCodeblock_e02fo_133",MA="_tokenFence_e02fo_138",OA="_tokenListMarker_e02fo_143",zA="_tokenLink_e02fo_149",$A="_tokenBlockquote_e02fo_155",BA="_tokenHr_e02fo_161",Ga={wrapper:jA,highlight:EA,textarea:TA,tokenText:IA,tokenHeading:DA,tokenBold:AA,tokenItalic:RA,tokenCode:PA,tokenCodeblock:LA,tokenFence:MA,tokenListMarker:OA,tokenLink:zA,tokenBlockquote:$A,tokenHr:BA};function FA(e){return e.endsWith(`
|
|
98
|
+
`)?e+" ":e}const HA={text:"tokenText",heading:"tokenHeading",bold:"tokenBold",italic:"tokenItalic",code:"tokenCode",codeblock:"tokenCodeblock",listMarker:"tokenListMarker",link:"tokenLink",blockquote:"tokenBlockquote",hr:"tokenHr",fence:"tokenFence"};function VA({value:e,onChange:t,ariaLabel:r,placeholder:s,id:l}){const a=w.useRef(null),c=p=>{a.current&&(a.current.scrollTop=p.currentTarget.scrollTop,a.current.scrollLeft=p.currentTarget.scrollLeft)},f=FA(e),m=NA(f);return u.jsxs("div",{className:Ga.wrapper,children:[u.jsx("pre",{ref:a,"aria-hidden":"true",className:Ga.highlight,children:m.map((p,y)=>u.jsx("span",{className:Ga[HA[p.type]],children:p.text},y))}),u.jsx("textarea",{id:l,className:Ga.textarea,value:e,onChange:p=>t(p.target.value),onScroll:c,spellCheck:!1,"aria-label":r,placeholder:s})]})}const UA="_view_hliei_1",WA="_tree_hliei_8",qA="_treeTitle_hliei_17",KA="_treeRoot_hliei_23",ZA="_treeChildren_hliei_24",YA="_dirName_hliei_34",QA="_fileBtn_hliei_42",XA="_fileBtnActive_hliei_67",GA="_detail_hliei_78",JA="_docPath_hliei_85",eR="_refs_hliei_92",tR="_refsTitle_hliei_100",nR="_refsList_hliei_106",rR="_refBtn_hliei_115",iR="_refId_hliei_139",sR="_refStatus_hliei_146",lR="_markdown_hliei_153",aR="_muted_hliei_172",oR="_broken_hliei_177",cR="_error_hliei_182",uR="_newDocBtn_hliei_188",dR="_toolbar_hliei_201",fR="_toolBtn_hliei_209",mR="_toolBtnPrimary_hliei_221",pR="_toolBtnDanger_hliei_228",hR="_confirm_hliei_234",gR="_tabs_hliei_242",yR="_tab_hliei_242",vR="_tabActive_hliei_260",xR="_editorWrapper_hliei_266",_R="_splitView_hliei_273",kR="_splitPane_hliei_278",wR="_splitPreview_hliei_282",bR="_editFooter_hliei_299",SR="_dirty_hliei_307",He={view:UA,tree:WA,treeTitle:qA,treeRoot:KA,treeChildren:ZA,dirName:YA,fileBtn:QA,fileBtnActive:XA,detail:GA,docPath:JA,refs:eR,refsTitle:tR,refsList:nR,refBtn:rR,refId:iR,refStatus:sR,markdown:lR,muted:aR,broken:oR,error:cR,newDocBtn:uR,toolbar:dR,toolBtn:fR,toolBtnPrimary:mR,toolBtnDanger:pR,confirm:hR,tabs:gR,tab:yR,tabActive:vR,editorWrapper:xR,splitView:_R,splitPane:kR,splitPreview:wR,editFooter:bR,dirty:SR};function CR({board:e,onOpen:t,docsWriteEnabled:r,onCreateTaskFromDoc:s}){const{t:l}=pt(),[a,c]=w.useState(null),[f,m]=w.useState(!1),[p,y]=w.useState(null),[g,x]=w.useState(null),[_,k]=w.useState(null),C=w.useRef(null),[D,S]=w.useState("split"),[R,T]=w.useState(""),[M,I]=w.useState(null),[j,B]=w.useState(!1),[Q,te]=w.useState(!1),[O,W]=w.useState(null),[ne,_e]=w.useState(!1),[ie,X]=w.useState(!1),J=w.useMemo(()=>Ll(l,e.config.columns),[l,e.config.columns]);w.useEffect(()=>{let de=!0;const ke=new AbortController;return(async()=>{try{const Nt=await Pg(ke.signal);de&&(c(Nt),m(!1))}catch{de&&m(!0)}})(),()=>{de=!1,ke.abort()}},[e]);const ve=async de=>{if(!(fe&&typeof window<"u"&&!window.confirm(l("docsEdit.dirtyConfirm")))){y(de),C.current=de,x(null),k(null),X(!1),S("split"),_e(!1);try{const ke=await Lg(de);if(C.current!==de)return;x(ke),T(ke.content),I(ke.mtimeMs)}catch(ke){if(C.current!==de)return;ke instanceof er&&(ke.status===404||ke.status===403)?x("broken"):k(ke instanceof Error?ke.message:l("docs.loadError"))}}},ee=g!==null&&g!=="broken"?g:null,fe=ie?R.trim().length>0:ee!==null&&R!==ee.content,N=()=>{fe&&typeof window<"u"&&!window.confirm(l("docsEdit.dirtyConfirm"))||(y(null),C.current=null,x(null),k(null),X(!0),T(""),I(null),S("split"),_e(!1))},P=async(de=M)=>{if(!(p===null||de===null)){B(!0),k(null);try{const ke=await Y_(p,R,de);x({path:ke.path,content:R,mtimeMs:ke.mtimeMs}),I(ke.mtimeMs),W(null),S("split")}catch(ke){ke instanceof Gn?W({serverContent:ke.serverContent,serverMtimeMs:ke.serverMtimeMs}):k(ke instanceof Error?ke.message:l("detail.saveError"))}finally{B(!1)}}},F=async de=>{te(!1),B(!0),k(null);try{const ke=await Z_(de,R);X(!1),y(ke.path),C.current=ke.path,x({path:ke.path,content:R,mtimeMs:ke.mtimeMs}),I(ke.mtimeMs),S("split")}catch(ke){k(ke instanceof Error?ke.message:l("detail.saveError"))}finally{B(!1)}},E=async()=>{if(p!==null){B(!0),k(null);try{await Q_(p),_e(!1),y(null),C.current=null,x(null),T(""),I(null)}catch(de){k(de instanceof Error?de.message:l("detail.saveError"))}finally{B(!1)}}},ce=w.useMemo(()=>p===null?[]:XD(e.tasks.map(de=>({id:de.frontmatter.id,title:de.frontmatter.title,status:de.frontmatter.status,related_docs:de.frontmatter.related_docs})),p),[e.tasks,p]),Se=w.useMemo(()=>new Map(e.tasks.map(de=>[de.frontmatter.id,de])),[e.tasks]),ge=de=>u.jsx("li",{children:de.type==="dir"?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:He.dirName,children:de.name}),de.children&&de.children.length>0&&u.jsx("ul",{className:He.treeChildren,children:de.children.map(ge)})]}):u.jsx("button",{type:"button",className:`${He.fileBtn} ${p===de.path?He.fileBtnActive:""}`,onClick:()=>void ve(de.path),"aria-current":p===de.path?"true":void 0,children:de.name})},de.path),xe=u.jsxs(u.Fragment,{children:[u.jsx("div",{className:He.editorWrapper,children:u.jsx(VA,{value:R,onChange:T,ariaLabel:l("docsEdit.editAria")})}),u.jsxs("div",{className:He.editFooter,children:[fe&&u.jsx("span",{className:He.dirty,children:l("detail.dirty")}),!ie&&u.jsx("button",{type:"button",className:He.toolBtn,onClick:()=>{ee&&T(ee.content),k(null)},disabled:!fe||j,children:l("common.discard")}),u.jsx("button",{type:"button",className:`${He.toolBtn} ${He.toolBtnPrimary}`,onClick:()=>ie?te(!0):void P(),disabled:!fe||j,children:l(j?"common.saving":"common.save")})]})]}),ze=u.jsx("div",{className:He.markdown,children:u.jsx(Oi,{remarkPlugins:[zi],children:Uu(R)})});return u.jsxs("div",{className:He.view,children:[u.jsxs("nav",{className:He.tree,"aria-label":l("docs.view.treeTitle"),children:[u.jsx("h2",{className:He.treeTitle,children:l("docs.view.treeTitle")}),r&&u.jsx("button",{type:"button",className:He.newDocBtn,onClick:N,children:l("docsEdit.new")}),f?u.jsx("p",{className:He.error,role:"alert",children:l("docs.treeError")}):a===null?u.jsx("p",{className:He.muted,children:l("board.loading")}):a.length===0?u.jsx("p",{className:He.muted,children:l("docs.pickerEmpty")}):u.jsx("ul",{className:He.treeRoot,children:a.map(ge)})]}),u.jsxs("section",{className:He.detail,"aria-label":l("view.docs"),children:[_&&u.jsx("p",{className:He.error,role:"alert",children:_}),p===null&&!ie?u.jsx("p",{className:He.muted,children:l("docs.view.selectPrompt")}):u.jsxs(u.Fragment,{children:[u.jsx("p",{className:He.docPath,children:ie?l("docsEdit.unsaved"):p}),r&&u.jsxs("div",{className:He.toolbar,children:[!ie&&p!==null&&u.jsx("button",{type:"button",className:He.toolBtn,onClick:()=>s(p),children:l("docsEdit.createTask")}),!ie&&p!==null&&!ne&&u.jsx("button",{type:"button",className:He.toolBtnDanger,onClick:()=>_e(!0),disabled:j,children:l("docsEdit.delete")}),ne&&u.jsxs("span",{className:He.confirm,children:[l("docsEdit.deleteConfirm"),u.jsx("button",{type:"button",className:He.toolBtnDanger,onClick:()=>void E(),disabled:j,children:l("docsEdit.deleteYes")}),u.jsx("button",{type:"button",className:He.toolBtn,onClick:()=>_e(!1),disabled:j,children:l("common.cancel")})]})]}),!ie&&u.jsxs("div",{className:He.refs,children:[u.jsx("h3",{className:He.refsTitle,children:l("docs.view.referencedBy")}),ce.length===0?u.jsx("p",{className:He.muted,children:l("docs.view.noRefs")}):u.jsx("ul",{className:He.refsList,children:ce.map(de=>{const ke=Se.get(de.id);return u.jsx("li",{children:u.jsxs("button",{type:"button",className:He.refBtn,onClick:()=>ke&&t(ke),disabled:!ke,children:[u.jsx("span",{className:He.refId,children:de.id})," ",de.title,u.jsx("span",{className:He.refStatus,children:J(de.status)})]})},de.id)})})]}),r?u.jsxs(u.Fragment,{children:[u.jsxs("nav",{className:He.tabs,children:[u.jsx("button",{type:"button",className:`${He.tab} ${D==="split"?He.tabActive:""}`,onClick:()=>S("split"),children:l("detail.tab.split")}),u.jsx("button",{type:"button",className:`${He.tab} ${D==="edit"?He.tabActive:""}`,onClick:()=>S("edit"),children:l("detail.tab.edit")}),u.jsx("button",{type:"button",className:`${He.tab} ${D==="preview"?He.tabActive:""}`,onClick:()=>S("preview"),children:l("detail.tab.preview")})]}),D==="split"?u.jsxs("div",{className:He.splitView,children:[u.jsx("div",{className:He.splitPane,children:xe}),u.jsx("div",{className:`${He.splitPane} ${He.splitPreview}`,children:ze})]}):D==="edit"?xe:u.jsx("div",{className:He.markdown,children:u.jsx(Oi,{remarkPlugins:[zi],children:Uu(ie?R:(ee==null?void 0:ee.content)??R)})})]}):g===null?u.jsx("p",{className:He.muted,children:l("board.loading")}):g==="broken"?u.jsx("p",{className:He.broken,children:l("docs.broken")}):u.jsx("div",{className:He.markdown,children:u.jsx(Oi,{remarkPlugins:[zi],children:Uu(g.content)})})]})]}),O&&u.jsx(Ev,{serverContent:O.serverContent,localContent:R,onClose:()=>W(null),onOverwrite:()=>void P(O.serverMtimeMs),onReload:()=>{T(O.serverContent),I(O.serverMtimeMs),x({path:p??"",content:O.serverContent,mtimeMs:O.serverMtimeMs}),W(null),k(null)}}),Q&&u.jsx(yA,{onCancel:()=>te(!1),onConfirm:de=>void F(de)})]})}const NR="_boundary_xnu0x_1",jR="_title_xnu0x_10",ER="_detail_xnu0x_16",TR="_retry_xnu0x_22",Ja={boundary:NR,title:jR,detail:ER,retry:TR};class IR extends w.Component{constructor(){super(...arguments);Ri(this,"state",{error:null});Ri(this,"handleRetry",()=>{this.setState({error:null})})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,s){console.error("AIzuchi view render error:",r,s.componentStack)}render(){return this.state.error!==null?u.jsxs("div",{className:Ja.boundary,role:"alert",children:[u.jsx("p",{className:Ja.title,children:this.props.title}),u.jsx("p",{className:Ja.detail,children:this.props.detail}),u.jsx("button",{type:"button",className:Ja.retry,onClick:this.handleRetry,children:this.props.retryLabel})]}):this.props.children}}const DR=new Set(["skills","agents","rules"]),AR=new Set(["skill.md","agent.md"]);function RR(e){const t=e.split("/");for(let r=0;r<t.length-1;r++)if(DR.has(t[r]))return t.slice(0,r+2).join("/");return t.slice(0,-1).join("/")||e}function PR(e){const t=[],r=new Map;for(const s of e){const l=RR(s.path);let a=r.get(l);if(!a){const m=l.split("/").pop()??l;a={key:l,name:m,items:[]},r.set(l,a),t.push(l)}const c=s.path.startsWith(`${l}/`)?s.path.slice(l.length+1):s.path.split("/").pop()??s.path;a.items.push({...s,label:c});const f=(s.path.split("/").pop()??"").toLowerCase();AR.has(f)&&s.name&&(a.name=s.name)}return t.map(s=>r.get(s))}function LR(e,t){const r=t.filter(l=>l.type==="ai");return r.length===0?{members:[],noAiMembers:!0}:{members:r.map(l=>{const a=e.filter(m=>MR(m,l.id)),c=new Map;for(const m of a){const p=c.get(m.kind);p?p.push(m):c.set(m.kind,[m])}const f=Array.from(c.entries()).map(([m,p])=>({kind:m,warnings:p}));return{member:l,groups:f,totalWarnings:a.length}}),noAiMembers:!1}}function MR(e,t){switch(e.kind){case"mode_violation":return e.message.includes(`(${t})`);case"unregistered_member":return e.message.includes(`"${t}"`);case"invalid_task":case"duplicate_id":case"invalid_config":return!0;default:return!1}}const OR="_panel_bonm7_3",zR="_title_bonm7_11",$R="_notice_bonm7_19",BR="_memberList_bonm7_25",FR="_memberCard_bonm7_31",HR="_memberHeader_bonm7_38",VR="_memberId_bonm7_45",UR="_badgeOk_bonm7_52",WR="_badgeWarn_bonm7_62",qR="_groupList_bonm7_73",KR="_group_bonm7_73",ZR="_groupKind_bonm7_83",YR="_groupFix_bonm7_89",QR="_warningPaths_bonm7_96",XR="_warningPath_bonm7_96",Nn={panel:OR,title:zR,notice:$R,memberList:BR,memberCard:FR,memberHeader:HR,memberId:VR,badgeOk:UR,badgeWarn:WR,groupList:qR,group:KR,groupKind:ZR,groupFix:YR,warningPaths:QR,warningPath:XR},xg={invalid_task:"aiHealth.kind.invalid_task",duplicate_id:"aiHealth.kind.duplicate_id",unregistered_member:"aiHealth.kind.unregistered_member",invalid_config:"aiHealth.kind.invalid_config",mode_violation:"aiHealth.kind.mode_violation"},GR={invalid_task:"aiHealth.fix.invalid_task",duplicate_id:"aiHealth.fix.duplicate_id",unregistered_member:"aiHealth.fix.unregistered_member",invalid_config:"aiHealth.fix.invalid_config",mode_violation:"aiHealth.fix.mode_violation"};function JR({board:e}){const{t}=pt(),r=w.useMemo(()=>LR(e.warnings,e.config.members),[e.warnings,e.config.members]),s=!r.noAiMembers&&r.members.every(l=>l.totalWarnings===0);return u.jsxs("section",{className:Nn.panel,"aria-label":t("aiHealth.title"),children:[u.jsx("h3",{className:Nn.title,children:t("aiHealth.title")}),r.noAiMembers?u.jsx("p",{className:Nn.notice,children:t("aiHealth.noAiMembers")}):s?u.jsx("p",{className:Nn.notice,children:t("aiHealth.allClear")}):u.jsx("ul",{className:Nn.memberList,"aria-label":t("aiHealth.member"),children:r.members.map(l=>u.jsxs("li",{className:Nn.memberCard,children:[u.jsxs("div",{className:Nn.memberHeader,children:[u.jsx("span",{className:Nn.memberId,children:l.member.label??l.member.id}),l.totalWarnings===0?u.jsx("span",{className:Nn.badgeOk,children:t("aiHealth.noWarnings")}):u.jsx("span",{className:Nn.badgeWarn,children:t("aiHealth.warnings",{n:l.totalWarnings})})]}),l.groups.length>0&&u.jsx("ul",{className:Nn.groupList,"aria-label":l.member.label??l.member.id,children:l.groups.map(a=>u.jsxs("li",{className:Nn.group,children:[u.jsx("div",{className:Nn.groupKind,children:t(xg[a.kind])}),u.jsx("div",{className:Nn.groupFix,children:t(GR[a.kind])}),u.jsx("ul",{className:Nn.warningPaths,"aria-label":t(xg[a.kind]),children:a.warnings.map((c,f)=>u.jsx("li",{className:Nn.warningPath,children:c.path},`${c.path}-${f}`))})]},a.kind))})]},l.member.id))})]})}const eP="_view_7aej0_1",tP="_sidebar_7aej0_7",nP="_sectionTitle_7aej0_15",rP="_fileItem_7aej0_24",iP="_fileItemActive_7aej0_47",sP="_tree_7aej0_53",lP="_treeDir_7aej0_57",aP="_catalogItem_7aej0_63",oP="_catalogName_7aej0_68",cP="_catalogDesc_7aej0_72",uP="_catalogGroup_7aej0_77",dP="_catalogGroupSummary_7aej0_81",fP="_catalogCount_7aej0_98",mP="_main_7aej0_109",pP="_mainHeader_7aej0_117",hP="_mainPath_7aej0_124",gP="_editor_7aej0_131",yP="_notice_7aej0_143",vP="_confirmIntro_7aej0_153",xP="_globalBadge_7aej0_160",_P="_globalWarn_7aej0_172",kP="_footer_7aej0_182",wP="_error_7aej0_189",bP="_loadError_7aej0_195",SP="_saved_7aej0_202",CP="_btn_7aej0_207",NP="_btnPrimary_7aej0_224",jP="_empty_7aej0_245",et={view:eP,sidebar:tP,sectionTitle:nP,fileItem:rP,fileItemActive:iP,tree:sP,treeDir:lP,catalogItem:aP,catalogName:oP,catalogDesc:cP,catalogGroup:uP,catalogGroupSummary:dP,catalogCount:fP,main:mP,mainHeader:pP,mainPath:hP,editor:gP,notice:yP,confirmIntro:vP,globalBadge:xP,globalWarn:_P,footer:kP,error:wP,loadError:bP,saved:SP,btn:CP,btnPrimary:NP,empty:jP};function EP({board:e}){const{t}=pt(),r=e.config.aiConfigPaths,s=e.config.aiConfigPaths.rootFiles,[l,a]=w.useState([]),[c,f]=w.useState([]),[m,p]=w.useState(null),[y,g]=w.useState(""),[x,_]=w.useState(0),[k,C]=w.useState(""),[D,S]=w.useState("idle"),[R,T]=w.useState(null),[M,I]=w.useState(!1),[j,B]=w.useState(!1),[Q,te]=w.useState([]),[O,W]=w.useState(!1),ne=w.useRef(null);w.useEffect(()=>{let F=!0;return(async()=>{try{const[E,ce,Se]=await Promise.all([q_(),Wp(),Wp(!0)]);F&&(a(E),f(ce),te(Se),I(!1))}catch{F&&I(!0)}})(),()=>{F=!1}},[e]);const _e=w.useMemo(()=>m!==null&&s.includes(m),[m,s]),ie=m!==null&&m.endsWith(".json"),X=k!==y,J=async(F,E=!1)=>{const ce=`${E}:${F}`;p(F),W(E),ne.current=ce,T(null),S("idle");try{const Se=await U_(F,E);if(ne.current!==ce)return;g(Se.content),C(Se.content),_(Se.mtimeMs)}catch(Se){if(ne.current!==ce)return;Se instanceof er&&Se.status===404?(g(""),C(""),_(0),T(t("files.notFound"))):(T(Se instanceof Error?Se.message:t("files.loadError")),g(""),C(""))}},ve=()=>{if(m!==null){if(ie)try{JSON.parse(k)}catch{T(t("files.invalidJson"));return}T(null),B(!0)}},ee=async()=>{if(m!==null){B(!1),S("saving"),T(null);try{const F=await W_(m,k,x,O);g(F.content),_(F.mtimeMs),S("saved")}catch(F){S("idle"),F instanceof er&&F.status===409?T(t("files.conflict")):T(F instanceof Error?F.message:t("files.saveError"))}}},fe=(F,E=0)=>F.flatMap(ce=>ce.type==="dir"?[u.jsxs("div",{className:et.treeDir,style:{paddingLeft:E*12},children:[ce.name,"/"]},ce.path),...fe(ce.children??[],E+1)]:[u.jsx("button",{type:"button",className:`${et.fileItem} ${m===ce.path?et.fileItemActive:""}`,style:{paddingLeft:E*12+6},onClick:()=>void J(ce.path),children:ce.name},ce.path)]),N=(F,E,ce)=>u.jsxs("button",{type:"button",className:`${et.fileItem} ${m===F.path&&O===E?et.fileItemActive:""}`,onClick:()=>void J(F.path,E),children:[u.jsx("span",{className:et.catalogName,children:ce?F.label:F.name??F.label}),F.description&&u.jsx("div",{className:et.catalogDesc,children:F.description})]},F.path),P=(F,E)=>PR(F).map(ce=>ce.items.length===1?u.jsx("div",{className:et.catalogItem,children:N(ce.items[0],E,!1)},ce.key):u.jsxs("details",{className:et.catalogGroup,children:[u.jsxs("summary",{className:et.catalogGroupSummary,children:[ce.name," ",u.jsx("span",{className:et.catalogCount,children:ce.items.length})]}),ce.items.map(Se=>N(Se,E,!0))]},ce.key));return u.jsxs("div",{className:et.view,children:[u.jsxs("div",{className:et.sidebar,children:[u.jsx(JR,{board:e}),u.jsx("div",{className:et.sectionTitle,children:t("files.settings")}),[...r.settingsFiles,...s].map(F=>u.jsx("button",{type:"button",className:`${et.fileItem} ${m===F?et.fileItemActive:""}`,onClick:()=>void J(F),children:F},F)),u.jsx("div",{className:et.sectionTitle,children:t("files.browse")}),M&&u.jsx("div",{className:et.loadError,children:t("files.treeLoadError")}),u.jsx("div",{className:et.tree,children:fe(l)}),u.jsx("div",{className:et.sectionTitle,children:t("files.catalog")}),c.length===0?u.jsx("div",{className:et.catalogDesc,children:t("files.catalogEmpty")}):P(c,!1),u.jsx("div",{className:et.sectionTitle,children:t("files.globalCatalog")}),Q.length===0?u.jsx("div",{className:et.catalogDesc,children:t("files.globalCatalogEmpty")}):P(Q,!0)]}),u.jsx("div",{className:et.main,children:m===null?u.jsx("div",{className:et.empty,children:t("files.selectPrompt")}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:et.mainHeader,children:[O&&u.jsx("span",{className:et.globalBadge,children:t("files.globalBadge")}),u.jsx("span",{className:et.mainPath,children:m})]}),u.jsx("textarea",{className:et.editor,value:k,onChange:F=>{C(F.target.value),S("idle")},spellCheck:!1,"aria-label":m}),_e&&u.jsx("div",{className:et.notice,children:t("files.restartNotice")}),u.jsxs("div",{className:et.footer,children:[R&&u.jsx("span",{className:et.error,children:R}),D==="saved"&&!X&&u.jsx("span",{className:et.saved,children:t("files.saved")}),u.jsx("span",{style:{flex:1}}),u.jsx("button",{type:"button",className:et.btn,onClick:()=>void J(m),children:t("files.reload")}),u.jsx("button",{type:"button",className:`${et.btn} ${et.btnPrimary}`,onClick:()=>void ve(),disabled:!X||D==="saving",children:t(D==="saving"?"files.saving":"files.save")})]})]})}),j&&m!==null&&u.jsxs(Ur,{title:t("files.confirmSave.title"),onClose:()=>B(!1),wide:!0,children:[O&&u.jsxs("p",{className:et.globalWarn,children:["⚠ ",t("files.globalWarn")]}),u.jsx("p",{className:et.confirmIntro,children:t("files.confirmSave.intro",{file:m})}),u.jsx(jv,{before:y,after:k,ariaLabel:t("files.confirmSave.diffAria")}),u.jsxs("div",{className:re.actions,children:[u.jsx("button",{type:"button",className:re.btn,onClick:()=>B(!1),children:t("files.confirmSave.cancel")}),u.jsx("button",{type:"button",className:`${re.btn} ${re.btnPrimary}`,onClick:()=>void ee(),children:t("files.confirmSave.confirm")})]})]})]})}function TP(e,t,r,s,l){const a=mv(e.map(k=>k.frontmatter)),c=Po(e.map(k=>({id:k.frontmatter.id,title:k.frontmatter.title,status:k.frontmatter.status,updated:k.frontmatter.updated,body:k.body})),r,s),f=e.filter(k=>k.frontmatter.status!=="done"),m=ef(f.map(k=>({id:k.frontmatter.id,dependsOn:k.frontmatter.depends_on}))),p=m.criticalPath.length>0?m.criticalPath[0]:null,y=new Map;for(const k of e)y.set(k.frontmatter.status,(y.get(k.frontmatter.status)??0)+1);const g=[];for(const k of t){if(k.wipLimit===void 0)continue;const C=y.get(k.id)??0;C>k.wipLimit&&g.push({columnId:k.id,count:C,limit:k.wipLimit})}const x=e.map(k=>k.frontmatter.id).filter(k=>l.has(k)),_=a.length===0&&c.length===0&&g.length===0&&x.length===0;return{decisions:a,stalled:c,criticalPath:m.criticalPath,hasCycle:m.cycleNodes.length>0,nextActionId:p,wipOverflows:g,unreadIds:x,allClear:_}}const Tv="aizuchi.pinnedIds";function IP(){try{if(typeof localStorage>"u")return new Set;const e=localStorage.getItem(Tv);if(e===null)return new Set;const t=JSON.parse(e);if(!Array.isArray(t))return new Set;const r=t.filter(s=>typeof s=="string");return new Set(r)}catch{return new Set}}function DP(e){try{if(typeof localStorage>"u")return;localStorage.setItem(Tv,JSON.stringify([...e]))}catch{}}function AP(e,t){const r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}function RP(e,t){return t.filter(r=>e.has(r.frontmatter.id)&&r.frontmatter.status!=="done")}const PP="_home_26qsz_1",LP="_intro_26qsz_8",MP="_title_26qsz_14",OP="_lead_26qsz_19",zP="_allClear_26qsz_25",$P="_allClearTitle_26qsz_32",BP="_allClearDetail_26qsz_38",FP="_hero_26qsz_44",HP="_sectionTitle_26qsz_51",VP="_count_26qsz_60",UP="_chain_26qsz_74",WP="_arrow_26qsz_81",qP="_chip_26qsz_86",KP="_chipNext_26qsz_109",ZP="_startBadge_26qsz_114",YP="_chipId_26qsz_124",QP="_chipTitle_26qsz_130",XP="_grid_26qsz_135",GP="_card_26qsz_141",JP="_list_26qsz_148",eL="_item_26qsz_157",tL="_itemId_26qsz_179",nL="_itemTitle_26qsz_185",rL="_itemMeta_26qsz_190",iL="_wipRow_26qsz_195",sL="_empty_26qsz_204",lL="_cycle_26qsz_210",aL="_pinnedSection_26qsz_217",oL="_pinnedRow_26qsz_224",cL="_pinBtn_26qsz_234",uL="_pinnedDoneNote_26qsz_259",Re={home:PP,intro:LP,title:MP,lead:OP,allClear:zP,allClearTitle:$P,allClearDetail:BP,hero:FP,sectionTitle:HP,count:VP,chain:UP,arrow:WP,chip:qP,chipNext:KP,startBadge:ZP,chipId:YP,chipTitle:QP,grid:XP,card:GP,list:JP,item:eL,itemId:tL,itemTitle:nL,itemMeta:rL,wipRow:iL,empty:sL,cycle:lL,pinnedSection:aL,pinnedRow:oL,pinBtn:cL,pinnedDoneNote:uL};function dL({board:e,unreadIds:t,onOpen:r,pinnedIds:s,onTogglePin:l}){const{t:a}=pt(),c=xv(),f=w.useMemo(()=>new Map(e.tasks.map(k=>[k.frontmatter.id,k])),[e.tasks]),m=w.useMemo(()=>new Map(e.config.columns.map(k=>[k.id,k])),[e.config.columns]),p=w.useMemo(()=>TP(e.tasks,e.config.columns,c,e.config.stallThresholds??{},t),[e.tasks,e.config.columns,e.config.stallThresholds,c,t]),y=w.useMemo(()=>RP(s,e.tasks),[s,e.tasks]),g=w.useMemo(()=>e.tasks.some(k=>s.has(k.frontmatter.id)&&k.frontmatter.status==="done"),[s,e.tasks]),x=k=>{const C=f.get(k);C&&r(C)},_=k=>Ud(a,m.get(k)??{id:k});return u.jsxs("div",{className:Re.home,children:[u.jsxs("header",{className:Re.intro,children:[u.jsx("h2",{className:Re.title,children:a("view.home")}),u.jsx("p",{className:Re.lead,children:a("home.lead")})]}),e.tasks.length===0?u.jsx("div",{className:Re.allClear,children:u.jsx("p",{className:Re.allClearDetail,children:a("home.empty")})}):u.jsxs(u.Fragment,{children:[u.jsxs("section",{className:Re.pinnedSection,children:[u.jsxs("h3",{className:Re.sectionTitle,children:[u.jsx("span",{"aria-hidden":"true",children:"📌"}),a("home.pinned.title"),y.length>0&&u.jsx("span",{className:Re.count,children:y.length})]}),y.length===0?u.jsx("p",{className:Re.empty,children:a("home.pinned.empty")}):u.jsxs(u.Fragment,{children:[u.jsx("ul",{className:Re.list,children:y.map(k=>{const C=s.has(k.frontmatter.id);return u.jsxs("li",{className:Re.pinnedRow,children:[u.jsxs("button",{type:"button",className:Re.item,onClick:()=>x(k.frontmatter.id),"aria-label":a("home.openAria",{id:k.frontmatter.id}),children:[u.jsx("span",{className:Re.itemId,children:k.frontmatter.id}),u.jsx("span",{className:Re.itemTitle,children:k.frontmatter.title})]}),u.jsx("div",{onPointerDown:D=>D.stopPropagation(),onClick:D=>D.stopPropagation(),children:u.jsx("button",{type:"button",className:Re.pinBtn,"aria-pressed":C,"aria-label":a("home.pin.unpin"),onClick:()=>l(k.frontmatter.id),children:"📌"})})]},k.frontmatter.id)})}),g&&u.jsx("p",{className:Re.pinnedDoneNote,children:a("home.pinned.doneHidden")})]})]}),p.allClear&&u.jsxs("div",{className:Re.allClear,role:"status",children:[u.jsxs("p",{className:Re.allClearTitle,children:["✓ ",a("home.allClear.title")]}),u.jsx("p",{className:Re.allClearDetail,children:a("home.allClear.detail")})]}),u.jsxs("section",{className:Re.hero,children:[u.jsx("h3",{className:Re.sectionTitle,children:a("home.next.title")}),p.hasCycle?u.jsx("p",{className:Re.cycle,role:"alert",children:a("home.next.cycle")}):p.criticalPath.length===0?u.jsx("p",{className:Re.empty,children:a("home.next.empty")}):u.jsx("div",{className:Re.chain,children:p.criticalPath.map((k,C)=>{const D=f.get(k),S=k===p.nextActionId;return u.jsxs(w.Fragment,{children:[C>0&&u.jsx("span",{className:Re.arrow,"aria-hidden":"true",children:"→"}),u.jsxs("button",{type:"button",className:`${Re.chip} ${S?Re.chipNext:""}`,onClick:()=>x(k),"aria-label":a("home.openAria",{id:k}),children:[S&&u.jsx("span",{className:Re.startBadge,children:a("home.next.startHere")}),u.jsx("span",{className:Re.chipId,children:k}),D&&u.jsx("span",{className:Re.chipTitle,children:D.frontmatter.title})]})]},k)})})]}),u.jsxs("div",{className:Re.grid,children:[u.jsxs("section",{className:Re.card,children:[u.jsxs("h3",{className:Re.sectionTitle,children:[a("decisionWaits.title"),p.decisions.length>0&&u.jsx("span",{className:Re.count,children:p.decisions.length})]}),p.decisions.length===0?u.jsx("p",{className:Re.empty,children:a("decisionWaits.empty")}):u.jsx("ul",{className:Re.list,children:p.decisions.map(k=>u.jsx("li",{children:u.jsxs("button",{type:"button",className:Re.item,onClick:()=>x(k.id),"aria-label":a("home.openAria",{id:k.id}),children:[u.jsx("span",{className:Re.itemId,children:k.id}),u.jsx("span",{className:Re.itemTitle,children:k.title}),u.jsx("span",{className:Re.itemMeta,children:k.blocked_reason??a("decisionWaits.noReason")})]})},k.id))})]}),u.jsxs("section",{className:Re.card,children:[u.jsxs("h3",{className:Re.sectionTitle,children:[a("stalled.title"),p.stalled.length>0&&u.jsx("span",{className:Re.count,children:p.stalled.length})]}),p.stalled.length===0?u.jsx("p",{className:Re.empty,children:a("stalled.empty")}):u.jsx("ul",{className:Re.list,children:p.stalled.map(k=>u.jsx("li",{children:u.jsxs("button",{type:"button",className:Re.item,onClick:()=>x(k.id),"aria-label":a("home.openAria",{id:k.id}),children:[u.jsx("span",{className:Re.itemId,children:k.id}),u.jsx("span",{className:Re.itemTitle,children:k.title}),u.jsxs("span",{className:Re.itemMeta,children:[_(k.status)," · ",a("home.idleDays",{n:k.idleDays})]})]})},k.id))})]}),u.jsxs("section",{className:Re.card,children:[u.jsxs("h3",{className:Re.sectionTitle,children:[a("home.wip.title"),p.wipOverflows.length>0&&u.jsx("span",{className:Re.count,children:p.wipOverflows.length})]}),p.wipOverflows.length===0?u.jsx("p",{className:Re.empty,children:a("home.wip.empty")}):u.jsx("ul",{className:Re.list,children:p.wipOverflows.map(k=>u.jsx("li",{className:Re.wipRow,children:a("home.wip.row",{label:_(k.columnId),count:k.count,limit:k.limit})},k.columnId))})]}),u.jsxs("section",{className:Re.card,children:[u.jsxs("h3",{className:Re.sectionTitle,children:[a("home.unread.title"),p.unreadIds.length>0&&u.jsx("span",{className:Re.count,children:p.unreadIds.length})]}),p.unreadIds.length===0?u.jsx("p",{className:Re.empty,children:a("home.unread.empty")}):u.jsx("ul",{className:Re.list,children:p.unreadIds.map(k=>{const C=f.get(k);return u.jsx("li",{children:u.jsxs("button",{type:"button",className:Re.item,onClick:()=>x(k),"aria-label":a("home.openAria",{id:k}),children:[u.jsx("span",{className:Re.itemId,children:k}),C&&u.jsx("span",{className:Re.itemTitle,children:C.frontmatter.title})]})},k)})})]})]})]})]})}function fL(e,t){const r=[],s=new Set;for(const f of e)s.has(f.id)||(s.add(f.id),r.push(f));const l=new Map;for(const f of r)l.set(f.id,{done:0,total:0});const a={done:0,total:0};for(const f of t){const m=f.milestone!==null&&s.has(f.milestone)?l.get(f.milestone):a;m.total+=1,f.done&&(m.done+=1)}return{milestones:r.map(f=>({milestone:f,...l.get(f.id)})).sort((f,m)=>f.milestone.order-m.milestone.order||f.milestone.id.localeCompare(m.milestone.id)),unassigned:a}}const mL="_view_z2hgn_1",pL="_viewEmpty_z2hgn_7",hL="_sidebar_z2hgn_19",gL="_sidebarTitle_z2hgn_28",yL="_navList_z2hgn_35",vL="_sideEmpty_z2hgn_36",xL="_navBtn_z2hgn_52",_L="_navBtnActive_z2hgn_76",kL="_navLabel_z2hgn_82",wL="_navCount_z2hgn_88",bL="_detail_z2hgn_100",SL="_sectionTitle_z2hgn_106",CL="_histStatus_z2hgn_115",NL="_milestone_z2hgn_122",jL="_milestoneactive_z2hgn_131",EL="_milestonedone_z2hgn_135",TL="_milestoneplanned_z2hgn_139",IL="_msInfo_z2hgn_143",DL="_msTitle_z2hgn_148",AL="_msStatus_z2hgn_152",RL="_msProgress_z2hgn_157",PL="_month_z2hgn_161",LL="_monthHeader_z2hgn_165",ML="_histEntry_z2hgn_173",OL="_histId_z2hgn_185",zL="_histTitle_z2hgn_192",$L="_histSummary_z2hgn_197",BL="_empty_z2hgn_218",Ye={view:mL,viewEmpty:pL,sidebar:hL,sidebarTitle:gL,navList:yL,sideEmpty:vL,navBtn:xL,navBtnActive:_L,navLabel:kL,navCount:wL,detail:bL,sectionTitle:SL,histStatus:CL,milestone:NL,milestoneactive:jL,milestonedone:EL,milestoneplanned:TL,msInfo:IL,msTitle:DL,msStatus:AL,msProgress:RL,month:PL,monthHeader:LL,histEntry:ML,histId:OL,histTitle:zL,histSummary:$L,empty:BL},FL={planned:"milestone.status.planned",active:"milestone.status.active",done:"milestone.status.done"};function _g(e){var s;const t=tf(e),r=t[t.length-1];return r?{summary:r.message,date:((s=r.timestamp)==null?void 0:s.slice(0,7))??null}:{summary:"",date:null}}function HL({board:e,onOpen:t}){const{t:r}=pt(),[s,l]=w.useState([]),[a,c]=w.useState(null);w.useEffect(()=>{let S=!0;const R=new AbortController;return(async()=>{try{const T=await _d(R.signal);S&&l(T.tasks)}catch{S&&l([])}})(),()=>{S=!1,R.abort()}},[e]);const f=w.useMemo(()=>fL(e.config.milestones,e.tasks.map(S=>({milestone:S.frontmatter.milestone,done:S.frontmatter.status==="done"}))),[e.config.milestones,e.tasks]),m=w.useMemo(()=>{const S=[],R=new Set;for(const M of e.tasks){if(M.frontmatter.status!=="done")continue;R.add(M.frontmatter.id);const{summary:I,date:j}=_g(M.body);S.push({id:M.frontmatter.id,title:M.frontmatter.title,month:j??M.frontmatter.updated.slice(0,7),summary:I,task:M})}for(const M of s){if(R.has(M.id))continue;const{summary:I,date:j}=_g(M.body);S.push({id:M.id,title:M.id,month:j??"----",summary:I})}const T=new Map;for(const M of S){const I=T.get(M.month)??[];I.push(M),T.set(M.month,I)}return[...T.entries()].sort((M,I)=>I[0].localeCompare(M[0])).map(([M,I])=>({month:M,items:I.sort((j,B)=>j.id.localeCompare(B.id,"en",{numeric:!0}))}))},[e.tasks,s]),p=w.useMemo(()=>Ll(r,e.config.columns),[r,e.config.columns]),y=w.useMemo(()=>new Set(e.config.milestones.map(S=>S.id)),[e.config.milestones]),g=S=>e.tasks.filter(R=>S===null?R.frontmatter.milestone===null||!y.has(R.frontmatter.milestone):R.frontmatter.milestone===S).sort((R,T)=>R.frontmatter.id.localeCompare(T.frontmatter.id,"en",{numeric:!0})),_=a!==null&&(a.kind==="milestone"&&f.milestones.some(S=>S.milestone.id===a.id)||a.kind==="unassigned"&&f.unassigned.total>0||a.kind==="month"&&m.some(S=>S.month===a.month))?a:m.length>0?{kind:"month",month:m[0].month}:f.milestones.length>0?{kind:"milestone",id:f.milestones[0].milestone.id}:f.unassigned.total>0?{kind:"unassigned"}:null,k=S=>_===null?!1:S.kind==="milestone"?_.kind==="milestone"&&_.id===S.id:S.kind==="month"?_.kind==="month"&&_.month===S.month:_.kind==="unassigned";if(_===null)return u.jsx("div",{className:Ye.viewEmpty,children:u.jsx("div",{className:Ye.empty,children:r("milestone.empty")})});const C=S=>{const R=S!==null?S.milestone.title:r("milestone.unassignedTasks"),T=S!==null?Ye[`milestone${S.milestone.status}`]:Ye.milestoneplanned,M=S!==null?S.done:f.unassigned.done,I=S!==null?S.total:f.unassigned.total,j=g(S!==null?S.milestone.id:null);return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:`${Ye.milestone} ${T}`,children:[u.jsxs("div",{className:Ye.msInfo,children:[u.jsx("div",{className:Ye.msTitle,children:R}),S!==null&&u.jsx("span",{className:Ye.msStatus,children:r(FL[S.milestone.status])})]}),u.jsx("div",{className:Ye.msProgress,children:u.jsx(kv,{done:M,total:I})})]}),u.jsx("p",{className:Ye.sectionTitle,children:r("milestone.tasks")}),j.length===0?u.jsx("div",{className:Ye.empty,children:r("column.empty")}):j.map(B=>u.jsxs("div",{className:Ye.histEntry,role:"button",tabIndex:0,onClick:()=>t(B),onKeyDown:Q=>{(Q.key==="Enter"||Q.key===" ")&&(Q.preventDefault(),t(B))},children:[u.jsx("span",{className:Ye.histId,children:B.frontmatter.id}),u.jsx("span",{className:Ye.histTitle,children:B.frontmatter.title}),u.jsx("span",{className:Ye.histStatus,children:p(B.frontmatter.status)})]},B.frontmatter.id))]})},D=S=>{const R=m.find(T=>T.month===S);return R?u.jsxs("section",{className:Ye.month,children:[u.jsx("div",{className:Ye.monthHeader,children:R.month}),R.items.map(T=>u.jsxs("div",{className:Ye.histEntry,role:T.task?"button":void 0,tabIndex:T.task?0:void 0,onClick:()=>T.task&&t(T.task),onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&T.task&&(M.preventDefault(),t(T.task))},children:[u.jsx("span",{className:Ye.histId,children:T.id}),u.jsx("span",{className:Ye.histTitle,title:T.title,children:T.title}),T.summary&&u.jsx("span",{className:Ye.histSummary,children:T.summary})]},T.id))]}):null};return u.jsxs("div",{className:Ye.view,children:[u.jsxs("aside",{className:Ye.sidebar,"aria-label":r("view.milestones"),children:[u.jsx("p",{className:Ye.sidebarTitle,children:r("milestone.roadmap")}),f.milestones.length===0&&f.unassigned.total===0?u.jsx("p",{className:Ye.sideEmpty,children:r("milestone.empty")}):u.jsxs("ul",{className:Ye.navList,children:[f.milestones.map(S=>u.jsx("li",{children:u.jsxs("button",{type:"button",className:`${Ye.navBtn} ${k({kind:"milestone",id:S.milestone.id})?Ye.navBtnActive:""}`,onClick:()=>c({kind:"milestone",id:S.milestone.id}),children:[u.jsx("span",{className:Ye.navLabel,children:S.milestone.title}),u.jsxs("span",{className:Ye.navCount,children:[S.done,"/",S.total]})]})},S.milestone.id)),f.unassigned.total>0&&u.jsx("li",{children:u.jsxs("button",{type:"button",className:`${Ye.navBtn} ${k({kind:"unassigned"})?Ye.navBtnActive:""}`,onClick:()=>c({kind:"unassigned"}),children:[u.jsx("span",{className:Ye.navLabel,children:r("milestone.unassignedTasks")}),u.jsxs("span",{className:Ye.navCount,children:[f.unassigned.done,"/",f.unassigned.total]})]})})]}),u.jsx("p",{className:Ye.sidebarTitle,children:r("milestone.history")}),m.length===0?u.jsx("p",{className:Ye.sideEmpty,children:r("digest.empty")}):u.jsx("ul",{className:Ye.navList,children:m.map(S=>u.jsx("li",{children:u.jsxs("button",{type:"button",className:`${Ye.navBtn} ${k({kind:"month",month:S.month})?Ye.navBtnActive:""}`,onClick:()=>c({kind:"month",month:S.month}),children:[u.jsx("span",{className:Ye.navLabel,children:S.month}),u.jsx("span",{className:Ye.navCount,children:S.items.length})]})},S.month))})]}),u.jsx("div",{className:Ye.detail,children:_.kind==="month"?D(_.month):C(_.kind==="milestone"?f.milestones.find(S=>S.milestone.id===_.id)??null:null)})]})}function kg(e,t){return e.filter(r=>r.frontmatter.created_by===t||r.frontmatter.assignee===t).length}function VL(e,t,r){const s=[];for(const x of t)x.originalId===null||x.id.trim()===""||x.id===x.originalId||s.push({from:x.originalId,to:x.id,count:kg(r,x.originalId)});const l=new Set(t.map(x=>x.originalId).filter(x=>x!==null)),a=t.map(x=>x.id).filter(x=>x.trim()!==""),c=new Set(a),f=e.filter(x=>!l.has(x)&&!c.has(x)).map(x=>({id:x,count:kg(r,x)})),m=new Set([...s.map(x=>x.from),...f.map(x=>x.id)]),p=s.some(x=>m.has(x.to)),y=new Set,g=[];for(const x of a)y.has(x)&&!g.includes(x)&&g.push(x),y.add(x);return{renames:s,removals:f,swap:p,duplicates:g}}const UL="_section_yrpf3_1",WL="_sectionTitle_yrpf3_5",qL="_modeBox_yrpf3_14",KL="_memberRow_yrpf3_22",ZL="_memberId_yrpf3_41",YL="_removeBtn_yrpf3_45",QL="_addBtn_yrpf3_57",XL="_pathNote_yrpf3_71",GL="_colRow_yrpf3_79",JL="_colId_yrpf3_97",eM="_viewName_yrpf3_103",tM="_colWip_yrpf3_109",nM="_colCheck_yrpf3_113",rM="_moveBtn_yrpf3_122",iM="_advanced_yrpf3_140",sM="_jsonEditor_yrpf3_148",lM="_saved_yrpf3_163",aM="_reloadBtn_yrpf3_169",oM="_migrateBox_yrpf3_185",cM="_migrateTitle_yrpf3_194",uM="_migrateItem_yrpf3_200",dM="_migrateActions_yrpf3_220",Qe={section:UL,sectionTitle:WL,modeBox:qL,memberRow:KL,memberId:ZL,removeBtn:YL,addBtn:QL,pathNote:XL,colRow:GL,colId:JL,viewName:eM,colWip:tM,colCheck:nM,moveBtn:rM,advanced:iM,jsonEditor:sM,saved:lM,reloadBtn:aM,migrateBox:oM,migrateTitle:cM,migrateItem:uM,migrateActions:dM};function eo(e,t,r){if(r<0||r>=e.length)return e;const s=e.slice(),[l]=s.splice(t,1);return s.splice(r,0,l),s}let wg=0;function bg(){return wg+=1,`m${wg}`}let Sg=0;function Cg(){return Sg+=1,`c${Sg}`}function fM({onClose:e,onSaved:t,tasks:r=[]}){const{t:s,lang:l,setLang:a}=pt(),[c,f]=w.useState(null),[m,p]=w.useState(null),[y,g]=w.useState(null),[x,_]=w.useState(""),[k,C]=w.useState(""),[D,S]=w.useState(""),[R,T]=w.useState("free"),[M,I]=w.useState([]),[j,B]=w.useState([]),[Q,te]=w.useState([]),[O,W]=w.useState([]),[ne,_e]=w.useState([]),[ie,X]=w.useState([]),[J,ve]=w.useState([]),[ee,fe]=w.useState([]),[N,P]=w.useState([]),[F,E]=w.useState(""),[ce,Se]=w.useState(!1),[ge,xe]=w.useState(null),[ze,de]=w.useState({}),[ke,Nt]=w.useState(!1),[Lt,Kt]=w.useState(!1),[jt,se]=w.useState(null),[Ge,wt]=w.useState(!1),tn=w.useCallback(async()=>{const{config:ye,mtimeMs:Ce}=await so(),$=Vg.parse(ye);f(ye),p(Ce),_($.projectName),C($.idPrefix),S($.instructionTemplate),T($.aiTaskCreation),I($.members.map(Z=>({key:bg(),id:Z.id,label:Z.label??"",type:Z.type,originalId:Z.id}))),B($.members.map(Z=>Z.id)),xe(null),de({}),te($.columns.map(Z=>({key:Cg(),id:Z.id,label:Z.label??"",wipLimit:Z.wipLimit!=null?String(Z.wipLimit):"",hideWhenEmpty:Z.hideWhenEmpty??!1}))),W($.aiConfigPaths.settingsFiles),_e($.aiConfigPaths.browseDirs),X($.aiConfigPaths.rootFiles),ve($.docsDirs),fe($.docsWriteDirs),P(Sv(ko,$.views)),E(JSON.stringify({milestones:$.milestones},null,2)),wt(!1),se(null)},[]);w.useEffect(()=>{let ye=!0;return(async()=>{try{await tn()}catch(Ce){ye&&g(Ce instanceof Error?Ce.message:"load failed")}})(),()=>{ye=!1}},[tn]);const Zt=async()=>{try{await tn()}catch(ye){se(ye instanceof Error?ye.message:s("settings.loadError"))}},bt=async ye=>{if(c){Nt(!0),Kt(!1),se(null),wt(!1);try{let Ce={};if(F.trim().length>0){Ce=JSON.parse(F);for(const q of["members","projectName","idPrefix","instructionTemplate","aiTaskCreation","language","columns","aiConfigPaths","views","docsDirs","docsWriteDirs"])delete Ce[q]}const $={...c,projectName:x,idPrefix:k,instructionTemplate:D,aiTaskCreation:R,...ce?{language:l}:{},members:M.map(q=>({id:q.id,...q.label.trim()!==""?{label:q.label.trim()}:{},type:q.type})),columns:Q.map(q=>{const we=Number(q.wipLimit);return{id:q.id.trim(),...q.label.trim()!==""?{label:q.label.trim()}:{},...q.hideWhenEmpty?{hideWhenEmpty:!0}:{},...q.wipLimit.trim()!==""&&Number.isInteger(we)&&we>0?{wipLimit:we}:{}}}),aiConfigPaths:{settingsFiles:O.map(q=>q.trim()).filter(q=>q!==""),browseDirs:ne.map(q=>q.trim()).filter(q=>q!==""),rootFiles:ie.map(q=>q.trim()).filter(q=>q!=="")},docsDirs:J.map(q=>q.trim()).filter(q=>q!==""),docsWriteDirs:ee.map(q=>q.trim()).filter(q=>q!==""),views:N.map(q=>({id:q.id,...q.hidden?{hidden:!0}:{}})),...Ce};await kd($,m);try{const{mtimeMs:q}=await so();p(q)}catch{}const Z=[];try{for(const q of ye){const we=await H_(q.from,q.to);Z.push(...we.skipped)}}catch{se(s("settings.migrate.failed"));return}try{for(const q of ye)for(const we of["aizuchi.createdBy","aizuchi.commentMember"])typeof localStorage<"u"&&localStorage.getItem(we)===q.from&&localStorage.setItem(we,q.to)}catch{}try{await tn()}catch{}Z.length>0&&se(s("settings.migrate.skipped",{files:Z.join(", ")})),Kt(!0),t(),window.setTimeout(()=>Kt(!1),2e3)}catch(Ce){Ce instanceof Gn?(p(Ce.serverMtimeMs),wt(!0),se(s("settings.conflict"))):se(Ce instanceof Error?Ce.message:s("settings.error"))}finally{Nt(!1)}}},Mt=async()=>{if(!c)return;const ye=VL(j,M,r);if(ye.duplicates.length>0){se(s("settings.members.duplicate",{ids:ye.duplicates.join(", ")}));return}if(ye.swap){se(s("settings.migrate.swap"));return}const Ce=ye.removals.filter($=>$.count>0);if(ye.renames.some($=>$.count>0)||Ce.length>0){se(null),xe({renames:ye.renames,removals:Ce}),de({});return}await bt(ye.renames.map($=>({from:$.from,to:$.to})))},yt=async()=>{if(ge===null)return;const ye=[...ge.renames.map(Ce=>({from:Ce.from,to:Ce.to})),...ge.removals.filter(Ce=>(ze[Ce.id]??"")!=="").map(Ce=>({from:Ce.id,to:ze[Ce.id]}))];xe(null),await bt(ye)},Yt=(ye,Ce,$,Z="settings.paths.placeholder",q)=>u.jsxs("div",{className:Qe.section,children:[u.jsx("p",{className:Qe.sectionTitle,children:s(ye)}),Ce.map((we,Ve)=>u.jsxs("div",{className:Qe.memberRow,children:[u.jsx("input",{type:"text",className:Qe.memberId,value:we,placeholder:s(Z),"aria-label":s(ye),onChange:st=>$(Ot=>Ot.map((Ut,yn)=>yn===Ve?st.target.value.replace(/[\r\n]/g,""):Ut))}),u.jsx("button",{type:"button",className:Qe.removeBtn,"aria-label":s("settings.paths.remove"),onClick:()=>$(st=>st.filter((Ot,Ut)=>Ut!==Ve)),children:"×"})]},Ve)),u.jsx("button",{type:"button",className:Qe.addBtn,onClick:()=>$(we=>[...we,""]),children:s("settings.paths.add")}),q&&u.jsx("p",{className:Qe.pathNote,children:s(q)})]});return u.jsx(Ur,{title:s("settings.title"),onClose:e,wide:!0,children:y?u.jsx("p",{className:re.error,children:y==="load failed"?s("settings.loadError"):y}):c?u.jsxs(u.Fragment,{children:[jt&&u.jsxs("p",{className:re.error,role:"alert",children:[jt,Ge&&u.jsxs(u.Fragment,{children:[" ",u.jsx("button",{type:"button",className:Qe.reloadBtn,onClick:()=>void Zt(),children:s("settings.reload")})]})]}),u.jsxs("div",{className:Qe.modeBox,children:[u.jsx("label",{className:re.label,htmlFor:"ai-mode",children:s("settings.aiTaskCreation")}),u.jsxs("select",{id:"ai-mode",className:re.select,value:R,onChange:ye=>T(ye.target.value),children:[u.jsx("option",{value:"free",children:s("settings.aiTaskCreation.free")}),u.jsx("option",{value:"proposal",children:s("settings.aiTaskCreation.proposal")})]})]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"set-lang",children:s("settings.language")}),u.jsx("select",{id:"set-lang",className:re.select,value:l,onChange:ye=>{a(ye.target.value),Se(!0)},children:Sd.map(ye=>u.jsx("option",{value:ye,children:s(ye==="en"?"settings.language.en":"settings.language.ja")},ye))})]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"set-project",children:s("settings.projectName")}),u.jsx("input",{id:"set-project",className:re.input,value:x,onChange:ye=>_(ye.target.value.replace(/[\r\n]/g,""))})]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"set-prefix",children:s("settings.idPrefix")}),u.jsx("input",{id:"set-prefix",className:re.input,value:k,onChange:ye=>C(ye.target.value.replace(/[\r\n]/g,""))})]}),u.jsxs("div",{className:re.field,children:[u.jsx("label",{className:re.label,htmlFor:"set-instruction",children:s("settings.instructionTemplate")}),u.jsx("input",{id:"set-instruction",className:re.input,value:D,onChange:ye=>S(ye.target.value.replace(/[\r\n]/g,""))})]}),u.jsxs("div",{className:Qe.section,children:[u.jsx("p",{className:Qe.sectionTitle,children:s("settings.members")}),M.map((ye,Ce)=>u.jsxs("div",{className:Qe.memberRow,children:[u.jsx("input",{className:Qe.memberId,value:ye.id,placeholder:s("settings.members.idPlaceholder"),"aria-label":s("settings.members.idPlaceholder"),onChange:$=>I(Z=>Z.map((q,we)=>we===Ce?{...q,id:$.target.value.replace(/[\r\n]/g,"")}:q))}),u.jsx("input",{className:Qe.memberId,value:ye.label,placeholder:s("settings.members.labelPlaceholder"),"aria-label":s("settings.members.labelPlaceholder"),onChange:$=>I(Z=>Z.map((q,we)=>we===Ce?{...q,label:$.target.value.replace(/[\r\n]/g,"")}:q))}),u.jsx("select",{value:ye.type,onChange:$=>I(Z=>Z.map((q,we)=>we===Ce?{...q,type:$.target.value}:q)),"aria-label":s("settings.members.typePlaceholder"),children:Fg.map($=>u.jsx("option",{value:$,children:$},$))}),u.jsx("button",{type:"button",className:Qe.removeBtn,onClick:()=>I($=>$.filter((Z,q)=>q!==Ce)),children:"×"})]},ye.key)),u.jsx("button",{type:"button",className:Qe.addBtn,onClick:()=>I(ye=>[...ye,{key:bg(),id:"",label:"",type:"ai",originalId:null}]),children:s("settings.members.add")})]}),u.jsxs("div",{className:Qe.section,children:[u.jsx("p",{className:Qe.sectionTitle,children:s("settings.columns")}),Q.map((ye,Ce)=>u.jsxs("div",{className:Qe.colRow,children:[u.jsx("input",{type:"text",className:Qe.colId,value:ye.id,placeholder:s("settings.columns.idPlaceholder"),"aria-label":s("settings.columns.idPlaceholder"),onChange:$=>te(Z=>Z.map((q,we)=>we===Ce?{...q,id:$.target.value.replace(/[\r\n]/g,"")}:q))}),u.jsx("input",{type:"text",className:Qe.colId,value:ye.label,placeholder:s("settings.columns.labelPlaceholder"),"aria-label":s("settings.columns.labelPlaceholder"),onChange:$=>te(Z=>Z.map((q,we)=>we===Ce?{...q,label:$.target.value.replace(/[\r\n]/g,"")}:q))}),u.jsx("input",{type:"number",min:"1",className:Qe.colWip,value:ye.wipLimit,placeholder:s("settings.columns.wipPlaceholder"),"aria-label":s("settings.columns.wipAria"),onChange:$=>te(Z=>Z.map((q,we)=>we===Ce?{...q,wipLimit:$.target.value}:q))}),u.jsxs("label",{className:Qe.colCheck,children:[u.jsx("input",{type:"checkbox",checked:ye.hideWhenEmpty,onChange:$=>te(Z=>Z.map((q,we)=>we===Ce?{...q,hideWhenEmpty:$.target.checked}:q))}),s("settings.columns.hideWhenEmpty")]}),u.jsx("button",{type:"button",className:Qe.moveBtn,disabled:Ce===0,"aria-label":s("settings.columns.moveUp"),onClick:()=>te($=>eo($,Ce,Ce-1)),children:"↑"}),u.jsx("button",{type:"button",className:Qe.moveBtn,disabled:Ce===Q.length-1,"aria-label":s("settings.columns.moveDown"),onClick:()=>te($=>eo($,Ce,Ce+1)),children:"↓"}),u.jsx("button",{type:"button",className:Qe.removeBtn,disabled:Q.length<=1,"aria-label":s("settings.columns.remove"),onClick:()=>te($=>$.filter((Z,q)=>q!==Ce)),children:"×"})]},ye.key)),u.jsx("button",{type:"button",className:Qe.addBtn,onClick:()=>te(ye=>[...ye,{key:Cg(),id:"",label:"",wipLimit:"",hideWhenEmpty:!1}]),children:s("settings.columns.add")})]}),Yt("settings.paths.settingsFiles",O,W),Yt("settings.paths.browseDirs",ne,_e),Yt("settings.paths.rootFiles",ie,X),Yt("settings.docsDirs",J,ve,"settings.docsDirs.placeholder"),Yt("settings.docsWriteDirs",ee,fe,"settings.docsWriteDirs.placeholder","settings.docsWriteDirs.note"),u.jsxs("div",{className:Qe.section,children:[u.jsx("p",{className:Qe.sectionTitle,children:s("settings.views")}),N.map((ye,Ce)=>u.jsxs("div",{className:Qe.colRow,children:[u.jsx("span",{className:Qe.viewName,children:s(nf(ye.id)??"view.board")}),u.jsxs("label",{className:Qe.colCheck,children:[u.jsx("input",{type:"checkbox",checked:!ye.hidden,onChange:$=>P(Z=>Z.map((q,we)=>we===Ce?{...q,hidden:!$.target.checked}:q))}),s("settings.views.show")]}),u.jsx("button",{type:"button",className:Qe.moveBtn,disabled:Ce===0,"aria-label":s("settings.views.moveUp"),onClick:()=>P($=>eo($,Ce,Ce-1)),children:"↑"}),u.jsx("button",{type:"button",className:Qe.moveBtn,disabled:Ce===N.length-1,"aria-label":s("settings.views.moveDown"),onClick:()=>P($=>eo($,Ce,Ce+1)),children:"↓"})]},ye.id))]}),u.jsxs("details",{className:Qe.advanced,children:[u.jsx("summary",{children:s("settings.advanced")}),u.jsx("textarea",{className:Qe.jsonEditor,value:F,onChange:ye=>E(ye.target.value),spellCheck:!1,"aria-label":s("settings.advanced.aria")})]}),ge!==null&&u.jsxs("div",{className:Qe.migrateBox,role:"alert",children:[u.jsx("p",{className:Qe.migrateTitle,children:s("settings.migrate.title")}),ge.renames.map(ye=>u.jsx("p",{className:Qe.migrateItem,children:s("settings.migrate.rename",{from:ye.from,to:ye.to,n:ye.count})},`rename-${ye.from}`)),ge.removals.map(ye=>u.jsxs("div",{className:Qe.migrateItem,children:[u.jsx("span",{children:s("settings.migrate.removed",{id:ye.id,n:ye.count})})," ",u.jsxs("select",{value:ze[ye.id]??"",onChange:Ce=>de($=>({...$,[ye.id]:Ce.target.value})),"aria-label":s("settings.migrate.removed",{id:ye.id,n:ye.count}),children:[u.jsx("option",{value:"",children:s("settings.migrate.noTransfer")}),M.filter(Ce=>Ce.id.trim()!=="").map(Ce=>u.jsx("option",{value:Ce.id,children:Ce.label.trim()!==""?Ce.label:Ce.id},Ce.key))]})]},`remove-${ye.id}`)),u.jsxs("div",{className:Qe.migrateActions,children:[u.jsx("button",{type:"button",className:re.btn,onClick:()=>xe(null),children:s("common.cancel")}),u.jsx("button",{type:"button",className:`${re.btn} ${re.btnPrimary}`,onClick:()=>void yt(),disabled:ke,children:s("settings.migrate.execute")})]})]}),u.jsxs("div",{className:re.actions,children:[Lt&&u.jsx("span",{className:Qe.saved,children:s("settings.saved")}),u.jsx("button",{type:"button",className:re.btn,onClick:e,children:s("common.cancel")}),u.jsx("button",{type:"button",className:`${re.btn} ${re.btnPrimary}`,onClick:()=>void Mt(),disabled:ke||ge!==null,children:s(ke?"settings.saving":"settings.save")})]})]}):u.jsx("p",{children:s("board.loading")})})}const mM="_list_uhebt_1",pM="_row_uhebt_8",hM="_keys_uhebt_15",gM="_kbd_uhebt_21",yM="_desc_uhebt_31",vM="_aiSection_uhebt_38",xM="_aiTitle_uhebt_44",_M="_aiDesc_uhebt_50",kM="_copyBtn_uhebt_56",Hr={list:mM,row:pM,keys:hM,kbd:gM,desc:yM,aiSection:vM,aiTitle:xM,aiDesc:_M,copyBtn:kM};function wM({onClose:e,instructionText:t}){const{t:r}=pt(),[s,l]=w.useState(null),a=[{keys:"⌘K / Ctrl+K",descKey:"shortcuts.palette"},{keys:"?",descKey:"shortcuts.help"},{keys:"Enter",descKey:"shortcuts.openCard"},{keys:"Space",descKey:"shortcuts.grabCard"},{keys:"← → ↑ ↓",descKey:"shortcuts.moveCard"},{keys:"Esc",descKey:"shortcuts.close"}],c=async()=>{const m=await Ss(t);l(m?"done":"failed"),window.setTimeout(()=>l(null),2e3)},f=r(s==="done"?"shortcuts.aiInstruction.copied":s==="failed"?"shortcuts.aiInstruction.failed":"shortcuts.aiInstruction.copy");return u.jsxs(Ur,{title:r("shortcuts.title"),onClose:e,children:[u.jsx("dl",{className:Hr.list,children:a.map(m=>u.jsxs("div",{className:Hr.row,children:[u.jsx("dt",{className:Hr.keys,children:u.jsx("kbd",{className:Hr.kbd,children:m.keys})}),u.jsx("dd",{className:Hr.desc,children:r(m.descKey)})]},m.keys))}),u.jsxs("div",{className:Hr.aiSection,children:[u.jsx("p",{className:Hr.aiTitle,children:r("shortcuts.aiInstruction.title")}),u.jsx("p",{className:Hr.aiDesc,children:r("shortcuts.aiInstruction.desc")}),u.jsx("button",{type:"button",className:Hr.copyBtn,onClick:()=>void c(),children:f})]})]})}function bM(e){const t=Array.from({length:7},()=>new Array(24).fill(0));let r=0;for(const l of e)for(const{date:a,time:c}of Ro(l.body)){const f=Date.parse(`${a}T${c}`);if(Number.isNaN(f))continue;const m=new Date(f),p=m.getDay(),y=m.getHours();t[p][y]++,r++}const s=t.reduce((l,a)=>Math.max(l,...a),0);return{grid:t,maxCount:s,total:r}}const SM="_view_akezq_1",CM="_card_akezq_18",NM="_cardHead_akezq_26",jM="_cardTitle_akezq_34",EM="_note_akezq_44",TM="_metrics_akezq_52",IM="_metric_akezq_52",DM="_metricValue_akezq_65",AM="_metricLabel_akezq_72",RM="_metricSub_akezq_77",PM="_toggle_akezq_83",LM="_toggleBtn_akezq_90",MM="_toggleActive_akezq_103",OM="_chartWrap_akezq_109",zM="_chart_akezq_109",$M="_bar_akezq_121",BM="_barCount_akezq_125",FM="_barLabel_akezq_131",HM="_table_akezq_138",VM="_bId_akezq_166",UM="_empty_akezq_172",WM="_heatmapWrap_akezq_186",qM="_heatmapGrid_akezq_191",KM="_heatmapHourLabel_akezq_199",ZM="_heatmapDowLabel_akezq_207",YM="_heatmapCell_akezq_216",QM="_srOnly_akezq_226",Ie={view:SM,card:CM,cardHead:NM,cardTitle:jM,note:EM,metrics:TM,metric:IM,metricValue:DM,metricLabel:AM,metricSub:RM,toggle:PM,toggleBtn:LM,toggleActive:MM,chartWrap:OM,chart:zM,bar:$M,barCount:BM,barLabel:FM,table:HM,bId:VM,empty:UM,heatmapWrap:WM,heatmapGrid:qM,heatmapHourLabel:KM,heatmapDowLabel:ZM,heatmapCell:YM,srOnly:QM},XM=5,GM={decision:"blocked.decision",external:"blocked.external",dependency:"blocked.dependency"};function JM({board:e}){const{t}=pt(),[r]=w.useState(()=>Date.now()),s=w.useMemo(()=>Ll(t,e.config.columns),[t,e.config.columns]),l=w.useMemo(()=>Es(e.config.members),[e.config.members]),a=C=>C===null?"—":t(GM[C]),c=w.useMemo(()=>e.tasks.map(C=>({id:C.frontmatter.id,title:C.frontmatter.title,status:C.frontmatter.status,assignee:C.frontmatter.assignee,blocked_type:C.frontmatter.blocked_type,blocked_reason:C.frontmatter.blocked_reason,created:C.frontmatter.created,updated:C.frontmatter.updated,body:C.body})),[e.tasks]),f=w.useMemo(()=>YE(c,r,{maxBottlenecks:XM}),[c,r]),m=w.useMemo(()=>Po(c,r,e.config.stallThresholds),[c,r,e.config.stallThresholds]),p=w.useMemo(()=>bM(c),[c]),[y,g]=w.useState("day");if(f.totalTasks===0)return u.jsx("div",{className:Ie.view,children:u.jsx("div",{className:Ie.empty,children:t("stats.empty")})});const x=y==="day"?f.completionsByDay:f.completionsByWeek,_=x.reduce((C,D)=>Math.max(C,D.count),0),k=C=>C===null?"—":t("stats.days",{n:C});return u.jsxs("div",{className:Ie.view,children:[u.jsxs("section",{className:Ie.card,"aria-labelledby":"stats-summary",children:[u.jsx("h2",{id:"stats-summary",className:Ie.cardTitle,children:t("stats.summary.title")}),u.jsxs("div",{className:Ie.metrics,children:[u.jsxs("div",{className:Ie.metric,children:[u.jsx("span",{className:Ie.metricValue,children:f.totalTasks}),u.jsx("span",{className:Ie.metricLabel,children:t("stats.summary.total")})]}),u.jsxs("div",{className:Ie.metric,children:[u.jsx("span",{className:Ie.metricValue,children:f.doneTasks}),u.jsx("span",{className:Ie.metricLabel,children:t("stats.summary.done")})]})]})]}),u.jsxs("section",{className:Ie.card,"aria-labelledby":"stats-completions",children:[u.jsxs("div",{className:Ie.cardHead,children:[u.jsx("h2",{id:"stats-completions",className:Ie.cardTitle,children:t("stats.completions.title")}),u.jsxs("div",{className:Ie.toggle,role:"group","aria-label":t("stats.completions.granularity"),children:[u.jsx("button",{type:"button",className:`${Ie.toggleBtn} ${y==="day"?Ie.toggleActive:""}`,"aria-pressed":y==="day",onClick:()=>g("day"),children:t("stats.completions.byDay")}),u.jsx("button",{type:"button",className:`${Ie.toggleBtn} ${y==="week"?Ie.toggleActive:""}`,"aria-pressed":y==="week",onClick:()=>g("week"),children:t("stats.completions.byWeek")})]})]}),x.length===0?u.jsx("p",{className:Ie.note,children:t("stats.completions.empty")}):u.jsx(eO,{bins:x,maxCount:_,ariaLabel:C=>t("stats.completions.barAria",C)})]}),u.jsxs("section",{className:Ie.card,"aria-labelledby":"stats-cycle",children:[u.jsx("h2",{id:"stats-cycle",className:Ie.cardTitle,children:t("stats.cycleTime.title")}),f.cycleTime.sampleSize===0?u.jsx("p",{className:Ie.note,children:t("stats.cycleTime.empty")}):u.jsxs("div",{className:Ie.metrics,children:[u.jsxs("div",{className:Ie.metric,children:[u.jsx("span",{className:Ie.metricValue,children:k(f.cycleTime.medianDays)}),u.jsx("span",{className:Ie.metricLabel,children:t("stats.cycleTime.median")})]}),u.jsxs("div",{className:Ie.metric,children:[u.jsx("span",{className:Ie.metricValue,children:k(f.cycleTime.meanDays)}),u.jsx("span",{className:Ie.metricLabel,children:t("stats.cycleTime.mean")})]}),u.jsx("div",{className:Ie.metric,children:u.jsx("span",{className:Ie.metricSub,children:t("stats.cycleTime.sample",{n:f.cycleTime.sampleSize})})})]})]}),u.jsxs("section",{className:Ie.card,"aria-labelledby":"stats-dwell",children:[u.jsx("h2",{id:"stats-dwell",className:Ie.cardTitle,children:t("stats.dwell.title")}),u.jsx("p",{className:Ie.note,children:t("stats.dwell.note")}),u.jsxs("table",{className:Ie.table,children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{scope:"col",children:t("stats.dwell.status")}),u.jsx("th",{scope:"col",children:t("stats.dwell.count")}),u.jsx("th",{scope:"col",children:t("stats.dwell.avg")}),u.jsx("th",{scope:"col",children:t("stats.dwell.max")})]})}),u.jsx("tbody",{children:f.dwellByStatus.filter(C=>C.count>0).map(C=>u.jsxs("tr",{children:[u.jsx("td",{children:s(C.status)}),u.jsx("td",{children:C.count}),u.jsx("td",{children:k(C.avgDays)}),u.jsx("td",{children:k(C.maxDays)})]},C.status))})]})]}),u.jsxs("section",{className:Ie.card,"aria-labelledby":"stats-member",children:[u.jsx("h2",{id:"stats-member",className:Ie.cardTitle,children:t("stats.member.title")}),f.completionsByMember.length===0?u.jsx("p",{className:Ie.note,children:t("stats.member.empty")}):u.jsxs("table",{className:Ie.table,children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{scope:"col",children:t("stats.member.name")}),u.jsx("th",{scope:"col",children:t("stats.summary.done")})]})}),u.jsx("tbody",{children:f.completionsByMember.map(C=>u.jsxs("tr",{children:[u.jsx("td",{children:C.member!==null?l(C.member):t("stats.member.unassigned")}),u.jsx("td",{children:C.count})]},C.member??"(unassigned)"))})]})]}),u.jsxs("section",{className:Ie.card,"aria-labelledby":"stats-bottleneck",children:[u.jsx("h2",{id:"stats-bottleneck",className:Ie.cardTitle,children:t("stats.bottlenecks.title")}),f.bottlenecks.length===0?u.jsx("p",{className:Ie.note,children:t("stats.bottlenecks.empty")}):u.jsxs("table",{className:Ie.table,children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{scope:"col",children:t("stats.bottlenecks.task")}),u.jsx("th",{scope:"col",children:t("stats.bottlenecks.dwell")}),u.jsx("th",{scope:"col",children:t("stats.bottlenecks.type")}),u.jsx("th",{scope:"col",children:t("stats.bottlenecks.reason")})]})}),u.jsx("tbody",{children:f.bottlenecks.map(C=>u.jsxs("tr",{children:[u.jsxs("td",{children:[u.jsx("span",{className:Ie.bId,children:C.id})," ",C.title]}),u.jsx("td",{children:t("stats.days",{n:C.dwellDays})}),u.jsx("td",{children:a(C.blockedType)}),u.jsx("td",{children:C.blockedReason??"—"})]},C.id))})]})]}),u.jsxs("section",{className:Ie.card,"aria-labelledby":"stats-stalled",children:[u.jsx("h2",{id:"stats-stalled",className:Ie.cardTitle,children:t("stalled.title")}),u.jsx("p",{className:Ie.note,children:t("stalled.note")}),m.length===0?u.jsx("p",{className:Ie.note,children:t("stalled.empty")}):u.jsxs("table",{className:Ie.table,children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{scope:"col",children:t("stalled.task")}),u.jsx("th",{scope:"col",children:t("stalled.status")}),u.jsx("th",{scope:"col",children:t("stalled.idle")})]})}),u.jsx("tbody",{children:m.map(C=>u.jsxs("tr",{children:[u.jsxs("td",{children:[u.jsx("span",{className:Ie.bId,children:C.id})," ",C.title]}),u.jsx("td",{children:s(C.status)}),u.jsx("td",{children:t("stats.days",{n:C.idleDays})})]},C.id))})]})]}),u.jsxs("section",{className:Ie.card,"aria-labelledby":"stats-heatmap",children:[u.jsx("h2",{id:"stats-heatmap",className:Ie.cardTitle,children:t("heatmap.title")}),u.jsx("p",{className:Ie.note,children:t("heatmap.note")}),p.total===0?u.jsx("p",{className:Ie.note,children:t("heatmap.empty")}):u.jsx(tO,{heatmap:p})]})]})}function eO({bins:e,maxCount:t,ariaLabel:r}){const{t:s}=pt(),l=28,a=8,c=120,f=28,m=e.length*(l+a)+a,p=c+f;return u.jsxs("div",{className:Ie.chartWrap,children:[u.jsx("svg",{className:Ie.chart,viewBox:`0 0 ${m} ${p}`,role:"img","aria-label":s("stats.completions.title"),preserveAspectRatio:"xMinYMid meet",children:e.map((y,g)=>{const x=t>0?Math.max(2,Math.round(y.count/t*c)):2,_=a+g*(l+a),k=c-x;return u.jsxs("g",{children:[u.jsx("title",{children:r(y)}),u.jsx("rect",{x:_,y:k,width:l,height:x,className:Ie.bar,rx:2}),u.jsx("text",{x:_+l/2,y:k-4,className:Ie.barCount,textAnchor:"middle",children:y.count}),u.jsx("text",{x:_+l/2,y:c+16,className:Ie.barLabel,textAnchor:"middle",children:y.key.slice(5)})]},y.key)})}),u.jsxs("table",{className:Ie.srOnly,children:[u.jsx("caption",{children:s("stats.completions.title")}),u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{scope:"col",children:s("stats.completions.date")}),u.jsx("th",{scope:"col",children:s("stats.summary.done")})]})}),u.jsx("tbody",{children:e.map(y=>u.jsxs("tr",{children:[u.jsx("td",{children:y.key}),u.jsx("td",{children:y.count})]},y.key))})]})]})}function tO({heatmap:e}){const{t}=pt(),r=Array.from({length:24},(l,a)=>a),s=["heatmap.dow.0","heatmap.dow.1","heatmap.dow.2","heatmap.dow.3","heatmap.dow.4","heatmap.dow.5","heatmap.dow.6"];return u.jsxs("div",{className:Ie.heatmapWrap,children:[u.jsxs("div",{className:Ie.heatmapGrid,role:"presentation",children:[u.jsx("div",{}),r.map(l=>u.jsx("div",{className:Ie.heatmapHourLabel,"aria-hidden":"true",children:l},l)),e.grid.map((l,a)=>u.jsxs(w.Fragment,{children:[u.jsx("div",{className:Ie.heatmapDowLabel,"aria-hidden":"true",children:t(s[a])}),l.map((c,f)=>{const m=e.maxCount>0?Math.max(.06,c/e.maxCount*.85):.06;return u.jsx("div",{className:Ie.heatmapCell,style:{"--cell-alpha":m},title:t("heatmap.cellAria",{count:c,dow:t(s[a]),hour:f}),"aria-label":t("heatmap.cellAria",{count:c,dow:t(s[a]),hour:f})},f)})]},a))]}),u.jsxs("table",{className:Ie.srOnly,children:[u.jsx("caption",{children:t("heatmap.title")}),u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{scope:"col",children:t("heatmap.col.dow")}),u.jsx("th",{scope:"col",children:t("heatmap.col.hour")}),u.jsx("th",{scope:"col",children:t("heatmap.col.count")})]})}),u.jsx("tbody",{children:e.grid.flatMap((l,a)=>l.map((c,f)=>({dow:a,hour:f,count:c})).filter(({count:c})=>c>0).map(({dow:c,hour:f,count:m})=>u.jsxs("tr",{children:[u.jsx("td",{children:t(s[c])}),u.jsxs("td",{children:[f,":00"]}),u.jsx("td",{children:m})]},`${c}-${f}`)))})]})]})}const gd=Number.MAX_SAFE_INTEGER;function Ng(e){if(e===null)return gd;const t=Date.parse(e.replace(" ","T"));return Number.isNaN(t)?gd:t}function nO(e,t,r){const s=[];for(const l of e)s.push({kind:"log",timestamp:l.timestamp,sortMs:Ng(l.timestamp),member:l.member,text:l.message,hash:null});for(const l of t)s.push({kind:"comment",timestamp:l.timestamp,sortMs:Ng(l.timestamp),member:l.member,text:l.message,hash:null});for(const l of r){const a=Date.parse(l.authorDate);s.push({kind:"commit",timestamp:/^\d{4}-\d{2}-\d{2}/.test(l.authorDate)?l.authorDate.slice(0,10):l.authorDate,sortMs:Number.isNaN(a)?gd:a,member:null,text:l.subject,hash:l.hash.slice(0,7)})}return s.sort((l,a)=>l.sortMs-a.sortMs)}const rO="_overlay_1mlzx_1",iO="_panel_1mlzx_10",sO="_header_1mlzx_20",lO="_id_1mlzx_28",aO="_title_1mlzx_34",oO="_copyBtn_1mlzx_41",cO="_close_1mlzx_59",uO="_tabs_1mlzx_72",dO="_tab_1mlzx_72",fO="_tabActive_1mlzx_96",mO="_body_1mlzx_101",pO="_markdown_1mlzx_107",hO="_editor_1mlzx_142",gO="_timeline_1mlzx_155",yO="_entry_1mlzx_164",vO="_entryMeta_1mlzx_183",xO="_entryMember_1mlzx_190",_O="_entryMessage_1mlzx_195",kO="_mention_1mlzx_200",wO="_mentionSelf_1mlzx_205",bO="_emptyTimeline_1mlzx_211",SO="_timelineKind_1mlzx_217",CO="_footer_1mlzx_241",NO="_dirty_1mlzx_249",jO="_error_1mlzx_254",EO="_spacer_1mlzx_260",TO="_btn_1mlzx_264",IO="_btnPrimary_1mlzx_279",DO="_commentInput_1mlzx_290",AO="_commentField_1mlzx_305",RO="_docsHint_1mlzx_313",PO="_docsList_1mlzx_323",LO="_docRow_1mlzx_332",MO="_docLink_1mlzx_338",OO="_docLinkActive_1mlzx_361",zO="_docBroken_1mlzx_365",$O="_docRemove_1mlzx_374",BO="_docsActions_1mlzx_393",FO="_docsPicker_1mlzx_397",HO="_docsPreview_1mlzx_407",VO="_docsPreviewPath_1mlzx_412",UO="_metaSection_1mlzx_420",WO="_metaLabel_1mlzx_438",qO="_depId_1mlzx_447",KO="_btnDanger_1mlzx_456",ZO="_deleteConfirm_1mlzx_476",G={overlay:rO,panel:iO,header:sO,id:lO,title:aO,copyBtn:oO,close:cO,tabs:uO,tab:dO,tabActive:fO,body:mO,markdown:pO,editor:hO,timeline:gO,entry:yO,entryMeta:vO,entryMember:xO,entryMessage:_O,mention:kO,mentionSelf:wO,emptyTimeline:bO,timelineKind:SO,footer:CO,dirty:NO,error:jO,spacer:EO,btn:TO,btnPrimary:IO,commentInput:DO,commentField:AO,docsHint:RO,docsList:PO,docRow:LO,docLink:MO,docLinkActive:OO,docBroken:zO,docRemove:$O,docsActions:BO,docsPicker:FO,docsPreview:HO,docsPreviewPath:VO,metaSection:UO,metaLabel:WO,depId:qO,btnDanger:KO,deleteConfirm:ZO},jg="aizuchi.commentMember";function yd(e){const t=[];for(const r of e)r.type==="file"?t.push(r.path):r.children&&t.push(...yd(r.children));return t}const YO={log:"timeline.kind.log",comment:"timeline.kind.comment",commit:"timeline.kind.commit"};function QO({task:e,instructionTemplate:t,members:r,allTasks:s=[],docsEnabled:l=!1,pinned:a=!1,onTogglePin:c,onClose:f,onSaved:m,onDeleted:p}){var Bl;const{t:y}=pt(),[g,x]=w.useState("preview"),[_,k]=w.useState(e.raw),[C,D]=w.useState(e.mtimeMs),[S,R]=w.useState(!1),[T,M]=w.useState(null),[I,j]=w.useState(null),[B,Q]=w.useState(null),[te,O]=w.useState(!1),[W,ne]=w.useState(!1),[_e,ie]=w.useState(null),[X,J]=w.useState(!1),ve=typeof localStorage<"u"?localStorage.getItem(jg):null,[ee,fe]=w.useState(ve&&r.some(K=>K.id===ve)?ve:((Bl=r[0])==null?void 0:Bl.id)??""),[N,P]=w.useState(""),[F,E]=w.useState(null),ce=w.useMemo(()=>Es(r),[r]),Se=w.useMemo(()=>new Set(r.map(K=>K.id)),[r]),ge=(K,be)=>gv(K,Se).map((lt,pn)=>lt.kind==="text"?u.jsx("span",{children:lt.value},pn):u.jsxs("span",{className:`${G.mention} ${be!=null&<.id===be?G.mentionSelf:""}`,children:["@",ce(lt.id)]},pn)),[xe,ze]=w.useState(null),[de,ke]=w.useState(!1),[Nt,Lt]=w.useState(!1),[Kt,jt]=w.useState(null),[se,Ge]=w.useState(null),wt=w.useRef(null),[tn,Zt]=w.useState(null),[bt,Mt]=w.useState(!1),[yt,Yt]=w.useState(null),[ye,Ce]=w.useState(null),[$,Z]=w.useState(!1),[q,we]=w.useState(!1),[Ve,st]=w.useState(null),[Ot,Ut]=w.useState(!1),[yn,vn]=w.useState(null),Y=(yt==null?void 0:yt.raw)??e.raw,le=[...new Set((yt==null?void 0:yt.relatedDocs)??e.frontmatter.related_docs??[])],Ne=(yt==null?void 0:yt.dependsOn)??e.frontmatter.depends_on??[],Xe=(yt==null?void 0:yt.priority)??e.frontmatter.priority??"medium",Tn=l||le.length>0,vt=_!==e.raw;w.useEffect(()=>{yt!==null&&e.raw===yt.raw&&Yt(null)},[e.raw,yt]);const ot=Nt||q;w.useEffect(()=>{const K=be=>{var pn;if(be.key!=="Escape"||I||te||ot)return;const lt=(pn=be.target)==null?void 0:pn.tagName;lt==="TEXTAREA"||lt==="INPUT"||lt==="SELECT"||f()};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[I,te,ot,f]);const Et=w.useRef(null);bo(Et,!I&&!te&&!ot);const zt=w.useRef(e.raw);w.useEffect(()=>{e.raw!==zt.current&&(k(K=>K===zt.current?e.raw:K),D(K=>_===zt.current?e.mtimeMs:K),zt.current=e.raw)},[e.raw,e.mtimeMs]);const Pn=async(K=C)=>{R(!0),M(null);try{const be=await _u(e.frontmatter.id,_,K);D(be.mtimeMs),j(null),m(),x("preview")}catch(be){be instanceof Gn?j({serverContent:be.serverContent,serverMtimeMs:be.serverMtimeMs}):M(be instanceof Error?be.message:y("detail.saveError"))}finally{R(!1)}},mn=async()=>{const K=xT(e.body)??void 0,be=yv(t,e.frontmatter.id,vv(e.frontmatter.id),K),lt=await Ss(be);Q(lt?"done":"failed"),window.setTimeout(()=>Q(null),2e3)},on=async K=>{M(null);try{await Rg(e.frontmatter.id,K.length>0?K:void 0,C),m()}catch(be){be instanceof Gn?j({serverContent:be.serverContent,serverMtimeMs:be.serverMtimeMs}):M(be instanceof Error?be.message:y("revise.error"))}},xn=async()=>{J(!0),ie(null);try{await G_(e.frontmatter.id),ne(!1),p!==void 0?p():(m(),f())}catch(K){ie(K instanceof Error?K.message:y("detail.delete.error"))}finally{J(!1)}},mr=e.frontmatter.status==="done"||e.frontmatter.status==="in_progress"||e.frontmatter.status==="pending";w.useEffect(()=>{if(g!=="docs"||xe!==null||de)return;let K=!0;return(async()=>{try{const be=await Pg();K&&ze(be)}catch{K&&ke(!0)}})(),()=>{K=!1}},[g,xe,de]),w.useEffect(()=>{if(g!=="commits"&&g!=="timeline"||Ve!==null||Ot)return;let K=!0;return(async()=>{try{const be=await X_(e.frontmatter.id);K&&st(be)}catch{K&&Ut(!0)}})(),()=>{K=!1}},[g,Ve,Ot,e.frontmatter.id]);const Dt=async K=>{await Ss(K)&&(vn(K),window.setTimeout(()=>vn(lt=>lt===K?null:lt),2e3))},In=async K=>{Mt(!0),Zt(null);try{const be=GD(Y,K);if(be===Y){Zt(y("docs.noChange"));return}const lt=await _u(e.frontmatter.id,be,C);D(lt.mtimeMs),Yt({raw:lt.raw,relatedDocs:lt.frontmatter.related_docs??[],dependsOn:lt.frontmatter.depends_on??[],priority:lt.frontmatter.priority??"medium"}),m()}catch(be){be instanceof Gn?(Yt(null),Zt(y("docs.conflict")),m()):Zt(be instanceof Error?be.message:y("detail.saveError"))}finally{Mt(!1)}},nn=async(K,be,lt)=>{Z(!0),Ce(null);try{if(K===Y){Ce(y("meta.noChange"));return}const pn=await _u(e.frontmatter.id,K,C);D(pn.mtimeMs),Yt({raw:pn.raw,relatedDocs:pn.frontmatter.related_docs??[],dependsOn:be,priority:lt}),m()}catch(pn){pn instanceof Gn?(Yt(null),Ce(y("meta.conflict")),m()):Ce(pn instanceof Error?pn.message:y("detail.saveError"))}finally{Z(!1)}},Ln=K=>{const be=YD(Y,K);nn(be,K,Xe)},Wn=K=>{const be=QD(Y,K);nn(be,Ne,K)},nr=async K=>{Ge(K),wt.current=K,jt(null),Zt(null);try{const be=await Lg(K);if(wt.current!==K)return;jt(be)}catch(be){if(wt.current!==K)return;be instanceof er&&(be.status===404||be.status===403)?jt("broken"):Zt(be instanceof Error?be.message:y("docs.loadError"))}},_n=async()=>{const K=N.trim();if(!(K.length===0||ee==="")){E(null);try{await Mg(e.frontmatter.id,ee,K),P(""),typeof localStorage<"u"&&localStorage.setItem(jg,ee),m()}catch(be){E(be instanceof Error?be.message:y("comment.error"))}}},qn=tf(e.body),Ar=yT(e.body),$l=nO(qn,Ar,Ve??[]);return u.jsxs("div",{className:G.overlay,onClick:K=>{Cd(K.target,K.currentTarget)&&f()},children:[u.jsxs("aside",{ref:Et,className:G.panel,role:"dialog","aria-modal":"true","aria-label":y("detail.aria",{id:e.frontmatter.id}),children:[u.jsxs("header",{className:G.header,children:[u.jsx("span",{className:G.id,children:e.frontmatter.id}),u.jsx("span",{className:G.title,children:e.frontmatter.title}),u.jsx("button",{type:"button",className:G.copyBtn,onClick:()=>void mn(),title:y("detail.copyInstruction.title"),children:y(B==="done"?"detail.copyInstruction.done":B==="failed"?"detail.copyInstruction.failed":"detail.copyInstruction")}),mr&&u.jsx("button",{type:"button",className:G.copyBtn,onClick:()=>O(!0),disabled:vt,title:vt?y("docs.dirtyHint"):void 0,children:y("revise.button")}),c!==void 0&&u.jsxs("button",{type:"button",className:G.copyBtn,"aria-pressed":a,onClick:()=>c(e.frontmatter.id),title:y(a?"home.pin.unpin":"home.pin.toggle"),children:["📌 ",y(a?"home.pin.unpin":"home.pin.toggle")]}),W?u.jsxs("span",{className:G.deleteConfirm,children:[y("detail.delete.confirm",{id:e.frontmatter.id}),u.jsx("button",{type:"button",className:`${G.btn} ${G.btnDanger}`,onClick:()=>void xn(),disabled:X,children:y(X?"common.saving":"detail.delete")}),u.jsx("button",{type:"button",className:G.btn,onClick:()=>{ne(!1),ie(null)},disabled:X,children:y("common.cancel")})]}):u.jsx("button",{type:"button",className:`${G.btn} ${G.btnDanger}`,onClick:()=>ne(!0),disabled:vt||X,title:vt?y("docs.dirtyHint"):void 0,children:y("detail.delete")}),_e!==null&&u.jsx("span",{className:G.error,role:"alert",children:_e}),u.jsx("button",{type:"button",className:G.close,onClick:f,"aria-label":y("detail.close"),children:"×"})]}),u.jsxs("nav",{className:G.tabs,children:[u.jsx("button",{type:"button",className:`${G.tab} ${g==="preview"?G.tabActive:""}`,onClick:()=>x("preview"),children:y("detail.tab.preview")}),u.jsx("button",{type:"button",className:`${G.tab} ${g==="edit"?G.tabActive:""}`,onClick:()=>x("edit"),children:y("detail.tab.edit")}),u.jsx("button",{type:"button",className:`${G.tab} ${g==="log"?G.tabActive:""}`,onClick:()=>x("log"),children:y("detail.tab.log")}),u.jsx("button",{type:"button",className:`${G.tab} ${g==="comment"?G.tabActive:""}`,onClick:()=>x("comment"),children:y("comment.title")}),u.jsx("button",{type:"button",className:`${G.tab} ${g==="meta"?G.tabActive:""}`,onClick:()=>x("meta"),children:y("detail.tab.meta")}),Tn&&u.jsx("button",{type:"button",className:`${G.tab} ${g==="docs"?G.tabActive:""}`,onClick:()=>x("docs"),children:y("detail.tab.docs")}),u.jsx("button",{type:"button",className:`${G.tab} ${g==="commits"?G.tabActive:""}`,onClick:()=>x("commits"),children:y("detail.tab.commits")}),u.jsx("button",{type:"button",className:`${G.tab} ${g==="timeline"?G.tabActive:""}`,onClick:()=>x("timeline"),children:y("detail.tab.timeline")})]}),u.jsxs("div",{className:G.body,children:[g==="preview"&&u.jsx("div",{className:G.markdown,children:u.jsx(Oi,{remarkPlugins:[zi],children:e.body})}),g==="edit"&&u.jsx("textarea",{className:G.editor,value:_,onChange:K=>k(K.target.value),spellCheck:!1,"aria-label":y("detail.editAria")}),g==="log"&&u.jsx(u.Fragment,{children:qn.length===0?u.jsx("p",{className:G.emptyTimeline,children:y("detail.log.empty")}):u.jsx("ol",{className:G.timeline,children:qn.map((K,be)=>u.jsxs("li",{className:G.entry,children:[u.jsxs("span",{className:G.entryMeta,children:[K.timestamp??"—",K.member&&u.jsxs("span",{className:G.entryMember,children:[" [",ce(K.member),"]"]})]}),u.jsx("span",{className:G.entryMessage,children:ge(K.message)})]},be))})}),g==="comment"&&u.jsxs(u.Fragment,{children:[Ar.length===0?u.jsx("p",{className:G.emptyTimeline,children:y("comment.empty")}):u.jsx("ol",{className:G.timeline,children:Ar.map((K,be)=>u.jsxs("li",{className:G.entry,children:[u.jsxs("span",{className:G.entryMeta,children:[K.timestamp??"—",K.member&&u.jsxs("span",{className:G.entryMember,children:[" [",ce(K.member),"]"]})]}),u.jsx("span",{className:G.entryMessage,children:ge(K.message,ee)})]},be))}),F&&u.jsx("p",{className:G.error,children:F}),u.jsxs("div",{className:G.commentInput,children:[u.jsx("select",{value:ee,onChange:K=>fe(K.target.value),"aria-label":y("comment.member"),children:r.map(K=>u.jsx("option",{value:K.id,children:K.label??K.id},K.id))}),u.jsx("input",{className:G.commentField,value:N,onChange:K=>P(K.target.value.replace(/[\r\n]/g,"")),placeholder:y("comment.placeholder"),"aria-label":y("comment.placeholder"),onKeyDown:K=>{K.key==="Enter"&&(K.preventDefault(),_n())}}),u.jsx("button",{type:"button",className:`${G.btn} ${G.btnPrimary}`,onClick:()=>void _n(),disabled:N.trim().length===0,children:y("comment.send")})]})]}),g==="meta"&&u.jsxs(u.Fragment,{children:[ye&&u.jsx("p",{className:G.error,role:"alert",children:ye}),vt&&u.jsx("p",{className:G.docsHint,children:y("meta.dirtyHint")}),u.jsxs("div",{className:G.metaSection,children:[u.jsx("p",{className:G.metaLabel,children:y("meta.priority")}),u.jsx("select",{value:Xe,onChange:K=>{const be=K.target.value;jl.includes(be)&&Wn(be)},disabled:vt||$,"aria-label":y("meta.priority"),children:jl.map(K=>u.jsx("option",{value:K,children:K},K))})]}),u.jsxs("div",{className:G.metaSection,children:[u.jsx("p",{className:G.metaLabel,children:y("meta.dependsOn")}),Ne.length===0?u.jsx("p",{className:G.emptyTimeline,children:y("meta.dependsOn.empty")}):u.jsx("ul",{className:G.docsList,children:Ne.map(K=>u.jsxs("li",{className:G.docRow,children:[u.jsx("span",{className:G.depId,children:K}),u.jsx("button",{type:"button",className:G.docRemove,onClick:()=>Ln(Ne.filter(be=>be!==K)),disabled:vt||$,"aria-label":y("meta.dependsOn.remove",{id:K}),children:"×"})]},K))}),u.jsx("div",{className:G.docsActions,children:u.jsx("button",{type:"button",className:G.btn,onClick:()=>we(K=>!K),disabled:vt||$,"aria-expanded":q,children:y("meta.dependsOn.add")})}),q&&u.jsx("div",{className:G.docsPicker,children:(()=>{const K=e.frontmatter.id,be=s.filter(lt=>lt.frontmatter.id!==K&&!Ne.includes(lt.frontmatter.id));return be.length===0?u.jsx("p",{className:G.emptyTimeline,children:y("meta.dependsOn.pickerEmpty")}):u.jsx("ul",{className:G.docsList,"aria-label":y("meta.dependsOn.pickerTitle"),children:be.map(lt=>u.jsx("li",{className:G.docRow,children:u.jsxs("button",{type:"button",className:G.docLink,onClick:()=>{we(!1),Ln([...Ne,lt.frontmatter.id])},disabled:vt||$,children:[lt.frontmatter.id,": ",lt.frontmatter.title]})},lt.frontmatter.id))})})()})]})]}),g==="docs"&&u.jsxs(u.Fragment,{children:[tn&&u.jsx("p",{className:G.error,role:"alert",children:tn}),vt&&u.jsx("p",{className:G.docsHint,children:y("docs.dirtyHint")}),le.length===0?u.jsx("p",{className:G.emptyTimeline,children:y("docs.empty")}):u.jsx("ul",{className:G.docsList,children:le.map(K=>{const be=xe!==null?yd(xe):null,lt=be!==null&&!be.includes(K);return u.jsxs("li",{className:G.docRow,children:[u.jsx("button",{type:"button",className:`${G.docLink} ${se===K?G.docLinkActive:""}`,onClick:()=>void nr(K),children:K}),lt&&u.jsx("span",{className:G.docBroken,children:y("docs.broken")}),u.jsx("button",{type:"button",className:G.docRemove,onClick:()=>void In(le.filter(pn=>pn!==K)),disabled:vt||bt,"aria-label":`${y("docs.remove")}: ${K}`,children:"×"})]},K)})}),u.jsx("div",{className:G.docsActions,children:u.jsx("button",{type:"button",className:G.btn,onClick:()=>Lt(K=>!K),disabled:vt||bt,"aria-expanded":Nt,children:y("docs.add")})}),Nt&&u.jsx("div",{className:G.docsPicker,children:de?u.jsx("p",{className:G.error,role:"alert",children:y("docs.treeError")}):xe===null?u.jsx("p",{className:G.emptyTimeline,children:y("board.loading")}):(()=>{const K=yd(xe).filter(be=>!le.includes(be));return K.length===0?u.jsx("p",{className:G.emptyTimeline,children:y("docs.pickerEmpty")}):u.jsx("ul",{className:G.docsList,"aria-label":y("docs.pickerTitle"),children:K.map(be=>u.jsx("li",{className:G.docRow,children:u.jsx("button",{type:"button",className:G.docLink,onClick:()=>{Lt(!1),In([...le,be])},disabled:vt||bt,children:be})},be))})})()}),se!==null&&u.jsxs("div",{className:G.docsPreview,children:[u.jsx("p",{className:G.docsPreviewPath,children:se}),Kt===null?u.jsx("p",{className:G.emptyTimeline,children:y("board.loading")}):Kt==="broken"?u.jsx("p",{className:G.docBroken,children:y("docs.broken")}):u.jsx("div",{className:G.markdown,children:u.jsx(Oi,{remarkPlugins:[zi],children:Kt.content})})]})]}),g==="commits"&&u.jsx(u.Fragment,{children:Ot?u.jsx("p",{className:G.error,role:"alert",children:y("commits.error")}):Ve===null?u.jsx("p",{className:G.emptyTimeline,children:y("board.loading")}):Ve.length===0?u.jsx("p",{className:G.emptyTimeline,children:y("commits.empty")}):u.jsx("ol",{className:G.timeline,children:Ve.map(K=>u.jsxs("li",{className:G.entry,children:[u.jsxs("span",{className:G.entryMeta,children:[u.jsx("button",{type:"button",className:G.docLink,onClick:()=>void Dt(K.hash),title:y("commits.copyHash"),children:yn===K.hash?y("commits.copied"):K.hash.slice(0,7)})," · ",K.authorDate.slice(0,10)]}),u.jsx("span",{className:G.entryMessage,children:K.subject})]},K.hash))})}),g==="timeline"&&u.jsxs(u.Fragment,{children:[Ot&&u.jsx("p",{className:G.error,role:"alert",children:y("commits.error")}),$l.length===0?u.jsx("p",{className:G.emptyTimeline,children:y(Ve===null&&!Ot?"board.loading":"timeline.empty")}):u.jsx("ol",{className:G.timeline,children:$l.map((K,be)=>u.jsxs("li",{className:G.entry,children:[u.jsxs("span",{className:G.entryMeta,children:[u.jsx("span",{className:G.timelineKind,"data-kind":K.kind,children:y(YO[K.kind])})," ",K.timestamp??"—",K.member&&u.jsxs("span",{className:G.entryMember,children:[" [",ce(K.member),"]"]}),K.hash&&u.jsxs("span",{className:G.entryMember,children:[" ",K.hash]})]}),u.jsx("span",{className:G.entryMessage,children:ge(K.text)})]},be))})]})]}),g==="edit"&&u.jsxs("footer",{className:G.footer,children:[T?u.jsx("span",{className:G.error,children:T}):vt?u.jsx("span",{className:G.dirty,children:y("detail.dirty")}):u.jsx("span",{className:G.spacer}),u.jsx("button",{type:"button",className:G.btn,onClick:()=>{k(e.raw),M(null)},disabled:!vt||S,children:y("common.discard")}),u.jsx("button",{type:"button",className:`${G.btn} ${G.btnPrimary}`,onClick:()=>void Pn(),disabled:!vt||S,children:y(S?"common.saving":"common.save")})]})]}),I&&u.jsx(Ev,{serverContent:I.serverContent,localContent:_,onClose:()=>j(null),onOverwrite:()=>void Pn(I.serverMtimeMs),onReload:()=>{k(I.serverContent),D(I.serverMtimeMs),j(null),M(null)}}),te&&u.jsx(wv,{taskTitle:e.frontmatter.title,onCancel:()=>O(!1),onConfirm:K=>{O(!1),on(K)}})]})}const XO="_view_1hota_1",GO="_list_1hota_8",JO="_search_1hota_18",ez="_searchInput_1hota_23",tz="_listScroll_1hota_39",nz="_taskList_1hota_45",rz="_taskBtn_1hota_61",iz="_taskBtnActive_1hota_84",sz="_taskId_1hota_94",lz="_taskTitle_1hota_100",az="_taskTime_1hota_107",oz="_detail_1hota_114",cz="_detailHeader_1hota_121",uz="_detailHeadText_1hota_128",dz="_detailTitle_1hota_133",fz="_meta_1hota_140",mz="_metaId_1hota_149",pz="_restoreBtn_1hota_153",hz="_diffWrap_1hota_181",gz="_diffTitle_1hota_185",yz="_previewTitle_1hota_186",vz="_diff_1hota_181",xz="_line_1hota_207",_z="_sign_1hota_214",kz="_equal_1hota_220",wz="_add_1hota_224",bz="_remove_1hota_229",Sz="_legend_1hota_234",Cz="_markdown_1hota_242",Nz="_muted_1hota_261",jz="_error_1hota_266",rt={view:XO,list:GO,search:JO,searchInput:ez,listScroll:tz,taskList:nz,taskBtn:rz,taskBtnActive:iz,taskId:sz,taskTitle:lz,taskTime:az,detail:oz,detailHeader:cz,detailHeadText:uz,detailTitle:dz,meta:fz,metaId:mz,restoreBtn:pz,diffWrap:hz,diffTitle:gz,previewTitle:yz,diff:vz,line:xz,sign:_z,equal:kz,add:wz,remove:bz,legend:Sz,markdown:Cz,muted:Nz,error:jz};function Eg(e){return`${e.id}.${e.trashedAt}`}function Ez({board:e,onChanged:t,onError:r}){const{t:s}=pt(),[l,a]=w.useState(null),[c,f]=w.useState(!1),[m,p]=w.useState(""),[y,g]=w.useState(null),[x,_]=w.useState(!1),k=w.useMemo(()=>e.tasks.map(j=>`${j.frontmatter.id}@${j.frontmatter.updated}`).join(`
|
|
99
|
+
`),[e.tasks]);w.useEffect(()=>{let j=!0;const B=new AbortController;return(async()=>{try{const Q=await L_(B.signal);j&&(a(Q.items),f(!1))}catch{j&&(a([]),f(!0))}})(),()=>{j=!1,B.abort()}},[k]);const C=w.useMemo(()=>Ll(s,e.config.columns),[s,e.config.columns]),D=w.useMemo(()=>{const j=l??[],B=m.trim().toLowerCase();return B===""?j:j.filter(Q=>[Q.id,Q.title??"",Q.body].some(te=>te.toLowerCase().includes(B)))},[l,m]),S=y!==null?D.find(j=>Eg(j)===y)??null:null,R=S!==null?e.tasks.find(j=>j.frontmatter.id===S.id):void 0,T=w.useMemo(()=>S===null||R===void 0?null:Nv(S.body,R.body),[S,R]),M=j=>new Date(j).toLocaleString(),I=async j=>{const B=e.tasks.some(te=>te.frontmatter.id===j.id),Q=B?"trash.view.restoreOverwriteConfirm":"trash.view.restoreConfirm";if(!(typeof window<"u"&&!window.confirm(s(Q,{id:j.id})))){_(!0);try{await M_(j.id,j.trashedAt,B?!0:void 0),g(null),t()}catch(te){const O=te instanceof er&&te.status===409?s("trash.view.restoreConflict",{id:j.id}):te instanceof Error?te.message:s("trash.view.restoreError");r(O)}finally{_(!1)}}};return u.jsxs("div",{className:rt.view,children:[u.jsxs("nav",{className:rt.list,"aria-label":s("trash.view.listTitle"),children:[u.jsx("div",{className:rt.search,children:u.jsx("input",{className:rt.searchInput,type:"search",value:m,onChange:j=>p(j.target.value),placeholder:s("trash.view.searchPlaceholder"),"aria-label":s("trash.view.searchPlaceholder")})}),u.jsx("div",{className:rt.listScroll,children:c?u.jsx("p",{className:rt.error,role:"alert",children:s("trash.view.loadError")}):l===null?u.jsx("p",{className:rt.muted,children:s("board.loading")}):D.length===0?u.jsx("p",{className:rt.muted,children:m.trim()===""?s("trash.view.empty"):s("trash.view.noMatch")}):u.jsx("ul",{className:rt.taskList,children:D.map(j=>{const B=Eg(j);return u.jsx("li",{children:u.jsxs("button",{type:"button",className:`${rt.taskBtn} ${y===B?rt.taskBtnActive:""}`,onClick:()=>g(B),"aria-current":y===B?"true":void 0,children:[u.jsx("span",{className:rt.taskId,children:j.id})," ",u.jsx("span",{className:rt.taskTitle,children:j.title??j.id}),u.jsx("span",{className:rt.taskTime,children:M(j.trashedAt)})]})},B)})})})]}),u.jsx("section",{className:rt.detail,"aria-label":s("view.trash"),children:S===null?u.jsx("p",{className:rt.muted,children:s("trash.view.selectPrompt")}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:rt.detailHeader,children:[u.jsxs("div",{className:rt.detailHeadText,children:[u.jsx("h2",{className:rt.detailTitle,children:S.title??S.id}),u.jsxs("p",{className:rt.meta,children:[u.jsx("span",{className:rt.metaId,children:S.id}),S.status!==null&&u.jsx("span",{children:C(S.status)}),u.jsx("span",{children:s("trash.view.trashedAt",{time:M(S.trashedAt)})})]})]}),u.jsx("button",{type:"button",className:rt.restoreBtn,onClick:()=>void I(S),disabled:x,children:s("trash.view.restore")})]}),R===void 0?u.jsx("p",{className:rt.muted,children:s("trash.view.noCurrent")}):T!==null&&T.some(j=>j.op!=="equal")?u.jsxs("div",{className:rt.diffWrap,children:[u.jsx("h3",{className:rt.diffTitle,children:s("trash.view.diffTitle")}),u.jsx("div",{className:rt.diff,role:"region","aria-label":s("trash.view.diffTitle"),children:T.map((j,B)=>u.jsxs("div",{className:`${rt.line} ${j.op==="add"?rt.add:j.op==="remove"?rt.remove:rt.equal}`,children:[u.jsx("span",{className:rt.sign,children:j.op==="add"?"+":j.op==="remove"?"-":" "}),u.jsx("span",{children:j.text})]},B))}),u.jsxs("p",{className:rt.legend,children:[u.jsx("span",{children:s("trash.view.diff.add")}),u.jsx("span",{children:s("trash.view.diff.remove")})]})]}):u.jsx("p",{className:rt.muted,children:s("trash.view.noDiff")}),u.jsx("h3",{className:rt.previewTitle,children:s("trash.view.previewTitle")}),u.jsx("div",{className:rt.markdown,children:u.jsx(Oi,{remarkPlugins:[zi],children:S.body})})]})})]})}const Tz="_banner_1uu1k_1",Iz="_summary_1uu1k_9",Dz="_icon_1uu1k_22",Az="_list_1uu1k_26",Rz="_item_1uu1k_35",Pz="_kind_1uu1k_39",Lz="_path_1uu1k_51",Mz="_renameBtn_1uu1k_57",fi={banner:Tz,summary:Iz,icon:Dz,list:Az,item:Rz,kind:Pz,path:Lz,renameBtn:Mz},Oz={invalid_task:"warning.kind.invalid_task",duplicate_id:"warning.kind.duplicate_id",unregistered_member:"warning.kind.unregistered_member",invalid_config:"warning.kind.invalid_config",mode_violation:"warning.kind.mode_violation"};function zz({warnings:e,onRename:t}){const{t:r}=pt();return e.length===0?null:u.jsxs("details",{className:fi.banner,open:!0,children:[u.jsxs("summary",{className:fi.summary,children:[u.jsx("span",{className:fi.icon,"aria-hidden":"true",children:"⚠"}),r("warning.summary",{n:e.length})]}),u.jsx("ul",{className:fi.list,children:e.map((s,l)=>u.jsxs("li",{className:fi.item,children:[u.jsx("span",{className:fi.kind,children:r(Oz[s.kind])}),s.taskId&&u.jsxs("strong",{children:[s.taskId,": "]}),s.message,s.path&&u.jsxs("span",{className:fi.path,children:[" (",s.path,")"]}),s.kind==="duplicate_id"&&s.taskId&&t&&u.jsx("button",{type:"button",className:fi.renameBtn,onClick:()=>t(s.taskId),children:r("rename.action")})]},l))})]})}const Iv="aizuchi.viewerId";function Tg(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(Iv);return typeof e=="string"&&e.length>0?e:null}catch{return null}}function Ig(e){try{if(typeof localStorage>"u")return;localStorage.setItem(Iv,e)}catch{}}function $z(e){return e.length===0?null:(e.find(r=>r.type==="human")??e[0]).id}function Bz(e,t){return e!==null&&e.length>0&&t.some(r=>r.id===e)?e:$z(t)}const Fz="_app_168tj_1",Hz="_main_168tj_8",Vz="_header_168tj_15",Uz="_brand_168tj_26",Wz="_tabs_168tj_32",qz="_tab_168tj_32",Kz="_tabActive_168tj_64",Zz="_project_168tj_69",Yz="_spacer_168tj_74",Qz="_status_168tj_78",Xz="_dot_168tj_86",Gz="_dotOn_168tj_92",Jz="_dotOff_168tj_97",e4="_markAllReadBtn_168tj_113",t4="_viewerSelect_168tj_132",n4="_langSelect_168tj_143",r4="_settingsBtn_168tj_152",i4="_addBtn_168tj_167",s4="_banner_168tj_187",l4="_bannerClose_168tj_197",a4="_center_168tj_206",Ht={app:Fz,main:Hz,header:Vz,brand:Uz,tabs:Wz,tab:qz,tabActive:Kz,project:Zz,spacer:Yz,status:Qz,dot:Xz,dotOn:Gz,dotOff:Jz,markAllReadBtn:e4,viewerSelect:t4,langSelect:n4,settingsBtn:r4,addBtn:i4,banner:s4,bannerClose:l4,center:a4};function o4(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}function c4(){var jt;const{t:e,lang:t,setLang:r,applyLang:s,hasUserChoice:l}=pt(),{board:a,loading:c,error:f,connected:m,refresh:p}=J_(),{unreadIds:y,markRead:g,markAllRead:x}=lk((a==null?void 0:a.tasks)??null,a==null?void 0:a.config.projectName),[_,k]=w.useState("home"),[C,D]=w.useState(!1),[S,R]=w.useState([]),[T,M]=w.useState(!1),[I,j]=w.useState(!1),[B,Q]=w.useState(!1),[te,O]=w.useState(null),[W,ne]=w.useState(null),[_e,ie]=w.useState(()=>Tg()),[X,J]=w.useState(null),[ve,ee]=w.useState(()=>IP()),fe=w.useCallback(se=>{ee(Ge=>{const wt=AP(Ge,se);return DP(wt),wt})},[]),N=w.useMemo(()=>{const se=Cv(ko,(a==null?void 0:a.config.views)??[]),wt=(se.length>0?se:ko).filter(tn=>tn!=="docs"||((a==null?void 0:a.config.docsDirs.length)??0)>0);return wt.length>0?wt:["board"]},[a==null?void 0:a.config.views,a==null?void 0:a.config.docsDirs]),P=se=>{O(se),g(se)},F=se=>{R([se]),D(!0)},E=se=>{k("board"),J({...se})},ce=w.useMemo(()=>{var se;return eT({projectName:a==null?void 0:a.config.projectName,aiMemberId:(se=a==null?void 0:a.config.members.find(Ge=>Ge.type==="ai"))==null?void 0:se.id,aiTaskCreation:a==null?void 0:a.config.aiTaskCreation})},[a==null?void 0:a.config.projectName,a==null?void 0:a.config.members,a==null?void 0:a.config.aiTaskCreation]),Se=te!==null?(a==null?void 0:a.tasks.find(se=>se.frontmatter.id===te))??null:null,ge=C||T||te!==null||B,xe=w.useRef(ge);xe.current=ge;const ze=w.useRef(!1);ze.current=ge||I;const de=w.useRef(!1);de.current=B,w.useEffect(()=>{const se=Ge=>{if((Ge.metaKey||Ge.ctrlKey)&&(Ge.key==="k"||Ge.key==="K")&&!Ge.isComposing){Ge.preventDefault(),j(wt=>wt?!1:!xe.current);return}Ge.key==="?"&&!Ge.isComposing&&!o4(Ge.target)&&(de.current?(Ge.preventDefault(),Q(!1)):ze.current||(Ge.preventDefault(),Q(!0)))};return window.addEventListener("keydown",se),()=>window.removeEventListener("keydown",se)},[]),w.useEffect(()=>{a&&!N.includes(_)&&k(N[0]??"board")},[a,N,_]),w.useEffect(()=>{const se=a==null?void 0:a.config.language;se!==void 0&&se!==t&&!l()&&s(se)},[a,t,s,l]),w.useEffect(()=>{if(!a)return;const se=Bz(Tg(),a.config.members);se!==null&&se!==_e&&(Ig(se),ie(se))},[a,_e]);const ke=se=>{Ig(se),ie(se)},Nt=se=>{r(se),V_(se)},Lt=async se=>{await O_(se),D(!1),R([]),p()},Kt=async se=>{try{await F_(se),p()}catch(Ge){ne(Ge instanceof Error?Ge.message:e("rename.error"))}};return u.jsxs("div",{className:Ht.app,children:[u.jsxs("header",{className:Ht.header,children:[u.jsx("span",{className:Ht.brand,children:"AIzuchi"}),a&&u.jsx("span",{className:Ht.project,children:a.config.projectName}),u.jsx("span",{className:Ht.spacer}),u.jsxs("span",{className:Ht.status,title:e(m?"header.live.title":"header.reconnecting.title"),children:[u.jsx("span",{className:`${Ht.dot} ${m?Ht.dotOn:Ht.dotOff}`,"aria-hidden":"true"}),e(m?"header.live":"header.reconnecting")]}),a&&u.jsx(vD,{board:a,onOpenTask:se=>P(se)}),y.size>0&&u.jsx("button",{type:"button",className:Ht.markAllReadBtn,onClick:()=>x(),title:e("newActivity.markAllRead.title"),children:e("newActivity.markAllRead",{n:y.size})}),a&&a.config.members.length>0&&u.jsxs("select",{className:Ht.viewerSelect,value:_e??"",onChange:se=>ke(se.target.value),"aria-label":e("viewer.label"),children:[_e===null&&u.jsx("option",{value:"",children:e("viewer.none")}),a.config.members.map(se=>u.jsxs("option",{value:se.id,children:[e("viewer.label"),": ",se.label??se.id]},se.id))]}),u.jsx("select",{className:Ht.langSelect,value:t,onChange:se=>Nt(se.target.value),"aria-label":e("settings.language"),children:Sd.map(se=>u.jsx("option",{value:se,children:e(se==="en"?"settings.language.en":"settings.language.ja")},se))}),u.jsx("button",{type:"button",className:Ht.settingsBtn,onClick:()=>Q(!0),title:e("header.help"),"aria-label":e("header.help"),children:"?"}),u.jsx("button",{type:"button",className:Ht.settingsBtn,onClick:()=>M(!0),disabled:!a,children:e("header.settings")}),u.jsx("button",{type:"button",className:Ht.addBtn,onClick:()=>D(!0),disabled:!a,children:e("header.addTask")})]}),(f||W)&&u.jsxs("div",{className:Ht.banner,role:"alert",children:[f??W,!f&&W&&u.jsx("button",{type:"button",className:Ht.bannerClose,onClick:()=>ne(null),children:e("banner.close")})]}),a&&u.jsx("nav",{className:Ht.tabs,"aria-label":"views",children:N.map(se=>u.jsx("button",{type:"button",className:`${Ht.tab} ${_===se?Ht.tabActive:""}`,onClick:()=>k(se),children:e(nf(se)??"view.board")},se))}),a&&u.jsx(zz,{warnings:a.warnings,onRename:se=>void Kt(se)}),u.jsx("main",{className:Ht.main,children:c&&!a?u.jsx("div",{className:Ht.center,children:e("board.loading")}):a?u.jsx(IR,{title:e("error.view.title"),detail:e("error.view.detail"),retryLabel:e("error.view.retry"),children:_==="home"?u.jsx(dL,{board:a,unreadIds:y,onOpen:se=>P(se.frontmatter.id),pinnedIds:ve,onTogglePin:fe}):_==="board"?u.jsx(g2,{board:a,onOpen:se=>P(se.frontmatter.id),onChanged:()=>void p(),onError:ne,unreadIds:y,applyView:X,onViewApplied:()=>J(null),onAddTask:()=>D(!0),viewerId:_e,pinnedIds:ve,onTogglePin:fe}):_==="critical"?u.jsx(tD,{board:a,onOpen:se=>P(se.frontmatter.id)}):_==="digest"?u.jsx(HD,{board:a}):_==="docs"?u.jsx(CR,{board:a,onOpen:se=>P(se.frontmatter.id),docsWriteEnabled:(((jt=a.config.docsWriteDirs)==null?void 0:jt.length)??0)>0,onCreateTaskFromDoc:F}):_==="archive"?u.jsx(dj,{board:a,onChanged:()=>void p(),onError:ne}):_==="trash"?u.jsx(Ez,{board:a,onChanged:()=>void p(),onError:ne}):_==="stats"?u.jsx(JM,{board:a}):_==="files"?u.jsx(EP,{board:a}):u.jsx(HL,{board:a,onOpen:se=>P(se.frontmatter.id)})},_):u.jsx("div",{className:Ht.center,children:e("board.unavailable")})}),C&&a&&u.jsx(yw,{members:a.config.members,templates:a.config.taskTemplates,initialRelatedDocs:S,onCancel:()=>{D(!1),R([])},onSubmit:Lt}),T&&u.jsx(fM,{tasks:(a==null?void 0:a.tasks)??[],onClose:()=>M(!1),onSaved:()=>void p()}),B&&u.jsx(wM,{onClose:()=>Q(!1),instructionText:ce}),I&&a&&u.jsx(N2,{board:a,onClose:()=>j(!1),onSelectView:se=>k(se),onOpenAdd:()=>D(!0),onOpenSettings:()=>M(!0),onOpenTask:se=>P(se),onApplySavedView:E}),Se&&a&&u.jsx(QO,{task:Se,instructionTemplate:a.config.instructionTemplate,members:a.config.members,allTasks:a.tasks,docsEnabled:a.config.docsDirs.length>0,pinned:ve.has(Se.frontmatter.id),onTogglePin:fe,onClose:()=>O(null),onSaved:()=>void p()},Se.frontmatter.id)]})}const u4="_app_156sn_1",d4="_header_156sn_7",f4="_brand_156sn_16",m4="_mode_156sn_22",p4="_spacer_156sn_27",h4="_status_156sn_31",g4="_dot_156sn_39",y4="_dotOn_156sn_45",v4="_dotOff_156sn_49",x4="_langSelect_156sn_53",_4="_banner_156sn_69",k4="_center_156sn_77",w4="_main_156sn_85",b4="_sectionTitle_156sn_95",S4="_cards_156sn_102",C4="_card_156sn_102",N4="_cardName_156sn_121",j4="_cardDir_156sn_127",E4="_counts_156sn_134",T4="_count_156sn_134",I4="_badges_156sn_159",D4="_badgeWip_156sn_166",A4="_badgeWarn_156sn_174",R4="_tableWrap_156sn_183",P4="_table_156sn_183",L4="_taskId_156sn_211",M4="_empty_156sn_217",kt={app:u4,header:d4,brand:f4,mode:m4,spacer:p4,status:h4,dot:g4,dotOn:y4,dotOff:v4,langSelect:x4,banner:_4,center:k4,main:w4,sectionTitle:b4,cards:S4,card:C4,cardName:N4,cardDir:j4,counts:E4,count:T4,badges:I4,badgeWip:D4,badgeWarn:A4,tableWrap:R4,table:P4,taskId:L4,empty:M4},O4={decision:"blocked.decision",external:"blocked.external",dependency:"blocked.dependency"};function z4(){const[e,t]=w.useState(null),[r,s]=w.useState(!0),[l,a]=w.useState(null),[c,f]=w.useState(!1),m=w.useRef(0),p=w.useCallback(async()=>{const y=++m.current;try{const g=await R_();y===m.current&&(t(g),a(null))}catch(g){y===m.current&&a(g instanceof Error?g.message:"failed")}finally{y===m.current&&s(!1)}},[]);return w.useEffect(()=>{p();const y=new EventSource("/api/events");return y.onopen=()=>{f(!0),p()},y.onmessage=g=>{try{const x=JSON.parse(g.data);x.type==="change"?p():x.type==="connected"&&f(!0)}catch{}},y.onerror=()=>f(!1),()=>{y.close()}},[p]),{overview:e,loading:r,error:l,connected:c}}function $4(){const{t:e,lang:t,setLang:r}=pt(),{overview:s,loading:l,error:a,connected:c}=z4(),f=m=>{if(m.status!=="pending"||m.blocked_type===null)return"—";const p=e(O4[m.blocked_type]);return m.blocked_reason!==null?`${p}: ${m.blocked_reason}`:p};return u.jsxs("div",{className:kt.app,children:[u.jsxs("header",{className:kt.header,children:[u.jsx("span",{className:kt.brand,children:"AIzuchi"}),u.jsx("span",{className:kt.mode,children:e("overview.title")}),u.jsx("span",{className:kt.spacer}),u.jsxs("span",{className:kt.status,title:e(c?"header.live.title":"header.reconnecting.title"),children:[u.jsx("span",{className:`${kt.dot} ${c?kt.dotOn:kt.dotOff}`,"aria-hidden":"true"}),e(c?"header.live":"header.reconnecting")]}),u.jsx("select",{className:kt.langSelect,value:t,onChange:m=>r(m.target.value),"aria-label":e("settings.language"),children:Sd.map(m=>u.jsx("option",{value:m,children:e(m==="en"?"settings.language.en":"settings.language.ja")},m))})]}),a!==null&&s!==null&&u.jsx("div",{className:kt.banner,role:"alert",children:e("overview.loadError")}),l&&!s?u.jsx("div",{className:kt.center,children:e("board.loading")}):s?u.jsxs("main",{className:kt.main,children:[u.jsxs("section",{"aria-labelledby":"ov-projects",children:[u.jsx("h2",{id:"ov-projects",className:kt.sectionTitle,children:e("overview.projects")}),u.jsx("div",{className:kt.cards,children:s.projects.map(m=>u.jsxs("article",{className:kt.card,title:m.root,children:[u.jsx("h3",{className:kt.cardName,children:m.name}),m.name!==m.dir&&u.jsx("p",{className:kt.cardDir,children:m.dir}),u.jsx("dl",{className:kt.counts,children:Cs.map(p=>u.jsxs("div",{className:kt.count,children:[u.jsx("dt",{children:e(go[p])}),u.jsx("dd",{children:m.statusCounts[p]})]},p))}),u.jsxs("div",{className:kt.badges,children:[m.wipExceeded&&u.jsx("span",{className:kt.badgeWip,children:e("overview.wipExceeded")}),m.warningCount>0&&u.jsx("span",{className:kt.badgeWarn,children:e("overview.warnings",{n:m.warningCount})})]})]},m.dir))})]}),u.jsxs("section",{"aria-labelledby":"ov-attention",children:[u.jsx("h2",{id:"ov-attention",className:kt.sectionTitle,children:e("overview.attention.title")}),s.attention.length===0?u.jsx("p",{className:kt.empty,children:e("overview.attention.empty")}):u.jsx("div",{className:kt.tableWrap,children:u.jsxs("table",{className:kt.table,children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{scope:"col",children:e("overview.col.project")}),u.jsx("th",{scope:"col",children:e("overview.col.task")}),u.jsx("th",{scope:"col",children:e("overview.col.status")}),u.jsx("th",{scope:"col",children:e("overview.col.assignee")}),u.jsx("th",{scope:"col",children:e("overview.col.blocked")})]})}),u.jsx("tbody",{children:s.attention.map(m=>u.jsxs("tr",{children:[u.jsx("td",{children:m.project}),u.jsxs("td",{children:[u.jsx("span",{className:kt.taskId,children:m.id})," ",m.title]}),u.jsx("td",{children:e(go[m.status])}),u.jsx("td",{children:m.assignee??e("card.unassigned")}),u.jsx("td",{children:f(m)})]},`${m.project}:${m.id}`))})]})})]})]}):u.jsx("div",{className:kt.center,children:e("overview.loadError")})]})}const Dg=3,B4=700;function F4(){const{t:e}=pt(),[t,r]=w.useState(null);return w.useEffect(()=>{let s=!0;return(async()=>{for(let l=1;l<=Dg;l++)try{const a=await A_();s&&r(a.mode==="overview"?"overview":"board");return}catch(a){if(a instanceof er&&a.status>=400&&a.status<500){s&&r("board");return}if(l===Dg){s&&r("error");return}if(await new Promise(c=>setTimeout(c,B4)),!s)return}})(),()=>{s=!1}},[]),t===null?u.jsx(u.Fragment,{}):t==="error"?u.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:12,padding:48},role:"alert",children:[u.jsx("p",{children:e("mode.connectError")}),u.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:e("settings.reload")})]}):t==="overview"?u.jsx($4,{}):u.jsx(c4,{})}const Dv=document.getElementById("root");if(!Dv)throw new Error("#root not found");I_.createRoot(Dv).render(u.jsx(w.StrictMode,{children:u.jsx(Gk,{children:u.jsx(F4,{})})}));
|