@kousaku-maron/diffshape 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/bin/{chunk-O2FOVHLS.js → chunk-KGUYHIRU.js} +20 -4
- package/dist/bin/dbshape.js +1 -1
- package/dist/bin/depshape.js +1 -1
- package/dist/bin/diffshape.js +1 -1
- package/dist/bin/fileshape.js +1 -1
- package/dist/bin/ui/assets/index-kQSL8wBb.js +161 -0
- package/dist/bin/ui/index.html +1 -1
- package/package.json +1 -1
- package/dist/bin/ui/assets/index-DBg_McNT.js +0 -166
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var jf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tm={exports:{}},jl={},$m={exports:{}},Le={};/**
|
|
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 Do=Symbol.for("react.element"),aw=Symbol.for("react.portal"),uw=Symbol.for("react.fragment"),cw=Symbol.for("react.strict_mode"),dw=Symbol.for("react.profiler"),fw=Symbol.for("react.provider"),pw=Symbol.for("react.context"),hw=Symbol.for("react.forward_ref"),mw=Symbol.for("react.suspense"),gw=Symbol.for("react.memo"),yw=Symbol.for("react.lazy"),_f=Symbol.iterator;function vw(e){return e===null||typeof e!="object"?null:(e=_f&&e[_f]||e["@@iterator"],typeof e=="function"?e:null)}var Lm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Im=Object.assign,Am={};function Ci(e,t,n){this.props=e,this.context=t,this.refs=Am,this.updater=n||Lm}Ci.prototype.isReactComponent={};Ci.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ci.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rm(){}Rm.prototype=Ci.prototype;function Rc(e,t,n){this.props=e,this.context=t,this.refs=Am,this.updater=n||Lm}var Oc=Rc.prototype=new Rm;Oc.constructor=Rc;Im(Oc,Ci.prototype);Oc.isPureReactComponent=!0;var Tf=Array.isArray,Om=Object.prototype.hasOwnProperty,Mc={current:null},Mm={key:!0,ref:!0,__self:!0,__source:!0};function Pm(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Om.call(t,r)&&!Mm.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Do,type:e,key:o,ref:s,props:i,_owner:Mc.current}}function xw(e,t){return{$$typeof:Do,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Pc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Do}function ww(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var $f=/\/+/g;function na(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ww(""+e.key):t.toString(36)}function Ns(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Do:case aw:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+na(s,0):r,Tf(i)?(n="",e!=null&&(n=e.replace($f,"$&/")+"/"),Ns(i,t,n,"",function(u){return u})):i!=null&&(Pc(i)&&(i=xw(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace($f,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",Tf(e))for(var l=0;l<e.length;l++){o=e[l];var a=r+na(o,l);s+=Ns(o,t,n,a,i)}else if(a=vw(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=r+na(o,l++),s+=Ns(o,t,n,a,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Zo(e,t,n){if(e==null)return e;var r=[],i=0;return Ns(e,r,"","",function(o){return t.call(n,o,i++)}),r}function kw(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Lt={current:null},js={transition:null},bw={ReactCurrentDispatcher:Lt,ReactCurrentBatchConfig:js,ReactCurrentOwner:Mc};function Fm(){throw Error("act(...) is not supported in production builds of React.")}Le.Children={map:Zo,forEach:function(e,t,n){Zo(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Zo(e,function(){t++}),t},toArray:function(e){return Zo(e,function(t){return t})||[]},only:function(e){if(!Pc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Le.Component=Ci;Le.Fragment=uw;Le.Profiler=dw;Le.PureComponent=Rc;Le.StrictMode=cw;Le.Suspense=mw;Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bw;Le.act=Fm;Le.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Im({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Mc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Om.call(t,a)&&!Mm.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Do,type:e.type,key:i,ref:o,props:r,_owner:s}};Le.createContext=function(e){return e={$$typeof:pw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:fw,_context:e},e.Consumer=e};Le.createElement=Pm;Le.createFactory=function(e){var t=Pm.bind(null,e);return t.type=e,t};Le.createRef=function(){return{current:null}};Le.forwardRef=function(e){return{$$typeof:hw,render:e}};Le.isValidElement=Pc;Le.lazy=function(e){return{$$typeof:yw,_payload:{_status:-1,_result:e},_init:kw}};Le.memo=function(e,t){return{$$typeof:gw,type:e,compare:t===void 0?null:t}};Le.startTransition=function(e){var t=js.transition;js.transition={};try{e()}finally{js.transition=t}};Le.unstable_act=Fm;Le.useCallback=function(e,t){return Lt.current.useCallback(e,t)};Le.useContext=function(e){return Lt.current.useContext(e)};Le.useDebugValue=function(){};Le.useDeferredValue=function(e){return Lt.current.useDeferredValue(e)};Le.useEffect=function(e,t){return Lt.current.useEffect(e,t)};Le.useId=function(){return Lt.current.useId()};Le.useImperativeHandle=function(e,t,n){return Lt.current.useImperativeHandle(e,t,n)};Le.useInsertionEffect=function(e,t){return Lt.current.useInsertionEffect(e,t)};Le.useLayoutEffect=function(e,t){return Lt.current.useLayoutEffect(e,t)};Le.useMemo=function(e,t){return Lt.current.useMemo(e,t)};Le.useReducer=function(e,t,n){return Lt.current.useReducer(e,t,n)};Le.useRef=function(e){return Lt.current.useRef(e)};Le.useState=function(e){return Lt.current.useState(e)};Le.useSyncExternalStore=function(e,t,n){return Lt.current.useSyncExternalStore(e,t,n)};Le.useTransition=function(){return Lt.current.useTransition()};Le.version="18.3.1";$m.exports=Le;var O=$m.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 Ew=O,Sw=Symbol.for("react.element"),Cw=Symbol.for("react.fragment"),Nw=Object.prototype.hasOwnProperty,jw=Ew.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_w={key:!0,ref:!0,__self:!0,__source:!0};function Dm(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Nw.call(t,r)&&!_w.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Sw,type:e,key:o,ref:s,props:i,_owner:jw.current}}jl.Fragment=Cw;jl.jsx=Dm;jl.jsxs=Dm;Tm.exports=jl;var f=Tm.exports,zm={exports:{}},Kt={},Bm={exports:{}},Um={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(D,W){var E=D.length;D.push(W);e:for(;0<E;){var X=E-1>>>1,H=D[X];if(0<i(H,W))D[X]=W,D[E]=H,E=X;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var W=D[0],E=D.pop();if(E!==W){D[0]=E;e:for(var X=0,H=D.length,j=H>>>1;X<j;){var M=2*(X+1)-1,L=D[M],F=M+1,V=D[F];if(0>i(L,E))F<H&&0>i(V,L)?(D[X]=V,D[F]=E,X=F):(D[X]=L,D[M]=E,X=M);else if(F<H&&0>i(V,E))D[X]=V,D[F]=E,X=F;else break e}}return W}function i(D,W){var E=D.sortIndex-W.sortIndex;return E!==0?E:D.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,p=3,h=!1,y=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(D){for(var W=n(u);W!==null;){if(W.callback===null)r(u);else if(W.startTime<=D)r(u),W.sortIndex=W.expirationTime,t(a,W);else break;W=n(u)}}function k(D){if(x=!1,g(D),!y)if(n(a)!==null)y=!0,U(_);else{var W=n(u);W!==null&&q(k,W.startTime-D)}}function _(D,W){y=!1,x&&(x=!1,v(C),C=-1),h=!0;var E=p;try{for(g(W),d=n(a);d!==null&&(!(d.expirationTime>W)||D&&!A());){var X=d.callback;if(typeof X=="function"){d.callback=null,p=d.priorityLevel;var H=X(d.expirationTime<=W);W=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(a)&&r(a),g(W)}else r(a);d=n(a)}if(d!==null)var j=!0;else{var M=n(u);M!==null&&q(k,M.startTime-W),j=!1}return j}finally{d=null,p=E,h=!1}}var b=!1,T=null,C=-1,$=5,w=-1;function A(){return!(e.unstable_now()-w<$)}function I(){if(T!==null){var D=e.unstable_now();w=D;var W=!0;try{W=T(!0,D)}finally{W?P():(b=!1,T=null)}}else b=!1}var P;if(typeof m=="function")P=function(){m(I)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,K=z.port2;z.port1.onmessage=I,P=function(){K.postMessage(null)}}else P=function(){S(I,0)};function U(D){T=D,b||(b=!0,P())}function q(D,W){C=S(function(){D(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,U(_))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(D){switch(p){case 1:case 2:case 3:var W=3;break;default:W=p}var E=p;p=W;try{return D()}finally{p=E}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,W){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var E=p;p=D;try{return W()}finally{p=E}},e.unstable_scheduleCallback=function(D,W,E){var X=e.unstable_now();switch(typeof E=="object"&&E!==null?(E=E.delay,E=typeof E=="number"&&0<E?X+E:X):E=X,D){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=E+H,D={id:c++,callback:W,priorityLevel:D,startTime:E,expirationTime:H,sortIndex:-1},E>X?(D.sortIndex=E,t(u,D),n(a)===null&&D===n(u)&&(x?(v(C),C=-1):x=!0,q(k,E-X))):(D.sortIndex=H,t(a,D),y||h||(y=!0,U(_))),D},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(D){var W=p;return function(){var E=p;p=W;try{return D.apply(this,arguments)}finally{p=E}}}})(Um);Bm.exports=Um;var Tw=Bm.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 $w=O,Vt=Tw;function ae(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Hm=new Set,mo={};function Fr(e,t){mi(e,t),mi(e+"Capture",t)}function mi(e,t){for(mo[e]=t,e=0;e<t.length;e++)Hm.add(t[e])}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cu=Object.prototype.hasOwnProperty,Lw=/^[: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]*$/,Lf={},If={};function Iw(e){return cu.call(If,e)?!0:cu.call(Lf,e)?!1:Lw.test(e)?If[e]=!0:(Lf[e]=!0,!1)}function Aw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Rw(e,t,n,r){if(t===null||typeof t>"u"||Aw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function It(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var wt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){wt[e]=new It(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];wt[t]=new It(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){wt[e]=new It(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wt[e]=new It(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){wt[e]=new It(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){wt[e]=new It(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){wt[e]=new It(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){wt[e]=new It(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){wt[e]=new It(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fc=/[\-:]([a-z])/g;function Dc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Fc,Dc);wt[t]=new It(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Fc,Dc);wt[t]=new It(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Fc,Dc);wt[t]=new It(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){wt[e]=new It(e,1,!1,e.toLowerCase(),null,!1,!1)});wt.xlinkHref=new It("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){wt[e]=new It(e,1,!1,e.toLowerCase(),null,!0,!0)});function zc(e,t,n,r){var i=wt.hasOwnProperty(t)?wt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Rw(t,n,i,r)&&(n=null),r||i===null?Iw(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var On=$w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Jo=Symbol.for("react.element"),Gr=Symbol.for("react.portal"),Yr=Symbol.for("react.fragment"),Bc=Symbol.for("react.strict_mode"),du=Symbol.for("react.profiler"),Wm=Symbol.for("react.provider"),Vm=Symbol.for("react.context"),Uc=Symbol.for("react.forward_ref"),fu=Symbol.for("react.suspense"),pu=Symbol.for("react.suspense_list"),Hc=Symbol.for("react.memo"),Hn=Symbol.for("react.lazy"),qm=Symbol.for("react.offscreen"),Af=Symbol.iterator;function Ri(e){return e===null||typeof e!="object"?null:(e=Af&&e[Af]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,ra;function Ki(e){if(ra===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ra=t&&t[1]||""}return`
|
|
34
|
+
`+ra+e}var ia=!1;function oa(e,t){if(!e||ia)return"";ia=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
35
|
+
`),o=r.stack.split(`
|
|
36
|
+
`),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var a=`
|
|
37
|
+
`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{ia=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ki(e):""}function Ow(e){switch(e.tag){case 5:return Ki(e.type);case 16:return Ki("Lazy");case 13:return Ki("Suspense");case 19:return Ki("SuspenseList");case 0:case 2:case 15:return e=oa(e.type,!1),e;case 11:return e=oa(e.type.render,!1),e;case 1:return e=oa(e.type,!0),e;default:return""}}function hu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yr:return"Fragment";case Gr:return"Portal";case du:return"Profiler";case Bc:return"StrictMode";case fu:return"Suspense";case pu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Vm:return(e.displayName||"Context")+".Consumer";case Wm:return(e._context.displayName||"Context")+".Provider";case Uc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hc:return t=e.displayName||null,t!==null?t:hu(e.type)||"Memo";case Hn:t=e._payload,e=e._init;try{return hu(e(t))}catch{}}return null}function Mw(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return hu(t);case 8:return t===Bc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function or(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Km(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Pw(e){var t=Km(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function es(e){e._valueTracker||(e._valueTracker=Pw(e))}function Gm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Km(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function mu(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Rf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=or(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ym(e,t){t=t.checked,t!=null&&zc(e,"checked",t,!1)}function gu(e,t){Ym(e,t);var n=or(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?yu(e,t.type,n):t.hasOwnProperty("defaultValue")&&yu(e,t.type,or(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Of(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function yu(e,t,n){(t!=="number"||Hs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Gi=Array.isArray;function li(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+or(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function vu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ae(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Mf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ae(92));if(Gi(n)){if(1<n.length)throw Error(ae(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:or(n)}}function Xm(e,t){var n=or(t.value),r=or(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Pf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Qm(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Qm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ts,Zm=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ts=ts||document.createElement("div"),ts.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ts.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function go(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zi={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},Fw=["Webkit","ms","Moz","O"];Object.keys(Zi).forEach(function(e){Fw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zi[t]=Zi[e]})});function Jm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zi.hasOwnProperty(e)&&Zi[e]?(""+t).trim():t+"px"}function eg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Jm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Dw=Ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wu(e,t){if(t){if(Dw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function ku(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bu=null;function Wc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Eu=null,ai=null,ui=null;function Ff(e){if(e=Uo(e)){if(typeof Eu!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=Il(t),Eu(e.stateNode,e.type,t))}}function tg(e){ai?ui?ui.push(e):ui=[e]:ai=e}function ng(){if(ai){var e=ai,t=ui;if(ui=ai=null,Ff(e),t)for(e=0;e<t.length;e++)Ff(t[e])}}function rg(e,t){return e(t)}function ig(){}var sa=!1;function og(e,t,n){if(sa)return e(t,n);sa=!0;try{return rg(e,t,n)}finally{sa=!1,(ai!==null||ui!==null)&&(ig(),ng())}}function yo(e,t){var n=e.stateNode;if(n===null)return null;var r=Il(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ae(231,t,typeof n));return n}var Su=!1;if($n)try{var Oi={};Object.defineProperty(Oi,"passive",{get:function(){Su=!0}}),window.addEventListener("test",Oi,Oi),window.removeEventListener("test",Oi,Oi)}catch{Su=!1}function zw(e,t,n,r,i,o,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ji=!1,Ws=null,Vs=!1,Cu=null,Bw={onError:function(e){Ji=!0,Ws=e}};function Uw(e,t,n,r,i,o,s,l,a){Ji=!1,Ws=null,zw.apply(Bw,arguments)}function Hw(e,t,n,r,i,o,s,l,a){if(Uw.apply(this,arguments),Ji){if(Ji){var u=Ws;Ji=!1,Ws=null}else throw Error(ae(198));Vs||(Vs=!0,Cu=u)}}function Dr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function sg(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Df(e){if(Dr(e)!==e)throw Error(ae(188))}function Ww(e){var t=e.alternate;if(!t){if(t=Dr(e),t===null)throw Error(ae(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Df(i),e;if(o===r)return Df(i),t;o=o.sibling}throw Error(ae(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(ae(189))}}if(n.alternate!==r)throw Error(ae(190))}if(n.tag!==3)throw Error(ae(188));return n.stateNode.current===n?e:t}function lg(e){return e=Ww(e),e!==null?ag(e):null}function ag(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ag(e);if(t!==null)return t;e=e.sibling}return null}var ug=Vt.unstable_scheduleCallback,zf=Vt.unstable_cancelCallback,Vw=Vt.unstable_shouldYield,qw=Vt.unstable_requestPaint,Qe=Vt.unstable_now,Kw=Vt.unstable_getCurrentPriorityLevel,Vc=Vt.unstable_ImmediatePriority,cg=Vt.unstable_UserBlockingPriority,qs=Vt.unstable_NormalPriority,Gw=Vt.unstable_LowPriority,dg=Vt.unstable_IdlePriority,_l=null,kn=null;function Yw(e){if(kn&&typeof kn.onCommitFiberRoot=="function")try{kn.onCommitFiberRoot(_l,e,void 0,(e.current.flags&128)===128)}catch{}}var cn=Math.clz32?Math.clz32:Zw,Xw=Math.log,Qw=Math.LN2;function Zw(e){return e>>>=0,e===0?32:31-(Xw(e)/Qw|0)|0}var ns=64,rs=4194304;function Yi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ks(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Yi(l):(o&=s,o!==0&&(r=Yi(o)))}else s=n&~i,s!==0?r=Yi(s):o!==0&&(r=Yi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-cn(t),i=1<<n,r|=e[n],t&=~i;return r}function Jw(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ek(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-cn(o),l=1<<s,a=i[s];a===-1?(!(l&n)||l&r)&&(i[s]=Jw(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function Nu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function fg(){var e=ns;return ns<<=1,!(ns&4194240)&&(ns=64),e}function la(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-cn(t),e[t]=n}function tk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-cn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function qc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-cn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Pe=0;function pg(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var hg,Kc,mg,gg,yg,ju=!1,is=[],Xn=null,Qn=null,Zn=null,vo=new Map,xo=new Map,Vn=[],nk="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 Bf(e,t){switch(e){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":vo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xo.delete(t.pointerId)}}function Mi(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Uo(t),t!==null&&Kc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function rk(e,t,n,r,i){switch(t){case"focusin":return Xn=Mi(Xn,e,t,n,r,i),!0;case"dragenter":return Qn=Mi(Qn,e,t,n,r,i),!0;case"mouseover":return Zn=Mi(Zn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return vo.set(o,Mi(vo.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,xo.set(o,Mi(xo.get(o)||null,e,t,n,r,i)),!0}return!1}function vg(e){var t=kr(e.target);if(t!==null){var n=Dr(t);if(n!==null){if(t=n.tag,t===13){if(t=sg(n),t!==null){e.blockedOn=t,yg(e.priority,function(){mg(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function _s(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_u(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bu=r,n.target.dispatchEvent(r),bu=null}else return t=Uo(n),t!==null&&Kc(t),e.blockedOn=n,!1;t.shift()}return!0}function Uf(e,t,n){_s(e)&&n.delete(t)}function ik(){ju=!1,Xn!==null&&_s(Xn)&&(Xn=null),Qn!==null&&_s(Qn)&&(Qn=null),Zn!==null&&_s(Zn)&&(Zn=null),vo.forEach(Uf),xo.forEach(Uf)}function Pi(e,t){e.blockedOn===t&&(e.blockedOn=null,ju||(ju=!0,Vt.unstable_scheduleCallback(Vt.unstable_NormalPriority,ik)))}function wo(e){function t(i){return Pi(i,e)}if(0<is.length){Pi(is[0],e);for(var n=1;n<is.length;n++){var r=is[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Xn!==null&&Pi(Xn,e),Qn!==null&&Pi(Qn,e),Zn!==null&&Pi(Zn,e),vo.forEach(t),xo.forEach(t),n=0;n<Vn.length;n++)r=Vn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Vn.length&&(n=Vn[0],n.blockedOn===null);)vg(n),n.blockedOn===null&&Vn.shift()}var ci=On.ReactCurrentBatchConfig,Gs=!0;function ok(e,t,n,r){var i=Pe,o=ci.transition;ci.transition=null;try{Pe=1,Gc(e,t,n,r)}finally{Pe=i,ci.transition=o}}function sk(e,t,n,r){var i=Pe,o=ci.transition;ci.transition=null;try{Pe=4,Gc(e,t,n,r)}finally{Pe=i,ci.transition=o}}function Gc(e,t,n,r){if(Gs){var i=_u(e,t,n,r);if(i===null)ya(e,t,r,Ys,n),Bf(e,r);else if(rk(i,e,t,n,r))r.stopPropagation();else if(Bf(e,r),t&4&&-1<nk.indexOf(e)){for(;i!==null;){var o=Uo(i);if(o!==null&&hg(o),o=_u(e,t,n,r),o===null&&ya(e,t,r,Ys,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else ya(e,t,r,null,n)}}var Ys=null;function _u(e,t,n,r){if(Ys=null,e=Wc(r),e=kr(e),e!==null)if(t=Dr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=sg(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ys=e,null}function xg(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Kw()){case Vc:return 1;case cg:return 4;case qs:case Gw:return 16;case dg:return 536870912;default:return 16}default:return 16}}var Gn=null,Yc=null,Ts=null;function wg(){if(Ts)return Ts;var e,t=Yc,n=t.length,r,i="value"in Gn?Gn.value:Gn.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Ts=i.slice(e,1<r?1-r:void 0)}function $s(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function os(){return!0}function Hf(){return!1}function Gt(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?os:Hf,this.isPropagationStopped=Hf,this}return Ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=os)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=os)},persist:function(){},isPersistent:os}),t}var Ni={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xc=Gt(Ni),Bo=Ge({},Ni,{view:0,detail:0}),lk=Gt(Bo),aa,ua,Fi,Tl=Ge({},Bo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Fi&&(Fi&&e.type==="mousemove"?(aa=e.screenX-Fi.screenX,ua=e.screenY-Fi.screenY):ua=aa=0,Fi=e),aa)},movementY:function(e){return"movementY"in e?e.movementY:ua}}),Wf=Gt(Tl),ak=Ge({},Tl,{dataTransfer:0}),uk=Gt(ak),ck=Ge({},Bo,{relatedTarget:0}),ca=Gt(ck),dk=Ge({},Ni,{animationName:0,elapsedTime:0,pseudoElement:0}),fk=Gt(dk),pk=Ge({},Ni,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hk=Gt(pk),mk=Ge({},Ni,{data:0}),Vf=Gt(mk),gk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yk={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"},vk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vk[e])?!!t[e]:!1}function Qc(){return xk}var wk=Ge({},Bo,{key:function(e){if(e.key){var t=gk[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$s(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yk[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qc,charCode:function(e){return e.type==="keypress"?$s(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$s(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kk=Gt(wk),bk=Ge({},Tl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qf=Gt(bk),Ek=Ge({},Bo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qc}),Sk=Gt(Ek),Ck=Ge({},Ni,{propertyName:0,elapsedTime:0,pseudoElement:0}),Nk=Gt(Ck),jk=Ge({},Tl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),_k=Gt(jk),Tk=[9,13,27,32],Zc=$n&&"CompositionEvent"in window,eo=null;$n&&"documentMode"in document&&(eo=document.documentMode);var $k=$n&&"TextEvent"in window&&!eo,kg=$n&&(!Zc||eo&&8<eo&&11>=eo),Kf=" ",Gf=!1;function bg(e,t){switch(e){case"keyup":return Tk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function Lk(e,t){switch(e){case"compositionend":return Eg(t);case"keypress":return t.which!==32?null:(Gf=!0,Kf);case"textInput":return e=t.data,e===Kf&&Gf?null:e;default:return null}}function Ik(e,t){if(Xr)return e==="compositionend"||!Zc&&bg(e,t)?(e=wg(),Ts=Yc=Gn=null,Xr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return kg&&t.locale!=="ko"?null:t.data;default:return null}}var Ak={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 Yf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ak[e.type]:t==="textarea"}function Sg(e,t,n,r){tg(r),t=Xs(t,"onChange"),0<t.length&&(n=new Xc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var to=null,ko=null;function Rk(e){Og(e,0)}function $l(e){var t=Jr(e);if(Gm(t))return e}function Ok(e,t){if(e==="change")return t}var Cg=!1;if($n){var da;if($n){var fa="oninput"in document;if(!fa){var Xf=document.createElement("div");Xf.setAttribute("oninput","return;"),fa=typeof Xf.oninput=="function"}da=fa}else da=!1;Cg=da&&(!document.documentMode||9<document.documentMode)}function Qf(){to&&(to.detachEvent("onpropertychange",Ng),ko=to=null)}function Ng(e){if(e.propertyName==="value"&&$l(ko)){var t=[];Sg(t,ko,e,Wc(e)),og(Rk,t)}}function Mk(e,t,n){e==="focusin"?(Qf(),to=t,ko=n,to.attachEvent("onpropertychange",Ng)):e==="focusout"&&Qf()}function Pk(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $l(ko)}function Fk(e,t){if(e==="click")return $l(t)}function Dk(e,t){if(e==="input"||e==="change")return $l(t)}function zk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hn=typeof Object.is=="function"?Object.is:zk;function bo(e,t){if(hn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!cu.call(t,i)||!hn(e[i],t[i]))return!1}return!0}function Zf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jf(e,t){var n=Zf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zf(n)}}function jg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _g(){for(var e=window,t=Hs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hs(e.document)}return t}function Jc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Bk(e){var t=_g(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jg(n.ownerDocument.documentElement,n)){if(r!==null&&Jc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Jf(n,o);var s=Jf(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Uk=$n&&"documentMode"in document&&11>=document.documentMode,Qr=null,Tu=null,no=null,$u=!1;function ep(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$u||Qr==null||Qr!==Hs(r)||(r=Qr,"selectionStart"in r&&Jc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),no&&bo(no,r)||(no=r,r=Xs(Tu,"onSelect"),0<r.length&&(t=new Xc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function ss(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zr={animationend:ss("Animation","AnimationEnd"),animationiteration:ss("Animation","AnimationIteration"),animationstart:ss("Animation","AnimationStart"),transitionend:ss("Transition","TransitionEnd")},pa={},Tg={};$n&&(Tg=document.createElement("div").style,"AnimationEvent"in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),"TransitionEvent"in window||delete Zr.transitionend.transition);function Ll(e){if(pa[e])return pa[e];if(!Zr[e])return e;var t=Zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Tg)return pa[e]=t[n];return e}var $g=Ll("animationend"),Lg=Ll("animationiteration"),Ig=Ll("animationstart"),Ag=Ll("transitionend"),Rg=new Map,tp="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 ur(e,t){Rg.set(e,t),Fr(t,[e])}for(var ha=0;ha<tp.length;ha++){var ma=tp[ha],Hk=ma.toLowerCase(),Wk=ma[0].toUpperCase()+ma.slice(1);ur(Hk,"on"+Wk)}ur($g,"onAnimationEnd");ur(Lg,"onAnimationIteration");ur(Ig,"onAnimationStart");ur("dblclick","onDoubleClick");ur("focusin","onFocus");ur("focusout","onBlur");ur(Ag,"onTransitionEnd");mi("onMouseEnter",["mouseout","mouseover"]);mi("onMouseLeave",["mouseout","mouseover"]);mi("onPointerEnter",["pointerout","pointerover"]);mi("onPointerLeave",["pointerout","pointerover"]);Fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xi="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(" "),Vk=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xi));function np(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Hw(r,t,void 0,e),e.currentTarget=null}function Og(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==o&&i.isPropagationStopped())break e;np(i,l,u),o=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==o&&i.isPropagationStopped())break e;np(i,l,u),o=a}}}if(Vs)throw e=Cu,Vs=!1,Cu=null,e}function Ue(e,t){var n=t[Ou];n===void 0&&(n=t[Ou]=new Set);var r=e+"__bubble";n.has(r)||(Mg(t,e,2,!1),n.add(r))}function ga(e,t,n){var r=0;t&&(r|=4),Mg(n,e,r,t)}var ls="_reactListening"+Math.random().toString(36).slice(2);function Eo(e){if(!e[ls]){e[ls]=!0,Hm.forEach(function(n){n!=="selectionchange"&&(Vk.has(n)||ga(n,!1,e),ga(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ls]||(t[ls]=!0,ga("selectionchange",!1,t))}}function Mg(e,t,n,r){switch(xg(t)){case 1:var i=ok;break;case 4:i=sk;break;default:i=Gc}n=i.bind(null,t,n,e),i=void 0,!Su||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ya(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;l!==null;){if(s=kr(l),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}l=l.parentNode}}r=r.return}og(function(){var u=o,c=Wc(n),d=[];e:{var p=Rg.get(e);if(p!==void 0){var h=Xc,y=e;switch(e){case"keypress":if($s(n)===0)break e;case"keydown":case"keyup":h=kk;break;case"focusin":y="focus",h=ca;break;case"focusout":y="blur",h=ca;break;case"beforeblur":case"afterblur":h=ca;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Wf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=uk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Sk;break;case $g:case Lg:case Ig:h=fk;break;case Ag:h=Nk;break;case"scroll":h=lk;break;case"wheel":h=_k;break;case"copy":case"cut":case"paste":h=hk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=qf}var x=(t&4)!==0,S=!x&&e==="scroll",v=x?p!==null?p+"Capture":null:p;x=[];for(var m=u,g;m!==null;){g=m;var k=g.stateNode;if(g.tag===5&&k!==null&&(g=k,v!==null&&(k=yo(m,v),k!=null&&x.push(So(m,k,g)))),S)break;m=m.return}0<x.length&&(p=new h(p,y,null,n,c),d.push({event:p,listeners:x}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==bu&&(y=n.relatedTarget||n.fromElement)&&(kr(y)||y[Ln]))break e;if((h||p)&&(p=c.window===c?c:(p=c.ownerDocument)?p.defaultView||p.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?kr(y):null,y!==null&&(S=Dr(y),y!==S||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(x=Wf,k="onMouseLeave",v="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(x=qf,k="onPointerLeave",v="onPointerEnter",m="pointer"),S=h==null?p:Jr(h),g=y==null?p:Jr(y),p=new x(k,m+"leave",h,n,c),p.target=S,p.relatedTarget=g,k=null,kr(c)===u&&(x=new x(v,m+"enter",y,n,c),x.target=g,x.relatedTarget=S,k=x),S=k,h&&y)t:{for(x=h,v=y,m=0,g=x;g;g=Ur(g))m++;for(g=0,k=v;k;k=Ur(k))g++;for(;0<m-g;)x=Ur(x),m--;for(;0<g-m;)v=Ur(v),g--;for(;m--;){if(x===v||v!==null&&x===v.alternate)break t;x=Ur(x),v=Ur(v)}x=null}else x=null;h!==null&&rp(d,p,h,x,!1),y!==null&&S!==null&&rp(d,S,y,x,!0)}}e:{if(p=u?Jr(u):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var _=Ok;else if(Yf(p))if(Cg)_=Dk;else{_=Pk;var b=Mk}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=Fk);if(_&&(_=_(e,u))){Sg(d,_,n,c);break e}b&&b(e,p,u),e==="focusout"&&(b=p._wrapperState)&&b.controlled&&p.type==="number"&&yu(p,"number",p.value)}switch(b=u?Jr(u):window,e){case"focusin":(Yf(b)||b.contentEditable==="true")&&(Qr=b,Tu=u,no=null);break;case"focusout":no=Tu=Qr=null;break;case"mousedown":$u=!0;break;case"contextmenu":case"mouseup":case"dragend":$u=!1,ep(d,n,c);break;case"selectionchange":if(Uk)break;case"keydown":case"keyup":ep(d,n,c)}var T;if(Zc)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Xr?bg(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(kg&&n.locale!=="ko"&&(Xr||C!=="onCompositionStart"?C==="onCompositionEnd"&&Xr&&(T=wg()):(Gn=c,Yc="value"in Gn?Gn.value:Gn.textContent,Xr=!0)),b=Xs(u,C),0<b.length&&(C=new Vf(C,e,null,n,c),d.push({event:C,listeners:b}),T?C.data=T:(T=Eg(n),T!==null&&(C.data=T)))),(T=$k?Lk(e,n):Ik(e,n))&&(u=Xs(u,"onBeforeInput"),0<u.length&&(c=new Vf("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=T))}Og(d,t)})}function So(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xs(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=yo(e,n),o!=null&&r.unshift(So(e,o,i)),o=yo(e,t),o!=null&&r.push(So(e,o,i))),e=e.return}return r}function Ur(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function rp(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,i?(a=yo(n,o),a!=null&&s.unshift(So(n,a,l))):i||(a=yo(n,o),a!=null&&s.push(So(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var qk=/\r\n?/g,Kk=/\u0000|\uFFFD/g;function ip(e){return(typeof e=="string"?e:""+e).replace(qk,`
|
|
38
|
+
`).replace(Kk,"")}function as(e,t,n){if(t=ip(t),ip(e)!==t&&n)throw Error(ae(425))}function Qs(){}var Lu=null,Iu=null;function Au(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ru=typeof setTimeout=="function"?setTimeout:void 0,Gk=typeof clearTimeout=="function"?clearTimeout:void 0,op=typeof Promise=="function"?Promise:void 0,Yk=typeof queueMicrotask=="function"?queueMicrotask:typeof op<"u"?function(e){return op.resolve(null).then(e).catch(Xk)}:Ru;function Xk(e){setTimeout(function(){throw e})}function va(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),wo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);wo(t)}function Jn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function sp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ji=Math.random().toString(36).slice(2),wn="__reactFiber$"+ji,Co="__reactProps$"+ji,Ln="__reactContainer$"+ji,Ou="__reactEvents$"+ji,Qk="__reactListeners$"+ji,Zk="__reactHandles$"+ji;function kr(e){var t=e[wn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ln]||n[wn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=sp(e);e!==null;){if(n=e[wn])return n;e=sp(e)}return t}e=n,n=e.parentNode}return null}function Uo(e){return e=e[wn]||e[Ln],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Jr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ae(33))}function Il(e){return e[Co]||null}var Mu=[],ei=-1;function cr(e){return{current:e}}function He(e){0>ei||(e.current=Mu[ei],Mu[ei]=null,ei--)}function Be(e,t){ei++,Mu[ei]=e.current,e.current=t}var sr={},jt=cr(sr),Mt=cr(!1),$r=sr;function gi(e,t){var n=e.type.contextTypes;if(!n)return sr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Pt(e){return e=e.childContextTypes,e!=null}function Zs(){He(Mt),He(jt)}function lp(e,t,n){if(jt.current!==sr)throw Error(ae(168));Be(jt,t),Be(Mt,n)}function Pg(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ae(108,Mw(e)||"Unknown",i));return Ge({},n,r)}function Js(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sr,$r=jt.current,Be(jt,e),Be(Mt,Mt.current),!0}function ap(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=Pg(e,t,$r),r.__reactInternalMemoizedMergedChildContext=e,He(Mt),He(jt),Be(jt,e)):He(Mt),Be(Mt,n)}var Nn=null,Al=!1,xa=!1;function Fg(e){Nn===null?Nn=[e]:Nn.push(e)}function Jk(e){Al=!0,Fg(e)}function dr(){if(!xa&&Nn!==null){xa=!0;var e=0,t=Pe;try{var n=Nn;for(Pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Nn=null,Al=!1}catch(i){throw Nn!==null&&(Nn=Nn.slice(e+1)),ug(Vc,dr),i}finally{Pe=t,xa=!1}}return null}var ti=[],ni=0,el=null,tl=0,Xt=[],Qt=0,Lr=null,jn=1,_n="";function gr(e,t){ti[ni++]=tl,ti[ni++]=el,el=e,tl=t}function Dg(e,t,n){Xt[Qt++]=jn,Xt[Qt++]=_n,Xt[Qt++]=Lr,Lr=e;var r=jn;e=_n;var i=32-cn(r)-1;r&=~(1<<i),n+=1;var o=32-cn(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,jn=1<<32-cn(t)+i|n<<i|r,_n=o+e}else jn=1<<o|n<<i|r,_n=e}function ed(e){e.return!==null&&(gr(e,1),Dg(e,1,0))}function td(e){for(;e===el;)el=ti[--ni],ti[ni]=null,tl=ti[--ni],ti[ni]=null;for(;e===Lr;)Lr=Xt[--Qt],Xt[Qt]=null,_n=Xt[--Qt],Xt[Qt]=null,jn=Xt[--Qt],Xt[Qt]=null}var Wt=null,Ht=null,Ve=!1,un=null;function zg(e,t){var n=Jt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function up(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Wt=e,Ht=Jn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,Ht=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Lr!==null?{id:jn,overflow:_n}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Jt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Wt=e,Ht=null,!0):!1;default:return!1}}function Pu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Fu(e){if(Ve){var t=Ht;if(t){var n=t;if(!up(e,t)){if(Pu(e))throw Error(ae(418));t=Jn(n.nextSibling);var r=Wt;t&&up(e,t)?zg(r,n):(e.flags=e.flags&-4097|2,Ve=!1,Wt=e)}}else{if(Pu(e))throw Error(ae(418));e.flags=e.flags&-4097|2,Ve=!1,Wt=e}}}function cp(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function us(e){if(e!==Wt)return!1;if(!Ve)return cp(e),Ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Au(e.type,e.memoizedProps)),t&&(t=Ht)){if(Pu(e))throw Bg(),Error(ae(418));for(;t;)zg(e,t),t=Jn(t.nextSibling)}if(cp(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ae(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ht=Jn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ht=null}}else Ht=Wt?Jn(e.stateNode.nextSibling):null;return!0}function Bg(){for(var e=Ht;e;)e=Jn(e.nextSibling)}function yi(){Ht=Wt=null,Ve=!1}function nd(e){un===null?un=[e]:un.push(e)}var e0=On.ReactCurrentBatchConfig;function Di(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(ae(309));var r=n.stateNode}if(!r)throw Error(ae(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(ae(284));if(!n._owner)throw Error(ae(290,e))}return e}function cs(e,t){throw e=Object.prototype.toString.call(t),Error(ae(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function dp(e){var t=e._init;return t(e._payload)}function Ug(e){function t(v,m){if(e){var g=v.deletions;g===null?(v.deletions=[m],v.flags|=16):g.push(m)}}function n(v,m){if(!e)return null;for(;m!==null;)t(v,m),m=m.sibling;return null}function r(v,m){for(v=new Map;m!==null;)m.key!==null?v.set(m.key,m):v.set(m.index,m),m=m.sibling;return v}function i(v,m){return v=rr(v,m),v.index=0,v.sibling=null,v}function o(v,m,g){return v.index=g,e?(g=v.alternate,g!==null?(g=g.index,g<m?(v.flags|=2,m):g):(v.flags|=2,m)):(v.flags|=1048576,m)}function s(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,m,g,k){return m===null||m.tag!==6?(m=Na(g,v.mode,k),m.return=v,m):(m=i(m,g),m.return=v,m)}function a(v,m,g,k){var _=g.type;return _===Yr?c(v,m,g.props.children,k,g.key):m!==null&&(m.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Hn&&dp(_)===m.type)?(k=i(m,g.props),k.ref=Di(v,m,g),k.return=v,k):(k=Ps(g.type,g.key,g.props,null,v.mode,k),k.ref=Di(v,m,g),k.return=v,k)}function u(v,m,g,k){return m===null||m.tag!==4||m.stateNode.containerInfo!==g.containerInfo||m.stateNode.implementation!==g.implementation?(m=ja(g,v.mode,k),m.return=v,m):(m=i(m,g.children||[]),m.return=v,m)}function c(v,m,g,k,_){return m===null||m.tag!==7?(m=Nr(g,v.mode,k,_),m.return=v,m):(m=i(m,g),m.return=v,m)}function d(v,m,g){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Na(""+m,v.mode,g),m.return=v,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Jo:return g=Ps(m.type,m.key,m.props,null,v.mode,g),g.ref=Di(v,null,m),g.return=v,g;case Gr:return m=ja(m,v.mode,g),m.return=v,m;case Hn:var k=m._init;return d(v,k(m._payload),g)}if(Gi(m)||Ri(m))return m=Nr(m,v.mode,g,null),m.return=v,m;cs(v,m)}return null}function p(v,m,g,k){var _=m!==null?m.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return _!==null?null:l(v,m,""+g,k);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Jo:return g.key===_?a(v,m,g,k):null;case Gr:return g.key===_?u(v,m,g,k):null;case Hn:return _=g._init,p(v,m,_(g._payload),k)}if(Gi(g)||Ri(g))return _!==null?null:c(v,m,g,k,null);cs(v,g)}return null}function h(v,m,g,k,_){if(typeof k=="string"&&k!==""||typeof k=="number")return v=v.get(g)||null,l(m,v,""+k,_);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Jo:return v=v.get(k.key===null?g:k.key)||null,a(m,v,k,_);case Gr:return v=v.get(k.key===null?g:k.key)||null,u(m,v,k,_);case Hn:var b=k._init;return h(v,m,g,b(k._payload),_)}if(Gi(k)||Ri(k))return v=v.get(g)||null,c(m,v,k,_,null);cs(m,k)}return null}function y(v,m,g,k){for(var _=null,b=null,T=m,C=m=0,$=null;T!==null&&C<g.length;C++){T.index>C?($=T,T=null):$=T.sibling;var w=p(v,T,g[C],k);if(w===null){T===null&&(T=$);break}e&&T&&w.alternate===null&&t(v,T),m=o(w,m,C),b===null?_=w:b.sibling=w,b=w,T=$}if(C===g.length)return n(v,T),Ve&&gr(v,C),_;if(T===null){for(;C<g.length;C++)T=d(v,g[C],k),T!==null&&(m=o(T,m,C),b===null?_=T:b.sibling=T,b=T);return Ve&&gr(v,C),_}for(T=r(v,T);C<g.length;C++)$=h(T,v,C,g[C],k),$!==null&&(e&&$.alternate!==null&&T.delete($.key===null?C:$.key),m=o($,m,C),b===null?_=$:b.sibling=$,b=$);return e&&T.forEach(function(A){return t(v,A)}),Ve&&gr(v,C),_}function x(v,m,g,k){var _=Ri(g);if(typeof _!="function")throw Error(ae(150));if(g=_.call(g),g==null)throw Error(ae(151));for(var b=_=null,T=m,C=m=0,$=null,w=g.next();T!==null&&!w.done;C++,w=g.next()){T.index>C?($=T,T=null):$=T.sibling;var A=p(v,T,w.value,k);if(A===null){T===null&&(T=$);break}e&&T&&A.alternate===null&&t(v,T),m=o(A,m,C),b===null?_=A:b.sibling=A,b=A,T=$}if(w.done)return n(v,T),Ve&&gr(v,C),_;if(T===null){for(;!w.done;C++,w=g.next())w=d(v,w.value,k),w!==null&&(m=o(w,m,C),b===null?_=w:b.sibling=w,b=w);return Ve&&gr(v,C),_}for(T=r(v,T);!w.done;C++,w=g.next())w=h(T,v,C,w.value,k),w!==null&&(e&&w.alternate!==null&&T.delete(w.key===null?C:w.key),m=o(w,m,C),b===null?_=w:b.sibling=w,b=w);return e&&T.forEach(function(I){return t(v,I)}),Ve&&gr(v,C),_}function S(v,m,g,k){if(typeof g=="object"&&g!==null&&g.type===Yr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Jo:e:{for(var _=g.key,b=m;b!==null;){if(b.key===_){if(_=g.type,_===Yr){if(b.tag===7){n(v,b.sibling),m=i(b,g.props.children),m.return=v,v=m;break e}}else if(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Hn&&dp(_)===b.type){n(v,b.sibling),m=i(b,g.props),m.ref=Di(v,b,g),m.return=v,v=m;break e}n(v,b);break}else t(v,b);b=b.sibling}g.type===Yr?(m=Nr(g.props.children,v.mode,k,g.key),m.return=v,v=m):(k=Ps(g.type,g.key,g.props,null,v.mode,k),k.ref=Di(v,m,g),k.return=v,v=k)}return s(v);case Gr:e:{for(b=g.key;m!==null;){if(m.key===b)if(m.tag===4&&m.stateNode.containerInfo===g.containerInfo&&m.stateNode.implementation===g.implementation){n(v,m.sibling),m=i(m,g.children||[]),m.return=v,v=m;break e}else{n(v,m);break}else t(v,m);m=m.sibling}m=ja(g,v.mode,k),m.return=v,v=m}return s(v);case Hn:return b=g._init,S(v,m,b(g._payload),k)}if(Gi(g))return y(v,m,g,k);if(Ri(g))return x(v,m,g,k);cs(v,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,m!==null&&m.tag===6?(n(v,m.sibling),m=i(m,g),m.return=v,v=m):(n(v,m),m=Na(g,v.mode,k),m.return=v,v=m),s(v)):n(v,m)}return S}var vi=Ug(!0),Hg=Ug(!1),nl=cr(null),rl=null,ri=null,rd=null;function id(){rd=ri=rl=null}function od(e){var t=nl.current;He(nl),e._currentValue=t}function Du(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function di(e,t){rl=e,rd=ri=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ot=!0),e.firstContext=null)}function tn(e){var t=e._currentValue;if(rd!==e)if(e={context:e,memoizedValue:t,next:null},ri===null){if(rl===null)throw Error(ae(308));ri=e,rl.dependencies={lanes:0,firstContext:e}}else ri=ri.next=e;return t}var br=null;function sd(e){br===null?br=[e]:br.push(e)}function Wg(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,sd(t)):(n.next=i.next,i.next=n),t.interleaved=n,In(e,r)}function In(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Wn=!1;function ld(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function er(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ae&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,In(e,n)}return i=r.interleaved,i===null?(t.next=t,sd(r)):(t.next=i.next,i.next=t),r.interleaved=t,In(e,n)}function Ls(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qc(e,n)}}function fp(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function il(e,t,n,r){var i=e.updateQueue;Wn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var d=i.baseState;s=0,c=u=a=null,l=o;do{var p=l.lane,h=l.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,x=l;switch(p=t,h=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){d=y.call(h,d,p);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,p=typeof y=="function"?y.call(h,d,p):y,p==null)break e;d=Ge({},d,p);break e;case 2:Wn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else h={eventTime:h,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=h,a=d):c=c.next=h,s|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ar|=s,e.lanes=s,e.memoizedState=d}}function pp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(ae(191,i));i.call(r)}}}var Ho={},bn=cr(Ho),No=cr(Ho),jo=cr(Ho);function Er(e){if(e===Ho)throw Error(ae(174));return e}function ad(e,t){switch(Be(jo,t),Be(No,e),Be(bn,Ho),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xu(t,e)}He(bn),Be(bn,t)}function xi(){He(bn),He(No),He(jo)}function qg(e){Er(jo.current);var t=Er(bn.current),n=xu(t,e.type);t!==n&&(Be(No,e),Be(bn,n))}function ud(e){No.current===e&&(He(bn),He(No))}var qe=cr(0);function ol(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wa=[];function cd(){for(var e=0;e<wa.length;e++)wa[e]._workInProgressVersionPrimary=null;wa.length=0}var Is=On.ReactCurrentDispatcher,ka=On.ReactCurrentBatchConfig,Ir=0,Ke=null,lt=null,ft=null,sl=!1,ro=!1,_o=0,t0=0;function bt(){throw Error(ae(321))}function dd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!hn(e[n],t[n]))return!1;return!0}function fd(e,t,n,r,i,o){if(Ir=o,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Is.current=e===null||e.memoizedState===null?o0:s0,e=n(r,i),ro){o=0;do{if(ro=!1,_o=0,25<=o)throw Error(ae(301));o+=1,ft=lt=null,t.updateQueue=null,Is.current=l0,e=n(r,i)}while(ro)}if(Is.current=ll,t=lt!==null&<.next!==null,Ir=0,ft=lt=Ke=null,sl=!1,t)throw Error(ae(300));return e}function pd(){var e=_o!==0;return _o=0,e}function yn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?Ke.memoizedState=ft=e:ft=ft.next=e,ft}function nn(){if(lt===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=ft===null?Ke.memoizedState:ft.next;if(t!==null)ft=t,lt=e;else{if(e===null)throw Error(ae(310));lt=e,e={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},ft===null?Ke.memoizedState=ft=e:ft=ft.next=e}return ft}function To(e,t){return typeof t=="function"?t(e):t}function ba(e){var t=nn(),n=t.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=e;var r=lt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,a=null,u=o;do{var c=u.lane;if((Ir&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=d,s=r):a=a.next=d,Ke.lanes|=c,Ar|=c}u=u.next}while(u!==null&&u!==o);a===null?s=r:a.next=l,hn(r,t.memoizedState)||(Ot=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Ke.lanes|=o,Ar|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ea(e){var t=nn(),n=t.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);hn(o,t.memoizedState)||(Ot=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Kg(){}function Gg(e,t){var n=Ke,r=nn(),i=t(),o=!hn(r.memoizedState,i);if(o&&(r.memoizedState=i,Ot=!0),r=r.queue,hd(Qg.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||ft!==null&&ft.memoizedState.tag&1){if(n.flags|=2048,$o(9,Xg.bind(null,n,r,i,t),void 0,null),pt===null)throw Error(ae(349));Ir&30||Yg(n,t,i)}return i}function Yg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Xg(e,t,n,r){t.value=n,t.getSnapshot=r,Zg(t)&&Jg(e)}function Qg(e,t,n){return n(function(){Zg(t)&&Jg(e)})}function Zg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hn(e,n)}catch{return!0}}function Jg(e){var t=In(e,1);t!==null&&dn(t,e,1,-1)}function hp(e){var t=yn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:To,lastRenderedState:e},t.queue=e,e=e.dispatch=i0.bind(null,Ke,e),[t.memoizedState,e]}function $o(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ey(){return nn().memoizedState}function As(e,t,n,r){var i=yn();Ke.flags|=e,i.memoizedState=$o(1|t,n,void 0,r===void 0?null:r)}function Rl(e,t,n,r){var i=nn();r=r===void 0?null:r;var o=void 0;if(lt!==null){var s=lt.memoizedState;if(o=s.destroy,r!==null&&dd(r,s.deps)){i.memoizedState=$o(t,n,o,r);return}}Ke.flags|=e,i.memoizedState=$o(1|t,n,o,r)}function mp(e,t){return As(8390656,8,e,t)}function hd(e,t){return Rl(2048,8,e,t)}function ty(e,t){return Rl(4,2,e,t)}function ny(e,t){return Rl(4,4,e,t)}function ry(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function iy(e,t,n){return n=n!=null?n.concat([e]):null,Rl(4,4,ry.bind(null,t,e),n)}function md(){}function oy(e,t){var n=nn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&dd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function sy(e,t){var n=nn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&dd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ly(e,t,n){return Ir&21?(hn(n,t)||(n=fg(),Ke.lanes|=n,Ar|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ot=!0),e.memoizedState=n)}function n0(e,t){var n=Pe;Pe=n!==0&&4>n?n:4,e(!0);var r=ka.transition;ka.transition={};try{e(!1),t()}finally{Pe=n,ka.transition=r}}function ay(){return nn().memoizedState}function r0(e,t,n){var r=nr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},uy(e))cy(t,n);else if(n=Wg(e,t,n,r),n!==null){var i=$t();dn(n,e,r,i),dy(n,t,r)}}function i0(e,t,n){var r=nr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(uy(e))cy(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,hn(l,s)){var a=t.interleaved;a===null?(i.next=i,sd(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Wg(e,t,i,r),n!==null&&(i=$t(),dn(n,e,r,i),dy(n,t,r))}}function uy(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function cy(e,t){ro=sl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qc(e,n)}}var ll={readContext:tn,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useInsertionEffect:bt,useLayoutEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useMutableSource:bt,useSyncExternalStore:bt,useId:bt,unstable_isNewReconciler:!1},o0={readContext:tn,useCallback:function(e,t){return yn().memoizedState=[e,t===void 0?null:t],e},useContext:tn,useEffect:mp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,As(4194308,4,ry.bind(null,t,e),n)},useLayoutEffect:function(e,t){return As(4194308,4,e,t)},useInsertionEffect:function(e,t){return As(4,2,e,t)},useMemo:function(e,t){var n=yn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=r0.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=yn();return e={current:e},t.memoizedState=e},useState:hp,useDebugValue:md,useDeferredValue:function(e){return yn().memoizedState=e},useTransition:function(){var e=hp(!1),t=e[0];return e=n0.bind(null,e[1]),yn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,i=yn();if(Ve){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),pt===null)throw Error(ae(349));Ir&30||Yg(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,mp(Qg.bind(null,r,o,e),[e]),r.flags|=2048,$o(9,Xg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=yn(),t=pt.identifierPrefix;if(Ve){var n=_n,r=jn;n=(r&~(1<<32-cn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_o++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=t0++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},s0={readContext:tn,useCallback:oy,useContext:tn,useEffect:hd,useImperativeHandle:iy,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:sy,useReducer:ba,useRef:ey,useState:function(){return ba(To)},useDebugValue:md,useDeferredValue:function(e){var t=nn();return ly(t,lt.memoizedState,e)},useTransition:function(){var e=ba(To)[0],t=nn().memoizedState;return[e,t]},useMutableSource:Kg,useSyncExternalStore:Gg,useId:ay,unstable_isNewReconciler:!1},l0={readContext:tn,useCallback:oy,useContext:tn,useEffect:hd,useImperativeHandle:iy,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:sy,useReducer:Ea,useRef:ey,useState:function(){return Ea(To)},useDebugValue:md,useDeferredValue:function(e){var t=nn();return lt===null?t.memoizedState=e:ly(t,lt.memoizedState,e)},useTransition:function(){var e=Ea(To)[0],t=nn().memoizedState;return[e,t]},useMutableSource:Kg,useSyncExternalStore:Gg,useId:ay,unstable_isNewReconciler:!1};function sn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function zu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ol={isMounted:function(e){return(e=e._reactInternals)?Dr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=$t(),i=nr(e),o=Tn(r,i);o.payload=t,n!=null&&(o.callback=n),t=er(e,o,i),t!==null&&(dn(t,e,i,r),Ls(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=$t(),i=nr(e),o=Tn(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=er(e,o,i),t!==null&&(dn(t,e,i,r),Ls(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=$t(),r=nr(e),i=Tn(n,r);i.tag=2,t!=null&&(i.callback=t),t=er(e,i,r),t!==null&&(dn(t,e,r,n),Ls(t,e,r))}};function gp(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!bo(n,r)||!bo(i,o):!0}function fy(e,t,n){var r=!1,i=sr,o=t.contextType;return typeof o=="object"&&o!==null?o=tn(o):(i=Pt(t)?$r:jt.current,r=t.contextTypes,o=(r=r!=null)?gi(e,i):sr),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ol,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function yp(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ol.enqueueReplaceState(t,t.state,null)}function Bu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ld(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=tn(o):(o=Pt(t)?$r:jt.current,i.context=gi(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(zu(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Ol.enqueueReplaceState(i,i.state,null),il(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function wi(e,t){try{var n="",r=t;do n+=Ow(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
39
|
+
Error generating stack: `+o.message+`
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Sa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Uu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var a0=typeof WeakMap=="function"?WeakMap:Map;function py(e,t,n){n=Tn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ul||(ul=!0,Zu=r),Uu(e,t)},n}function hy(e,t,n){n=Tn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Uu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Uu(e,t),typeof r!="function"&&(tr===null?tr=new Set([this]):tr.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function vp(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new a0;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=b0.bind(null,e,t,n),t.then(e,e))}function xp(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function wp(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Tn(-1,1),t.tag=2,er(n,t,1))),n.lanes|=1),e)}var u0=On.ReactCurrentOwner,Ot=!1;function Tt(e,t,n,r){t.child=e===null?Hg(t,null,n,r):vi(t,e.child,n,r)}function kp(e,t,n,r,i){n=n.render;var o=t.ref;return di(t,i),r=fd(e,t,n,r,o,i),n=pd(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,An(e,t,i)):(Ve&&n&&ed(t),t.flags|=1,Tt(e,t,r,i),t.child)}function bp(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Ed(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,my(e,t,o,r,i)):(e=Ps(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:bo,n(s,r)&&e.ref===t.ref)return An(e,t,i)}return t.flags|=1,e=rr(o,r),e.ref=t.ref,e.return=t,t.child=e}function my(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(bo(o,r)&&e.ref===t.ref)if(Ot=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Ot=!0);else return t.lanes=e.lanes,An(e,t,i)}return Hu(e,t,n,r,i)}function gy(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Be(oi,Ut),Ut|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Be(oi,Ut),Ut|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Be(oi,Ut),Ut|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Be(oi,Ut),Ut|=r;return Tt(e,t,i,n),t.child}function yy(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Hu(e,t,n,r,i){var o=Pt(n)?$r:jt.current;return o=gi(t,o),di(t,i),n=fd(e,t,n,r,o,i),r=pd(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,An(e,t,i)):(Ve&&r&&ed(t),t.flags|=1,Tt(e,t,n,i),t.child)}function Ep(e,t,n,r,i){if(Pt(n)){var o=!0;Js(t)}else o=!1;if(di(t,i),t.stateNode===null)Rs(e,t),fy(t,n,r),Bu(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=tn(u):(u=Pt(n)?$r:jt.current,u=gi(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&yp(t,s,r,u),Wn=!1;var p=t.memoizedState;s.state=p,il(t,r,s,i),a=t.memoizedState,l!==r||p!==a||Mt.current||Wn?(typeof c=="function"&&(zu(t,n,c,r),a=t.memoizedState),(l=Wn||gp(t,n,l,r,p,a,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Vg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:sn(t.type,l),s.props=u,d=t.pendingProps,p=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=tn(a):(a=Pt(n)?$r:jt.current,a=gi(t,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||p!==a)&&yp(t,s,r,a),Wn=!1,p=t.memoizedState,s.state=p,il(t,r,s,i);var y=t.memoizedState;l!==d||p!==y||Mt.current||Wn?(typeof h=="function"&&(zu(t,n,h,r),y=t.memoizedState),(u=Wn||gp(t,n,u,r,p,y,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Wu(e,t,n,r,o,i)}function Wu(e,t,n,r,i,o){yy(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&ap(t,n,!1),An(e,t,o);r=t.stateNode,u0.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=vi(t,e.child,null,o),t.child=vi(t,null,l,o)):Tt(e,t,l,o),t.memoizedState=r.state,i&&ap(t,n,!0),t.child}function vy(e){var t=e.stateNode;t.pendingContext?lp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lp(e,t.context,!1),ad(e,t.containerInfo)}function Sp(e,t,n,r,i){return yi(),nd(i),t.flags|=256,Tt(e,t,n,r),t.child}var Vu={dehydrated:null,treeContext:null,retryLane:0};function qu(e){return{baseLanes:e,cachePool:null,transitions:null}}function xy(e,t,n){var r=t.pendingProps,i=qe.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Be(qe,i&1),e===null)return Fu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Fl(s,r,0,null),e=Nr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=qu(n),t.memoizedState=Vu,e):gd(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return c0(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=rr(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=rr(l,o):(o=Nr(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?qu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Vu,r}return o=e.child,e=o.sibling,r=rr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function gd(e,t){return t=Fl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ds(e,t,n,r){return r!==null&&nd(r),vi(t,e.child,null,n),e=gd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function c0(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Sa(Error(ae(422))),ds(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Fl({mode:"visible",children:r.children},i,0,null),o=Nr(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&vi(t,e.child,null,s),t.child.memoizedState=qu(s),t.memoizedState=Vu,o);if(!(t.mode&1))return ds(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(ae(419)),r=Sa(o,r,void 0),ds(e,t,s,r)}if(l=(s&e.childLanes)!==0,Ot||l){if(r=pt,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,In(e,i),dn(r,e,i,-1))}return bd(),r=Sa(Error(ae(421))),ds(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=E0.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ht=Jn(i.nextSibling),Wt=t,Ve=!0,un=null,e!==null&&(Xt[Qt++]=jn,Xt[Qt++]=_n,Xt[Qt++]=Lr,jn=e.id,_n=e.overflow,Lr=t),t=gd(t,r.children),t.flags|=4096,t)}function Cp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Du(e.return,t,n)}function Ca(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function wy(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Tt(e,t,r.children,n),r=qe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cp(e,n,t);else if(e.tag===19)Cp(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Be(qe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ol(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ca(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ol(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ca(t,!0,n,null,o);break;case"together":Ca(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Rs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function An(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ar|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ae(153));if(t.child!==null){for(e=t.child,n=rr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function d0(e,t,n){switch(t.tag){case 3:vy(t),yi();break;case 5:qg(t);break;case 1:Pt(t.type)&&Js(t);break;case 4:ad(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Be(nl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Be(qe,qe.current&1),t.flags|=128,null):n&t.child.childLanes?xy(e,t,n):(Be(qe,qe.current&1),e=An(e,t,n),e!==null?e.sibling:null);Be(qe,qe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return wy(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Be(qe,qe.current),r)break;return null;case 22:case 23:return t.lanes=0,gy(e,t,n)}return An(e,t,n)}var ky,Ku,by,Ey;ky=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ku=function(){};by=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Er(bn.current);var o=null;switch(n){case"input":i=mu(e,i),r=mu(e,r),o=[];break;case"select":i=Ge({},i,{value:void 0}),r=Ge({},r,{value:void 0}),o=[];break;case"textarea":i=vu(e,i),r=vu(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Qs)}wu(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(mo.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(mo.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Ue("scroll",e),o||l===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Ey=function(e,t,n,r){n!==r&&(t.flags|=4)};function zi(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Et(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function f0(e,t,n){var r=t.pendingProps;switch(td(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Et(t),null;case 1:return Pt(t.type)&&Zs(),Et(t),null;case 3:return r=t.stateNode,xi(),He(Mt),He(jt),cd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(us(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,un!==null&&(tc(un),un=null))),Ku(e,t),Et(t),null;case 5:ud(t);var i=Er(jo.current);if(n=t.type,e!==null&&t.stateNode!=null)by(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ae(166));return Et(t),null}if(e=Er(bn.current),us(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[wn]=t,r[Co]=o,e=(t.mode&1)!==0,n){case"dialog":Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":case"embed":Ue("load",r);break;case"video":case"audio":for(i=0;i<Xi.length;i++)Ue(Xi[i],r);break;case"source":Ue("error",r);break;case"img":case"image":case"link":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"input":Rf(r,o),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ue("invalid",r);break;case"textarea":Mf(r,o),Ue("invalid",r)}wu(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&as(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&as(r.textContent,l,e),i=["children",""+l]):mo.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&Ue("scroll",r)}switch(n){case"input":es(r),Of(r,o,!0);break;case"textarea":es(r),Pf(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Qs)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Qm(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[wn]=t,e[Co]=r,ky(e,t,!1,!1),t.stateNode=e;e:{switch(s=ku(n,r),n){case"dialog":Ue("cancel",e),Ue("close",e),i=r;break;case"iframe":case"object":case"embed":Ue("load",e),i=r;break;case"video":case"audio":for(i=0;i<Xi.length;i++)Ue(Xi[i],e);i=r;break;case"source":Ue("error",e),i=r;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),i=r;break;case"details":Ue("toggle",e),i=r;break;case"input":Rf(e,r),i=mu(e,r),Ue("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ge({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":Mf(e,r),i=vu(e,r),Ue("invalid",e);break;default:i=r}wu(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?eg(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Zm(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&go(e,a):typeof a=="number"&&go(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(mo.hasOwnProperty(o)?a!=null&&o==="onScroll"&&Ue("scroll",e):a!=null&&zc(e,o,a,s))}switch(n){case"input":es(e),Of(e,r,!1);break;case"textarea":es(e),Pf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+or(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?li(e,!!r.multiple,o,!1):r.defaultValue!=null&&li(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Qs)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Et(t),null;case 6:if(e&&t.stateNode!=null)Ey(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ae(166));if(n=Er(jo.current),Er(bn.current),us(t)){if(r=t.stateNode,n=t.memoizedProps,r[wn]=t,(o=r.nodeValue!==n)&&(e=Wt,e!==null))switch(e.tag){case 3:as(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&as(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[wn]=t,t.stateNode=r}return Et(t),null;case 13:if(He(qe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ve&&Ht!==null&&t.mode&1&&!(t.flags&128))Bg(),yi(),t.flags|=98560,o=!1;else if(o=us(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(ae(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(ae(317));o[wn]=t}else yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Et(t),o=!1}else un!==null&&(tc(un),un=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||qe.current&1?at===0&&(at=3):bd())),t.updateQueue!==null&&(t.flags|=4),Et(t),null);case 4:return xi(),Ku(e,t),e===null&&Eo(t.stateNode.containerInfo),Et(t),null;case 10:return od(t.type._context),Et(t),null;case 17:return Pt(t.type)&&Zs(),Et(t),null;case 19:if(He(qe),o=t.memoizedState,o===null)return Et(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)zi(o,!1);else{if(at!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=ol(e),s!==null){for(t.flags|=128,zi(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Be(qe,qe.current&1|2),t.child}e=e.sibling}o.tail!==null&&Qe()>ki&&(t.flags|=128,r=!0,zi(o,!1),t.lanes=4194304)}else{if(!r)if(e=ol(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),zi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Ve)return Et(t),null}else 2*Qe()-o.renderingStartTime>ki&&n!==1073741824&&(t.flags|=128,r=!0,zi(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qe(),t.sibling=null,n=qe.current,Be(qe,r?n&1|2:n&1),t):(Et(t),null);case 22:case 23:return kd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ut&1073741824&&(Et(t),t.subtreeFlags&6&&(t.flags|=8192)):Et(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function p0(e,t){switch(td(t),t.tag){case 1:return Pt(t.type)&&Zs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xi(),He(Mt),He(jt),cd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ud(t),null;case 13:if(He(qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return He(qe),null;case 4:return xi(),null;case 10:return od(t.type._context),null;case 22:case 23:return kd(),null;case 24:return null;default:return null}}var fs=!1,St=!1,h0=typeof WeakSet=="function"?WeakSet:Set,me=null;function ii(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Xe(e,t,r)}else n.current=null}function Gu(e,t,n){try{n()}catch(r){Xe(e,t,r)}}var Np=!1;function m0(e,t){if(Lu=Gs,e=_g(),Jc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=e,p=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(l=s+i),d!==o||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++u===i&&(l=s),p===o&&++c===r&&(a=s),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Iu={focusedElem:e,selectionRange:n},Gs=!1,me=t;me!==null;)if(t=me,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,me=e;else for(;me!==null;){t=me;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,S=y.memoizedState,v=t.stateNode,m=v.getSnapshotBeforeUpdate(t.elementType===t.type?x:sn(t.type,x),S);v.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(k){Xe(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,me=e;break}me=t.return}return y=Np,Np=!1,y}function io(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Gu(t,n,o)}i=i.next}while(i!==r)}}function Ml(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Sy(e){var t=e.alternate;t!==null&&(e.alternate=null,Sy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wn],delete t[Co],delete t[Ou],delete t[Qk],delete t[Zk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Cy(e){return e.tag===5||e.tag===3||e.tag===4}function jp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qs));else if(r!==4&&(e=e.child,e!==null))for(Xu(e,t,n),e=e.sibling;e!==null;)Xu(e,t,n),e=e.sibling}function Qu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Qu(e,t,n),e=e.sibling;e!==null;)Qu(e,t,n),e=e.sibling}var gt=null,ln=!1;function Bn(e,t,n){for(n=n.child;n!==null;)Ny(e,t,n),n=n.sibling}function Ny(e,t,n){if(kn&&typeof kn.onCommitFiberUnmount=="function")try{kn.onCommitFiberUnmount(_l,n)}catch{}switch(n.tag){case 5:St||ii(n,t);case 6:var r=gt,i=ln;gt=null,Bn(e,t,n),gt=r,ln=i,gt!==null&&(ln?(e=gt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):gt.removeChild(n.stateNode));break;case 18:gt!==null&&(ln?(e=gt,n=n.stateNode,e.nodeType===8?va(e.parentNode,n):e.nodeType===1&&va(e,n),wo(e)):va(gt,n.stateNode));break;case 4:r=gt,i=ln,gt=n.stateNode.containerInfo,ln=!0,Bn(e,t,n),gt=r,ln=i;break;case 0:case 11:case 14:case 15:if(!St&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Gu(n,t,s),i=i.next}while(i!==r)}Bn(e,t,n);break;case 1:if(!St&&(ii(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Xe(n,t,l)}Bn(e,t,n);break;case 21:Bn(e,t,n);break;case 22:n.mode&1?(St=(r=St)||n.memoizedState!==null,Bn(e,t,n),St=r):Bn(e,t,n);break;default:Bn(e,t,n)}}function _p(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new h0),t.forEach(function(r){var i=S0.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function on(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:gt=l.stateNode,ln=!1;break e;case 3:gt=l.stateNode.containerInfo,ln=!0;break e;case 4:gt=l.stateNode.containerInfo,ln=!0;break e}l=l.return}if(gt===null)throw Error(ae(160));Ny(o,s,i),gt=null,ln=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){Xe(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)jy(t,e),t=t.sibling}function jy(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(on(t,e),gn(e),r&4){try{io(3,e,e.return),Ml(3,e)}catch(x){Xe(e,e.return,x)}try{io(5,e,e.return)}catch(x){Xe(e,e.return,x)}}break;case 1:on(t,e),gn(e),r&512&&n!==null&&ii(n,n.return);break;case 5:if(on(t,e),gn(e),r&512&&n!==null&&ii(n,n.return),e.flags&32){var i=e.stateNode;try{go(i,"")}catch(x){Xe(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Ym(i,o),ku(l,s);var u=ku(l,o);for(s=0;s<a.length;s+=2){var c=a[s],d=a[s+1];c==="style"?eg(i,d):c==="dangerouslySetInnerHTML"?Zm(i,d):c==="children"?go(i,d):zc(i,c,d,u)}switch(l){case"input":gu(i,o);break;case"textarea":Xm(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?li(i,!!o.multiple,h,!1):p!==!!o.multiple&&(o.defaultValue!=null?li(i,!!o.multiple,o.defaultValue,!0):li(i,!!o.multiple,o.multiple?[]:"",!1))}i[Co]=o}catch(x){Xe(e,e.return,x)}}break;case 6:if(on(t,e),gn(e),r&4){if(e.stateNode===null)throw Error(ae(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(x){Xe(e,e.return,x)}}break;case 3:if(on(t,e),gn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{wo(t.containerInfo)}catch(x){Xe(e,e.return,x)}break;case 4:on(t,e),gn(e);break;case 13:on(t,e),gn(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(xd=Qe())),r&4&&_p(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(St=(u=St)||c,on(t,e),St=u):on(t,e),gn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(me=e,c=e.child;c!==null;){for(d=me=c;me!==null;){switch(p=me,h=p.child,p.tag){case 0:case 11:case 14:case 15:io(4,p,p.return);break;case 1:ii(p,p.return);var y=p.stateNode;if(typeof y.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(x){Xe(r,n,x)}}break;case 5:ii(p,p.return);break;case 22:if(p.memoizedState!==null){$p(d);continue}}h!==null?(h.return=p,me=h):$p(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,a=d.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=Jm("display",s))}catch(x){Xe(e,e.return,x)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(x){Xe(e,e.return,x)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:on(t,e),gn(e),r&4&&_p(e);break;case 21:break;default:on(t,e),gn(e)}}function gn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Cy(n)){var r=n;break e}n=n.return}throw Error(ae(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(go(i,""),r.flags&=-33);var o=jp(e);Qu(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=jp(e);Xu(e,l,s);break;default:throw Error(ae(161))}}catch(a){Xe(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function g0(e,t,n){me=e,_y(e)}function _y(e,t,n){for(var r=(e.mode&1)!==0;me!==null;){var i=me,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||fs;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||St;l=fs;var u=St;if(fs=s,(St=a)&&!u)for(me=i;me!==null;)s=me,a=s.child,s.tag===22&&s.memoizedState!==null?Lp(i):a!==null?(a.return=s,me=a):Lp(i);for(;o!==null;)me=o,_y(o),o=o.sibling;me=i,fs=l,St=u}Tp(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,me=o):Tp(e)}}function Tp(e){for(;me!==null;){var t=me;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:St||Ml(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!St)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:sn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&pp(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}pp(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&wo(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ae(163))}St||t.flags&512&&Yu(t)}catch(p){Xe(t,t.return,p)}}if(t===e){me=null;break}if(n=t.sibling,n!==null){n.return=t.return,me=n;break}me=t.return}}function $p(e){for(;me!==null;){var t=me;if(t===e){me=null;break}var n=t.sibling;if(n!==null){n.return=t.return,me=n;break}me=t.return}}function Lp(e){for(;me!==null;){var t=me;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ml(4,t)}catch(a){Xe(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){Xe(t,i,a)}}var o=t.return;try{Yu(t)}catch(a){Xe(t,o,a)}break;case 5:var s=t.return;try{Yu(t)}catch(a){Xe(t,s,a)}}}catch(a){Xe(t,t.return,a)}if(t===e){me=null;break}var l=t.sibling;if(l!==null){l.return=t.return,me=l;break}me=t.return}}var y0=Math.ceil,al=On.ReactCurrentDispatcher,yd=On.ReactCurrentOwner,en=On.ReactCurrentBatchConfig,Ae=0,pt=null,rt=null,xt=0,Ut=0,oi=cr(0),at=0,Lo=null,Ar=0,Pl=0,vd=0,oo=null,Rt=null,xd=0,ki=1/0,Cn=null,ul=!1,Zu=null,tr=null,ps=!1,Yn=null,cl=0,so=0,Ju=null,Os=-1,Ms=0;function $t(){return Ae&6?Qe():Os!==-1?Os:Os=Qe()}function nr(e){return e.mode&1?Ae&2&&xt!==0?xt&-xt:e0.transition!==null?(Ms===0&&(Ms=fg()),Ms):(e=Pe,e!==0||(e=window.event,e=e===void 0?16:xg(e.type)),e):1}function dn(e,t,n,r){if(50<so)throw so=0,Ju=null,Error(ae(185));zo(e,n,r),(!(Ae&2)||e!==pt)&&(e===pt&&(!(Ae&2)&&(Pl|=n),at===4&&qn(e,xt)),Ft(e,r),n===1&&Ae===0&&!(t.mode&1)&&(ki=Qe()+500,Al&&dr()))}function Ft(e,t){var n=e.callbackNode;ek(e,t);var r=Ks(e,e===pt?xt:0);if(r===0)n!==null&&zf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&zf(n),t===1)e.tag===0?Jk(Ip.bind(null,e)):Fg(Ip.bind(null,e)),Yk(function(){!(Ae&6)&&dr()}),n=null;else{switch(pg(r)){case 1:n=Vc;break;case 4:n=cg;break;case 16:n=qs;break;case 536870912:n=dg;break;default:n=qs}n=My(n,Ty.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ty(e,t){if(Os=-1,Ms=0,Ae&6)throw Error(ae(327));var n=e.callbackNode;if(fi()&&e.callbackNode!==n)return null;var r=Ks(e,e===pt?xt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=dl(e,r);else{t=r;var i=Ae;Ae|=2;var o=Ly();(pt!==e||xt!==t)&&(Cn=null,ki=Qe()+500,Cr(e,t));do try{w0();break}catch(l){$y(e,l)}while(!0);id(),al.current=o,Ae=i,rt!==null?t=0:(pt=null,xt=0,t=at)}if(t!==0){if(t===2&&(i=Nu(e),i!==0&&(r=i,t=ec(e,i))),t===1)throw n=Lo,Cr(e,0),qn(e,r),Ft(e,Qe()),n;if(t===6)qn(e,r);else{if(i=e.current.alternate,!(r&30)&&!v0(i)&&(t=dl(e,r),t===2&&(o=Nu(e),o!==0&&(r=o,t=ec(e,o))),t===1))throw n=Lo,Cr(e,0),qn(e,r),Ft(e,Qe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(ae(345));case 2:yr(e,Rt,Cn);break;case 3:if(qn(e,r),(r&130023424)===r&&(t=xd+500-Qe(),10<t)){if(Ks(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){$t(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Ru(yr.bind(null,e,Rt,Cn),t);break}yr(e,Rt,Cn);break;case 4:if(qn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-cn(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*y0(r/1960))-r,10<r){e.timeoutHandle=Ru(yr.bind(null,e,Rt,Cn),r);break}yr(e,Rt,Cn);break;case 5:yr(e,Rt,Cn);break;default:throw Error(ae(329))}}}return Ft(e,Qe()),e.callbackNode===n?Ty.bind(null,e):null}function ec(e,t){var n=oo;return e.current.memoizedState.isDehydrated&&(Cr(e,t).flags|=256),e=dl(e,t),e!==2&&(t=Rt,Rt=n,t!==null&&tc(t)),e}function tc(e){Rt===null?Rt=e:Rt.push.apply(Rt,e)}function v0(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!hn(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function qn(e,t){for(t&=~vd,t&=~Pl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-cn(t),r=1<<n;e[n]=-1,t&=~r}}function Ip(e){if(Ae&6)throw Error(ae(327));fi();var t=Ks(e,0);if(!(t&1))return Ft(e,Qe()),null;var n=dl(e,t);if(e.tag!==0&&n===2){var r=Nu(e);r!==0&&(t=r,n=ec(e,r))}if(n===1)throw n=Lo,Cr(e,0),qn(e,t),Ft(e,Qe()),n;if(n===6)throw Error(ae(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yr(e,Rt,Cn),Ft(e,Qe()),null}function wd(e,t){var n=Ae;Ae|=1;try{return e(t)}finally{Ae=n,Ae===0&&(ki=Qe()+500,Al&&dr())}}function Rr(e){Yn!==null&&Yn.tag===0&&!(Ae&6)&&fi();var t=Ae;Ae|=1;var n=en.transition,r=Pe;try{if(en.transition=null,Pe=1,e)return e()}finally{Pe=r,en.transition=n,Ae=t,!(Ae&6)&&dr()}}function kd(){Ut=oi.current,He(oi)}function Cr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Gk(n)),rt!==null)for(n=rt.return;n!==null;){var r=n;switch(td(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Zs();break;case 3:xi(),He(Mt),He(jt),cd();break;case 5:ud(r);break;case 4:xi();break;case 13:He(qe);break;case 19:He(qe);break;case 10:od(r.type._context);break;case 22:case 23:kd()}n=n.return}if(pt=e,rt=e=rr(e.current,null),xt=Ut=t,at=0,Lo=null,vd=Pl=Ar=0,Rt=oo=null,br!==null){for(t=0;t<br.length;t++)if(n=br[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}br=null}return e}function $y(e,t){do{var n=rt;try{if(id(),Is.current=ll,sl){for(var r=Ke.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}sl=!1}if(Ir=0,ft=lt=Ke=null,ro=!1,_o=0,yd.current=null,n===null||n.return===null){at=1,Lo=t,rt=null;break}e:{var o=e,s=n.return,l=n,a=t;if(t=xt,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var p=c.alternate;p?(c.updateQueue=p.updateQueue,c.memoizedState=p.memoizedState,c.lanes=p.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=xp(s);if(h!==null){h.flags&=-257,wp(h,s,l,o,t),h.mode&1&&vp(o,u,t),t=h,a=u;var y=t.updateQueue;if(y===null){var x=new Set;x.add(a),t.updateQueue=x}else y.add(a);break e}else{if(!(t&1)){vp(o,u,t),bd();break e}a=Error(ae(426))}}else if(Ve&&l.mode&1){var S=xp(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),wp(S,s,l,o,t),nd(wi(a,l));break e}}o=a=wi(a,l),at!==4&&(at=2),oo===null?oo=[o]:oo.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=py(o,a,t);fp(o,v);break e;case 1:l=a;var m=o.type,g=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(tr===null||!tr.has(g)))){o.flags|=65536,t&=-t,o.lanes|=t;var k=hy(o,l,t);fp(o,k);break e}}o=o.return}while(o!==null)}Ay(n)}catch(_){t=_,rt===n&&n!==null&&(rt=n=n.return);continue}break}while(!0)}function Ly(){var e=al.current;return al.current=ll,e===null?ll:e}function bd(){(at===0||at===3||at===2)&&(at=4),pt===null||!(Ar&268435455)&&!(Pl&268435455)||qn(pt,xt)}function dl(e,t){var n=Ae;Ae|=2;var r=Ly();(pt!==e||xt!==t)&&(Cn=null,Cr(e,t));do try{x0();break}catch(i){$y(e,i)}while(!0);if(id(),Ae=n,al.current=r,rt!==null)throw Error(ae(261));return pt=null,xt=0,at}function x0(){for(;rt!==null;)Iy(rt)}function w0(){for(;rt!==null&&!Vw();)Iy(rt)}function Iy(e){var t=Oy(e.alternate,e,Ut);e.memoizedProps=e.pendingProps,t===null?Ay(e):rt=t,yd.current=null}function Ay(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=p0(n,t),n!==null){n.flags&=32767,rt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{at=6,rt=null;return}}else if(n=f0(n,t,Ut),n!==null){rt=n;return}if(t=t.sibling,t!==null){rt=t;return}rt=t=e}while(t!==null);at===0&&(at=5)}function yr(e,t,n){var r=Pe,i=en.transition;try{en.transition=null,Pe=1,k0(e,t,n,r)}finally{en.transition=i,Pe=r}return null}function k0(e,t,n,r){do fi();while(Yn!==null);if(Ae&6)throw Error(ae(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ae(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(tk(e,o),e===pt&&(rt=pt=null,xt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ps||(ps=!0,My(qs,function(){return fi(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=en.transition,en.transition=null;var s=Pe;Pe=1;var l=Ae;Ae|=4,yd.current=null,m0(e,n),jy(n,e),Bk(Iu),Gs=!!Lu,Iu=Lu=null,e.current=n,g0(n),qw(),Ae=l,Pe=s,en.transition=o}else e.current=n;if(ps&&(ps=!1,Yn=e,cl=i),o=e.pendingLanes,o===0&&(tr=null),Yw(n.stateNode),Ft(e,Qe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(ul)throw ul=!1,e=Zu,Zu=null,e;return cl&1&&e.tag!==0&&fi(),o=e.pendingLanes,o&1?e===Ju?so++:(so=0,Ju=e):so=0,dr(),null}function fi(){if(Yn!==null){var e=pg(cl),t=en.transition,n=Pe;try{if(en.transition=null,Pe=16>e?16:e,Yn===null)var r=!1;else{if(e=Yn,Yn=null,cl=0,Ae&6)throw Error(ae(331));var i=Ae;for(Ae|=4,me=e.current;me!==null;){var o=me,s=o.child;if(me.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(me=u;me!==null;){var c=me;switch(c.tag){case 0:case 11:case 15:io(8,c,o)}var d=c.child;if(d!==null)d.return=c,me=d;else for(;me!==null;){c=me;var p=c.sibling,h=c.return;if(Sy(c),c===u){me=null;break}if(p!==null){p.return=h,me=p;break}me=h}}}var y=o.alternate;if(y!==null){var x=y.child;if(x!==null){y.child=null;do{var S=x.sibling;x.sibling=null,x=S}while(x!==null)}}me=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,me=s;else e:for(;me!==null;){if(o=me,o.flags&2048)switch(o.tag){case 0:case 11:case 15:io(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,me=v;break e}me=o.return}}var m=e.current;for(me=m;me!==null;){s=me;var g=s.child;if(s.subtreeFlags&2064&&g!==null)g.return=s,me=g;else e:for(s=m;me!==null;){if(l=me,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Ml(9,l)}}catch(_){Xe(l,l.return,_)}if(l===s){me=null;break e}var k=l.sibling;if(k!==null){k.return=l.return,me=k;break e}me=l.return}}if(Ae=i,dr(),kn&&typeof kn.onPostCommitFiberRoot=="function")try{kn.onPostCommitFiberRoot(_l,e)}catch{}r=!0}return r}finally{Pe=n,en.transition=t}}return!1}function Ap(e,t,n){t=wi(n,t),t=py(e,t,1),e=er(e,t,1),t=$t(),e!==null&&(zo(e,1,t),Ft(e,t))}function Xe(e,t,n){if(e.tag===3)Ap(e,e,n);else for(;t!==null;){if(t.tag===3){Ap(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(tr===null||!tr.has(r))){e=wi(n,e),e=hy(t,e,1),t=er(t,e,1),e=$t(),t!==null&&(zo(t,1,e),Ft(t,e));break}}t=t.return}}function b0(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=$t(),e.pingedLanes|=e.suspendedLanes&n,pt===e&&(xt&n)===n&&(at===4||at===3&&(xt&130023424)===xt&&500>Qe()-xd?Cr(e,0):vd|=n),Ft(e,t)}function Ry(e,t){t===0&&(e.mode&1?(t=rs,rs<<=1,!(rs&130023424)&&(rs=4194304)):t=1);var n=$t();e=In(e,t),e!==null&&(zo(e,t,n),Ft(e,n))}function E0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ry(e,n)}function S0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),Ry(e,n)}var Oy;Oy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)Ot=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ot=!1,d0(e,t,n);Ot=!!(e.flags&131072)}else Ot=!1,Ve&&t.flags&1048576&&Dg(t,tl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Rs(e,t),e=t.pendingProps;var i=gi(t,jt.current);di(t,n),i=fd(null,t,r,e,i,n);var o=pd();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pt(r)?(o=!0,Js(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ld(t),i.updater=Ol,t.stateNode=i,i._reactInternals=t,Bu(t,r,e,n),t=Wu(null,t,r,!0,o,n)):(t.tag=0,Ve&&o&&ed(t),Tt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Rs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=N0(r),e=sn(r,e),i){case 0:t=Hu(null,t,r,e,n);break e;case 1:t=Ep(null,t,r,e,n);break e;case 11:t=kp(null,t,r,e,n);break e;case 14:t=bp(null,t,r,sn(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Hu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Ep(e,t,r,i,n);case 3:e:{if(vy(t),e===null)throw Error(ae(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Vg(e,t),il(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=wi(Error(ae(423)),t),t=Sp(e,t,r,n,i);break e}else if(r!==i){i=wi(Error(ae(424)),t),t=Sp(e,t,r,n,i);break e}else for(Ht=Jn(t.stateNode.containerInfo.firstChild),Wt=t,Ve=!0,un=null,n=Hg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yi(),r===i){t=An(e,t,n);break e}Tt(e,t,r,n)}t=t.child}return t;case 5:return qg(t),e===null&&Fu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Au(r,i)?s=null:o!==null&&Au(r,o)&&(t.flags|=32),yy(e,t),Tt(e,t,s,n),t.child;case 6:return e===null&&Fu(t),null;case 13:return xy(e,t,n);case 4:return ad(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vi(t,null,r,n):Tt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),kp(e,t,r,i,n);case 7:return Tt(e,t,t.pendingProps,n),t.child;case 8:return Tt(e,t,t.pendingProps.children,n),t.child;case 12:return Tt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Be(nl,r._currentValue),r._currentValue=s,o!==null)if(hn(o.value,s)){if(o.children===i.children&&!Mt.current){t=An(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Tn(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Du(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ae(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Du(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Tt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,di(t,n),i=tn(i),r=r(i),t.flags|=1,Tt(e,t,r,n),t.child;case 14:return r=t.type,i=sn(r,t.pendingProps),i=sn(r.type,i),bp(e,t,r,i,n);case 15:return my(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Rs(e,t),t.tag=1,Pt(r)?(e=!0,Js(t)):e=!1,di(t,n),fy(t,r,i),Bu(t,r,i,n),Wu(null,t,r,!0,e,n);case 19:return wy(e,t,n);case 22:return gy(e,t,n)}throw Error(ae(156,t.tag))};function My(e,t){return ug(e,t)}function C0(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,n,r){return new C0(e,t,n,r)}function Ed(e){return e=e.prototype,!(!e||!e.isReactComponent)}function N0(e){if(typeof e=="function")return Ed(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uc)return 11;if(e===Hc)return 14}return 2}function rr(e,t){var n=e.alternate;return n===null?(n=Jt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ps(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Ed(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Yr:return Nr(n.children,i,o,t);case Bc:s=8,i|=8;break;case du:return e=Jt(12,n,t,i|2),e.elementType=du,e.lanes=o,e;case fu:return e=Jt(13,n,t,i),e.elementType=fu,e.lanes=o,e;case pu:return e=Jt(19,n,t,i),e.elementType=pu,e.lanes=o,e;case qm:return Fl(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Wm:s=10;break e;case Vm:s=9;break e;case Uc:s=11;break e;case Hc:s=14;break e;case Hn:s=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=Jt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Nr(e,t,n,r){return e=Jt(7,e,r,t),e.lanes=n,e}function Fl(e,t,n,r){return e=Jt(22,e,r,t),e.elementType=qm,e.lanes=n,e.stateNode={isHidden:!1},e}function Na(e,t,n){return e=Jt(6,e,null,t),e.lanes=n,e}function ja(e,t,n){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function j0(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=la(0),this.expirationTimes=la(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=la(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Sd(e,t,n,r,i,o,s,l,a){return e=new j0(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Jt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ld(o),e}function _0(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Gr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Py(e){if(!e)return sr;e=e._reactInternals;e:{if(Dr(e)!==e||e.tag!==1)throw Error(ae(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ae(171))}if(e.tag===1){var n=e.type;if(Pt(n))return Pg(e,n,t)}return t}function Fy(e,t,n,r,i,o,s,l,a){return e=Sd(n,r,!0,e,i,o,s,l,a),e.context=Py(null),n=e.current,r=$t(),i=nr(n),o=Tn(r,i),o.callback=t??null,er(n,o,i),e.current.lanes=i,zo(e,i,r),Ft(e,r),e}function Dl(e,t,n,r){var i=t.current,o=$t(),s=nr(i);return n=Py(n),t.context===null?t.context=n:t.pendingContext=n,t=Tn(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=er(i,t,s),e!==null&&(dn(e,i,s,o),Ls(e,i,s)),s}function fl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Cd(e,t){Rp(e,t),(e=e.alternate)&&Rp(e,t)}function T0(){return null}var Dy=typeof reportError=="function"?reportError:function(e){console.error(e)};function Nd(e){this._internalRoot=e}zl.prototype.render=Nd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ae(409));Dl(e,t,null,null)};zl.prototype.unmount=Nd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rr(function(){Dl(null,e,null,null)}),t[Ln]=null}};function zl(e){this._internalRoot=e}zl.prototype.unstable_scheduleHydration=function(e){if(e){var t=gg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Vn.length&&t!==0&&t<Vn[n].priority;n++);Vn.splice(n,0,e),n===0&&vg(e)}};function jd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Op(){}function $0(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=fl(s);o.call(u)}}var s=Fy(t,r,e,0,null,!1,!1,"",Op);return e._reactRootContainer=s,e[Ln]=s.current,Eo(e.nodeType===8?e.parentNode:e),Rr(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=fl(a);l.call(u)}}var a=Sd(e,0,!1,null,null,!1,!1,"",Op);return e._reactRootContainer=a,e[Ln]=a.current,Eo(e.nodeType===8?e.parentNode:e),Rr(function(){Dl(t,a,n,r)}),a}function Ul(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var a=fl(s);l.call(a)}}Dl(t,s,e,i)}else s=$0(n,t,e,i,r);return fl(s)}hg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Yi(t.pendingLanes);n!==0&&(qc(t,n|1),Ft(t,Qe()),!(Ae&6)&&(ki=Qe()+500,dr()))}break;case 13:Rr(function(){var r=In(e,1);if(r!==null){var i=$t();dn(r,e,1,i)}}),Cd(e,1)}};Kc=function(e){if(e.tag===13){var t=In(e,134217728);if(t!==null){var n=$t();dn(t,e,134217728,n)}Cd(e,134217728)}};mg=function(e){if(e.tag===13){var t=nr(e),n=In(e,t);if(n!==null){var r=$t();dn(n,e,t,r)}Cd(e,t)}};gg=function(){return Pe};yg=function(e,t){var n=Pe;try{return Pe=e,t()}finally{Pe=n}};Eu=function(e,t,n){switch(t){case"input":if(gu(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Il(r);if(!i)throw Error(ae(90));Gm(r),gu(r,i)}}}break;case"textarea":Xm(e,n);break;case"select":t=n.value,t!=null&&li(e,!!n.multiple,t,!1)}};rg=wd;ig=Rr;var L0={usingClientEntryPoint:!1,Events:[Uo,Jr,Il,tg,ng,wd]},Bi={findFiberByHostInstance:kr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},I0={bundleType:Bi.bundleType,version:Bi.version,rendererPackageName:Bi.rendererPackageName,rendererConfig:Bi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:On.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=lg(e),e===null?null:e.stateNode},findFiberByHostInstance:Bi.findFiberByHostInstance||T0,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 hs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hs.isDisabled&&hs.supportsFiber)try{_l=hs.inject(I0),kn=hs}catch{}}Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L0;Kt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jd(t))throw Error(ae(200));return _0(e,t,null,n)};Kt.createRoot=function(e,t){if(!jd(e))throw Error(ae(299));var n=!1,r="",i=Dy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Sd(e,1,!1,null,null,n,!1,r,i),e[Ln]=t.current,Eo(e.nodeType===8?e.parentNode:e),new Nd(t)};Kt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ae(188)):(e=Object.keys(e).join(","),Error(ae(268,e)));return e=lg(t),e=e===null?null:e.stateNode,e};Kt.flushSync=function(e){return Rr(e)};Kt.hydrate=function(e,t,n){if(!Bl(t))throw Error(ae(200));return Ul(null,e,t,!0,n)};Kt.hydrateRoot=function(e,t,n){if(!jd(e))throw Error(ae(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=Dy;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Fy(t,null,e,1,n??null,i,!1,o,s),e[Ln]=t.current,Eo(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new zl(t)};Kt.render=function(e,t,n){if(!Bl(t))throw Error(ae(200));return Ul(null,e,t,!1,n)};Kt.unmountComponentAtNode=function(e){if(!Bl(e))throw Error(ae(40));return e._reactRootContainer?(Rr(function(){Ul(null,null,e,!1,function(){e._reactRootContainer=null,e[Ln]=null})}),!0):!1};Kt.unstable_batchedUpdates=wd;Kt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bl(n))throw Error(ae(200));if(e==null||e._reactInternals===void 0)throw Error(ae(38));return Ul(e,t,n,!1,r)};Kt.version="18.3.1-next-f1338f8080-20240426";function zy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zy)}catch(e){console.error(e)}}zy(),zm.exports=Kt;var A0=zm.exports,By,Mp=A0;By=Mp.createRoot,Mp.hydrateRoot;const Or=6;function Io(e){return f.jsx("div",{className:"ds-divider",role:"separator","aria-orientation":"vertical",title:e.title,onDoubleClick:e.onReset,onPointerDown:t=>{if(t.button!==0)return;t.preventDefault();const n=t.currentTarget,r=t.clientX,i=e.start();n.setPointerCapture(t.pointerId),n.classList.add("dragging"),document.body.classList.add("ds-resizing");const o=l=>e.onDrag(i,l.clientX-r),s=()=>{n.removeEventListener("pointermove",o),n.removeEventListener("pointerup",s),n.removeEventListener("pointercancel",s),n.classList.remove("dragging"),document.body.classList.remove("ds-resizing"),e.onEnd()};n.addEventListener("pointermove",o),n.addEventListener("pointerup",s),n.addEventListener("pointercancel",s)}})}function Uy(e){const[t,n]=O.useState(0);return O.useEffect(()=>{const r=e.current;if(!r)return;const i=new ResizeObserver(()=>n(r.clientWidth));return i.observe(r),n(r.clientWidth),()=>i.disconnect()},[e]),t}async function _i(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}}/*!
|
|
41
|
+
* Icon paths from Feather (https://github.com/feathericons/feather)
|
|
42
|
+
* The MIT License (MIT)
|
|
43
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
44
|
+
*
|
|
45
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
46
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
47
|
+
* in the Software without restriction, including without limitation the rights
|
|
48
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
49
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
50
|
+
* furnished to do so, subject to the following conditions:
|
|
51
|
+
*
|
|
52
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
53
|
+
* copies or substantial portions of the Software.
|
|
54
|
+
*
|
|
55
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
56
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
57
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
58
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
59
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
60
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
61
|
+
* SOFTWARE.
|
|
62
|
+
*/function _a({on:e,size:t=14,x:n,y:r}){return f.jsx("svg",{className:`eye${e?" on":""}`,x:n,y:r,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),f.jsx("circle",{cx:"12",cy:"12",r:"3"})]}):f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),f.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]})})}function nc({on:e,size:t=14,x:n,y:r}){return f.jsxs("svg",{className:`pin-icon${e?" on":""}`,x:n,y:r,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M8 3h8"}),f.jsx("path",{d:"M9.5 3v6L6 14h12l-3.5-5V3z",fill:e?"currentColor":"none"}),f.jsx("path",{d:"M12 14v7"})]})}function Mn({size:e=18,x:t,y:n,className:r,children:i}){return f.jsx("svg",{className:r,x:t,y:n,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i})}function R0(e){return f.jsxs(Mn,{...e,children:[f.jsx("circle",{cx:"18",cy:"5",r:"3"}),f.jsx("circle",{cx:"6",cy:"12",r:"3"}),f.jsx("circle",{cx:"18",cy:"19",r:"3"}),f.jsx("line",{x1:"8.59",y1:"13.51",x2:"15.42",y2:"17.49"}),f.jsx("line",{x1:"15.41",y1:"6.51",x2:"8.59",y2:"10.49"})]})}function O0(e){return f.jsxs(Mn,{...e,children:[f.jsx("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),f.jsx("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),f.jsx("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})]})}function Ti({size:e=14,...t}){return f.jsx(Mn,{size:e,...t,children:f.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function Hy({size:e=14,...t}){return f.jsxs(Mn,{size:e,...t,children:[f.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),f.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function M0({size:e=14,...t}){return f.jsxs(Mn,{size:e,...t,children:[f.jsx("polyline",{points:"23 4 23 10 17 10"}),f.jsx("polyline",{points:"1 20 1 14 7 14"}),f.jsx("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})]})}function P0({size:e=14,...t}){return f.jsx(Mn,{size:e,...t,children:f.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}function F0({size:e=14,...t}){return f.jsx(Mn,{size:e,...t,children:f.jsx("polyline",{points:"20 6 9 17 4 12"})})}function _d(e){return f.jsxs(Mn,{...e,children:[f.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),f.jsx("polyline",{points:"14 2 14 8 20 8"}),f.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),f.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),f.jsx("polyline",{points:"10 9 9 9 8 9"})]})}function Td({size:e=14,...t}){return f.jsx(Mn,{size:e,...t,children:f.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Ao({n:e,title:t,className:n}){return f.jsxs("span",{className:`ds-count${n?` ${n}`:""}`,title:t,children:[f.jsx(Ti,{size:12}),e]})}const D0=O.forwardRef(function({value:t,onChange:n,onSave:r,onCancel:i,placeholder:o,autoFocus:s,className:l},a){return f.jsx("textarea",{ref:a,className:l,autoFocus:s,value:t,placeholder:o,onChange:u=>n(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),r()),u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),u.target.blur(),i())}})});function qt(e,t){try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}}function Nt(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function Wo(e){try{localStorage.removeItem(e)}catch{}}function Wy(e){try{const t=[];for(let n=0;n<localStorage.length;n++){const r=localStorage.key(n);r!=null&&r.startsWith(e)&&t.push(r)}for(const n of t)localStorage.removeItem(n)}catch{}}function Pp(e){const[t,n]=O.useState(()=>{const r=qt(e,[]);return new Set(Array.isArray(r)?r:[])});return O.useEffect(()=>Nt(e,[...t]),[e,t]),[t,n]}function rc(e,t,n){try{return localStorage.getItem(`${e}.${t}`)??n}catch{return n}}function ic(e,t,n){try{localStorage.setItem(`${e}.${t}`,n)}catch{}}function $d(e){const t=qt(e,[]);return Array.isArray(t)?t:[]}function Ld(e,t){t.length?Nt(e,t):Wo(e)}const Id=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,7)}`,Vy={open:"未対応",partial:"一部解消",updated:"コメント後に変更あり",resolved:"解消済み?"},Ad=(e,t)=>`${e}
|
|
63
|
+
${t.trim()}`,Rd=e=>e.length?`${e.join(`
|
|
64
|
+
=====
|
|
65
|
+
`)}
|
|
66
|
+
`:"";function Od(e){const[t,n]=O.useState(!1),r=async()=>{await e.onCopy(),n(!0),window.setTimeout(()=>n(!1),1600)};return f.jsxs("article",{className:`ds-comment ${e.state}${e.lit?" lit":""}${e.editing?" editing":""}`,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,children:[e.top&&f.jsx("div",{className:"ds-comment-top",children:e.top}),f.jsx("div",{className:"ds-comment-body",children:e.body}),f.jsxs("div",{className:"ds-comment-foot",children:[f.jsx("span",{className:`ds-comment-state ${e.state}`,title:e.stateTitle,children:Vy[e.state]}),e.ai&&f.jsx("span",{className:"ds-comment-ai",title:`${e.ai} のレビューが付けたコメント`,children:"AI"}),e.meta&&f.jsx("span",{className:"ds-muted",children:e.meta}),f.jsx("span",{className:"ds-spacer"}),f.jsx("button",{className:"ds-link",onClick:()=>void r(),title:"このコメントだけ AI 用にコピー",children:t?"コピーしました":"コピー"}),f.jsx("button",{className:"ds-link",onClick:e.onEdit,children:"編集"}),f.jsx("button",{className:"ds-link danger",onClick:()=>{window.confirm("このコメントを削除しますか?")&&e.onDelete()},children:"削除"})]})]})}const Md=O.forwardRef(function(t,n){const r=(t.canSave??!0)&&t.value.trim()!=="";return f.jsxs("div",{className:`ds-composer${t.editing?" editing":""}${t.className?` ${t.className}`:""}`,children:[t.top&&f.jsx("div",{className:"ds-composer-top",children:t.top}),f.jsx(D0,{ref:n,className:"ds-composer-input",autoFocus:t.autoFocus,value:t.value,placeholder:t.placeholder,onChange:t.onChange,onSave:()=>r&&t.onSave(),onCancel:t.onCancel}),f.jsxs("div",{className:"ds-composer-foot",children:[f.jsx("span",{className:"ds-muted",children:"⌘ / Ctrl + Enter で保存 ・ Esc でキャンセル"}),f.jsx("span",{className:"ds-spacer"}),(t.showCancel??!0)&&f.jsx("button",{className:"ds-btn",onClick:t.onCancel,children:"キャンセル"}),f.jsx("button",{className:"ds-btn ds-btn-primary",onClick:t.onSave,disabled:!r,children:t.editing?"更新":"保存"})]})]})});function lo(e){const t=JSON.stringify(e);let n=5381;for(let r=0;r<t.length;r++)n=(n<<5)+n+t.charCodeAt(r)|0;return(n>>>0).toString(36)}const z0={added:"A",modified:"M",removed:"D",renamed:"R",unchanged:""},Fp={added:"追加",modified:"変更",removed:"削除",renamed:"名前の変更",unchanged:"変更なし"};function bi({status:e,small:t=!1,title:n}){const r=n===null?void 0:n??Fp[e];return f.jsx("span",{className:`ds-st ${e}${t?" small":""}`,title:r,"aria-label":Fp[e],children:z0[e]})}const Dp=[["added","追加"],["modified","変更"],["removed","削除"]];function Pd({stats:e,unit:t,showZero:n=!1}){const r=Dp.filter(([o])=>n||e[o]>0);if(r.length===0)return null;const i=Dp.map(([o,s])=>`${s} ${e[o]}`).join("・")+` ${t}`;return f.jsx("span",{className:"ds-status",title:i,children:r.map(([o])=>f.jsxs("span",{className:`ds-status-n ${o}${e[o]===0?" zero":""}`,children:[f.jsx(bi,{status:o,small:!0,title:null}),e[o]]},o))})}function $i({stats:e,title:t,showZero:n=!1}){const r=[["added","+",e.added],["removed","−",e.removed]];e.modified!==void 0&&r.push(["modified","~",e.modified]);const i=r.filter(([,,o])=>n||o>0);return i.length===0?null:f.jsx("span",{className:"ds-change",title:t,children:i.map(([o,s,l])=>f.jsxs("span",{className:l?o:"zero",children:[s,l]},o))})}function Fd({children:e}){return f.jsx("header",{className:"ds-bar",children:e})}function Dd({children:e}){return f.jsx("span",{className:"ds-bar-counts",children:e})}function Ei({children:e}){return f.jsx("span",{className:"ds-bar-label",children:e})}function zd(){return f.jsx("span",{className:"ds-bar-sep"})}function Bd(){return f.jsx("span",{className:"ds-bar-spacer"})}function Ud({done:e,total:t,title:n}){return t===0?null:f.jsxs("span",{className:"ds-progress",title:n,children:[f.jsxs("span",{children:["確認済み ",e," / ",t]}),f.jsx("span",{className:"ds-progress-bar",children:f.jsx("span",{style:{width:`${e/t*100}%`}})})]})}const B0={review:{agent:"",by:{}},fix:{agent:"",by:{}},scope:"current"},Hr=e=>e&&typeof e=="object"?e:{},Ta=e=>typeof e=="string"?e:"";function U0(e){const t=r=>({agent:Ta(Hr(r).agent),by:Object.fromEntries(Object.entries(Hr(Hr(r).by)).map(([i,o])=>[i,{model:Ta(Hr(o).model),effort:Ta(Hr(o).effort)}]))}),n=Hr(e);return{review:t(n.review),fix:t(n.fix),scope:n.scope==="all"?"all":"current"}}const qy=(e,t)=>{var n;return((n=e.models.find(r=>r.id===t))==null?void 0:n.efforts)??e.defaultEfforts};function oc(e,t){const n=t.find(s=>s.id===e.agent)??t[0];if(!n)return null;const r=e.by[n.id]??{model:"",effort:""},i=n.models.some(s=>s.id===r.model)?r.model:"",o=qy(n,i).includes(r.effort)?r.effort:"";return{agent:n,model:i,effort:o}}const $a=(e,t,n)=>({agent:t,by:{...e.by,[t]:{...e.by[t]??{model:"",effort:""},...n}}});function Ky(e,t){const n=t.filter(r=>r.comments.trim()).map(r=>`## ${r.heading}
|
|
67
|
+
|
|
68
|
+
${r.comments.trimEnd()}`);return[...e.range?[e.range]:[],...n].join(`
|
|
69
|
+
|
|
70
|
+
`)+`
|
|
71
|
+
`}function H0(e,t){return["各指摘に対応してください。","","- 作業ディレクトリのファイルを直接編集してください。","- コミットやステージ(git add)はしないでください。","- 指摘と関係のない変更はしないでください。","- 最後に、何を変えたかを短く報告してください。対応しなかった指摘があれば、その理由も書いてください。","",Ky(e,t)].join(`
|
|
72
|
+
`)}function W0(e){return e.baseRev===null?"`git diff`(ステージ済みの状態と作業ディレクトリの差分)":`\`git diff ${e.baseRev}\`(まだ git に追加していない新しいファイルはこの差分に出ません。下の一覧にあるものは直接読んでください)`}function V0(e,t){const n=["あなたはコードレビュアーです。git の差分のレビュービューア diffshape から呼ばれています。次の変更をレビューして、指摘をコメントとして返してください。",`比較: ${e.targetLabel} と ${e.baseLabel} の差分`,`差分の見方: ${W0(e)}`,"","## 決まり","","- 読むだけにしてください。ファイルの変更、コミット、ステージはしないでください。","- 直す価値のある指摘だけを書いてください(バグ、考慮漏れ、既存の作りとの食い違い、危険な変更など)。好みの問題や細かい書き方の指摘は要りません。問題がなければ comments は空の配列にしてください。","- 1つの指摘を1つのコメントにしてください。","- 「既に付いているコメント」と同じ指摘は書かないでください。","- 各コメントの module には、下の見出しにある module の値を入れてください。コメントの付け方は見出しごとに違います。使わない項目は null にしてください。",""];for(const r of t)n.push(`## ${r.heading}(module: "${r.id}")`,"",(r.review??"").trimEnd(),""),r.comments.trim()&&n.push("既に付いているコメント:","",r.comments.trimEnd(),"");return n.join(`
|
|
73
|
+
`).trimEnd()+`
|
|
74
|
+
`}function q0(e){const t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function K0(e,t){if(e===0&&t===0)return"指摘はありませんでした";const n=t?`(${t} 件は指している場所が見つからず、追加していません)`:"";return e?`コメントを ${e} 件追加しました${n}`:`コメントは追加していません${n}`}const G0=e=>e.split(/(`[^`\n]*`)/).map((t,n)=>n%2?t:t.replace(/\[([^\]\n]+)\]\([^)\n]*\)/g,"$1")).join(""),zp="diffshape.ai",ms="diffshape.ai.seen",Bp={review:"レビュー",fix:"修正"};async function La(e,t){const n=await fetch(e,t===void 0?void 0:{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await n.text());return await n.json()}const Up=e=>e instanceof Error?e.message:String(e);function Y0({info:e,modules:t,current:n,reports:r,acks:i,onBatch:o,onReload:s,onFixing:l,flash:a}){var re,ce;const[u,c]=O.useState(null),[d,p]=O.useState(!1),[h,y]=O.useState(()=>U0(qt(zp,B0))),[x,S]=O.useState(null),[v,m]=O.useState(null),[g,k]=O.useState(null),_=O.useRef(!1),b=oe=>{y(oe),Nt(zp,oe)},T=O.useCallback(()=>La("/api/agent").then(c,()=>{}),[]);O.useEffect(()=>void T(),[T]);const C=(u==null?void 0:u.job)??null,$=(C==null?void 0:C.status)==="running";O.useEffect(()=>{if(!$)return;const oe=window.setTimeout(()=>void T(),1e3);return()=>window.clearTimeout(oe)},[$,u,T]),O.useEffect(()=>l($&&(C==null?void 0:C.kind)==="fix"),[$,C==null?void 0:C.kind,l]);const w=O.useMemo(()=>t.filter(oe=>{var de;return(de=r[oe.id])==null?void 0:de.review}),[t,r]),A=oe=>h.scope==="all"?oe:oe.filter(de=>de===n),I=A(w),P=A(t.filter(oe=>{var de;return(((de=r[oe.id])==null?void 0:de.open)??0)>0})),z=P.reduce((oe,de)=>oe+r[de.id].open,0),K=oe=>{var de,we,je;return{id:oe.id,heading:oe.heading,review:(we=(de=r[oe.id])==null?void 0:de.review)==null?void 0:we.call(de),comments:(((je=r[oe.id])==null?void 0:je.open)??0)>0?r[oe.id].prompt():""}},U=(u==null?void 0:u.agents)??[],q={review:oc(h.review,U),fix:oc(h.fix,U)},D=async(oe,de)=>{const we=q[oe];if(we){S(null),m(null);try{const je=await La("/api/agent/start",{kind:oe,agent:we.agent.id,prompt:de,model:we.model,effort:we.effort});c(N=>N&&{...N,job:je})}catch(je){_.current=!1,S(Up(je))}}},W=oe=>{const de=I.map(K).filter(we=>{var je;return(je=we.review)==null?void 0:je.trim()});if(de.length===0)return S("レビューする変更がありません");_.current=oe,D("review",V0(e,de))},E=()=>void D("fix",H0(e,P.map(K))),X=O.useRef(E);X.current=E;const H=()=>{_.current=!1,La("/api/agent/cancel",{}).then(T,oe=>S(Up(oe)))},j=O.useRef(qt(ms,""));O.useEffect(()=>{var G,ee;if(!C||C.status==="running")return;const oe=`${C.id}:${C.startedAt}`;if(j.current===oe)return;j.current=oe;const de=((G=U.find(he=>he.id===C.agent))==null?void 0:G.label)??C.agent,we=he=>{m(he),a(he)};if(C.kind==="review"){const he=_.current;if(_.current=!1,C.status!=="done")return Nt(ms,oe),we(C.status==="cancelled"?"レビューを中止しました":`レビューできませんでした: ${C.error??""}`);const fe=C.comments??[],pe=w.map($e=>$e.id);if(pe.length===0){j.current="",_.current=he;return}Nt(ms,oe),o({seq:C.startedAt,agent:de,items:fe}),k({seq:C.startedAt,ids:pe,other:fe.filter($e=>!pe.includes($e.module)).length,chain:he});return}Nt(ms,oe);const je=((ee=C.changedFiles)==null?void 0:ee.length)??0,N=C.status==="done"?"修正が終わりました":C.status==="cancelled"?"修正を中止しました":`修正できませんでした: ${C.error??""}`;(je||C.status==="done"?s():Promise.resolve()).then(()=>we(`${N}(変更 ${je} ファイル)`))},[C,U,w,o,s,a]);const[M,L]=O.useState(0);O.useEffect(()=>{if(!g)return;const oe=window.setTimeout(()=>L(g.seq),1e4);return()=>window.clearTimeout(oe)},[g]),O.useEffect(()=>{if(!g)return;const oe=g.ids.filter(N=>{var G;return((G=i[N])==null?void 0:G.seq)===g.seq});if(oe.length<g.ids.length&&M!==g.seq)return;k(null);const de=oe.reduce((N,G)=>N+i[G].placed,0),we=oe.reduce((N,G)=>N+i[G].dropped,0)+g.other,je=K0(de,we);if(g.chain&&z>0)a(je),X.current();else{const N=g.chain?"。直すコメントがないので、修正はしていません":"";m(je+N),a(je+N)}},[g,i,M,z,a]);const F=O.useRef(null);if(O.useEffect(()=>{if(!d)return;const oe=we=>{F.current&&!F.current.contains(we.target)&&p(!1)},de=we=>{we.key==="Escape"&&p(!1)};return document.addEventListener("mousedown",oe),document.addEventListener("keydown",de),()=>{document.removeEventListener("mousedown",oe),document.removeEventListener("keydown",de)}},[d]),!(u!=null&&u.available))return null;const V=$||!!g,Z=C&&$?q0(Date.now()-C.startedAt):"",te=I.length===0?h.scope==="current"?`${n.title}の画面は、まだ AI レビューに対応していません`:"AI レビューに対応した画面がありません":void 0,le=z===0?"未対応のコメントがありません":void 0;return f.jsxs("div",{className:"ai",ref:F,children:[f.jsxs("button",{className:`ds-btn${d?" on":""}`,onClick:()=>p(oe=>!oe),"aria-expanded":d,title:"AI にレビューや修正をさせる(Claude Code / Codex)",children:[f.jsx(P0,{size:13,className:$?"ai-pulse":void 0}),$&&C?`AI ${Bp[C.kind]}中 ${Z}`:"AI"]}),d&&f.jsxs("div",{className:"ai-panel",role:"dialog","aria-label":"AI レビューと修正",children:[t.length>1&&f.jsxs("div",{className:"ai-row",children:[f.jsx("span",{className:"ai-label",children:"範囲"}),f.jsx("div",{className:"ds-seg",role:"radiogroup","aria-label":"範囲",children:[["current",`この画面(${n.title})`],["all","すべて"]].map(([oe,de])=>f.jsx("button",{role:"radio","aria-checked":h.scope===oe,className:h.scope===oe?"on":"",disabled:V,onClick:()=>b({...h,scope:oe}),children:de},oe))})]}),f.jsx(Hp,{label:"レビュー",agents:U,choice:h.review,disabled:V,onChange:oe=>b({...h,review:oe})}),f.jsx(Hp,{label:"修正",agents:U,choice:h.fix,disabled:V,onChange:oe=>b({...h,fix:oe})}),f.jsxs("div",{className:"ai-actions",children:[f.jsx("button",{className:"ds-btn",disabled:V||!!te,title:te??"差分を読んでコメントを付けます(ファイルは変えません)",onClick:()=>W(!1),children:"レビュー"}),f.jsxs("button",{className:"ds-btn",disabled:V||!!le,title:le??"未対応のコメントに対応するよう、作業ディレクトリのファイルを編集します",onClick:E,children:["修正",z>0?`(${z})`:""]}),f.jsx("button",{className:"ds-btn ds-btn-primary",disabled:V||!!te,title:te??"レビューして、付いたコメントを続けて修正します",onClick:()=>W(!0),children:"レビューして修正"})]}),x&&f.jsx("div",{className:"ai-error",children:x}),$&&C&&f.jsxs("div",{className:"ai-run",children:[f.jsxs("div",{className:"ai-run-head",children:[f.jsxs("span",{children:[((re=U.find(oe=>oe.id===C.agent))==null?void 0:re.label)??C.agent," が",Bp[C.kind],"中… ",Z]}),f.jsx("span",{className:"shell-spacer"}),f.jsx("button",{className:"ds-btn",onClick:H,children:"中止"})]}),f.jsx(X0,{lines:C.log})]}),!$&&g&&f.jsx("div",{className:"ai-outcome",children:"コメントを置いています…"}),!V&&v&&f.jsxs("div",{className:"ai-outcome",children:[f.jsx("div",{children:v}),(C==null?void 0:C.kind)==="fix"&&C.text&&f.jsx("div",{className:"ai-said",children:G0(C.text)}),(C==null?void 0:C.kind)==="fix"&&C.snapshot&&(((ce=C.changedFiles)==null?void 0:ce.length)??0)>0&&f.jsx(Q0,{command:`diffshape . ${C.snapshot}`})]})]})]})}function Hp({label:e,agents:t,choice:n,disabled:r,onChange:i}){var l;const o=oc(n,t);if(!o)return null;const s=qy(o.agent,o.model);return f.jsxs("div",{className:"ai-row",children:[f.jsx("span",{className:"ai-label",children:e}),f.jsx("select",{className:"ds-select","aria-label":`${e}のエージェント`,value:o.agent.id,disabled:r||t.length<2,onChange:a=>i($a(n,a.target.value,{})),children:t.map(a=>f.jsx("option",{value:a.id,title:a.version?`${a.label} ${a.version}`:a.label,children:a.label},a.id))}),f.jsxs("select",{className:"ds-select ai-model","aria-label":`${e}のモデル`,value:o.model,disabled:r||o.agent.models.length===0,title:((l=o.agent.models.find(a=>a.id===o.model))==null?void 0:l.description)??`${o.agent.label}${o.agent.version?` ${o.agent.version}`:""} の設定どおり`,onChange:a=>i($a(n,o.agent.id,{model:a.target.value})),children:[f.jsx("option",{value:"",children:"既定のモデル"}),o.agent.models.map(a=>f.jsx("option",{value:a.id,children:a.label},a.id))]}),f.jsxs("select",{className:"ds-select","aria-label":`${e}の Effort`,value:o.effort,disabled:r||s.length===0,title:"考える深さ(Effort)",onChange:a=>i($a(n,o.agent.id,{effort:a.target.value})),children:[f.jsx("option",{value:"",children:"既定の Effort"}),s.map(a=>f.jsx("option",{value:a,children:a},a))]})]})}function X0({lines:e}){const t=O.useRef(null);return O.useEffect(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[e.length]),f.jsx("div",{className:"ai-log",ref:t,children:e.length===0?f.jsx("div",{className:"shell-muted",children:"開始しています…"}):e.map((n,r)=>f.jsx("div",{children:n},r))})}function Q0({command:e}){const[t,n]=O.useState(!1);return f.jsxs("div",{className:"ai-snapshot",children:[f.jsx("span",{className:"shell-muted",children:"AI の変更だけを見る:"}),f.jsx("code",{children:e}),f.jsx("button",{className:"ds-link",onClick:()=>void _i(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1600)}),children:t?"コピーしました":"コピー"})]})}function Hd(e){var n;if(e.kind==="option")return`--schema ${e.patterns.join(" ")}`;const t=((n=e.envs)==null?void 0:n.filter(Boolean))??[];return`${e.configs.join(", ")}${t.length?`(env: ${t.join(", ")})`:""} の src`}const Fs=e=>e.diff.tables.length+e.diff.values.length+e.diff.enums.length+e.diff.domains.length,Wd="dbshape.reviewed:",Z0=e=>qt(Wd+e,{}),J0=(e,t)=>Nt(Wd+e,t),Vd=e=>`${e.repoRoot}|${e.baseLabel}|${e.targetLabel}|`,eb=e=>Wy(Wd+Vd(e)),Gy=e=>`カラム・制約・インデックス:追加 ${e.added}・削除 ${e.removed}・変更 ${e.modified}`;function Yy(e){const t={added:0,removed:0,modified:0};for(const n of[...e.columns,...e.constraints,...e.indexes])t[n.status]++;return e.comment&&e.status==="modified"&&t.modified++,t}function tb(e){const t=new Map,n=r=>{let i=t.get(r);return i||t.set(r,i={primary:!1,unique:!1,references:[]}),i};for(const r of e)r.kind==="primary"&&r.columns.forEach(i=>n(i).primary=!0),r.kind==="unique"&&r.columns.length===1&&(n(r.columns[0]).unique=!0),r.kind==="foreign"&&r.references&&r.columns.length===1&&n(r.columns[0]).references.push({table:r.references.table,columns:r.references.columns}),r.kind==="check"&&r.values&&(n(r.values.column).values=r.values.values);return t}function nb(e){var n;return[...e.constraints.map(r=>r.after??(e.status==="removed"?r.before:void 0)).filter(r=>!!r),...((n=e.unchanged)==null?void 0:n.constraints)??[]]}function Hl(e,t){const n=new Set(e??[]),r=new Set(t??[]);return[...(t??[]).map(i=>({value:i,status:e&&!n.has(i)?"added":"same"})),...(e??[]).filter(i=>!r.has(i)).map(i=>({value:i,status:"removed"}))]}function Xy(e){return e.source==="check"?{label:`${e.table}.${e.column}`,table:e.table}:{label:e.type??""}}function sc(e){const t=[{key:"type",text:e.type}];return t.push({key:"notNull",text:e.notNull?"NOT NULL":"NULL"}),e.default!==void 0&&t.push({key:"default",text:`DEFAULT ${e.default}`}),e.identity&&t.push({key:"identity",text:`IDENTITY ${e.identity==="always"?"ALWAYS":"BY DEFAULT"}`}),e.generated&&t.push({key:"generated",text:`GENERATED (${e.generated})`}),t}function ao(e){return`${e.method?`USING ${e.method} `:""}(${e.columns.join(", ")})${e.include?` INCLUDE (${e.include.join(", ")})`:""}${e.where?` WHERE ${e.where}`:""}`}function rb(e){return`${e.unique?"UNIQUE ":""}INDEX ${ao(e)}`}function ib(e,t){const n=t.trim().toLowerCase();return n?e.name.toLowerCase().includes(n)||e.columns.some(r=>r.name.toLowerCase().includes(n)):!0}const Mr=e=>`${e.kind}:${e.table??""}:${e.name}`,pl=e=>({kind:"table",table:e,name:e});function Qy(e){switch(e.kind){case"table":case"type":return e.name;case"column":case"value":return`${e.table}.${e.name}`;default:return`${e.table}:${e.name}`}}const Ds={table:"テーブル",column:"カラム",constraint:"制約",index:"インデックス",value:"値",type:"型"};function Ro(e){return e.kind==="table"||e.kind==="type"?`${Ds[e.kind]} ${e.name}`:e.kind==="column"||e.kind==="value"?`${Ds[e.kind]} ${e.table}.${e.name}`:`${Ds[e.kind]} ${e.table} の ${e.name}`}function ob(e){return e.kind==="table"?"テーブル全体":e.kind==="type"?e.name:`${Ds[e.kind]} ${e.name}`}const Yt={added:"今回追加",removed:"今回削除",modified:"今回変更"},Ia=e=>sc(e).filter(t=>t.key!=="notNull"||e.notNull).map(t=>t.text).join(" "),Aa=e=>rb(e);function sb(e){if(e.status!=="modified")return Yt[e.status];const t=[],n=(r,i)=>{const o=r.filter(u=>u.status==="added").length,s=r.filter(u=>u.status==="removed").length,l=r.filter(u=>u.status==="modified").length,a=[o&&`+${o}`,s&&`−${s}`,l&&`~${l}`].filter(Boolean).join(" ");a&&t.push(`${i} ${a}`)};return n(e.columns,"カラム"),n(e.constraints,"制約"),n(e.indexes,"インデックス"),e.comment&&t.push("コメント"),`${Yt.modified}(${t.join("、")})`}function Wl(e,t){const n=e.diff,r=t.table?n.tables.find(i=>i.name===t.table):void 0;switch(t.kind){case"table":return r?sb(r):void 0;case"column":{const i=r==null?void 0:r.columns.find(o=>o.name===t.name);return i?i.status!=="modified"?`${Yt[i.status]}: ${Ia(i.after??i.before)}`:`${Yt.modified}: ${Ia(i.before)} → ${Ia(i.after)}`:void 0}case"constraint":{const i=r==null?void 0:r.constraints.find(o=>o.name===t.name);return i?i.status!=="modified"?`${Yt[i.status]}: ${(i.after??i.before).definition}`:`${Yt.modified}: ${i.before.definition} → ${i.after.definition}`:void 0}case"index":{const i=r==null?void 0:r.indexes.find(o=>o.name===t.name);return i?i.status!=="modified"?`${Yt[i.status]}: ${Aa(i.after??i.before)}`:`${Yt.modified}: ${Aa(i.before)} → ${Aa(i.after)}`:void 0}case"value":{const i=n.values.find(o=>o.source==="check"&&o.table===t.table&&o.column===t.name);return i?Wp(i):void 0}case"type":{const i=n.enums.find(l=>l.name===t.name);if(i){if(i.status!=="modified")return`${Yt[i.status]}: ENUM (${(i.after??i.before).values.join(", ")})`;const l=n.values.find(a=>a.type===t.name);return l?`値の変更: ${Wp(l)}`:Yt.modified}const o=n.domains.find(l=>l.name===t.name);if(!o)return;const s=l=>`${l.type}${l.notNull?" NOT NULL":""}${l.checks.map(a=>` ${a.definition}`).join("")}`;return o.status!=="modified"?`${Yt[o.status]}: DOMAIN ${s(o.after??o.before)}`:`${Yt.modified}: ${s(o.before)} → ${s(o.after)}`}}}function Wp(e){return e.status==="added"?`値の制限を追加(${(e.after??[]).join(", ")})`:e.status==="removed"?`値の制限を削除(変更前: ${(e.before??[]).join(", ")})`:`${[...e.added.map(n=>`+${n}`),...e.removed.map(n=>`−${n}`)].join(" ")}(変更後: ${(e.after??[]).join(", ")})`}function Zy(e,t){if(t.kind==="value"){const n=e.diff.values.find(r=>r.source==="check"&&r.table===t.table&&r.column===t.name);if(n!=null&&n.constraint){const r=e.locations[`${t.table}:${n.constraint}`];if(r)return r}}return e.locations[Qy(t)]}function Jy(e,t){const n=e.locations[Qy(t)];return!!n&&!n.base}function uo(e,t){const n=Wl(e,t.target);return!Jy(e,t.target)&&!n||t.snapshot!==void 0&&n===void 0?"resolved":n!==t.snapshot?"updated":"open"}function ev(e,t,n){return{id:Id(),target:t,body:n,createdAt:Date.now(),snapshot:Wl(e,t)}}const lb=e=>`${e.file}:L${e.line}${e.base?" (old)":""}`;function tv(e,t,n={}){const r=n.includeResolved?t:t.filter(o=>uo(e,o)!=="resolved"),i=r.map(o=>{const s=Zy(e,o.target);return Ad(s?`${lb(s)} ${Ro(o.target)}`:Ro(o.target),o.body)});return{text:Rd(i),included:r.length,skipped:t.length-r.length}}const qd="dbshape.comments:",ab=e=>$d(qd+e),Vp=(e,t)=>Ld(qd+e,t),ub=e=>Wy(qd+Vd(e)),nv=O.createContext(null),Kd=()=>O.useContext(nv),cb=Vy;function lr({target:e,label:t}){const n=Kd();if(!n)return null;const r=Mr(e),i=n.comments.filter(o=>Mr(o.target)===r).length;return f.jsxs("button",{className:`cbtn ${i?"has":""}`,onClick:o=>{o.stopPropagation(),n.compose(e)},title:`${t??ob(e)} にコメントする`,"aria-label":"コメントする",children:[f.jsx(Ti,{size:12}),i>0&&f.jsx("span",{className:"cnum",children:i})]})}function Rn({target:e,colSpan:t}){const n=Kd();if(!n)return null;const r=Mr(e),i=n.comments.filter(s=>Mr(s.target)===r),o=n.composing===r;return!i.length&&!o?null:t?f.jsx("tr",{className:"thread-row",children:f.jsx("td",{colSpan:t,children:f.jsx(Rn,{target:e})})}):f.jsxs("div",{className:"thread",id:`c-${r}`,children:[i.map(s=>n.editing===s.id?f.jsx(qp,{initial:s.body,onSave:l=>n.update(s.id,l),onCancel:()=>n.edit(null)},s.id):f.jsx(db,{c:s},s.id)),o&&f.jsx(qp,{initial:"",onSave:s=>n.add(e,s),onCancel:()=>n.compose(null)})]})}function db({c:e}){const t=Kd(),n=uo(t.data,e);return f.jsx(Od,{body:e.body,state:n,ai:e.ai,stateTitle:n==="updated"?`コメントしたときは: ${e.snapshot??"変更なし"}`:n==="resolved"?"対象がなくなったか、比較元と同じに戻りました":void 0,onCopy:()=>_i(tv(t.data,[e],{includeResolved:!0}).text),onEdit:()=>t.edit(e.id),onDelete:()=>t.remove(e.id)})}function qp({initial:e,onSave:t,onCancel:n}){const[r,i]=O.useState(e);return f.jsx(Md,{autoFocus:!0,editing:e!=="",value:r,placeholder:"気になる点や直してほしいこと",onChange:i,onSave:()=>r.trim()&&t(r.trim()),onCancel:n})}function fb({table:e,reviewed:t,onReviewed:n,known:r,onJump:i,highlighted:o,alwaysOpen:s}){const[l,a]=O.useState(!t),[u,c]=O.useState(!1),d=Yy(e),p=tb(nb(e)),h=s||l;return f.jsxs("section",{id:`table-${e.name}`,className:`card ${e.status} ${o?"highlighted":""} ${t&&!s?"reviewed":""}`,children:[f.jsxs("header",{className:"card-head",children:[!s&&f.jsx("button",{className:"fold",onClick:()=>a(!h),"aria-label":h?"たたむ":"開く","aria-expanded":h,children:h?"▾":"▸"}),f.jsxs("span",{className:"tname",children:[f.jsxs("span",{className:"schema",children:[e.schema,"."]}),e.table]}),f.jsx($i,{stats:d,title:Gy(d)}),f.jsx("span",{className:"file",title:e.file,children:e.file}),f.jsx(lr,{target:pl(e.name),label:"テーブル全体"}),f.jsxs("label",{className:"reviewed-box",title:"確認済みにすると、図と一覧で薄く表示します(テーブルがまた変わると外れます)",children:[f.jsx("input",{type:"checkbox",checked:t,onChange:y=>{n(y.target.checked),a(!y.target.checked)}}),"確認済み"]})]}),h&&f.jsxs("div",{className:"card-body",children:[f.jsx(Rn,{target:pl(e.name)}),e.comment&&f.jsx(yb,{before:e.comment.before,after:e.comment.after,status:e.status}),e.status==="modified"?f.jsxs(f.Fragment,{children:[f.jsx(Ui,{title:"カラム",empty:e.columns.length===0,children:f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(y=>f.jsx(hb,{table:e.name,change:y,badges:p.get(y.name),known:r,onJump:i},y.name))})})}),f.jsx(Ui,{title:"制約",empty:e.constraints.length===0,children:e.constraints.map(y=>f.jsx(mb,{table:e.name,change:y,known:r,onJump:i},y.name))}),f.jsx(Ui,{title:"インデックス",empty:e.indexes.length===0,children:e.indexes.map(y=>f.jsx(gb,{table:e.name,change:y},y.name))}),e.unchanged&&(e.unchanged.columns.length>0||e.unchanged.constraints.length>0||e.unchanged.indexes.length>0)&&f.jsxs("div",{className:"context",children:[f.jsxs("button",{className:"link",onClick:()=>c(!u),children:[u?"▾":"▸"," 変更のないカラム ",e.unchanged.columns.length,"・制約 ",e.unchanged.constraints.length,"・インデックス ",e.unchanged.indexes.length]}),u&&f.jsxs("div",{className:"context-body",children:[f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.unchanged.columns.map(y=>f.jsx(lc,{table:e.name,c:y,badges:p.get(y.name),known:r,onJump:i},y.name))})}),e.unchanged.constraints.map(y=>f.jsx(Kp,{table:e.name,c:y,known:r,onJump:i},y.name)),e.unchanged.indexes.map(y=>f.jsx(Gp,{table:e.name,i:y},y.name))]})]})]}):f.jsxs(f.Fragment,{children:[f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(y=>f.jsx(lc,{table:e.name,c:y.after??y.before,badges:p.get(y.name),known:r,onJump:i},y.name))})}),e.constraints.length>0&&f.jsx(Ui,{title:"制約",children:e.constraints.map(y=>f.jsx(Kp,{table:e.name,c:y.after??y.before,known:r,onJump:i},y.name))}),e.indexes.length>0&&f.jsx(Ui,{title:"インデックス",children:e.indexes.map(y=>f.jsx(Gp,{table:e.name,i:y.after??y.before},y.name))})]})]})]})}function Ui(e){return e.empty?null:f.jsxs("div",{className:"section",children:[f.jsx("div",{className:"section-title",children:e.title}),e.children]})}const rv={added:"+",removed:"−",modified:"~"};function iv({b:e,known:t,onJump:n}){return e?f.jsxs(f.Fragment,{children:[e.primary&&f.jsx("span",{className:"tag key",children:"PK"}),e.unique&&f.jsx("span",{className:"tag",children:"UNIQUE"}),e.references.map(r=>f.jsx(pb,{table:r.table,columns:r.columns,known:t,onJump:n},r.table))]}):null}function pb({table:e,columns:t,known:n,onJump:r}){const i=`→ ${e}${t.length?` (${t.join(", ")})`:""}`;return n.has(e)?f.jsx("button",{className:"tag ref link",onClick:()=>r(e),title:"このテーブルの変更へ移動",children:i}):f.jsx("span",{className:"tag ref",children:i})}const ov=(e,t)=>({kind:"column",table:e,name:t});function lc({table:e,c:t,badges:n,known:r,onJump:i}){const o=ov(e,t.name);return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:"plain",children:[f.jsx("td",{className:"mark"}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[f.jsx("code",{children:t.type}),t.notNull&&f.jsx("span",{className:"attr",children:"NOT NULL"}),t.default!==void 0&&f.jsxs("span",{className:"attr",children:["DEFAULT ",t.default]}),t.identity&&f.jsx("span",{className:"attr",children:"IDENTITY"}),t.generated&&f.jsxs("span",{className:"attr",children:["GENERATED (",t.generated,")"]}),f.jsx(iv,{b:n,known:r,onJump:i}),(n==null?void 0:n.values)&&f.jsx(sv,{values:n.values}),t.comment&&f.jsx("span",{className:"comment",children:t.comment}),f.jsx(lr,{target:o})]})]}),f.jsx(Rn,{target:o,colSpan:3})]})}function sv({values:e}){return f.jsx("span",{className:"chips",children:e.map(t=>f.jsx("span",{className:"chip",children:t},t))})}function hb({table:e,change:t,badges:n,known:r,onJump:i}){const o=ov(e,t.name);if(t.status!=="modified"){const c=t.after??t.before;return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:t.status,children:[f.jsx("td",{className:"mark",children:rv[t.status]}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[f.jsx("code",{children:c.type}),c.notNull&&f.jsx("span",{className:"attr",children:"NOT NULL"}),c.default!==void 0&&f.jsxs("span",{className:"attr",children:["DEFAULT ",c.default]}),c.identity&&f.jsx("span",{className:"attr",children:"IDENTITY"}),c.generated&&f.jsxs("span",{className:"attr",children:["GENERATED (",c.generated,")"]}),t.status==="added"&&f.jsx(iv,{b:n,known:r,onJump:i}),t.status==="added"&&(n==null?void 0:n.values)&&f.jsx(sv,{values:n.values}),c.comment&&f.jsx("span",{className:"comment",children:c.comment}),f.jsx(lr,{target:o})]})]}),f.jsx(Rn,{target:o,colSpan:3})]})}const s=new Map(sc(t.before).map(c=>[c.key,c.text])),l=sc(t.after),a=new Set(t.changed??[]),u=[...new Set([...l.map(c=>c.key),...s.keys()])];return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:"modified",children:[f.jsx("td",{className:"mark",children:"~"}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[u.map(c=>{var h;const d=(h=l.find(y=>y.key===c))==null?void 0:h.text,p=s.get(c);return a.has(c)?f.jsxs("span",{className:"attr change",children:[p!==void 0&&f.jsx("del",{children:p}),p!==void 0&&d!==void 0&&f.jsx("span",{className:"arrow",children:"→"}),d!==void 0&&f.jsx("ins",{children:d})]},c):d?f.jsx("span",{className:c==="type"?"attr type":"attr",children:d},c):null}),a.has("comment")&&f.jsxs("span",{className:"attr change",children:[f.jsx("span",{className:"muted",children:"コメント "}),t.before.comment!==void 0&&f.jsx("del",{children:t.before.comment}),f.jsx("span",{className:"arrow",children:"→"}),t.after.comment!==void 0?f.jsx("ins",{children:t.after.comment}):f.jsx("span",{className:"muted",children:"(なし)"})]}),f.jsx(lr,{target:o})]})]}),f.jsx(Rn,{target:o,colSpan:3})]})}const lv={primary:"PK",unique:"UNIQUE",check:"CHECK",foreign:"FK",exclude:"EXCLUDE"};function av({table:e,known:t,onJump:n}){return!e||!t.has(e)?null:f.jsxs("button",{className:"jump link",onClick:()=>n(e),title:`${e} の変更へ移動`,children:["↗ ",e]})}function Vo(e){return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:`row ${e.status??"plain"} ${e.target?"commentable":""}`,children:[f.jsx("span",{className:"mark",children:e.status?rv[e.status]:""}),f.jsx("span",{className:"tag kind",children:e.kind}),f.jsx("span",{className:"rbody",children:e.children}),f.jsx("span",{className:"rname",title:e.name,children:e.name}),e.target&&f.jsx(lr,{target:e.target})]}),e.target&&f.jsx(Rn,{target:e.target})]})}const Vl=(e,t,n)=>({kind:e,table:t,name:n});function Kp({table:e,c:t,known:n,onJump:r}){var i;return f.jsxs(Vo,{kind:lv[t.kind],name:t.name,target:Vl("constraint",e,t.name),children:[f.jsx("code",{children:t.definition}),f.jsx(av,{table:(i=t.references)==null?void 0:i.table,known:n,onJump:r})]})}function mb({table:e,change:t,known:n,onJump:r}){var s,l,a;const i=t.after??t.before,o=t.status==="modified"&&((s=t.before)!=null&&s.values)&&((l=t.after)!=null&&l.values)?Hl(t.before.values.values,t.after.values.values):null;return f.jsxs(Vo,{status:t.status,kind:lv[t.kind],name:t.name,target:Vl("constraint",e,t.name),children:[t.status!=="modified"?f.jsx("code",{children:i.definition}):o?f.jsxs(f.Fragment,{children:[f.jsxs("code",{children:[t.after.values.column,": "]}),f.jsx("span",{className:"chips",children:o.map(u=>f.jsxs("span",{className:`chip ${u.status}`,children:[u.status==="added"?"+":u.status==="removed"?"−":"",u.value]},u.value))})]}):f.jsxs("span",{className:"change-block",children:[f.jsx("del",{children:t.before.definition}),f.jsx("ins",{children:t.after.definition})]}),t.status!=="removed"&&f.jsx(av,{table:(a=i.references)==null?void 0:a.table,known:n,onJump:r})]})}function Gp({table:e,i:t}){return f.jsx(Vo,{kind:t.unique?"UNIQUE":"INDEX",name:t.name,target:Vl("index",e,t.name),children:f.jsx("code",{children:ao(t)})})}function gb({table:e,change:t}){const n=t.after??t.before;return f.jsx(Vo,{status:t.status,kind:n.unique?"UNIQUE":"INDEX",name:t.name,target:Vl("index",e,t.name),children:t.status==="modified"?f.jsxs("span",{className:"change-block",children:[f.jsxs("del",{children:[t.before.unique?"UNIQUE ":"",ao(t.before)]}),f.jsxs("ins",{children:[t.after.unique?"UNIQUE ":"",ao(t.after)]})]}):f.jsx("code",{children:ao(n)})})}function yb({before:e,after:t,status:n}){return n!=="modified"?f.jsx("div",{className:"table-comment",children:t??e}):f.jsx(Vo,{status:"modified",kind:"COMMENT",name:"",children:f.jsxs("span",{className:"change-block",children:[e!==void 0?f.jsx("del",{children:e}):f.jsx("span",{className:"muted",children:"(なし)"}),t!==void 0?f.jsx("ins",{children:t}):f.jsx("span",{className:"muted",children:"(なし)"})]})})}function vb(e){return f.jsxs("aside",{className:"panel",children:[f.jsxs("div",{className:"panel-head",children:[f.jsx("span",{className:"panel-title",children:e.selection.name}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:e.onClose,"aria-label":"閉じる",title:"閉じる(Esc)",children:"×"})]}),f.jsxs("div",{className:"panel-body",children:[e.selection.kind==="type"&&e.type&&f.jsx(kb,{kind:e.type.kind,change:e.type.change}),e.selection.kind==="table"&&(e.change?f.jsx(fb,{table:e.change,reviewed:e.reviewed,onReviewed:e.onReviewed,known:e.known,onJump:e.onJump,highlighted:!1,alwaysOpen:!0},e.change.name):e.erTable?f.jsx(xb,{t:e.erTable}):null),e.values.length>0&&f.jsxs("div",{className:"panel-section",children:[f.jsx("div",{className:"section-title",children:"値の変化"}),e.values.map((t,n)=>f.jsx(wb,{v:t},n))]})]})]})}function xb({t:e}){const t=pl(e.name);return f.jsxs("div",{className:"unchanged-table",children:[f.jsxs("p",{className:"muted unchanged-note",children:["このテーブルは変更されていません。",f.jsx(lr,{target:t,label:"テーブル全体"})]}),f.jsx(Rn,{target:t}),f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(n=>f.jsx(lc,{table:e.name,c:{name:n.name,type:n.type,notNull:n.notNull},badges:{primary:n.primary,unique:!1,references:e.foreignKeys.filter(r=>r.columns.length===1&&r.columns[0]===n.name).map(r=>({table:r.table,columns:r.refColumns}))},known:new Set,onJump:()=>{}},n.name))})})]})}function wb({v:e}){const t=Xy(e),n=Hl(e.before,e.after),r=e.source==="check"?{kind:"value",table:e.table,name:e.column??""}:{kind:"type",name:e.type??""};return f.jsxs("div",{className:"value-row commentable",children:[f.jsx(lr,{target:r,label:e.source==="check"?`${e.column} の値`:void 0}),f.jsxs("div",{className:"value-head",children:[f.jsx("span",{className:"vname",children:t.label}),f.jsx("span",{className:"tag kind",children:e.source==="check"?"CHECK":e.source==="enum"?"ENUM 型":"DOMAIN"}),e.constraint&&f.jsx("span",{className:"muted",children:e.constraint}),e.status==="added"&&f.jsx("span",{className:"note",children:"値の制限が付きました"}),e.status==="removed"&&f.jsx("span",{className:"note",children:"値の制限がなくなりました"})]}),f.jsx("div",{className:"chips",children:n.map(i=>f.jsxs("span",{className:`chip ${e.status==="added"?"same":i.status}`,children:[e.status==="modified"&&i.status==="added"?"+":i.status==="removed"?"−":"",i.value]},i.value))}),e.usedBy&&e.usedBy.length>0&&f.jsxs("div",{className:"muted used",children:["使用しているカラム: ",e.usedBy.join(", ")]}),f.jsx(Rn,{target:r})]})}function kb({kind:e,change:t}){const n=t.before&&"values"in t.before?t.before.values:void 0,r=t.after&&"values"in t.after?t.after.values:void 0,i=t.after??t.before,o={kind:"type",name:t.name};return f.jsxs("div",{className:"value-row commentable",children:[f.jsx(lr,{target:o}),f.jsxs("div",{className:`value-head tinted ${t.status}`,children:[f.jsx("span",{className:"vname",children:t.name}),f.jsx("span",{className:"tag kind",children:e})]}),e==="ENUM 型"?f.jsx("div",{className:"chips",children:Hl(t.status==="added"?void 0:n,t.status==="removed"?n:r).map(s=>f.jsxs("span",{className:`chip ${t.status==="modified"?s.status:"same"}`,children:[t.status==="modified"&&s.status==="added"?"+":s.status==="removed"&&t.status==="modified"?"−":"",s.value]},s.value))}):i&&f.jsx("div",{className:"domain",children:t.status==="modified"&&t.before&&t.after&&"type"in t.before&&"type"in t.after?f.jsxs("span",{className:"change-block",children:[f.jsxs("del",{children:[t.before.type,t.before.notNull?" NOT NULL":"",t.before.checks.map(s=>` ${s.definition}`).join("")]}),f.jsxs("ins",{children:[t.after.type,t.after.notNull?" NOT NULL":"",t.after.checks.map(s=>` ${s.definition}`).join("")]})]}):f.jsxs("code",{children:[i.type,i.notNull?" NOT NULL":"",i.checks.map(s=>` ${s.definition}`).join("")]})}),f.jsx(Rn,{target:o})]})}var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mn=Fe((e,t)=>{var n=Object.defineProperty,r=(P,z,K)=>z in P?n(P,z,{enumerable:!0,configurable:!0,writable:!0,value:K}):P[z]=K,i=(P,z)=>()=>(z||P((z={exports:{}}).exports,z),z.exports),o=(P,z,K)=>r(P,typeof z!="symbol"?z+"":z,K),s=i((P,z)=>{var K="\0",U="\0",q="",D=class{constructor(M){o(this,"_isDirected",!0),o(this,"_isMultigraph",!1),o(this,"_isCompound",!1),o(this,"_label"),o(this,"_defaultNodeLabelFn",()=>{}),o(this,"_defaultEdgeLabelFn",()=>{}),o(this,"_nodes",{}),o(this,"_in",{}),o(this,"_preds",{}),o(this,"_out",{}),o(this,"_sucs",{}),o(this,"_edgeObjs",{}),o(this,"_edgeLabels",{}),o(this,"_nodeCount",0),o(this,"_edgeCount",0),o(this,"_parent"),o(this,"_children"),M&&(this._isDirected=Object.hasOwn(M,"directed")?M.directed:!0,this._isMultigraph=Object.hasOwn(M,"multigraph")?M.multigraph:!1,this._isCompound=Object.hasOwn(M,"compound")?M.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[U]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(M){return this._label=M,this}graph(){return this._label}setDefaultNodeLabel(M){return this._defaultNodeLabelFn=M,typeof M!="function"&&(this._defaultNodeLabelFn=()=>M),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var M=this;return this.nodes().filter(L=>Object.keys(M._in[L]).length===0)}sinks(){var M=this;return this.nodes().filter(L=>Object.keys(M._out[L]).length===0)}setNodes(M,L){var F=arguments,V=this;return M.forEach(function(Z){F.length>1?V.setNode(Z,L):V.setNode(Z)}),this}setNode(M,L){return Object.hasOwn(this._nodes,M)?(arguments.length>1&&(this._nodes[M]=L),this):(this._nodes[M]=arguments.length>1?L:this._defaultNodeLabelFn(M),this._isCompound&&(this._parent[M]=U,this._children[M]={},this._children[U][M]=!0),this._in[M]={},this._preds[M]={},this._out[M]={},this._sucs[M]={},++this._nodeCount,this)}node(M){return this._nodes[M]}hasNode(M){return Object.hasOwn(this._nodes,M)}removeNode(M){var L=this;if(Object.hasOwn(this._nodes,M)){var F=V=>L.removeEdge(L._edgeObjs[V]);delete this._nodes[M],this._isCompound&&(this._removeFromParentsChildList(M),delete this._parent[M],this.children(M).forEach(function(V){L.setParent(V)}),delete this._children[M]),Object.keys(this._in[M]).forEach(F),delete this._in[M],delete this._preds[M],Object.keys(this._out[M]).forEach(F),delete this._out[M],delete this._sucs[M],--this._nodeCount}return this}setParent(M,L){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(L===void 0)L=U;else{L+="";for(var F=L;F!==void 0;F=this.parent(F))if(F===M)throw new Error("Setting "+L+" as parent of "+M+" would create a cycle");this.setNode(L)}return this.setNode(M),this._removeFromParentsChildList(M),this._parent[M]=L,this._children[L][M]=!0,this}_removeFromParentsChildList(M){delete this._children[this._parent[M]][M]}parent(M){if(this._isCompound){var L=this._parent[M];if(L!==U)return L}}children(M=U){if(this._isCompound){var L=this._children[M];if(L)return Object.keys(L)}else{if(M===U)return this.nodes();if(this.hasNode(M))return[]}}predecessors(M){var L=this._preds[M];if(L)return Object.keys(L)}successors(M){var L=this._sucs[M];if(L)return Object.keys(L)}neighbors(M){var L=this.predecessors(M);if(L){let V=new Set(L);for(var F of this.successors(M))V.add(F);return Array.from(V.values())}}isLeaf(M){var L;return this.isDirected()?L=this.successors(M):L=this.neighbors(M),L.length===0}filterNodes(M){var L=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});L.setGraph(this.graph());var F=this;Object.entries(this._nodes).forEach(function([te,le]){M(te)&&L.setNode(te,le)}),Object.values(this._edgeObjs).forEach(function(te){L.hasNode(te.v)&&L.hasNode(te.w)&&L.setEdge(te,F.edge(te))});var V={};function Z(te){var le=F.parent(te);return le===void 0||L.hasNode(le)?(V[te]=le,le):le in V?V[le]:Z(le)}return this._isCompound&&L.nodes().forEach(te=>L.setParent(te,Z(te))),L}setDefaultEdgeLabel(M){return this._defaultEdgeLabelFn=M,typeof M!="function"&&(this._defaultEdgeLabelFn=()=>M),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(M,L){var F=this,V=arguments;return M.reduce(function(Z,te){return V.length>1?F.setEdge(Z,te,L):F.setEdge(Z,te),te}),this}setEdge(){var M,L,F,V,Z=!1,te=arguments[0];typeof te=="object"&&te!==null&&"v"in te?(M=te.v,L=te.w,F=te.name,arguments.length===2&&(V=arguments[1],Z=!0)):(M=te,L=arguments[1],F=arguments[3],arguments.length>2&&(V=arguments[2],Z=!0)),M=""+M,L=""+L,F!==void 0&&(F=""+F);var le=X(this._isDirected,M,L,F);if(Object.hasOwn(this._edgeLabels,le))return Z&&(this._edgeLabels[le]=V),this;if(F!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(M),this.setNode(L),this._edgeLabels[le]=Z?V:this._defaultEdgeLabelFn(M,L,F);var re=H(this._isDirected,M,L,F);return M=re.v,L=re.w,Object.freeze(re),this._edgeObjs[le]=re,W(this._preds[L],M),W(this._sucs[M],L),this._in[L][le]=re,this._out[M][le]=re,this._edgeCount++,this}edge(M,L,F){var V=arguments.length===1?j(this._isDirected,arguments[0]):X(this._isDirected,M,L,F);return this._edgeLabels[V]}edgeAsObj(){let M=this.edge(...arguments);return typeof M!="object"?{label:M}:M}hasEdge(M,L,F){var V=arguments.length===1?j(this._isDirected,arguments[0]):X(this._isDirected,M,L,F);return Object.hasOwn(this._edgeLabels,V)}removeEdge(M,L,F){var V=arguments.length===1?j(this._isDirected,arguments[0]):X(this._isDirected,M,L,F),Z=this._edgeObjs[V];return Z&&(M=Z.v,L=Z.w,delete this._edgeLabels[V],delete this._edgeObjs[V],E(this._preds[L],M),E(this._sucs[M],L),delete this._in[L][V],delete this._out[M][V],this._edgeCount--),this}inEdges(M,L){return this.isDirected()?this.filterEdges(this._in[M],M,L):this.nodeEdges(M,L)}outEdges(M,L){return this.isDirected()?this.filterEdges(this._out[M],M,L):this.nodeEdges(M,L)}nodeEdges(M,L){if(M in this._nodes)return this.filterEdges({...this._in[M],...this._out[M]},M,L)}filterEdges(M,L,F){if(M){var V=Object.values(M);return F?V.filter(function(Z){return Z.v===L&&Z.w===F||Z.v===F&&Z.w===L}):V}}};function W(M,L){M[L]?M[L]++:M[L]=1}function E(M,L){--M[L]||delete M[L]}function X(M,L,F,V){var Z=""+L,te=""+F;if(!M&&Z>te){var le=Z;Z=te,te=le}return Z+q+te+q+(V===void 0?K:V)}function H(M,L,F,V){var Z=""+L,te=""+F;if(!M&&Z>te){var le=Z;Z=te,te=le}var re={v:Z,w:te};return V&&(re.name=V),re}function j(M,L){return X(M,L.v,L.w,L.name)}z.exports=D}),l=i((P,z)=>{z.exports="3.0.2"}),a=i((P,z)=>{z.exports={Graph:s(),version:l()}}),u=i((P,z)=>{var K=s();z.exports={write:U,read:W};function U(E){var X={options:{directed:E.isDirected(),multigraph:E.isMultigraph(),compound:E.isCompound()},nodes:q(E),edges:D(E)};return E.graph()!==void 0&&(X.value=structuredClone(E.graph())),X}function q(E){return E.nodes().map(function(X){var H=E.node(X),j=E.parent(X),M={v:X};return H!==void 0&&(M.value=H),j!==void 0&&(M.parent=j),M})}function D(E){return E.edges().map(function(X){var H=E.edge(X),j={v:X.v,w:X.w};return X.name!==void 0&&(j.name=X.name),H!==void 0&&(j.value=H),j})}function W(E){var X=new K(E.options).setGraph(E.value);return E.nodes.forEach(function(H){X.setNode(H.v,H.value),H.parent&&X.setParent(H.v,H.parent)}),E.edges.forEach(function(H){X.setEdge({v:H.v,w:H.w,name:H.name},H.value)}),X}}),c=i((P,z)=>{z.exports=U;var K=()=>1;function U(D,W,E,X){return q(D,String(W),E||K,X||function(H){return D.outEdges(H)})}function q(D,W,E,X){var H={},j=!0,M=0,L=D.nodes(),F=function(le){var re=E(le);H[le.v].distance+re<H[le.w].distance&&(H[le.w]={distance:H[le.v].distance+re,predecessor:le.v},j=!0)},V=function(){L.forEach(function(le){X(le).forEach(function(re){var ce=re.v===le?re.v:re.w,oe=ce===re.v?re.w:re.v;F({v:ce,w:oe})})})};L.forEach(function(le){var re=le===W?0:Number.POSITIVE_INFINITY;H[le]={distance:re}});for(var Z=L.length,te=1;te<Z&&(j=!1,M++,V(),!!j);te++);if(M===Z-1&&(j=!1,V(),j))throw new Error("The graph contains a negative weight cycle");return H}}),d=i((P,z)=>{z.exports=K;function K(U){var q={},D=[],W;function E(X){Object.hasOwn(q,X)||(q[X]=!0,W.push(X),U.successors(X).forEach(E),U.predecessors(X).forEach(E))}return U.nodes().forEach(function(X){W=[],E(X),W.length&&D.push(W)}),D}}),p=i((P,z)=>{var K=class{constructor(){o(this,"_arr",[]),o(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(U){return U.key})}has(U){return Object.hasOwn(this._keyIndices,U)}priority(U){var q=this._keyIndices[U];if(q!==void 0)return this._arr[q].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(U,q){var D=this._keyIndices;if(U=String(U),!Object.hasOwn(D,U)){var W=this._arr,E=W.length;return D[U]=E,W.push({key:U,priority:q}),this._decrease(E),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var U=this._arr.pop();return delete this._keyIndices[U.key],this._heapify(0),U.key}decrease(U,q){var D=this._keyIndices[U];if(q>this._arr[D].priority)throw new Error("New priority is greater than current priority. Key: "+U+" Old: "+this._arr[D].priority+" New: "+q);this._arr[D].priority=q,this._decrease(D)}_heapify(U){var q=this._arr,D=2*U,W=D+1,E=U;D<q.length&&(E=q[D].priority<q[E].priority?D:E,W<q.length&&(E=q[W].priority<q[E].priority?W:E),E!==U&&(this._swap(U,E),this._heapify(E)))}_decrease(U){for(var q=this._arr,D=q[U].priority,W;U!==0&&(W=U>>1,!(q[W].priority<D));)this._swap(U,W),U=W}_swap(U,q){var D=this._arr,W=this._keyIndices,E=D[U],X=D[q];D[U]=X,D[q]=E,W[X.key]=U,W[E.key]=q}};z.exports=K}),h=i((P,z)=>{var K=p();z.exports=q;var U=()=>1;function q(W,E,X,H){var j=function(M){return W.outEdges(M)};return D(W,String(E),X||U,H||j)}function D(W,E,X,H){var j={},M=new K,L,F,V=function(Z){var te=Z.v!==L?Z.v:Z.w,le=j[te],re=X(Z),ce=F.distance+re;if(re<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+Z+" Weight: "+re);ce<le.distance&&(le.distance=ce,le.predecessor=L,M.decrease(te,ce))};for(W.nodes().forEach(function(Z){var te=Z===E?0:Number.POSITIVE_INFINITY;j[Z]={distance:te},M.add(Z,te)});M.size()>0&&(L=M.removeMin(),F=j[L],F.distance!==Number.POSITIVE_INFINITY);)H(L).forEach(V);return j}}),y=i((P,z)=>{var K=h();z.exports=U;function U(q,D,W){return q.nodes().reduce(function(E,X){return E[X]=K(q,X,D,W),E},{})}}),x=i((P,z)=>{z.exports=K;function K(q,D,W){if(q[D].predecessor!==void 0)throw new Error("Invalid source vertex");if(q[W].predecessor===void 0&&W!==D)throw new Error("Invalid destination vertex");return{weight:q[W].distance,path:U(q,D,W)}}function U(q,D,W){for(var E=[],X=W;X!==D;)E.push(X),X=q[X].predecessor;return E.push(D),E.reverse()}}),S=i((P,z)=>{z.exports=K;function K(U){var q=0,D=[],W={},E=[];function X(H){var j=W[H]={onStack:!0,lowlink:q,index:q++};if(D.push(H),U.successors(H).forEach(function(F){Object.hasOwn(W,F)?W[F].onStack&&(j.lowlink=Math.min(j.lowlink,W[F].index)):(X(F),j.lowlink=Math.min(j.lowlink,W[F].lowlink))}),j.lowlink===j.index){var M=[],L;do L=D.pop(),W[L].onStack=!1,M.push(L);while(H!==L);E.push(M)}}return U.nodes().forEach(function(H){Object.hasOwn(W,H)||X(H)}),E}}),v=i((P,z)=>{var K=S();z.exports=U;function U(q){return K(q).filter(function(D){return D.length>1||D.length===1&&q.hasEdge(D[0],D[0])})}}),m=i((P,z)=>{z.exports=U;var K=()=>1;function U(D,W,E){return q(D,W||K,E||function(X){return D.outEdges(X)})}function q(D,W,E){var X={},H=D.nodes();return H.forEach(function(j){X[j]={},X[j][j]={distance:0},H.forEach(function(M){j!==M&&(X[j][M]={distance:Number.POSITIVE_INFINITY})}),E(j).forEach(function(M){var L=M.v===j?M.w:M.v,F=W(M);X[j][L]={distance:F,predecessor:j}})}),H.forEach(function(j){var M=X[j];H.forEach(function(L){var F=X[L];H.forEach(function(V){var Z=F[j],te=M[V],le=F[V],re=Z.distance+te.distance;re<le.distance&&(le.distance=re,le.predecessor=te.predecessor)})})}),X}}),g=i((P,z)=>{function K(q){var D={},W={},E=[];function X(H){if(Object.hasOwn(W,H))throw new U;Object.hasOwn(D,H)||(W[H]=!0,D[H]=!0,q.predecessors(H).forEach(X),delete W[H],E.push(H))}if(q.sinks().forEach(X),Object.keys(D).length!==q.nodeCount())throw new U;return E}var U=class extends Error{constructor(){super(...arguments)}};z.exports=K,K.CycleException=U}),k=i((P,z)=>{var K=g();z.exports=U;function U(q){try{K(q)}catch(D){if(D instanceof K.CycleException)return!1;throw D}return!0}}),_=i((P,z)=>{z.exports=K;function K(q,D,W,E,X){Array.isArray(D)||(D=[D]);var H=(q.isDirected()?q.successors:q.neighbors).bind(q),j={};return D.forEach(function(M){if(!q.hasNode(M))throw new Error("Graph does not have node: "+M);X=U(q,M,W==="post",j,H,E,X)}),X}function U(q,D,W,E,X,H,j){return Object.hasOwn(E,D)||(E[D]=!0,W||(j=H(j,D)),X(D).forEach(function(M){j=U(q,M,W,E,X,H,j)}),W&&(j=H(j,D))),j}}),b=i((P,z)=>{var K=_();z.exports=U;function U(q,D,W){return K(q,D,W,function(E,X){return E.push(X),E},[])}}),T=i((P,z)=>{var K=b();z.exports=U;function U(q,D){return K(q,D,"post")}}),C=i((P,z)=>{var K=b();z.exports=U;function U(q,D){return K(q,D,"pre")}}),$=i((P,z)=>{var K=s(),U=p();z.exports=q;function q(D,W){var E=new K,X={},H=new U,j;function M(F){var V=F.v===j?F.w:F.v,Z=H.priority(V);if(Z!==void 0){var te=W(F);te<Z&&(X[V]=j,H.decrease(V,te))}}if(D.nodeCount()===0)return E;D.nodes().forEach(function(F){H.add(F,Number.POSITIVE_INFINITY),E.setNode(F)}),H.decrease(D.nodes()[0],0);for(var L=!1;H.size()>0;){if(j=H.removeMin(),Object.hasOwn(X,j))E.setEdge(j,X[j]);else{if(L)throw new Error("Input graph is not connected: "+D);L=!0}D.nodeEdges(j).forEach(M)}return E}}),w=i((P,z)=>{var K=h(),U=c();z.exports=q;function q(W,E,X,H){return D(W,E,X,H||function(j){return W.outEdges(j)})}function D(W,E,X,H){if(X===void 0)return K(W,E,X,H);for(var j=!1,M=W.nodes(),L=0;L<M.length;L++){for(var F=H(M[L]),V=0;V<F.length;V++){var Z=F[V],te=Z.v===M[L]?Z.v:Z.w,le=te===Z.v?Z.w:Z.v;X({v:te,w:le})<0&&(j=!0)}if(j)return U(W,E,X,H)}return K(W,E,X,H)}}),A=i((P,z)=>{z.exports={bellmanFord:c(),components:d(),dijkstra:h(),dijkstraAll:y(),extractPath:x(),findCycles:v(),floydWarshall:m(),isAcyclic:k(),postorder:T(),preorder:C(),prim:$(),shortestPaths:w(),reduce:_(),tarjan:S(),topsort:g()}}),I=a();t.exports={Graph:I.Graph,json:u(),alg:A(),version:I.version}}),bb=Fe((e,t)=>{var n=class{constructor(){let o={};o._next=o._prev=o,this._sentinel=o}dequeue(){let o=this._sentinel,s=o._prev;if(s!==o)return r(s),s}enqueue(o){let s=this._sentinel;o._prev&&o._next&&r(o),o._next=s._next,s._next._prev=o,s._next=o,o._prev=s}toString(){let o=[],s=this._sentinel,l=s._prev;for(;l!==s;)o.push(JSON.stringify(l,i)),l=l._prev;return"["+o.join(", ")+"]"}};function r(o){o._prev._next=o._next,o._next._prev=o._prev,delete o._next,delete o._prev}function i(o,s){if(o!=="_next"&&o!=="_prev")return s}t.exports=n}),Eb=Fe((e,t)=>{var n=mn().Graph,r=bb();t.exports=o;var i=()=>1;function o(d,p){if(d.nodeCount()<=1)return[];let h=a(d,p||i);return s(h.graph,h.buckets,h.zeroIdx).flatMap(y=>d.outEdges(y.v,y.w))}function s(d,p,h){let y=[],x=p[p.length-1],S=p[0],v;for(;d.nodeCount();){for(;v=S.dequeue();)l(d,p,h,v);for(;v=x.dequeue();)l(d,p,h,v);if(d.nodeCount()){for(let m=p.length-2;m>0;--m)if(v=p[m].dequeue(),v){y=y.concat(l(d,p,h,v,!0));break}}}return y}function l(d,p,h,y,x){let S=x?[]:void 0;return d.inEdges(y.v).forEach(v=>{let m=d.edge(v),g=d.node(v.v);x&&S.push({v:v.v,w:v.w}),g.out-=m,u(p,h,g)}),d.outEdges(y.v).forEach(v=>{let m=d.edge(v),g=v.w,k=d.node(g);k.in-=m,u(p,h,k)}),d.removeNode(y.v),S}function a(d,p){let h=new n,y=0,x=0;d.nodes().forEach(m=>{h.setNode(m,{v:m,in:0,out:0})}),d.edges().forEach(m=>{let g=h.edge(m.v,m.w)||0,k=p(m),_=g+k;h.setEdge(m.v,m.w,_),x=Math.max(x,h.node(m.v).out+=k),y=Math.max(y,h.node(m.w).in+=k)});let S=c(x+y+3).map(()=>new r),v=y+1;return h.nodes().forEach(m=>{u(S,v,h.node(m))}),{graph:h,buckets:S,zeroIdx:v}}function u(d,p,h){h.out?h.in?d[h.out-h.in+p].enqueue(h):d[d.length-1].enqueue(h):d[0].enqueue(h)}function c(d){let p=[];for(let h=0;h<d;h++)p.push(h);return p}}),it=Fe((e,t)=>{var n=mn().Graph;t.exports={addBorderNode:p,addDummyNode:r,applyWithChunking:x,asNonCompoundGraph:o,buildLayerMatrix:u,intersectRect:a,mapValues:C,maxRank:S,normalizeRanks:c,notime:g,partition:v,pick:T,predecessorWeights:l,range:b,removeEmptyRanks:d,simplify:i,successorWeights:s,time:m,uniqueId:_,zipObject:$};function r(w,A,I,P){for(var z=P;w.hasNode(z);)z=_(P);return I.dummy=A,w.setNode(z,I),z}function i(w){let A=new n().setGraph(w.graph());return w.nodes().forEach(I=>A.setNode(I,w.node(I))),w.edges().forEach(I=>{let P=A.edge(I.v,I.w)||{weight:0,minlen:1},z=w.edge(I);A.setEdge(I.v,I.w,{weight:P.weight+z.weight,minlen:Math.max(P.minlen,z.minlen)})}),A}function o(w){let A=new n({multigraph:w.isMultigraph()}).setGraph(w.graph());return w.nodes().forEach(I=>{w.children(I).length||A.setNode(I,w.node(I))}),w.edges().forEach(I=>{A.setEdge(I,w.edge(I))}),A}function s(w){let A=w.nodes().map(I=>{let P={};return w.outEdges(I).forEach(z=>{P[z.w]=(P[z.w]||0)+w.edge(z).weight}),P});return $(w.nodes(),A)}function l(w){let A=w.nodes().map(I=>{let P={};return w.inEdges(I).forEach(z=>{P[z.v]=(P[z.v]||0)+w.edge(z).weight}),P});return $(w.nodes(),A)}function a(w,A){let I=w.x,P=w.y,z=A.x-I,K=A.y-P,U=w.width/2,q=w.height/2;if(!z&&!K)throw new Error("Not possible to find intersection inside of the rectangle");let D,W;return Math.abs(K)*U>Math.abs(z)*q?(K<0&&(q=-q),D=q*z/K,W=q):(z<0&&(U=-U),D=U,W=U*K/z),{x:I+D,y:P+W}}function u(w){let A=b(S(w)+1).map(()=>[]);return w.nodes().forEach(I=>{let P=w.node(I),z=P.rank;z!==void 0&&(A[z][P.order]=I)}),A}function c(w){let A=w.nodes().map(P=>{let z=w.node(P).rank;return z===void 0?Number.MAX_VALUE:z}),I=x(Math.min,A);w.nodes().forEach(P=>{let z=w.node(P);Object.hasOwn(z,"rank")&&(z.rank-=I)})}function d(w){let A=w.nodes().map(U=>w.node(U).rank).filter(U=>U!==void 0),I=x(Math.min,A),P=[];w.nodes().forEach(U=>{let q=w.node(U).rank-I;P[q]||(P[q]=[]),P[q].push(U)});let z=0,K=w.graph().nodeRankFactor;Array.from(P).forEach((U,q)=>{U===void 0&&q%K!==0?--z:U!==void 0&&z&&U.forEach(D=>w.node(D).rank+=z)})}function p(w,A,I,P){let z={width:0,height:0};return arguments.length>=4&&(z.rank=I,z.order=P),r(w,"border",z,A)}function h(w,A=y){let I=[];for(let P=0;P<w.length;P+=A){let z=w.slice(P,P+A);I.push(z)}return I}var y=65535;function x(w,A){if(A.length>y){let I=h(A);return w.apply(null,I.map(P=>w.apply(null,P)))}else return w.apply(null,A)}function S(w){let A=w.nodes().map(I=>{let P=w.node(I).rank;return P===void 0?Number.MIN_VALUE:P});return x(Math.max,A)}function v(w,A){let I={lhs:[],rhs:[]};return w.forEach(P=>{A(P)?I.lhs.push(P):I.rhs.push(P)}),I}function m(w,A){let I=Date.now();try{return A()}finally{console.log(w+" time: "+(Date.now()-I)+"ms")}}function g(w,A){return A()}var k=0;function _(w){var A=++k;return w+(""+A)}function b(w,A,I=1){A==null&&(A=w,w=0);let P=K=>K<A;I<0&&(P=K=>A<K);let z=[];for(let K=w;P(K);K+=I)z.push(K);return z}function T(w,A){let I={};for(let P of A)w[P]!==void 0&&(I[P]=w[P]);return I}function C(w,A){let I=A;return typeof A=="string"&&(I=P=>P[A]),Object.entries(w).reduce((P,[z,K])=>(P[z]=I(K,z),P),{})}function $(w,A){return w.reduce((I,P,z)=>(I[P]=A[z],I),{})}}),Sb=Fe((e,t)=>{var n=Eb(),r=it().uniqueId;t.exports={run:i,undo:s};function i(l){(l.graph().acyclicer==="greedy"?n(l,a(l)):o(l)).forEach(u=>{let c=l.edge(u);l.removeEdge(u),c.forwardName=u.name,c.reversed=!0,l.setEdge(u.w,u.v,c,r("rev"))});function a(u){return c=>u.edge(c).weight}}function o(l){let a=[],u={},c={};function d(p){Object.hasOwn(c,p)||(c[p]=!0,u[p]=!0,l.outEdges(p).forEach(h=>{Object.hasOwn(u,h.w)?a.push(h):d(h.w)}),delete u[p])}return l.nodes().forEach(d),a}function s(l){l.edges().forEach(a=>{let u=l.edge(a);if(u.reversed){l.removeEdge(a);let c=u.forwardName;delete u.reversed,delete u.forwardName,l.setEdge(a.w,a.v,u,c)}})}}),Cb=Fe((e,t)=>{var n=it();t.exports={run:r,undo:o};function r(s){s.graph().dummyChains=[],s.edges().forEach(l=>i(s,l))}function i(s,l){let a=l.v,u=s.node(a).rank,c=l.w,d=s.node(c).rank,p=l.name,h=s.edge(l),y=h.labelRank;if(d===u+1)return;s.removeEdge(l);let x,S,v;for(v=0,++u;u<d;++v,++u)h.points=[],S={width:0,height:0,edgeLabel:h,edgeObj:l,rank:u},x=n.addDummyNode(s,"edge",S,"_d"),u===y&&(S.width=h.width,S.height=h.height,S.dummy="edge-label",S.labelpos=h.labelpos),s.setEdge(a,x,{weight:h.weight},p),v===0&&s.graph().dummyChains.push(x),a=x;s.setEdge(a,c,{weight:h.weight},p)}function o(s){s.graph().dummyChains.forEach(l=>{let a=s.node(l),u=a.edgeLabel,c;for(s.setEdge(a.edgeObj,u);a.dummy;)c=s.successors(l)[0],s.removeNode(l),u.points.push({x:a.x,y:a.y}),a.dummy==="edge-label"&&(u.x=a.x,u.y=a.y,u.width=a.width,u.height=a.height),l=c,a=s.node(l)})}}),hl=Fe((e,t)=>{var{applyWithChunking:n}=it();t.exports={longestPath:r,slack:i};function r(o){var s={};function l(a){var u=o.node(a);if(Object.hasOwn(s,a))return u.rank;s[a]=!0;let c=o.outEdges(a).map(p=>p==null?Number.POSITIVE_INFINITY:l(p.w)-o.edge(p).minlen);var d=n(Math.min,c);return d===Number.POSITIVE_INFINITY&&(d=0),u.rank=d}o.sources().forEach(l)}function i(o,s){return o.node(s.w).rank-o.node(s.v).rank-o.edge(s).minlen}}),uv=Fe((e,t)=>{var n=mn().Graph,r=hl().slack;t.exports=i;function i(a){var u=new n({directed:!1}),c=a.nodes()[0],d=a.nodeCount();u.setNode(c,{});for(var p,h;o(u,a)<d;)p=s(u,a),h=u.hasNode(p.v)?r(a,p):-r(a,p),l(u,a,h);return u}function o(a,u){function c(d){u.nodeEdges(d).forEach(p=>{var h=p.v,y=d===h?p.w:h;!a.hasNode(y)&&!r(u,p)&&(a.setNode(y,{}),a.setEdge(d,y,{}),c(y))})}return a.nodes().forEach(c),a.nodeCount()}function s(a,u){return u.edges().reduce((c,d)=>{let p=Number.POSITIVE_INFINITY;return a.hasNode(d.v)!==a.hasNode(d.w)&&(p=r(u,d)),p<c[0]?[p,d]:c},[Number.POSITIVE_INFINITY,null])[1]}function l(a,u,c){a.nodes().forEach(d=>u.node(d).rank+=c)}}),Nb=Fe((e,t)=>{var n=uv(),r=hl().slack,i=hl().longestPath,o=mn().alg.preorder,s=mn().alg.postorder,l=it().simplify;t.exports=a,a.initLowLimValues=p,a.initCutValues=u,a.calcCutValue=d,a.leaveEdge=y,a.enterEdge=x,a.exchangeEdges=S;function a(k){k=l(k),i(k);var _=n(k);p(_),u(_,k);for(var b,T;b=y(_);)T=x(_,k,b),S(_,k,b,T)}function u(k,_){var b=s(k,k.nodes());b=b.slice(0,b.length-1),b.forEach(T=>c(k,_,T))}function c(k,_,b){var T=k.node(b),C=T.parent;k.edge(b,C).cutvalue=d(k,_,b)}function d(k,_,b){var T=k.node(b),C=T.parent,$=!0,w=_.edge(b,C),A=0;return w||($=!1,w=_.edge(C,b)),A=w.weight,_.nodeEdges(b).forEach(I=>{var P=I.v===b,z=P?I.w:I.v;if(z!==C){var K=P===$,U=_.edge(I).weight;if(A+=K?U:-U,m(k,b,z)){var q=k.edge(b,z).cutvalue;A+=K?-q:q}}}),A}function p(k,_){arguments.length<2&&(_=k.nodes()[0]),h(k,{},1,_)}function h(k,_,b,T,C){var $=b,w=k.node(T);return _[T]=!0,k.neighbors(T).forEach(A=>{Object.hasOwn(_,A)||(b=h(k,_,b,A,T))}),w.low=$,w.lim=b++,C?w.parent=C:delete w.parent,b}function y(k){return k.edges().find(_=>k.edge(_).cutvalue<0)}function x(k,_,b){var T=b.v,C=b.w;_.hasEdge(T,C)||(T=b.w,C=b.v);var $=k.node(T),w=k.node(C),A=$,I=!1;$.lim>w.lim&&(A=w,I=!0);var P=_.edges().filter(z=>I===g(k,k.node(z.v),A)&&I!==g(k,k.node(z.w),A));return P.reduce((z,K)=>r(_,K)<r(_,z)?K:z)}function S(k,_,b,T){var C=b.v,$=b.w;k.removeEdge(C,$),k.setEdge(T.v,T.w,{}),p(k),u(k,_),v(k,_)}function v(k,_){var b=k.nodes().find(C=>!_.node(C).parent),T=o(k,b);T=T.slice(1),T.forEach(C=>{var $=k.node(C).parent,w=_.edge(C,$),A=!1;w||(w=_.edge($,C),A=!0),_.node(C).rank=_.node($).rank+(A?w.minlen:-w.minlen)})}function m(k,_,b){return k.hasEdge(_,b)}function g(k,_,b){return b.low<=_.lim&&_.lim<=b.lim}}),jb=Fe((e,t)=>{var n=hl(),r=n.longestPath,i=uv(),o=Nb();t.exports=s;function s(c){var d=c.graph().ranker;if(d instanceof Function)return d(c);switch(c.graph().ranker){case"network-simplex":u(c);break;case"tight-tree":a(c);break;case"longest-path":l(c);break;case"none":break;default:u(c)}}var l=r;function a(c){r(c),i(c)}function u(c){o(c)}}),_b=Fe((e,t)=>{t.exports=n;function n(o){let s=i(o);o.graph().dummyChains.forEach(l=>{let a=o.node(l),u=a.edgeObj,c=r(o,s,u.v,u.w),d=c.path,p=c.lca,h=0,y=d[h],x=!0;for(;l!==u.w;){if(a=o.node(l),x){for(;(y=d[h])!==p&&o.node(y).maxRank<a.rank;)h++;y===p&&(x=!1)}if(!x){for(;h<d.length-1&&o.node(y=d[h+1]).minRank<=a.rank;)h++;y=d[h]}o.setParent(l,y),l=o.successors(l)[0]}})}function r(o,s,l,a){let u=[],c=[],d=Math.min(s[l].low,s[a].low),p=Math.max(s[l].lim,s[a].lim),h,y;h=l;do h=o.parent(h),u.push(h);while(h&&(s[h].low>d||p>s[h].lim));for(y=h,h=a;(h=o.parent(h))!==y;)c.push(h);return{path:u.concat(c.reverse()),lca:y}}function i(o){let s={},l=0;function a(u){let c=l;o.children(u).forEach(a),s[u]={low:c,lim:l++}}return o.children().forEach(a),s}}),Tb=Fe((e,t)=>{var n=it();t.exports={run:r,cleanup:l};function r(a){let u=n.addDummyNode(a,"root",{},"_root"),c=o(a),d=Object.values(c),p=n.applyWithChunking(Math.max,d)-1,h=2*p+1;a.graph().nestingRoot=u,a.edges().forEach(x=>a.edge(x).minlen*=h);let y=s(a)+1;a.children().forEach(x=>i(a,u,h,y,p,c,x)),a.graph().nodeRankFactor=h}function i(a,u,c,d,p,h,y){let x=a.children(y);if(!x.length){y!==u&&a.setEdge(u,y,{weight:0,minlen:c});return}let S=n.addBorderNode(a,"_bt"),v=n.addBorderNode(a,"_bb"),m=a.node(y);a.setParent(S,y),m.borderTop=S,a.setParent(v,y),m.borderBottom=v,x.forEach(g=>{i(a,u,c,d,p,h,g);let k=a.node(g),_=k.borderTop?k.borderTop:g,b=k.borderBottom?k.borderBottom:g,T=k.borderTop?d:2*d,C=_!==b?1:p-h[y]+1;a.setEdge(S,_,{weight:T,minlen:C,nestingEdge:!0}),a.setEdge(b,v,{weight:T,minlen:C,nestingEdge:!0})}),a.parent(y)||a.setEdge(u,S,{weight:0,minlen:p+h[y]})}function o(a){var u={};function c(d,p){var h=a.children(d);h&&h.length&&h.forEach(y=>c(y,p+1)),u[d]=p}return a.children().forEach(d=>c(d,1)),u}function s(a){return a.edges().reduce((u,c)=>u+a.edge(c).weight,0)}function l(a){var u=a.graph();a.removeNode(u.nestingRoot),delete u.nestingRoot,a.edges().forEach(c=>{var d=a.edge(c);d.nestingEdge&&a.removeEdge(c)})}}),$b=Fe((e,t)=>{var n=it();t.exports=r;function r(o){function s(l){let a=o.children(l),u=o.node(l);if(a.length&&a.forEach(s),Object.hasOwn(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(let c=u.minRank,d=u.maxRank+1;c<d;++c)i(o,"borderLeft","_bl",l,u,c),i(o,"borderRight","_br",l,u,c)}}o.children().forEach(s)}function i(o,s,l,a,u,c){let d={width:0,height:0,rank:c,borderType:s},p=u[s][c-1],h=n.addDummyNode(o,"border",d,l);u[s][c]=h,o.setParent(h,a),p&&o.setEdge(p,h,{weight:1})}}),Lb=Fe((e,t)=>{t.exports={adjust:n,undo:r};function n(c){let d=c.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&i(c)}function r(c){let d=c.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&s(c),(d==="lr"||d==="rl")&&(a(c),i(c))}function i(c){c.nodes().forEach(d=>o(c.node(d))),c.edges().forEach(d=>o(c.edge(d)))}function o(c){let d=c.width;c.width=c.height,c.height=d}function s(c){c.nodes().forEach(d=>l(c.node(d))),c.edges().forEach(d=>{let p=c.edge(d);p.points.forEach(l),Object.hasOwn(p,"y")&&l(p)})}function l(c){c.y=-c.y}function a(c){c.nodes().forEach(d=>u(c.node(d))),c.edges().forEach(d=>{let p=c.edge(d);p.points.forEach(u),Object.hasOwn(p,"x")&&u(p)})}function u(c){let d=c.x;c.x=c.y,c.y=d}}),Ib=Fe((e,t)=>{var n=it();t.exports=r;function r(i){let o={},s=i.nodes().filter(d=>!i.children(d).length),l=s.map(d=>i.node(d).rank),a=n.applyWithChunking(Math.max,l),u=n.range(a+1).map(()=>[]);function c(d){if(o[d])return;o[d]=!0;let p=i.node(d);u[p.rank].push(d),i.successors(d).forEach(c)}return s.sort((d,p)=>i.node(d).rank-i.node(p).rank).forEach(c),u}}),Ab=Fe((e,t)=>{var n=it().zipObject;t.exports=r;function r(o,s){let l=0;for(let a=1;a<s.length;++a)l+=i(o,s[a-1],s[a]);return l}function i(o,s,l){let a=n(l,l.map((y,x)=>x)),u=s.flatMap(y=>o.outEdges(y).map(x=>({pos:a[x.w],weight:o.edge(x).weight})).sort((x,S)=>x.pos-S.pos)),c=1;for(;c<l.length;)c<<=1;let d=2*c-1;c-=1;let p=new Array(d).fill(0),h=0;return u.forEach(y=>{let x=y.pos+c;p[x]+=y.weight;let S=0;for(;x>0;)x%2&&(S+=p[x+1]),x=x-1>>1,p[x]+=y.weight;h+=y.weight*S}),h}}),Rb=Fe((e,t)=>{t.exports=n;function n(r,i=[]){return i.map(o=>{let s=r.inEdges(o);if(s.length){let l=s.reduce((a,u)=>{let c=r.edge(u),d=r.node(u.v);return{sum:a.sum+c.weight*d.order,weight:a.weight+c.weight}},{sum:0,weight:0});return{v:o,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:o}})}}),Ob=Fe((e,t)=>{var n=it();t.exports=r;function r(s,l){let a={};s.forEach((c,d)=>{let p=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};c.barycenter!==void 0&&(p.barycenter=c.barycenter,p.weight=c.weight)}),l.edges().forEach(c=>{let d=a[c.v],p=a[c.w];d!==void 0&&p!==void 0&&(p.indegree++,d.out.push(a[c.w]))});let u=Object.values(a).filter(c=>!c.indegree);return i(u)}function i(s){let l=[];function a(c){return d=>{d.merged||(d.barycenter===void 0||c.barycenter===void 0||d.barycenter>=c.barycenter)&&o(c,d)}}function u(c){return d=>{d.in.push(c),--d.indegree===0&&s.push(d)}}for(;s.length;){let c=s.pop();l.push(c),c.in.reverse().forEach(a(c)),c.out.forEach(u(c))}return l.filter(c=>!c.merged).map(c=>n.pick(c,["vs","i","barycenter","weight"]))}function o(s,l){let a=0,u=0;s.weight&&(a+=s.barycenter*s.weight,u+=s.weight),l.weight&&(a+=l.barycenter*l.weight,u+=l.weight),s.vs=l.vs.concat(s.vs),s.barycenter=a/u,s.weight=u,s.i=Math.min(l.i,s.i),l.merged=!0}}),Mb=Fe((e,t)=>{var n=it();t.exports=r;function r(s,l){let a=n.partition(s,S=>Object.hasOwn(S,"barycenter")),u=a.lhs,c=a.rhs.sort((S,v)=>v.i-S.i),d=[],p=0,h=0,y=0;u.sort(o(!!l)),y=i(d,c,y),u.forEach(S=>{y+=S.vs.length,d.push(S.vs),p+=S.barycenter*S.weight,h+=S.weight,y=i(d,c,y)});let x={vs:d.flat(!0)};return h&&(x.barycenter=p/h,x.weight=h),x}function i(s,l,a){let u;for(;l.length&&(u=l[l.length-1]).i<=a;)l.pop(),s.push(u.vs),a++;return a}function o(s){return(l,a)=>l.barycenter<a.barycenter?-1:l.barycenter>a.barycenter?1:s?a.i-l.i:l.i-a.i}}),Pb=Fe((e,t)=>{var n=Rb(),r=Ob(),i=Mb();t.exports=o;function o(a,u,c,d){let p=a.children(u),h=a.node(u),y=h?h.borderLeft:void 0,x=h?h.borderRight:void 0,S={};y&&(p=p.filter(k=>k!==y&&k!==x));let v=n(a,p);v.forEach(k=>{if(a.children(k.v).length){let _=o(a,k.v,c,d);S[k.v]=_,Object.hasOwn(_,"barycenter")&&l(k,_)}});let m=r(v,c);s(m,S);let g=i(m,d);if(y&&(g.vs=[y,g.vs,x].flat(!0),a.predecessors(y).length)){let k=a.node(a.predecessors(y)[0]),_=a.node(a.predecessors(x)[0]);Object.hasOwn(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+k.order+_.order)/(g.weight+2),g.weight+=2}return g}function s(a,u){a.forEach(c=>{c.vs=c.vs.flatMap(d=>u[d]?u[d].vs:d)})}function l(a,u){a.barycenter!==void 0?(a.barycenter=(a.barycenter*a.weight+u.barycenter*u.weight)/(a.weight+u.weight),a.weight+=u.weight):(a.barycenter=u.barycenter,a.weight=u.weight)}}),Fb=Fe((e,t)=>{var n=mn().Graph,r=it();t.exports=i;function i(s,l,a,u){u||(u=s.nodes());let c=o(s),d=new n({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(p=>s.node(p));return u.forEach(p=>{let h=s.node(p),y=s.parent(p);(h.rank===l||h.minRank<=l&&l<=h.maxRank)&&(d.setNode(p),d.setParent(p,y||c),s[a](p).forEach(x=>{let S=x.v===p?x.w:x.v,v=d.edge(S,p),m=v!==void 0?v.weight:0;d.setEdge(S,p,{weight:s.edge(x).weight+m})}),Object.hasOwn(h,"minRank")&&d.setNode(p,{borderLeft:h.borderLeft[l],borderRight:h.borderRight[l]}))}),d}function o(s){for(var l;s.hasNode(l=r.uniqueId("_root")););return l}}),Db=Fe((e,t)=>{t.exports=n;function n(r,i,o){let s={},l;o.forEach(a=>{let u=r.parent(a),c,d;for(;u;){if(c=r.parent(u),c?(d=s[c],s[c]=u):(d=l,l=u),d&&d!==u){i.setEdge(d,u);return}u=c}})}}),zb=Fe((e,t)=>{var n=Ib(),r=Ab(),i=Pb(),o=Fb(),s=Db(),l=mn().Graph,a=it();t.exports=u;function u(h,y={}){if(typeof y.customOrder=="function"){y.customOrder(h,u);return}let x=a.maxRank(h),S=c(h,a.range(1,x+1),"inEdges"),v=c(h,a.range(x-1,-1,-1),"outEdges"),m=n(h);if(p(h,m),y.disableOptimalOrderHeuristic)return;let g=Number.POSITIVE_INFINITY,k,_=y.constraints||[];for(let b=0,T=0;T<4;++b,++T){d(b%2?S:v,b%4>=2,_),m=a.buildLayerMatrix(h);let C=r(h,m);C<g?(T=0,k=Object.assign({},m),g=C):C===g&&(k=structuredClone(m))}p(h,k)}function c(h,y,x){let S=new Map,v=(m,g)=>{S.has(m)||S.set(m,[]),S.get(m).push(g)};for(let m of h.nodes()){let g=h.node(m);if(typeof g.rank=="number"&&v(g.rank,m),typeof g.minRank=="number"&&typeof g.maxRank=="number")for(let k=g.minRank;k<=g.maxRank;k++)k!==g.rank&&v(k,m)}return y.map(function(m){return o(h,m,x,S.get(m)||[])})}function d(h,y,x){let S=new l;h.forEach(function(v){x.forEach(k=>S.setEdge(k.left,k.right));let m=v.graph().root,g=i(v,m,S,y);g.vs.forEach((k,_)=>v.node(k).order=_),s(v,S,g.vs)})}function p(h,y){Object.values(y).forEach(x=>x.forEach((S,v)=>h.node(S).order=v))}}),Bb=Fe((e,t)=>{var n=mn().Graph,r=it();t.exports={positionX:x,findType1Conflicts:i,findType2Conflicts:o,addConflict:l,hasConflict:a,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:h,findSmallestWidthAlignment:p,balance:y};function i(m,g){let k={};function _(b,T){let C=0,$=0,w=b.length,A=T[T.length-1];return T.forEach((I,P)=>{let z=s(m,I),K=z?m.node(z).order:w;(z||I===A)&&(T.slice($,P+1).forEach(U=>{m.predecessors(U).forEach(q=>{let D=m.node(q),W=D.order;(W<C||K<W)&&!(D.dummy&&m.node(U).dummy)&&l(k,q,U)})}),$=P+1,C=K)}),T}return g.length&&g.reduce(_),k}function o(m,g){let k={};function _(T,C,$,w,A){let I;r.range(C,$).forEach(P=>{I=T[P],m.node(I).dummy&&m.predecessors(I).forEach(z=>{let K=m.node(z);K.dummy&&(K.order<w||K.order>A)&&l(k,z,I)})})}function b(T,C){let $=-1,w,A=0;return C.forEach((I,P)=>{if(m.node(I).dummy==="border"){let z=m.predecessors(I);z.length&&(w=m.node(z[0]).order,_(C,A,P,$,w),A=P,$=w)}_(C,A,C.length,w,T.length)}),C}return g.length&&g.reduce(b),k}function s(m,g){if(m.node(g).dummy)return m.predecessors(g).find(k=>m.node(k).dummy)}function l(m,g,k){if(g>k){let b=g;g=k,k=b}let _=m[g];_||(m[g]=_={}),_[k]=!0}function a(m,g,k){if(g>k){let _=g;g=k,k=_}return!!m[g]&&Object.hasOwn(m[g],k)}function u(m,g,k,_){let b={},T={},C={};return g.forEach($=>{$.forEach((w,A)=>{b[w]=w,T[w]=w,C[w]=A})}),g.forEach($=>{let w=-1;$.forEach(A=>{let I=_(A);if(I.length){I=I.sort((z,K)=>C[z]-C[K]);let P=(I.length-1)/2;for(let z=Math.floor(P),K=Math.ceil(P);z<=K;++z){let U=I[z];T[A]===A&&w<C[U]&&!a(k,A,U)&&(T[U]=A,T[A]=b[A]=b[U],w=C[U])}}})}),{root:b,align:T}}function c(m,g,k,_,b){let T={},C=d(m,g,k,b),$=b?"borderLeft":"borderRight";function w(P,z){let K=C.nodes().slice(),U={},q=K.pop();for(;q;){if(U[q])P(q);else{U[q]=!0,K.push(q);for(let D of z(q))K.push(D)}q=K.pop()}}function A(P){T[P]=C.inEdges(P).reduce((z,K)=>Math.max(z,T[K.v]+C.edge(K)),0)}function I(P){let z=C.outEdges(P).reduce((U,q)=>Math.min(U,T[q.w]-C.edge(q)),Number.POSITIVE_INFINITY),K=m.node(P);z!==Number.POSITIVE_INFINITY&&K.borderType!==$&&(T[P]=Math.max(T[P],z))}return w(A,C.predecessors.bind(C)),w(I,C.successors.bind(C)),Object.keys(_).forEach(P=>T[P]=T[k[P]]),T}function d(m,g,k,_){let b=new n,T=m.graph(),C=S(T.nodesep,T.edgesep,_);return g.forEach($=>{let w;$.forEach(A=>{let I=k[A];if(b.setNode(I),w){var P=k[w],z=b.edge(P,I);b.setEdge(P,I,Math.max(C(m,A,w),z||0))}w=A})}),b}function p(m,g){return Object.values(g).reduce((k,_)=>{let b=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY;Object.entries(_).forEach(([$,w])=>{let A=v(m,$)/2;b=Math.max(w+A,b),T=Math.min(w-A,T)});let C=b-T;return C<k[0]&&(k=[C,_]),k},[Number.POSITIVE_INFINITY,null])[1]}function h(m,g){let k=Object.values(g),_=r.applyWithChunking(Math.min,k),b=r.applyWithChunking(Math.max,k);["u","d"].forEach(T=>{["l","r"].forEach(C=>{let $=T+C,w=m[$];if(w===g)return;let A=Object.values(w),I=_-r.applyWithChunking(Math.min,A);C!=="l"&&(I=b-r.applyWithChunking(Math.max,A)),I&&(m[$]=r.mapValues(w,P=>P+I))})})}function y(m,g){return r.mapValues(m.ul,(k,_)=>{if(g)return m[g.toLowerCase()][_];{let b=Object.values(m).map(T=>T[_]).sort((T,C)=>T-C);return(b[1]+b[2])/2}})}function x(m){let g=r.buildLayerMatrix(m),k=Object.assign(i(m,g),o(m,g)),_={},b;["u","d"].forEach(C=>{b=C==="u"?g:Object.values(g).reverse(),["l","r"].forEach($=>{$==="r"&&(b=b.map(P=>Object.values(P).reverse()));let w=(C==="u"?m.predecessors:m.successors).bind(m),A=u(m,b,k,w),I=c(m,b,A.root,A.align,$==="r");$==="r"&&(I=r.mapValues(I,P=>-P)),_[C+$]=I})});let T=p(m,_);return h(_,T),y(_,m.graph().align)}function S(m,g,k){return(_,b,T)=>{let C=_.node(b),$=_.node(T),w=0,A;if(w+=C.width/2,Object.hasOwn(C,"labelpos"))switch(C.labelpos.toLowerCase()){case"l":A=-C.width/2;break;case"r":A=C.width/2;break}if(A&&(w+=k?A:-A),A=0,w+=(C.dummy?g:m)/2,w+=($.dummy?g:m)/2,w+=$.width/2,Object.hasOwn($,"labelpos"))switch($.labelpos.toLowerCase()){case"l":A=$.width/2;break;case"r":A=-$.width/2;break}return A&&(w+=k?A:-A),A=0,w}}function v(m,g){return m.node(g).width}}),Ub=Fe((e,t)=>{var n=it(),r=Bb().positionX;t.exports=i;function i(s){s=n.asNonCompoundGraph(s),o(s),Object.entries(r(s)).forEach(([l,a])=>s.node(l).x=a)}function o(s){let l=n.buildLayerMatrix(s),a=s.graph().ranksep,u=s.graph().rankalign,c=0;l.forEach(d=>{let p=d.reduce((h,y)=>{let x=s.node(y).height;return h>x?h:x},0);d.forEach(h=>{let y=s.node(h);u==="top"?y.y=c+y.height/2:u==="bottom"?y.y=c+p-y.height/2:y.y=c+p/2}),c+=p+a})}}),Hb=Fe((e,t)=>{var n=Sb(),r=Cb(),i=jb(),o=it().normalizeRanks,s=_b(),l=it().removeEmptyRanks,a=Tb(),u=$b(),c=Lb(),d=zb(),p=Ub(),h=it(),y=mn().Graph;t.exports=x;function x(L,F={}){let V=F.debugTiming?h.time:h.notime;return V("layout",()=>{let Z=V(" buildLayoutGraph",()=>w(L));return V(" runLayout",()=>S(Z,V,F)),V(" updateInputGraph",()=>v(L,Z)),Z})}function S(L,F,V){F(" makeSpaceForEdgeLabels",()=>A(L)),F(" removeSelfEdges",()=>E(L)),F(" acyclic",()=>n.run(L)),F(" nestingGraph.run",()=>a.run(L)),F(" rank",()=>i(h.asNonCompoundGraph(L))),F(" injectEdgeLabelProxies",()=>I(L)),F(" removeEmptyRanks",()=>l(L)),F(" nestingGraph.cleanup",()=>a.cleanup(L)),F(" normalizeRanks",()=>o(L)),F(" assignRankMinMax",()=>P(L)),F(" removeEdgeLabelProxies",()=>z(L)),F(" normalize.run",()=>r.run(L)),F(" parentDummyChains",()=>s(L)),F(" addBorderSegments",()=>u(L)),F(" order",()=>d(L,V)),F(" insertSelfEdges",()=>X(L)),F(" adjustCoordinateSystem",()=>c.adjust(L)),F(" position",()=>p(L)),F(" positionSelfEdges",()=>H(L)),F(" removeBorderNodes",()=>W(L)),F(" normalize.undo",()=>r.undo(L)),F(" fixupEdgeLabelCoords",()=>q(L)),F(" undoCoordinateSystem",()=>c.undo(L)),F(" translateGraph",()=>K(L)),F(" assignNodeIntersects",()=>U(L)),F(" reversePoints",()=>D(L)),F(" acyclic.undo",()=>n.undo(L))}function v(L,F){L.nodes().forEach(V=>{let Z=L.node(V),te=F.node(V);Z&&(Z.x=te.x,Z.y=te.y,Z.order=te.order,Z.rank=te.rank,F.children(V).length&&(Z.width=te.width,Z.height=te.height))}),L.edges().forEach(V=>{let Z=L.edge(V),te=F.edge(V);Z.points=te.points,Object.hasOwn(te,"x")&&(Z.x=te.x,Z.y=te.y)}),L.graph().width=F.graph().width,L.graph().height=F.graph().height}var m=["nodesep","edgesep","ranksep","marginx","marginy"],g={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},k=["acyclicer","ranker","rankdir","align","rankalign"],_=["width","height","rank"],b={width:0,height:0},T=["minlen","weight","width","height","labeloffset"],C={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},$=["labelpos"];function w(L){let F=new y({multigraph:!0,compound:!0}),V=M(L.graph());return F.setGraph(Object.assign({},g,j(V,m),h.pick(V,k))),L.nodes().forEach(Z=>{let te=M(L.node(Z)),le=j(te,_);Object.keys(b).forEach(re=>{le[re]===void 0&&(le[re]=b[re])}),F.setNode(Z,le),F.setParent(Z,L.parent(Z))}),L.edges().forEach(Z=>{let te=M(L.edge(Z));F.setEdge(Z,Object.assign({},C,j(te,T),h.pick(te,$)))}),F}function A(L){let F=L.graph();F.ranksep/=2,L.edges().forEach(V=>{let Z=L.edge(V);Z.minlen*=2,Z.labelpos.toLowerCase()!=="c"&&(F.rankdir==="TB"||F.rankdir==="BT"?Z.width+=Z.labeloffset:Z.height+=Z.labeloffset)})}function I(L){L.edges().forEach(F=>{let V=L.edge(F);if(V.width&&V.height){let Z=L.node(F.v),te={rank:(L.node(F.w).rank-Z.rank)/2+Z.rank,e:F};h.addDummyNode(L,"edge-proxy",te,"_ep")}})}function P(L){let F=0;L.nodes().forEach(V=>{let Z=L.node(V);Z.borderTop&&(Z.minRank=L.node(Z.borderTop).rank,Z.maxRank=L.node(Z.borderBottom).rank,F=Math.max(F,Z.maxRank))}),L.graph().maxRank=F}function z(L){L.nodes().forEach(F=>{let V=L.node(F);V.dummy==="edge-proxy"&&(L.edge(V.e).labelRank=V.rank,L.removeNode(F))})}function K(L){let F=Number.POSITIVE_INFINITY,V=0,Z=Number.POSITIVE_INFINITY,te=0,le=L.graph(),re=le.marginx||0,ce=le.marginy||0;function oe(de){let we=de.x,je=de.y,N=de.width,G=de.height;F=Math.min(F,we-N/2),V=Math.max(V,we+N/2),Z=Math.min(Z,je-G/2),te=Math.max(te,je+G/2)}L.nodes().forEach(de=>oe(L.node(de))),L.edges().forEach(de=>{let we=L.edge(de);Object.hasOwn(we,"x")&&oe(we)}),F-=re,Z-=ce,L.nodes().forEach(de=>{let we=L.node(de);we.x-=F,we.y-=Z}),L.edges().forEach(de=>{let we=L.edge(de);we.points.forEach(je=>{je.x-=F,je.y-=Z}),Object.hasOwn(we,"x")&&(we.x-=F),Object.hasOwn(we,"y")&&(we.y-=Z)}),le.width=V-F+re,le.height=te-Z+ce}function U(L){L.edges().forEach(F=>{let V=L.edge(F),Z=L.node(F.v),te=L.node(F.w),le,re;V.points?(le=V.points[0],re=V.points[V.points.length-1]):(V.points=[],le=te,re=Z),V.points.unshift(h.intersectRect(Z,le)),V.points.push(h.intersectRect(te,re))})}function q(L){L.edges().forEach(F=>{let V=L.edge(F);if(Object.hasOwn(V,"x"))switch((V.labelpos==="l"||V.labelpos==="r")&&(V.width-=V.labeloffset),V.labelpos){case"l":V.x-=V.width/2+V.labeloffset;break;case"r":V.x+=V.width/2+V.labeloffset;break}})}function D(L){L.edges().forEach(F=>{let V=L.edge(F);V.reversed&&V.points.reverse()})}function W(L){L.nodes().forEach(F=>{if(L.children(F).length){let V=L.node(F),Z=L.node(V.borderTop),te=L.node(V.borderBottom),le=L.node(V.borderLeft[V.borderLeft.length-1]),re=L.node(V.borderRight[V.borderRight.length-1]);V.width=Math.abs(re.x-le.x),V.height=Math.abs(te.y-Z.y),V.x=le.x+V.width/2,V.y=Z.y+V.height/2}}),L.nodes().forEach(F=>{L.node(F).dummy==="border"&&L.removeNode(F)})}function E(L){L.edges().forEach(F=>{if(F.v===F.w){var V=L.node(F.v);V.selfEdges||(V.selfEdges=[]),V.selfEdges.push({e:F,label:L.edge(F)}),L.removeEdge(F)}})}function X(L){var F=h.buildLayerMatrix(L);F.forEach(V=>{var Z=0;V.forEach((te,le)=>{var re=L.node(te);re.order=le+Z,(re.selfEdges||[]).forEach(ce=>{h.addDummyNode(L,"selfedge",{width:ce.label.width,height:ce.label.height,rank:re.rank,order:le+ ++Z,e:ce.e,label:ce.label},"_se")}),delete re.selfEdges})})}function H(L){L.nodes().forEach(F=>{var V=L.node(F);if(V.dummy==="selfedge"){var Z=L.node(V.e.v),te=Z.x+Z.width/2,le=Z.y,re=V.x-te,ce=Z.height/2;L.setEdge(V.e,V.label),L.removeNode(F),V.label.points=[{x:te+2*re/3,y:le-ce},{x:te+5*re/6,y:le-ce},{x:te+re,y:le},{x:te+5*re/6,y:le+ce},{x:te+2*re/3,y:le+ce}],V.label.x=V.x,V.label.y=V.y}})}function j(L,F){return h.mapValues(h.pick(L,F),Number)}function M(L){var F={};return L&&Object.entries(L).forEach(([V,Z])=>{typeof V=="string"&&(V=V.toLowerCase()),F[V]=Z}),F}}),Wb=Fe((e,t)=>{var n=it(),r=mn().Graph;t.exports={debugOrdering:i};function i(o){let s=n.buildLayerMatrix(o),l=new r({compound:!0,multigraph:!0}).setGraph({});return o.nodes().forEach(a=>{l.setNode(a,{label:a}),l.setParent(a,"layer"+o.node(a).rank)}),o.edges().forEach(a=>l.setEdge(a.v,a.w,{},a.name)),s.forEach((a,u)=>{let c="layer"+u;l.setNode(c,{rank:"same"}),a.reduce((d,p)=>(l.setEdge(d,p,{style:"invis"}),p))}),l}}),Vb=Fe((e,t)=>{t.exports="2.0.4"}),qb=Fe((e,t)=>{t.exports={graphlib:mn(),layout:Hb(),debug:Wb(),util:{time:it().time,notime:it().notime},version:Vb()}});const Yp=qb();/*! For license information please see dagre.esm.js.LEGAL.txt */const pi=28,Sr=20,cv=20,Ra=10,Kb=150;function Gb(e,t){if(t==="all")return e.map(o=>({table:o,neighbor:!1}));const n=e.filter(o=>o.status!=="unchanged"),r=new Set(n.map(o=>o.name)),i=new Set;for(const o of n)for(const s of o.foreignKeys)r.has(s.table)||i.add(s.table);return e.filter(o=>r.has(o.name)||i.has(o.name)).map(o=>({table:o,neighbor:i.has(o.name)}))}function Yb(e,t,n){const r=new Set(e.foreignKeys.flatMap(l=>l.columns)),i=l=>n||l.status!=="unchanged"||l.primary||r.has(l.name)||l.values||t.has(l.name),o=e.columns.filter(i).map(l=>({kind:"column",column:l,fk:r.has(l.name)})),s=e.columns.length-o.length;return s>0&&o.push({kind:"more",hidden:s}),o}function Xb(e){const t=[];return e.otherChanges.constraints&&t.push(`制約 ${e.otherChanges.constraints}`),e.otherChanges.indexes&&t.push(`インデックス ${e.otherChanges.indexes}`),e.otherChanges.comment&&t.push("コメント"),t.length?`${t.join("・")} の変更`:void 0}function dv(e){return{name:e.name,type:e.beforeType?`${e.beforeType} → ${e.type}`:e.type}}function Qb(e,t,n,r){const i=Gb(e,t),o=new Set(i.map(x=>x.table.name)),s=new Map;for(const{table:x}of i)for(const S of x.foreignKeys){if(!o.has(S.table))continue;const v=s.get(S.table)??new Set;S.refColumns.forEach(m=>v.add(m)),s.set(S.table,v)}const l=new Yp.graphlib.Graph({compound:!0,multigraph:!0});l.setGraph({rankdir:"LR",nodesep:28,ranksep:90,marginx:20,marginy:20}),l.setDefaultEdgeLabel(()=>({}));const a=i.map(({table:x,neighbor:S})=>{const v=Yb(x,s.get(x.name)??new Set,n.has(x.name)),m=Xb(x);let g=Math.max(Kb,r(x.name,!0)+Ra*2+24);for(const _ of v){if(_.kind==="more")continue;const b=dv(_.column);g=Math.max(g,18+r(b.name)+16+r(b.type)+34+Ra*2)}m&&(g=Math.max(g,r(m)+Ra*2));const k=pi+v.length*Sr+(m?cv:0)+4;return{table:x,neighbor:S,rows:v,footer:m,x:0,y:0,width:Math.ceil(g),height:k}}),u=[...new Set(a.map(x=>x.table.schema))];for(const x of u)l.setNode(`schema:${x}`,{label:x,paddingTop:26});for(const x of a)l.setNode(x.table.name,{width:x.width,height:x.height}),l.setParent(x.table.name,`schema:${x.table.schema}`);const c=[];for(const x of a)for(const S of x.table.foreignKeys){if(!o.has(S.table))continue;const v=a.find(g=>g.table.name===S.table),m=(g,k)=>!!k&&g.rows.some(_=>_.kind==="column"&&_.column.name===k);c.push({fk:S,from:x.table.name,to:S.table,fromColumn:m(x,S.columns[0])?S.columns[0]:void 0,toColumn:m(v,S.refColumns[0])?S.refColumns[0]:void 0,points:[]}),S.table!==x.table.name&&l.setEdge(x.table.name,S.table,{},S.name)}Yp.layout(l);for(const x of a){const S=l.node(x.table.name);x.x=S.x-x.width/2,x.y=S.y-x.height/2}const d=u.map(x=>{const S=l.node(`schema:${x}`);return{schema:x,x:S.x-S.width/2,y:S.y-S.height/2,width:S.width,height:S.height}}),p=new Map(a.map(x=>[x.table.name,x]));for(const x of c)x.points=Zb(p.get(x.from),x.fromColumn,p.get(x.to),x.toColumn);const h=Math.max(0,...a.map(x=>x.x+x.width),...d.map(x=>x.x+x.width)),y=Math.max(0,...a.map(x=>x.y+x.height),...d.map(x=>x.y+x.height));return{tables:a,edges:c,groups:d,width:h+20,height:y+20}}function Xp(e,t){const n=t?e.rows.findIndex(r=>r.kind==="column"&&r.column.name===t):-1;return n<0?e.y+pi/2:e.y+pi+n*Sr+Sr/2}function Zb(e,t,n,r){const i=Xp(e,t),o=Xp(n,r);if(e===n){const d=e.x+e.width;return[{x:d,y:i},{x:d+28,y:i},{x:d+28,y:o},{x:d,y:o}]}const s=e.x+e.width/2,a=n.x+n.width/2>=s,u=a?e.x+e.width:e.x,c=a?n.x:n.x+n.width;return[{x:u,y:i},{x:c,y:o}]}function Jb(e){if(e.length!==2)return`M ${e.map(i=>`${i.x} ${i.y}`).join(" L ")}`;const[t,n]=e,r=Math.max(30,Math.abs(n.x-t.x)/2)*(n.x>=t.x?1:-1);return`M ${t.x} ${t.y} C ${t.x+r} ${t.y}, ${n.x-r} ${n.y}, ${n.x} ${n.y}`}const e1={added:"+",removed:"−",modified:"~",unchanged:""},fv="12px ui-monospace, SFMono-Regular, Menlo, monospace",t1=`600 ${fv}`;function n1(){return O.useMemo(()=>{const e=document.createElement("canvas").getContext("2d");return(t,n)=>e?(e.font=n?t1:fv,e.measureText(t).width):t.length*7.4},[])}const r1=O.forwardRef(function({tables:t,mode:n,values:r,selected:i,reviewed:o,comments:s,onSelect:l},a){const u=n1(),[c,d]=O.useState(new Set),[p,h]=O.useState(null),[y,x]=O.useState({x:0,y:0,k:1}),S=O.useRef(null),v=O.useRef(null),m=O.useMemo(()=>Qb(t,n,c,u),[t,n,c,u]),g=O.useMemo(()=>new Map(m.tables.map($=>[$.table.name,$])),[m]),k=O.useRef(!1),_=O.useCallback(()=>{const $=S.current;if(!$||m.width===0)return;if($.clientWidth===0||$.clientHeight===0){k.current=!0;return}k.current=!1;const w=Math.min(1.2,Math.max(.2,Math.min($.clientWidth/m.width,$.clientHeight/m.height)));x({k:w,x:($.clientWidth-m.width*w)/2,y:Math.max(0,($.clientHeight-m.height*w)/2)})},[m]),b=m.tables.map($=>$.table.name).join("|");O.useEffect(()=>{_()},[b]),O.useEffect(()=>{const $=S.current;if(!$)return;const w=new ResizeObserver(()=>{k.current&&_()});return w.observe($),()=>w.disconnect()},[_]);const T=O.useCallback(($,w,A)=>{x(I=>{const P=Math.min(3,Math.max(.15,I.k*$));return{k:P,x:w-(w-I.x)*P/I.k,y:A-(A-I.y)*P/I.k}})},[]);O.useImperativeHandle(a,()=>({fit:_,zoom:$=>{const w=S.current;w&&T($,w.clientWidth/2,w.clientHeight/2)},focus:$=>{const w=g.get($),A=S.current;!w||!A||x(I=>({...I,x:A.clientWidth/2-(w.x+w.width/2)*I.k,y:A.clientHeight/3-(w.y+Math.min(w.height,200)/2)*I.k}))}}),[_,T,g]),O.useEffect(()=>{const $=S.current;if(!$)return;const w=A=>{A.preventDefault();const I=$.getBoundingClientRect();A.ctrlKey||A.metaKey?T(Math.exp(-A.deltaY*.01),A.clientX-I.left,A.clientY-I.top):x(P=>({...P,x:P.x-A.deltaX,y:P.y-A.deltaY}))};return $.addEventListener("wheel",w,{passive:!1}),()=>$.removeEventListener("wheel",w)},[T]);const C=$=>p===$||i===$;return f.jsx("div",{ref:S,className:"er",onPointerDown:$=>{$.button===0&&(v.current={x:$.clientX,y:$.clientY,vx:y.x,vy:y.y,moved:!1,target:$.target},$.currentTarget.setPointerCapture($.pointerId))},onPointerMove:$=>{const w=v.current;w&&(Math.abs($.clientX-w.x)+Math.abs($.clientY-w.y)>3&&(w.moved=!0),w.moved&&x(A=>({...A,x:w.vx+$.clientX-w.x,y:w.vy+$.clientY-w.y})))},onPointerUp:()=>{const $=v.current;if(v.current=null,$&&!$.moved){const w=$.target.closest("[data-table]"),A=$.target.closest("[data-more]");if(A){const I=A.getAttribute("data-more");d(P=>{const z=new Set(P);return z.has(I)?z.delete(I):z.add(I),z})}else l(w?w.getAttribute("data-table"):null)}},children:m.tables.length===0?f.jsx("div",{className:"er-empty",children:"表示するテーブルはありません"}):f.jsxs("svg",{width:"100%",height:"100%",children:[f.jsx("defs",{children:["added","removed","modified","unchanged"].map($=>f.jsx("marker",{id:`arrow-${$}`,viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:f.jsx("path",{d:"M0,0 L10,5 L0,10 z",className:`arrow ${$}`})},$))}),f.jsxs("g",{transform:`translate(${y.x} ${y.y}) scale(${y.k})`,children:[m.groups.map($=>f.jsxs("g",{className:"er-group",children:[f.jsx("rect",{x:$.x,y:$.y,width:$.width,height:$.height,rx:8}),f.jsx("text",{x:$.x+10,y:$.y+17,children:$.schema})]},$.schema)),m.edges.map($=>{const w=C($.from)||C($.to);return f.jsx("path",{d:Jb($.points),className:`er-edge ${$.fk.status} ${w?"lit":""} ${p||i?w?"":"dim":""}`,markerEnd:`url(#arrow-${$.fk.status})`,children:f.jsxs("title",{children:[$.fk.name,": ",$.from,".",$.fk.columns.join(", ")," → ",$.to,".",$.fk.refColumns.join(", ")]})},`${$.from}:${$.fk.name}`)}),m.tables.map($=>f.jsx(i1,{t:$,values:r,selected:i===$.table.name,reviewed:o.has($.table.name),comments:s.tables.get($.table.name)??0,commented:s.columns,expanded:c.has($.table.name),onHover:h},$.table.name))]})]})})});function i1({t:e,values:t,selected:n,reviewed:r,comments:i,commented:o,expanded:s,onHover:l}){const a=e.table.status;return f.jsxs("g",{className:`er-table ${a} ${e.neighbor?"neighbor":""} ${n?"selected":""} ${r?"reviewed":""}`,"data-table":e.table.name,transform:`translate(${e.x} ${e.y})`,onPointerEnter:()=>l(e.table.name),onPointerLeave:()=>l(null),children:[f.jsx("rect",{className:"er-box",width:e.width,height:e.height,rx:6}),f.jsx("rect",{className:"er-head",width:e.width,height:pi,rx:6}),f.jsx("rect",{className:"er-head-fill",y:pi-6,width:e.width,height:6}),f.jsxs("text",{className:"er-title",x:10,y:18,children:[f.jsxs("tspan",{className:"er-schema",children:[e.table.schema,"."]}),f.jsx("tspan",{children:e.table.table})]}),r&&f.jsx("text",{className:"er-check",x:e.width-(i>0?24:10),y:18,textAnchor:"end",children:"✓"}),e.rows.map((u,c)=>{const d=pi+c*Sr;if(u.kind==="more")return f.jsxs("g",{className:"er-more","data-more":e.table.name,children:[f.jsx("rect",{y:d,width:e.width,height:Sr}),f.jsx("text",{x:10,y:d+14,children:s?"▴ たたむ":`▸ 他 ${u.hidden} カラム`})]},"more");const p=u.column,h=dv(p),y=t.get(`${e.table.name}.${p.name}`);return f.jsxs("g",{className:`er-row ${p.status}`,children:[f.jsx("rect",{y:d,width:e.width,height:Sr}),f.jsx("text",{x:8,y:d+14,className:`er-mark ${p.status}`,children:e1[p.status]}),f.jsxs("text",{x:20,y:d+14,className:"er-col",children:[p.primary&&f.jsx("tspan",{className:"er-key",children:"◆ "}),h.name]}),f.jsxs("text",{x:e.width-10,y:d+14,textAnchor:"end",className:"er-type",children:[u.fk&&f.jsx("tspan",{className:"er-fk",children:"FK "}),p.values&&f.jsx("tspan",{className:"er-values",children:"値± "}),p.beforeType?f.jsxs(f.Fragment,{children:[f.jsx("tspan",{className:"er-before",children:p.beforeType}),f.jsxs("tspan",{children:[" → ",p.type]})]}):p.type,p.notNull?"":f.jsx("tspan",{className:"er-null",children:"?"})]}),o.has(`${e.table.name}.${p.name}`)&&f.jsx("circle",{className:"er-cdot",cx:e.width-4,cy:d+Sr/2,r:2.5}),y&&f.jsx("title",{children:y})]},p.name)}),i>0&&f.jsxs("g",{className:"er-cbadge",transform:`translate(${e.width-4} 0)`,children:[f.jsxs("title",{children:["コメント ",i," 件"]}),f.jsx("rect",{x:-17,y:-9,width:34,height:18,rx:9}),f.jsx(Ti,{size:10,x:-11,y:-5}),f.jsx("text",{x:4,y:4,textAnchor:"middle",children:i})]}),e.footer&&f.jsx("text",{className:"er-footer",x:10,y:e.height-cv/2-1,children:e.footer})]})}const si={side:260,panel:440},Qp=180,Zp=320,Jp=320,pv="dbshape.layout";function o1(){const e=qt(pv,{});return{side:typeof e.side=="number"&&e.side>0?e.side:si.side,panel:typeof e.panel=="number"&&e.panel>0?e.panel:si.panel}}const gs=e=>Nt(pv,e);function ys(e,t,n){const r=Or*(n?2:1);let i=e.panel;n&&(i=Math.max(Jp,Math.min(i,t-r-Qp-Zp)));const o=t-r-(n?i:0);return{side:Math.max(Qp,Math.min(e.side,o-Zp)),panel:Math.max(Jp,i)}}function s1(e,t){return[`${e.side}px`,`${Or}px`,"minmax(0, 1fr)",...t?[`${Or}px`,`${e.panel}px`]:[]].join(" ")}const l1=["table","column","constraint","index","value","type"];function a1(e){const t=/^([a-z]+):([^:]*):(.+)$/.exec(e);return!t||!l1.includes(t[1])?null:{kind:t[1],...t[2]?{table:t[2]}:{},name:t[3]}}function u1(e,t=""){const n=e.diff,r=(o,s)=>{const l=Zy(e,o),a=l&&!l.base?` 定義: ${l.file}:${l.line}`:"";return`${" ".repeat(s)}- ${Ro(o)}(${Wl(e,o)??"変更なし"})${a} target: "${t}${Mr(o)}"`},i=[];for(const o of n.tables){i.push(r(pl(o.name),0));for(const s of o.columns)i.push(r({kind:"column",table:o.name,name:s.name},1));for(const s of o.constraints)i.push(r({kind:"constraint",table:o.name,name:s.name},1));for(const s of o.indexes)i.push(r({kind:"index",table:o.name,name:s.name},1))}for(const o of n.values)o.source==="check"&&o.table&&o.column&&i.push(r({kind:"value",table:o.table,name:o.column},0));for(const o of[...n.enums,...n.domains])i.push(r({kind:"type",name:o.name},0));return i.length===0?"":[`スキーマの SQL: ${Hd(e.schemaFrom)}`,"変更:",...i].join(`
|
|
75
|
+
`)}const c1=["コメントの付け方:","- target: 上の target の値をそのまま","- path / side / line / endLine / code: null","- スキーマの設計を見てください(型、NULL を許すか、既定値、制約、外部キー、インデックス、値の制限、既存のテーブルとの揃い方、既存のデータへの影響など)。定義は SQL ファイルを読んで確かめてください。","- 一覧にないテーブルやカラムも同じ形の target で指せます(table:<schema.table>:<schema.table>、column:<schema.table>:<カラム名>)。"].join(`
|
|
76
|
+
`);function d1(e,t,n,r){const i=[];for(const o of e){if(!o.target||!o.target.startsWith(n))continue;const s=a1(o.target.slice(n.length));!s||!Jy(t,s)&&Wl(t,s)===void 0||i.push({...ev(t,s,o.body),ai:r})}return i}const f1=e=>Vd({repoRoot:e.repoRoot,baseLabel:e.base.label,targetLabel:e.target.label})+e.database.id,p1=[{status:"added",title:"新規テーブル"},{status:"modified",title:"変更したテーブル"},{status:"removed",title:"削除したテーブル"}];function h1({data:e,active:t,onComments:n,ai:r,aiPrefix:i,onAi:o,switcher:s}){const l=f1(e),[a,u]=O.useState(""),[c,d]=O.useState("changes"),[p,h]=O.useState(null),[y,x]=O.useState(()=>Z0(l)),[S,v]=O.useState(()=>ab(l)),[m,g]=O.useState(null),[k,_]=O.useState(null),b=O.useRef(null),T=O.useRef(null),C=O.useRef(null),$=Uy(T),[w,A]=O.useState(o1);O.useEffect(()=>{if(!t)return;const N=G=>{G.key==="Escape"&&!(G.target instanceof HTMLElement&&G.target.closest("textarea, input"))&&h(null)};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[t]),O.useEffect(()=>{const N=S.filter(G=>uo(e,G)!=="resolved").length;n({open:N,prompt:()=>tv(e,S).text,review:()=>u1(e,i)})},[e,S,i,n]);const I=O.useRef(S);I.current=S;const P=O.useRef(0),[z,K]=O.useState(null);O.useEffect(()=>{if(!r||r.seq===P.current)return;P.current=r.seq;const N=d1(r.items.filter(G=>G.module==="db"),e,i,r.agent);if(N.length){const G=[...I.current,...N];v(G),Vp(l,G)}K({seq:r.seq,placed:N.length,dropped:0})},[r,e,i,l]),O.useEffect(()=>{z&&o(z)},[z,o]);const U=e.diff.tables,q=O.useMemo(()=>new Set(U.map(N=>N.name)),[U]),D=N=>y[N.name]===lo(N),W=O.useMemo(()=>new Set(U.filter(N=>y[N.name]===lo(N)).map(N=>N.name)),[U,y]),E=O.useMemo(()=>{const N=new Map;for(const G of e.diff.values){const ee=Hl(G.before,G.after).map(fe=>fe.status==="added"?`+${fe.value}`:fe.status==="removed"?`−${fe.value}`:fe.value).join(" "),he=G.source==="check"?[`${G.table}.${G.column}`]:G.usedBy??[];for(const fe of he)N.set(fe,`値: ${ee}`)}return N},[e]),X=O.useMemo(()=>{const N=new Map,G=new Set;for(const ee of S)uo(e,ee)==="resolved"||!ee.target.table||(N.set(ee.target.table,(N.get(ee.target.table)??0)+1),(ee.target.kind==="column"||ee.target.kind==="value")&&G.add(`${ee.target.table}.${ee.target.name}`));return{tables:N,columns:G}},[e,S]),H=e.diff,j=(N,G)=>{const ee={...y};G?ee[N.name]=lo(N):delete ee[N.name],x(ee),J0(l,ee)},M=(N,G=!0)=>{h({kind:"table",name:N}),G&&window.setTimeout(()=>{var ee;return(ee=b.current)==null?void 0:ee.focus(N)},0)},L=N=>{v(N),Vp(l,N)},F={data:e,comments:S,composing:m,editing:k,compose:N=>{g(N?Mr(N):null),_(null)},edit:N=>{_(N),g(null)},add:(N,G)=>{L([...S,ev(e,N,G)]),g(null)},update:(N,G)=>{L(S.map(ee=>ee.id===N?{...ee,body:G}:ee)),_(null)},remove:N=>L(S.filter(G=>G.id!==N))},V=N=>{N.table?M(N.table):h({kind:"type",name:N.name}),window.setTimeout(()=>{var G;return(G=document.getElementById(`c-${Mr(N)}`))==null?void 0:G.scrollIntoView({block:"center",behavior:"smooth"})},50)},Z=U.filter(N=>ib(N,a)),te=[...H.enums.map(N=>({kind:"ENUM 型",change:N})),...H.domains.map(N=>({kind:"DOMAIN",change:N}))],le=U.filter(D).length,re=p,ce=(re==null?void 0:re.kind)==="table"?U.find(N=>N.name===re.name):void 0,oe=(re==null?void 0:re.kind)==="table"?e.er.find(N=>N.name===re.name):void 0,de=(re==null?void 0:re.kind)==="table"?H.values.filter(N=>{var G;return N.table===re.name||((G=N.usedBy)==null?void 0:G.some(ee=>ee.startsWith(`${re.name}.`)))}):[],we=(re==null?void 0:re.kind)==="type"?te.find(N=>N.change.name===re.name):void 0,je=U.length===0&&H.values.length===0&&te.length===0;return f.jsx(nv.Provider,{value:F,children:f.jsxs("div",{className:"app",children:[f.jsxs(Fd,{children:[s,f.jsxs(Dd,{children:[f.jsx(Ei,{children:"テーブル"}),f.jsx(Pd,{stats:{added:U.filter(N=>N.status==="added").length,modified:U.filter(N=>N.status==="modified").length,removed:U.filter(N=>N.status==="removed").length},unit:"テーブル",showZero:!0}),f.jsx(zd,{}),f.jsx(Ei,{children:"値の変化"}),f.jsx("span",{className:`vcount${H.values.length?"":" zero"}`,title:"CHECK や ENUM などの値の変化",children:H.values.length})]}),f.jsx(Bd,{}),f.jsx(Ud,{done:le,total:U.length,title:"確認済みにしたテーブル(内容が変わると外れます)"})]}),f.jsxs("div",{className:`body ${re?"with-panel":""}`,ref:T,style:{gridTemplateColumns:s1($?ys(w,$,!!re):w,!!re)},children:[f.jsxs("nav",{className:"side",ref:C,children:[f.jsx("input",{className:"filter",placeholder:"テーブル・カラムで絞り込み",value:a,onChange:N=>u(N.target.value)}),p1.map(N=>{const G=Z.filter(ee=>ee.status===N.status);return f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:[N.title," ",f.jsx("span",{className:"muted",children:G.length})]}),G.map(ee=>{const he=Yy(ee),fe=X.tables.get(ee.name)??0,pe=D(ee);return f.jsxs("div",{className:`item-row tinted ${ee.status}${pe?" reviewed":""}${(re==null?void 0:re.name)===ee.name?" current":""}`,children:[f.jsxs("button",{className:"item",onClick:()=>M(ee.name),title:ee.name,children:[f.jsxs("span",{className:"iname",children:[f.jsxs("span",{className:"schema",children:[ee.schema,"."]}),ee.table]}),f.jsx($i,{stats:he,title:Gy(he)}),fe>0&&f.jsx(Ao,{n:fe,title:"このテーブルへの未対応のコメント"})]}),f.jsx("button",{className:`ireview${pe?" on":""}`,onClick:()=>j(ee,!pe),title:pe?"確認済み(クリックで外す)":"確認済みにする(テーブルがまた変わると外れます)","aria-label":pe?"確認済みを外す":"確認済みにする","aria-pressed":pe,children:f.jsx(F0,{size:12})})]},ee.name)})]},N.status)}),f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["値の変化 ",f.jsx("span",{className:"muted",children:H.values.length})]}),H.values.map((N,G)=>{const ee=Xy(N);return f.jsx("button",{className:"item tinted values",onClick:()=>ee.table?M(ee.table):N.type&&h({kind:"type",name:N.type}),children:f.jsx("span",{className:"iname",children:ee.label})},G)})]}),S.length>0&&f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["コメント ",f.jsx("span",{className:"muted",children:S.length})]}),S.map(N=>{const G=uo(e,N);return f.jsxs("div",{className:`item comment-item ${G}`,role:"button",tabIndex:0,onClick:()=>V(N.target),onKeyDown:ee=>ee.key==="Enter"&&V(N.target),title:`${Ro(N.target)}
|
|
77
|
+
${N.body}`,children:[f.jsx("span",{className:"mark cmark",children:f.jsx(Ti,{size:12})}),f.jsxs("span",{className:"iname",children:[f.jsx("span",{className:"ctarget",children:Ro(N.target)}),f.jsx("span",{className:"cline",children:N.body.split(`
|
|
78
|
+
`)[0]})]}),G!=="open"&&f.jsx("span",{className:`cstate ${G}`,children:cb[G]}),f.jsx("button",{className:"cdel","aria-label":"削除",title:"このコメントを削除",onClick:ee=>{ee.stopPropagation(),F.remove(N.id)},children:"×"})]},N.id)})]}),te.length>0&&f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["型 ",f.jsx("span",{className:"muted",children:te.length})]}),te.map(N=>f.jsx("button",{className:`item tinted ${N.change.status}${(re==null?void 0:re.name)===N.change.name?" current":""}`,onClick:()=>h({kind:"type",name:N.change.name}),children:f.jsx("span",{className:"iname",children:N.change.name})},N.change.name))]}),f.jsxs("div",{className:"side-foot muted",children:[f.jsxs("div",{children:["変更のないテーブル ",H.unchangedTables]}),f.jsxs("details",{children:[f.jsxs("summary",{children:["スキーマ ",e.target.files.length," ファイル(",Hd(e.schemaFrom),")"]}),f.jsx("ul",{children:e.target.files.map(N=>f.jsx("li",{children:N},N))})]}),e.ignored.length>0&&f.jsxs("details",{children:[f.jsxs("summary",{children:["比較していない文 ",e.ignored.reduce((N,G)=>N+G.count,0)]}),f.jsx("ul",{children:e.ignored.map(N=>f.jsxs("li",{children:[N.statement," ",N.count]},N.statement))})]})]})]}),f.jsx(Io,{title:"ドラッグで一覧と図の幅を変える(ダブルクリックで元に戻す)",start:()=>{var N;return((N=C.current)==null?void 0:N.getBoundingClientRect().width)??w.side},onDrag:(N,G)=>A(ee=>ys({...ee,side:N+G},$,!!re)),onEnd:()=>A(N=>(gs(N),N)),onReset:()=>A(N=>(gs({...N,side:si.side}),{...N,side:si.side}))}),f.jsxs("main",{className:"canvas",children:[f.jsxs("div",{className:"toolbar",children:[f.jsxs("div",{className:"ds-seg",children:[f.jsx("button",{className:c==="changes"?"on":"",onClick:()=>d("changes"),title:"変更したテーブルと、その外部キーの参照先だけ",children:"変更まわり"}),f.jsx("button",{className:c==="all"?"on":"",onClick:()=>d("all"),title:"すべてのテーブル",children:"全体"})]}),f.jsx("button",{className:"ds-btn",onClick:()=>{var N;return(N=b.current)==null?void 0:N.fit()},title:"図全体を画面に収める",children:"全体を表示"}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:()=>{var N;return(N=b.current)==null?void 0:N.zoom(1.25)},"aria-label":"拡大",children:"+"}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:()=>{var N;return(N=b.current)==null?void 0:N.zoom(.8)},"aria-label":"縮小",children:"−"}),f.jsx("span",{className:"muted hint",title:"スクロールでも移動できます。トラックパッドのピンチでも拡大縮小できます",children:"ドラッグで移動・⌘ / Ctrl + スクロールで拡大・クリックで詳細"})]}),e.warnings.length>0&&f.jsx("div",{className:"warnings",children:e.warnings.map((N,G)=>f.jsx("div",{className:"warning",children:N},G))}),je&&c==="changes"?f.jsxs("div",{className:"empty",children:["スキーマの変更はありません(",e.target.files.length," ファイルを比較しました)"]}):f.jsx(r1,{ref:b,tables:e.er,mode:c,values:E,selected:(re==null?void 0:re.kind)==="table"?re.name:null,reviewed:W,comments:X,onSelect:N=>N?M(N,!1):h(null)})]}),re&&f.jsx(Io,{title:"ドラッグで図と詳細パネルの幅を変える(ダブルクリックで元に戻す)",start:()=>ys(w,$,!0).panel,onDrag:(N,G)=>A(ee=>ys({...ee,panel:N-G},$,!0)),onEnd:()=>A(N=>(gs(N),N)),onReset:()=>A(N=>(gs({...N,panel:si.panel}),{...N,panel:si.panel}))}),re&&f.jsx(vb,{selection:re,change:ce,erTable:oe,values:de,type:we,reviewed:ce?D(ce):!1,onReviewed:N=>ce&&j(ce,N),known:q,onJump:N=>M(N),onClose:()=>h(null)})]})]})})}function m1({data:e,active:t,onComments:n,ai:r,onAi:i}){const o=e.databases,s=o.length>1,l=`dbshape.database:${e.repoRoot}`,[a,u]=O.useState(()=>{var C;const T=qt(l,null);return T&&o.some($=>$.database.id===T)?T:(C=[...o].sort(($,w)=>Fs(w)-Fs($))[0])==null?void 0:C.database.id}),c=o.find(T=>T.database.id===a)??o[0],d=T=>{u(T),Nt(l,T)},[p,h]=O.useState({}),y=O.useRef(new Map),x=T=>{let C=y.current.get(T);return C||y.current.set(T,C=$=>h(w=>({...w,[T]:$}))),C};O.useEffect(()=>{const T=o.filter(C=>{var $;return((($=p[C.database.id])==null?void 0:$.open)??0)>0});n({open:T.reduce((C,$)=>C+p[$.database.id].open,0),prompt:()=>{const C=T.map($=>p[$.database.id].prompt().trimEnd()).filter(Boolean);return C.length?`${C.join(`
|
|
79
|
+
=====
|
|
80
|
+
`)}
|
|
81
|
+
`:""},review:()=>{const C=o.map($=>{var w,A;return{d:$,text:((A=(w=p[$.database.id])==null?void 0:w.review)==null?void 0:A.call(w))??""}}).filter($=>$.text);return C.length===0?"":[...C.map(({d:$,text:w})=>s?`### DB: ${$.database.name}
|
|
82
|
+
|
|
83
|
+
${w}`:w),c1].join(`
|
|
84
|
+
|
|
85
|
+
`)}})},[o,p,s,n]);const S=T=>s?`${T+1}/`:"",[v,m]=O.useState({}),g=O.useRef(new Map),k=T=>{let C=g.current.get(T);return C||g.current.set(T,C=$=>m(w=>({...w,[T]:$}))),C},_=O.useRef(0);if(O.useEffect(()=>{if(!r||_.current===r.seq||!o.every(C=>{var $;return(($=v[C.database.id])==null?void 0:$.seq)===r.seq}))return;_.current=r.seq;const T=o.reduce((C,$)=>C+v[$.database.id].placed,0);i({seq:r.seq,placed:T,dropped:r.items.filter(C=>C.module==="db").length-T})},[r,o,v,i]),!c)return f.jsx("div",{className:"fatal muted",children:"スキーマの SQL ファイルがありません"});const b=s?f.jsx("div",{className:"db-switch",role:"tablist","aria-label":"データベース",children:o.map(T=>{const C=Fs(T),$=T===c;return f.jsxs("button",{role:"tab","aria-selected":$,className:`db-tab ${$?"on":""} ${C===0?"quiet":""}`,onClick:()=>d(T.database.id),title:`${Hd(T.schemaFrom)}
|
|
86
|
+
変更 ${C}`,children:[f.jsx("span",{className:"db-name",children:T.database.name}),f.jsx("span",{className:"db-count",children:C})]},T.database.id)})}):void 0;return f.jsx(f.Fragment,{children:o.map((T,C)=>f.jsx("div",{className:"db-pane",hidden:T!==c,children:f.jsx(h1,{data:T,active:t&&T===c,onComments:x(T.database.id),ai:r,aiPrefix:S(C),onAi:k(T.database.id),switcher:b})},T.database.id))})}const g1={id:"db",title:"DB",heading:"DB スキーマ",description:"DB スキーマ(dbshape): テーブル・カラム・制約・CHECK の値の変化",icon:O0,View:m1,badge:e=>e.databases.reduce((t,n)=>t+Fs(n),0)||void 0,clearReview:e=>{ub(e),eb(e)}};function y1(e){const t=new Map,n=new Map;for(const l of e.files){n.set(l.path,l);const a=t.get(l.dir)??[];a.push(l),t.set(l.dir,a)}const r=new Map,i=new Map;for(const l of e.edges)eh(r,l.from,l),eh(i,l.to,l);const o=[...t.keys()].sort(),s=new Set;for(const l of e.files)l.status!=="unchanged"&&s.add(l.dir);return{graph:e,filesByDir:t,edgesByFrom:r,edgesByTo:i,fileByPath:n,dirs:o,changedDirs:[...s].sort()}}function eh(e,t,n){const r=e.get(t);r?r.push(n):e.set(t,[n])}function ml(e,t){return e===0&&t>0?"added":t===0&&e>0?"removed":"unchanged"}function hv(e,t){let n;for(const r of e)(r.dir===""||t===r.dir||t.startsWith(r.dir+"/"))&&(!n||r.dir.length>n.dir.length)&&(n=r);return n}function mv(e,t,n){const r=hv(e,t);if(!r||r.dir==="")return t||"(root)";const i=t===r.dir?".":t.slice(r.dir.length+1);return`${r.dir.split("/").pop()}:${i}`}function Me(e){const t=e.lastIndexOf("/");return t===-1?"":e.slice(0,t)}function Ct(e){return e.slice(e.lastIndexOf("/")+1)}function v1(e){const t=new Map,n=r=>{let i=t.get(r);return i||(i={path:r,name:r===""?"(root)":Ct(r),dirs:[],files:[],stats:{added:0,modified:0,removed:0,total:0}},t.set(r,i),r!==""&&n(Me(r)).dirs.push(i),i)};n("");for(const r of e.graph.files){n(r.dir).files.push(r);let i=r.dir;for(;i!==null;){const o=n(i);o.stats.total++,r.status!=="unchanged"&&o.stats[r.status]++,i=i===""?null:Me(i)}}for(const r of t.values())r.dirs.sort((i,o)=>i.name.localeCompare(o.name)),r.files.sort((i,o)=>i.path.localeCompare(o.path));return{root:n(""),byPath:t}}function gv(e){const t=[];let n=e;for(;n!=="";)n=Me(n),n!==""&&t.unshift(n);return t}function gl(e){return e.added+e.modified+e.removed===0?"unchanged":e.added===e.total?"added":e.removed===e.total?"removed":"modified"}const x1=e=>`t:${e}`;function Oa(e){if(e.length===0)return"";const t=e.map(r=>Me(r)?Me(r).split("/"):[]),n=[];for(let r=0;;r++){const i=t[0][r];if(i===void 0||t.some(o=>o[r]!==i))break;n.push(i)}return n.join("/")}function yv(e){return[...e.files,...e.dirs.flatMap(yv)]}function jr(e,t,n,r){const i=n.slice(2);if(n.startsWith("f:")){const o=e.fileByPath.get(i);return o?{id:n,kind:"file",label:`${Ct(o.dir)}/${Ct(o.path)}`,path:i,status:o.status,files:[o],pinned:r,depth:0}:null}if(n.startsWith("d:")){const o=t.get(i);return o?{id:n,kind:"dir",label:`${o.name}/`,path:i,status:gl(o.stats),files:yv(o),pinned:r,scope:i,depth:0}:null}if(n.startsWith("r:")){const o=t.get(i);if(!o)return null;const s=o.files.filter(l=>l.status==="unchanged");return{id:n,kind:"rest",label:`${o.name}/`,suffix:` のほか ${s.length} ファイル`,path:i,status:"unchanged",files:s,pinned:r,depth:0}}if(n.startsWith("c:")){const o=t.get(i);return o?{id:n,kind:"container",label:`${o.name}/`,path:i,status:"unchanged",files:o.files,pinned:r,depth:0}:null}if(n.startsWith("p:")){const o=t.get(i);if(!o)return null;const s={added:0,modified:0,removed:0,total:o.files.length};for(const l of o.files)l.status!=="unchanged"&&s[l.status]++;return{id:n,kind:"package",label:o.name,suffix:"(パッケージ)",path:i,status:gl(s),files:o.files,pinned:r,depth:0}}return null}const an=(e,t)=>t===""||e===t||e.startsWith(t+"/");function Gd(e,t,n){const r=[];for(const i of t.files)for(const o of e.edgesByFrom.get(i.path)??[])o.external&&!n||t.scope!==void 0&&!o.external&&an(o.to,t.scope)||r.push(o);return r}const yl=(e,t)=>({from:e,to:t,before:0,after:0,added:0,removed:0,status:"unchanged"});function th(e,t){t!=="added"&&e.before++,t!=="removed"&&e.after++,t==="added"&&e.added++,t==="removed"&&e.removed++}function vv(e,t){if(!t)return;const n=new Map((e.files??[]).map(r=>[r.path,r]));for(const r of t){const i=n.get(r.path);i?(i.status!==r.status&&(i.status="unchanged"),r.typeOnly||delete i.typeOnly):n.set(r.path,{...r})}e.files=[...n.values()].sort((r,i)=>r.path.localeCompare(i.path))}function vl(e,t,n){const r=new Map;for(const i of Gd(e,t,n)){const o=i.external?`x:${i.to}`:`d:${i.to}`;let s=r.get(o);s||(s={target:{id:o,dir:i.to,label:i.external?i.to:mv(e.graph.modules,i.to),external:i.external},link:yl(t.id,o),fileLinks:new Map},r.set(o,s));const l=s.link;th(l,i.status),i.typeOnly!==void 0&&(l.typeOnly=(l.typeOnly??!0)&&i.typeOnly);for(const a of i.files??[]){const u=x1(a.path);let c=s.fileLinks.get(u);c||s.fileLinks.set(u,c=yl(t.id,u)),th(c,a.status),c.typeOnly=(c.typeOnly??!0)&&!!a.typeOnly}vv(l,i.files)}for(const{link:i,fileLinks:o}of r.values()){i.status=ml(i.before,i.after);for(const s of o.values())s.status=ml(s.before,s.after),s.typeOnly||delete s.typeOnly}return r}function xv(e,t,n,r=`g:${n}`){const i=yl(t.id,r),o=new Map;let s=!0;for(const l of Gd(e,t,!1)){if(l.external||!an(l.to,n))continue;const a=o.get(l.from)??{before:!1,after:!1};l.status!=="added"&&(a.before=!0),l.status!=="removed"&&(a.after=!0),o.set(l.from,a),s&&(s=l.typeOnly===!0),vv(i,l.files)}if(o.size===0)return null;for(const l of o.values())l.before&&i.before++,l.after&&i.after++,!l.before&&l.after&&i.added++,l.before&&!l.after&&i.removed++;return i.status=ml(i.before,i.after),s&&(i.typeOnly=!0),i}function w1(e,t,n,r){const i=s=>{const l=jr(e,t,s,n.pinned);return l?(l.scope=n.scope??l.scope,l.kind==="file"&&(l.label=Ct(l.path)),l):null};let o=[];if(n.kind==="dir"){const s=t.get(n.path);if(!s)return[];o=[...s.dirs.map(l=>i(`d:${l.path}`)),...s.files.map(l=>i(`f:${l.path}`))]}else(n.kind==="rest"||n.kind==="package")&&(o=n.files.map(s=>i(`f:${s.path}`)));return o.filter(s=>s!==null&&Gd(e,s,r).length>0)}function Qi(e,t){const n=new Set(t.files.map(o=>o.path)),r=new Set(t.files.map(o=>o.dir)),i=new Map;for(const o of e.graph.edges){if(o.external||n.has(o.from)||t.scope!==void 0&&an(Me(o.from),t.scope))continue;let s;if(o.files){const a=o.files.filter(u=>n.has(u.path));if(!a.length)continue;s={before:a.some(u=>u.status!=="added"),after:a.some(u=>u.status!=="removed"),typeOnly:a.every(u=>!!u.typeOnly)}}else{if(!r.has(o.to))continue;s={before:o.status!=="added",after:o.status!=="removed",typeOnly:!1}}const l=i.get(o.from);l?(l.before||(l.before=s.before),l.after||(l.after=s.after),l.typeOnly&&(l.typeOnly=s.typeOnly)):i.set(o.from,s)}return i}function wv(e,t,n){if(!n.length)return null;const r=yl(e,t);for(const i of n)i.before&&r.before++,i.after&&r.after++,!i.before&&i.after&&r.added++,i.before&&!i.after&&r.removed++;return r.status=ml(r.before,r.after),n.every(i=>i.typeOnly)&&(r.typeOnly=!0),r}function ac(e){const t=e.slice(4);return e.startsWith("i:f:")?n=>n===t:e.startsWith("i:d:")?n=>Me(n)===t:n=>an(Me(n),t)}function k1(e,t,n,r){var s,l;if(n.startsWith("i:")){const a=jr(e,t,r,!1);if(!a)return null;const u=a.kind==="container"?{...a,files:a.files.filter(d=>d.path.endsWith(".go"))}:a,c=ac(n);return wv(n,r,[...Qi(e,u)].filter(([d])=>c(d)).map(([,d])=>d))}const i=jr(e,t,n,!1);if(!i)return null;if(r.startsWith("g:"))return xv(e,i,r.slice(2),r);const o=vl(e,i,!0);return r.startsWith("t:")?((l=o.get(`d:${Me(r.slice(2))}`))==null?void 0:l.fileLinks.get(r))??null:((s=o.get(r))==null?void 0:s.link)??null}function nh(e,t){const n={dir:t,target:!1,children:new Map},r=e.includes(t);for(const s of e){if(s===t)continue;let l=n;for(const a of(t?s.slice(t.length+1):s).split("/")){const u=l.dir?`${l.dir}/${a}`:a;let c=l.children.get(a);c||l.children.set(a,c={dir:u,target:!1,children:new Map}),l=c}l.target=!0}const i=(s,l)=>{const a=[...s.children.values()];if(!s.target&&a.length===1)return i(a[0],`${l}/${Ct(a[0].dir)}`);if(a.length===0)return[{kind:"dir",dir:s.dir,label:l,self:!1}];const u=a.flatMap(c=>i(c,Ct(c.dir)));return s.target&&u.push({kind:"dir",dir:s.dir,label:`${Ct(s.dir)}(パッケージ)`,self:!0}),[{kind:"group",dir:s.dir,label:l,children:u}]},o=[...n.children.values()].flatMap(s=>i(s,Ct(s.dir)));return r&&o.push({kind:"dir",dir:t,label:t?`${Ct(t)}(パッケージ)`:"(ルート)",self:!0}),o}function b1(e,t,n,r,i,o=new Map,s=new Map){var je;const l=[],a=new Set,u=(N,G,ee)=>{if(a.has(N.id))return;a.add(N.id);const he=N.kind==="file"?[]:w1(e,t,N,i);if(Object.assign(N,{depth:G,parent:ee,canOpen:he.length>0,open:he.length>0&&(s.get(N.id)??!1)}),l.push(N),N.open)for(const fe of he)u(fe,G+1,N.id)},c=n.map(N=>jr(e,t,N,!0)).filter(N=>N!==null);for(const N of c)N.isPin=!0;const d=new Map,p=new Map;for(const N of c)N.kind==="file"&&d.set(Me(N.path),[...d.get(Me(N.path))??[],N]);const h=[...c.filter(N=>N.kind!=="file").map(N=>({key:`${N.path}/`,box:!1,s:N,dir:N.path})),...[...d.keys()].map(N=>({key:N?`${N}/`:"",box:!0,s:null,dir:N}))].sort((N,G)=>N.key.localeCompare(G.key)||Number(N.box)-Number(G.box));for(const N of h){if(!N.box){u(N.s,0,void 0);continue}const G=d.get(N.dir).filter(pe=>!a.has(pe.id)).sort((pe,$e)=>pe.path.localeCompare($e.path)),ee=G.length?jr(e,t,`c:${N.dir}`,!0):null;if(!ee)continue;const he=ee.files;ee.files=G.flatMap(pe=>pe.files);const fe={added:0,modified:0,removed:0,total:ee.files.length};for(const pe of ee.files)pe.status!=="unchanged"&&fe[pe.status]++;if(ee.status=gl(fe),a.add(ee.id),ee.depth=0,ee.canOpen=!0,ee.open=s.get(ee.id)??!0,ee.open||(ee.suffix=` ${G.length} ファイル`),l.push(ee),p.set(ee.id,{files:G,pkg:he}),ee.open)for(const pe of G)pe.label=Ct(pe.path),u(pe,1,ee.id)}if(r&&!n.includes(r)){const N=jr(e,t,r,!1);N&&u(N,0,void 0)}const y=l.filter(N=>N.depth===0),x=Oa(y.map(N=>N.path));for(const N of y){const G=x?N.path.slice(x.length+1):N.path;N.label=N.kind==="dir"||N.kind==="rest"||N.kind==="container"?`${G}/`:G}const S=l.map(N=>N.open?new Map:vl(e,N,i)),v=new Set,m=new Map;for(const N of S)for(const{target:G}of N.values())G.external?m.set(G.id,G):v.add(G.dir);const g=Oa([...v]),k=N=>g?N.slice(g.length+1):N,_=N=>{let G=0,ee=0;return S.forEach((he,fe)=>{for(const pe of he.keys())N(pe)&&(G+=fe,ee++)}),ee?G/ee:0},b=N=>_(G=>G.startsWith("d:")&&(N.kind==="group"?an(G.slice(2),N.dir):G.slice(2)===N.dir)),T=N=>[...N].sort((G,ee)=>{const he=G.kind==="dir"&&G.self?1:0,fe=ee.kind==="dir"&&ee.self?1:0;return he-fe||b(G)-b(ee)||G.label.localeCompare(ee.label)}),C=[],$=[],w=N=>{const G=S.flatMap(ee=>{var he;return[...((he=ee.get(N))==null?void 0:he.fileLinks.values())??[]]});return{fileLinks:G,files:[...new Set(G.map(ee=>ee.to))]}},A=(N,G,ee)=>{var Je;if(N.kind==="group"){const J=`g:${N.dir}`,ie=o.get(J)??!0,ye=[...v].filter(se=>se!==N.dir&&an(se,N.dir)).length,ge=v.has(N.dir)?w(`d:${N.dir}`).files.length:0,Y=v.has(N.dir)&&ge===0;if(C.push({id:J,kind:"group",dir:N.dir,label:N.label,fullLabel:k(N.dir),external:!1,depth:G,parent:ee,canOpen:!0,open:ie,folderCount:ye+(Y?1:0),directFileCount:ge}),ie)for(const se of T(N.children))A(se,G+1,J);else for(const se of l){if(se.open)continue;const ve=xv(e,se,N.dir,J);ve&&$.push(ve)}return}const he=`d:${N.dir}`,{fileLinks:fe,files:pe}=w(he),$e=J=>_(ie=>ie===he&&S.some(ye=>{var ge;return(ge=ye.get(ie))==null?void 0:ge.fileLinks.has(J)})),ht=(J,ie)=>{pe.sort((ye,ge)=>$e(ye)-$e(ge)||ye.localeCompare(ge));for(const ye of pe){const ge=ye.slice(2);C.push({id:ye,kind:"file",dir:N.dir,label:Ct(ge),fullLabel:k(ge),external:!1,depth:J,parent:ie,file:ge})}$.push(...fe)};if(N.self&&pe.length>0){ht(G,ee);return}const Ze=pe.length>0&&(o.get(he)??!1);if(C.push({id:he,kind:"dir",dir:N.dir,label:N.label,fullLabel:N.self?`${k(N.dir)}(パッケージ)`:k(N.dir),external:!1,depth:G,parent:ee,self:N.self,canOpen:pe.length>0,open:Ze,fileCount:pe.length}),!Ze){for(const J of S){const ie=(Je=J.get(he))==null?void 0:Je.link;ie&&$.push(ie)}return}ht(G+1,he)};for(const N of T(nh([...v],g)))A(N,0,void 0);const I=[...m.values()].sort((N,G)=>_(ee=>ee===N.id)-_(ee=>ee===G.id)||N.label.localeCompare(G.label));for(const N of I){C.push({id:N.id,kind:"external",dir:N.dir,label:N.label,fullLabel:N.label,external:!0,depth:0});for(const G of S){const ee=(je=G.get(N.id))==null?void 0:je.link;ee&&$.push(ee)}}const P=(N,G)=>{var ee;return G.startsWith("t:")?!!((ee=N.get(`d:${Me(G.slice(2))}`))!=null&&ee.fileLinks.has(G)):G.startsWith("g:")?[...N.keys()].some(he=>he.startsWith("d:")&&an(he.slice(2),G.slice(2))):N.has(G)},z=new Map,K=N=>{let G=z.get(N.id);return G||z.set(N.id,G=vl(e,N,i)),G};for(const N of $){const G=p.get(N.from);G&&(N.keys=G.files.filter(ee=>P(K(ee),N.to)).map(ee=>`L:${ee.id}>${N.to}`))}const U=N=>N.endsWith(".go"),q=N=>{var G;return N.kind==="file"&&!!((G=N.parent)!=null&&G.startsWith("c:"))&&U(N.path)},D=new Map,W=N=>{let G=D.get(N.id);if(G)return G;const ee=p.get(N.id),he=ee.pkg.filter(fe=>U(fe.path));return G=ee.files.some(fe=>U(fe.path))&&he.length?Qi(e,{...N,files:he}):new Map,D.set(N.id,G),G},E=N=>p.get(N.id).files.filter(G=>!U(G.path)),X=l.map(N=>{if(q(N))return new Map;if(N.kind==="container"){const G=W(N);if(N.open)return G;const ee=Qi(e,{...N,files:E(N).flatMap(he=>he.files)});for(const[he,fe]of G){const pe=ee.get(he);pe?(pe.before||(pe.before=fe.before),pe.after||(pe.after=fe.after),pe.typeOnly&&(pe.typeOnly=fe.typeOnly)):ee.set(he,{...fe})}return ee}return N.open?new Map:Qi(e,N)}),H=new Map,j=(N,G)=>{if(G.kind!=="container"||G.open)return;const ee=ac(N),he=`L:${N}>${G.id}`,fe=[...W(G).keys()].some(ee)?[he]:[];for(const pe of E(G)){let $e=H.get(pe.id);$e||H.set(pe.id,$e=Qi(e,pe)),[...$e.keys()].some(ee)&&fe.push(`L:${N}>${pe.id}`)}return fe.length===1&&fe[0]===he?void 0:fe},M=new Set(X.flatMap(N=>[...N.keys()])),L=new Set([...M].map(Me)),F=Oa([...L]),V=N=>F?N.slice(F.length+1):N,Z=N=>{let G=0,ee=0;return X.forEach((he,fe)=>{for(const pe of he.keys())N(pe)&&(G+=fe,ee++)}),ee?G/ee:0},te=N=>{const G=ac(N);l.forEach((ee,he)=>{const fe=wv(N,ee.id,[...X[he]].filter(([$e])=>G($e)).map(([,$e])=>$e));if(!fe)return;const pe=j(N,ee);pe&&(fe.keys=pe),re.push(fe)})},le=[],re=[],ce=(N,G,ee)=>{const he=[...M].filter(fe=>Me(fe)===N);he.sort((fe,pe)=>Z($e=>$e===fe)-Z($e=>$e===pe)||fe.localeCompare(pe));for(const fe of he){const pe=`i:f:${fe}`;le.push({id:pe,kind:"file",dir:N,label:Ct(fe),fullLabel:V(fe),external:!1,depth:G,parent:ee,file:fe}),te(pe)}},oe=(N,G,ee)=>{if(N.kind==="group"){const $e=`i:g:${N.dir}`,ht=o.get($e)??!0;if(le.push({id:$e,kind:"group",dir:N.dir,label:N.label,fullLabel:V(N.dir),external:!1,depth:G,parent:ee,canOpen:!0,open:ht,folderCount:[...L].filter(Ze=>Ze!==N.dir&&an(Ze,N.dir)).length,directFileCount:[...M].filter(Ze=>Me(Ze)===N.dir).length}),!ht)te($e);else for(const Ze of[...N.children].sort((Je,J)=>Number(Je.kind==="dir"&&Je.self)-Number(J.kind==="dir"&&J.self)||Z(ie=>Je.kind==="group"?an(Me(ie),Je.dir):Me(ie)===Je.dir)-Z(ie=>J.kind==="group"?an(Me(ie),J.dir):Me(ie)===J.dir)||Je.label.localeCompare(J.label)))oe(Ze,G+1,$e);return}if(N.self)return ce(N.dir,G,ee);const he=`i:d:${N.dir}`,fe=[...M].filter($e=>Me($e)===N.dir).length,pe=o.get(he)??!1;le.push({id:he,kind:"dir",dir:N.dir,label:N.label,fullLabel:V(N.dir),external:!1,depth:G,parent:ee,canOpen:!0,open:pe,fileCount:fe}),pe?ce(N.dir,G+1,he):te(he)},de=nh([...L],F),we=N=>Z(G=>N.kind==="group"?an(Me(G),N.dir):Me(G)===N.dir);for(const N of[...de].sort((G,ee)=>we(G)-we(ee)||G.label.localeCompare(ee.label)))oe(N,0,void 0);return{sources:l,targets:C,links:$,targetPrefix:g,sourcePrefix:x,dependents:le,inLinks:re,dependentPrefix:F}}const E1=e=>e===""?"root":`d:${e}`,S1=e=>`f:${e}`,ir=e=>e==="root"?"":e.slice(2);function uc(e,t,n,r){return{id:E1(e.path),kind:t,path:e.path,label:e.name,status:gl(e.stats),dir:e,full:r,children:n}}function kv(e){return{id:S1(e.path),kind:"file",path:e.path,label:Ct(e.path),status:e.status,file:e,children:[]}}function C1(e,t){const n=r=>{const i=[];for(const o of r.dirs){const s=t.has(o.path);i.push(uc(o,s?"open":"dir",s?n(o):[],!0))}if(r.path===""||t.has(r.path))for(const o of r.files)i.push(kv(o));return i};return bv(n(e))}function N1(e,t,n=new Set){const r=new Set([""]);for(const o of e.graph.files)if(o.status!=="unchanged"){r.add(o.dir);for(const s of gv(o.dir))r.add(s)}const i=o=>{const s=[];for(const l of o.dirs)r.has(l.path)&&s.push(n.has(l.path)?{...uc(l,"open",[],!1),collapsed:!0}:j1(uc(l,"open",i(l),!1)));for(const l of o.files)l.status!=="unchanged"&&s.push(kv(l));return s};return bv(i(t))}function j1(e){if(e.kind!=="open"||e.full||e.collapsed||e.children.length!==1)return e;const t=e.children[0];return t.kind!=="open"?e:{...t,label:`${e.label}/${t.label}`}}function bv(e){const t=new Map,n=new Map,r=(o,s)=>{n.set(o.path,s);for(const l of o.files)t.set(l.path,s);for(const l of o.dirs)r(l,s)},i=o=>{switch(o.kind){case"file":t.set(o.path,o.id);break;case"dir":r(o.dir,o.id);break;case"open":o.collapsed?r(o.dir,o.id):n.set(o.path,o.id);break}o.children.forEach(i)};return e.forEach(i),{roots:e,fileRep:t,pkgRep:n}}const Ev=(e,t)=>`L:${e}>${t}`,Vr=e=>`I:${e}`;function Si(e){if(e.startsWith("L:")){const t=e.slice(2),n=t.indexOf(">");return{kind:"link",from:t.slice(0,n),to:t.slice(n+1)}}return{kind:"item",id:e.slice(2)}}const Yd=k1;function Xd(e,t,n){const r=Si(n);if(r.kind==="link"){const i=Yd(e,t,r.from,r.to);return!i||i.after===0?"resolved":"open"}if(r.id.startsWith("f:")){const i=e.fileByPath.get(ir(r.id));return!i||i.status==="removed"?"resolved":"open"}return t.has(ir(r.id))?"open":"resolved"}function Oo(e,t,n){const r=n.targets.map(o=>Xd(e,t,o)),i=r.filter(o=>o==="resolved").length;return i===0?"open":i===r.length?"resolved":"partial"}function _1(e,t){const n=hv(e.graph.modules,t);if(!n)return t;const r=n.dir===""?t:t===n.dir?"":t.slice(n.dir.length+1);return r?`${n.path}/${r}`:n.path}const Mo=(e,t)=>_1(e,t)||".",xr=e=>`${e||"."}/`;function Ma(e){if(e.startsWith("i:")){const n=e.slice(4);return e.startsWith("i:f:")?n:e.startsWith("i:d:")?`${xr(n)}*`:xr(n)}const t=ir(e);return e.startsWith("f:")?t:e.startsWith("d:")?xr(t):e.startsWith("p:")||e.startsWith("c:")?`${xr(t)}*`:`${xr(t)}*(変更のないファイル)`}function T1(e,t,n){if(t.startsWith("x:")||t.startsWith("t:"))return t.slice(2);const r=t.slice(2);if(t.startsWith("g:"))return`${Mo(e,r)}/`;const i=((n==null?void 0:n.files)??[]).filter(o=>o.status!=="removed");return i.length===1?i[0].path:Mo(e,r)}function $1(e,t,n){if(t.startsWith("x:"))return`${t.slice(2)}(外部パッケージ)`;if(t.startsWith("t:"))return t.slice(2);const r=t.slice(2),i=t.startsWith("g:")?`${Mo(e,r)}/ 配下`:Mo(e,r),o=((n==null?void 0:n.files)??[]).filter(s=>s.status!=="removed").map(s=>r?s.path.slice(r.length+1):s.path);return o.length?t.startsWith("g:")?`${i}(${o.join(", ")})`:`${i}/(${o.join(", ")})`:i}function L1(e,t,n,r=3){const i=jr(e,t,`r:${n}`,!1);if(!i||i.files.length===0)return null;const o=[...vl(e,i,!1).values()].filter(({link:l})=>l.before>0).sort((l,a)=>a.link.before-l.link.before).slice(0,r);if(o.length===0)return`${xr(n)} の変更のないファイル ${i.files.length} 個は、このリポジトリ内のパッケージを import していません`;const s=o.map(({target:l,link:a})=>`${Mo(e,l.dir)} (${a.before})`).join(", ");return`${xr(n)} の変更のないファイル ${i.files.length} 個の主な依存先: ${s}`}function Sv(e,t,n,r={}){const i=r.includeResolved?n:n.filter(l=>Oo(e,t,l)!=="resolved"),o=l=>{const a=Si(l);if(a.kind==="item")return Ma(a.id);const u=a.from.startsWith("i:")?Ma(a.to):T1(e,a.to,Yd(e,t,a.from,a.to));return`${Ma(a.from)} → ${u}`},s=i.map(l=>Ad(l.targets.map(o).join(", "),l.body));return{text:Rd(s),included:i.length,skipped:n.length-i.length}}function cc(e,t){var i;const n=ir(t);if(t.startsWith("f:")){const o=n.slice(0,n.lastIndexOf("/"));return`${Ct(o)}/${Ct(n)}`}const r=((i=e.get(n))==null?void 0:i.name)??Ct(n);return t.startsWith("r:")?`${r}/ のほか`:`${r}/`}function rh(e,t,n){const r=Si(n);if(r.kind==="item")return cc(t,r.id);const i=r.to.startsWith("x:")?r.to.slice(2):mv(e.graph.modules,r.to.slice(2));return`${cc(t,r.from)} → ${i}`}function I1(e){const t=Si(e.targets[0]??"I:root");return t.kind==="link"?t.from:t.id}const A1=O.forwardRef(function(t,n){const{model:r,tree:i,comments:o,selection:s,draft:l}=t,[a,u]=O.useState("open"),d=o.map(x=>({c:x,state:Oo(r,i,x)})).filter(x=>a==="all"||x.state!=="resolved"),p=new Map;for(const x of d){const S=I1(x.c);p.set(S,[...p.get(S)??[],x])}const h=[...p.entries()].sort((x,S)=>ir(x[0]).localeCompare(ir(S[0]))),y=l.editingId!==null||l.body!==""||s.length>0;return f.jsxs("aside",{className:"comment-sidebar",children:[f.jsxs("div",{className:"dep-panel-head",children:[f.jsx("strong",{children:"コメント"}),f.jsxs("select",{value:a,onChange:x=>u(x.target.value),title:"表示するコメント",children:[f.jsx("option",{value:"open",children:"未対応のみ"}),f.jsx("option",{value:"all",children:"すべて"})]}),f.jsx("span",{className:"tspacer"}),f.jsx("button",{className:"icon-btn",onClick:t.onClose,title:"閉じる",children:"×"})]}),f.jsx("div",{className:"comment-sidebar-list",children:d.length===0?f.jsx("div",{className:"dep-panel-empty",children:o.length===0?"まだコメントはありません。パネルの矢印や箱をクリック(⌘ / Shift で複数)するか、ツリーの行の 💬 から書けます。":"未対応のコメントはありません。「すべて」に切り替えると解消済み?のものも見られます。"}):h.map(([x,S])=>f.jsxs("section",{className:"comment-group",children:[f.jsx("div",{className:"comment-group-head",title:ir(x),children:cc(i,x)}),S.map(({c:v,state:m})=>{var g;return f.jsx(Od,{body:v.body,state:m,ai:v.ai,meta:v.targets.length>1?`${v.targets.length}件`:void 0,lit:(g=t.hoveredKeys)==null?void 0:g.some(k=>v.targets.includes(k)),editing:l.editingId===v.id,onMouseEnter:()=>t.onHoverComment(v.targets),onMouseLeave:()=>t.onHoverComment(null),top:f.jsx("ul",{className:"comment-targets",onClick:()=>t.onShow(v),title:"クリックで図に表示",children:v.targets.map(k=>f.jsx("li",{className:Xd(r,i,k)==="resolved"?"resolved":"",children:rh(r,i,k)},k))}),onCopy:()=>_i(Sv(r,i,[v],{includeResolved:!0}).text),onEdit:()=>t.onEdit(v),onDelete:()=>t.onDelete(v.id)},v.id)})]},x))}),f.jsx(Md,{ref:n,className:"comment-composer",editing:l.editingId!==null,value:l.body,placeholder:"指摘を書く(例: usecase を経由する形にしてください)",onChange:x=>t.onDraft({...l,body:x}),onSave:t.onSave,onCancel:t.onCancel,canSave:s.length>0,showCancel:y,top:f.jsxs("div",{className:"composer-targets",children:[f.jsx("span",{className:"muted",children:l.editingId?"編集中のコメント先:":"コメント先:"}),s.length===0?f.jsx("span",{className:"muted",children:"矢印や箱・行を選ぶとここに入ります(⌘ / Shift で複数)"}):s.map(x=>f.jsxs("span",{className:`chip${x.startsWith("L:")?" link":""}`,title:x,children:[rh(r,i,x),f.jsx("button",{onClick:()=>t.onRemoveTarget(x),title:"外す",children:"×"})]},x))]})})]})});function R1(e,t,n){if(n(e)<=t)return e;const r=[...e];let i=r.length;for(;i>0&&n(r.slice(0,i).join("")+"…")>t;)i--;return r.slice(0,i).join("")+"…"}function O1(e,t,n){const r=e.endsWith("/"),i=(r?e.slice(0,-1):e).split("/"),o=i.pop()+(r?"/":""),s=i.length,l=[];s&&l.push(i.join("/")+"/");for(let a=s-2;a>=1;a--)l.push(`${i[0]}/…/${i.slice(s-a).join("/")}/`);s>=2&&l.push(`…/${i[s-1]}/`,`${i[0]}/…/`),s&&l.push("…/");for(const a of l)if(n(a)+n(o)<=t)return{dir:a,name:o};return{dir:s?"…/":"",name:R1(o,t-(s?n("…/"):0),n)}}function Cv(e,t){const n=t.startsWith("i:")?t.slice(2):t,r=n.slice(2);switch(n[0]){case"f":case"t":return{what:"file",path:r};case"g":return{what:"tree",path:r};case"d":return{what:e==="S"?"tree":"dir",path:r};case"x":return{what:"ext",path:r};default:return{what:"dir",path:r}}}const M1=(e,t)=>{const n=Cv(e,t);return`${e}|${n.what}|${n.path}`},P1=(e,t)=>t===""||e===t||e.startsWith(`${t}/`);function Nv(e,t,n){const[r,i,...o]=e.split("|");if(r!==t)return!1;const s=o.join("|"),l=Cv(t,n);switch(i){case"tree":return l.what!=="ext"&&P1(l.path,s);case"dir":return l.what==="dir"&&l.path===s||l.what==="file"&&Me(l.path)===s;default:return i===l.what&&s===l.path}}const ih=(e,t,n)=>[...e].some(r=>Nv(r,t,n));function dc(e,t,n){return new Set([...e].filter(r=>!Nv(r,t,n)))}const jv=(e,t)=>rc("depshape",e,t),_v=(e,t)=>ic("depshape",e,t),F1=7.3,dt=28,Pa=8,Sn=10,D1=18,z1=18,zs=120,B1=20,U1=16,H1=14,W1="12px ui-monospace, SFMono-Regular, Menlo, monospace";let Wr;function Kn(e){if(Wr===void 0&&(Wr=document.createElement("canvas").getContext("2d"),Wr&&(Wr.font=W1)),Wr)return Wr.measureText(e).width;let t=0;for(const n of e)t+=/[ -鿿-]/.test(n)?2:1;return t*F1}function oh(e,t){if(Kn(e)<=t)return e;const n=[...e];let r=0;for(;r<n.length&&Kn("…"+n.slice(r).join(""))>t;)r++;return"…"+n.slice(r).join("")}const V1=(e,t)=>O1(e,t,Kn);function sh(e,t,n,r,i){const o=1-e;return o*o*o*t+3*o*o*e*n+3*o*e*e*r+e*e*e*i}function lh(e){const t=Math.max(e.before,e.after,1);return 1.6+Math.min(3.2,Math.log2(t)*.8)+(e.status==="unchanged"?0:.5)}function ah(e,t){const n=e.map(()=>0);let r=[...e.keys()],i=t;for(;r.length;){const o=i/r.length,s=r.filter(l=>e[l]<=o);if(!s.length){for(const l of r)n[l]=Math.max(zs,o);break}for(const l of s)n[l]=e[l],i-=e[l];r=r.filter(l=>!s.includes(l))}return n}const Fa=e=>new Map(e.map(t=>[t.id,t.parent])),Da=(e,t,n)=>{for(let r=e.get(t);r;r=e.get(r))if(r===n)return!0;return!1},za=e=>e.metaKey||e.ctrlKey||e.shiftKey,uh=e=>e.detail>1,vs=e=>e.stopPropagation();function q1(e){const{model:t,tree:n,pins:r,hovered:i,targetOpen:o,sourceOpen:s}=e,[l,a]=O.useState(()=>jv("external","0")==="1"),u=O.useMemo(()=>b1(t,n,r,i,l,o,s),[t,n,r,i,l,o,s]),c=O.useMemo(()=>Fa(u.sources),[u]),d=O.useMemo(()=>Fa(u.targets),[u]),p=O.useMemo(()=>Fa(u.dependents),[u]),h=(R,B)=>Da(c,R,B),y=(R,B)=>Da(d,R,B),x=(R,B)=>Da(p,R,B),S=R=>R.depth*U1,v=R=>R.some(B=>B.canOpen)?H1:0,m=v(u.sources),g=v(u.targets),k=v(u.dependents),_=R=>[R.folderCount?`${R.folderCount} フォルダ`:"",R.directFileCount?`${R.directFileCount} ファイル`:""].filter(Boolean).join("・"),b=R=>R.open?"":R.kind==="group"?` ${_(R)}`:R.fileCount?` ${R.fileCount} ファイル`:"",[T,C]=O.useState(null),$=O.useMemo(()=>{const R=(B,Q)=>new Set(e.hidden.size?Q.filter(ne=>ih(e.hidden,B,ne.id)).map(ne=>ne.id):[]);return{S:R("S",u.sources),T:R("T",u.targets),I:R("I",u.dependents)}},[u,e.hidden]),w=O.useMemo(()=>u.links.filter(R=>!$.S.has(R.from)&&!$.T.has(R.to)),[u,$]),A=O.useMemo(()=>u.inLinks.filter(R=>!$.I.has(R.from)&&!$.S.has(R.to)),[u,$]),[I,P]=O.useState(null);O.useEffect(()=>{if(!I)return;const R=()=>P(null),B=Q=>Q.key==="Escape"&&R();return window.addEventListener("pointerdown",R),window.addEventListener("keydown",B),window.addEventListener("scroll",R,!0),window.addEventListener("blur",R),()=>{window.removeEventListener("pointerdown",R),window.removeEventListener("keydown",B),window.removeEventListener("scroll",R,!0),window.removeEventListener("blur",R)}},[I]);const z=R=>R&&e.openLabel(R)?R:void 0,K=(R,B,Q)=>ne=>{ne.preventDefault(),ne.stopPropagation(),P({x:ne.clientX,y:ne.clientY,col:R,id:B,file:Q,openAs:Q&&e.openLabel(Q)})},U=R=>{const B=R&&e.openLabel(R);return{dbl:B?`
|
|
87
|
+
ダブルクリックで${B==="差分を開く"?"このファイルの差分":"このファイル"}を開く`:"",menu:B?`「${B}」、`:""}},q=R=>w.filter(B=>B.from===R||h(B.from,R)),D=R=>new Set(u.links.filter(B=>B.from===R.id||h(B.from,R.id)).map(B=>B.to)).size,W=R=>w.filter(B=>B.to===R||y(B.to,R)),E=R=>A.filter(B=>B.from===R||x(B.from,R)),X=R=>R.keys??[Ev(R.from,R.to)],H=R=>[...new Set(R.flatMap(X))],j=O.useRef(null),[M,L]=O.useState(600);O.useEffect(()=>{const R=j.current;if(!R)return;const B=new ResizeObserver(()=>L(R.clientWidth));return B.observe(R),L(R.clientWidth),()=>B.disconnect()},[u.sources.length>0]),O.useEffect(()=>{var R,B;i&&((B=(R=j.current)==null?void 0:R.querySelector(`[data-src="${CSS.escape(i)}"]`))==null||B.scrollIntoView({block:"nearest"}))},[i,u]);const F=u.dependents.length>0,V=F?3:2,Z=Math.round(Math.min(110,Math.max(44,M*.26/V))),te=44,le=24+B1,re=R=>R.label+(R.suffix??"")+(D(R)===0&&!R.open?" 依存なし":""),ce=(R,B)=>Math.max(zs,...R.map(Q=>le+S(Q)+B+Kn(Q.label+b(Q)))),oe=Math.max(zs,...u.sources.map(R=>te+S(R)+m+Kn(re(R)))),de=ce(u.targets,g),we=F?ce(u.dependents,k):0,je=Math.max(zs*V,M-Sn*2-Z*(V-1)-4),[N,G,ee]=F?ah([we,oe,de],je):[0,...ah([oe,de],je)],he=Sn,fe=F?he+N+Z:Sn,pe=fe+G+Z,$e=pe+ee+Sn,ht=R=>R?R*(dt+Pa)-Pa:0,Je=Sn+(F?z1:0),J=Je+(u.targetPrefix||u.sourcePrefix||u.dependentPrefix?D1:0),ie=Math.max(ht(u.sources.length),ht(u.targets.length),ht(u.dependents.length)),ye=R=>{const B=J+(ie-ht(R.length))/2;return new Map(R.map((Q,ne)=>[Q.id,B+ne*(dt+Pa)]))},ge=ye(u.sources),Y=ye(u.targets),se=ye(u.dependents),ve=J+ie+Sn,be=(R,B)=>T===null?!1:B?R.from===T||x(R.from,T)||R.to===T||h(R.to,T):R.from===T||h(R.from,T)||R.to===T||y(R.to,T),Ee=[...w,...A].some(R=>X(R).some(B=>e.selection.has(B))),Ie={unchanged:0,removed:1,added:2},ut=R=>[...R].sort((B,Q)=>Ie[B.status]-Ie[Q.status]),Ye=R=>R?`${t.graph.repoRoot}/${R}`:t.graph.repoRoot,We=R=>`${R.label}${R.suffix??""}`,Oe=R=>R.kind==="group"?`${R.fullLabel}/ 配下`:R.kind==="dir"&&!R.file&&R.id.startsWith("i:")?`${R.fullLabel}/ 直下`:R.fullLabel,et=(R,B,Q)=>{if(B)return[R.status==="added"?"今回追加した import":R.status==="removed"?"今回削除した import":"既存の import"];const ne=[`import しているファイル: 変更前 ${R.before} → 変更後 ${R.after}${Q!==void 0?`(${Q} ファイル中)`:""}`];return(R.added||R.removed)&&ne.push(`うち 今回追加 ${R.added} / 今回削除 ${R.removed}`),ne},kt=(R,B,Q)=>{var xe;const ne=[`${We(B)} → ${Oe(Q)}${R.typeOnly?"(型のみの import)":""}`];if(ne.push(...et(R,B.kind==="file",B.files.filter(Se=>Se.status!=="removed").length)),(xe=R.files)!=null&&xe.length){const Se={added:"+",removed:"−",unchanged:"・"};ne.push("import しているファイル:");for(const Ce of R.files.slice(0,12))ne.push(` ${Se[Ce.status]} ${Ce.path.slice(Q.dir?Q.dir.length+1:0)}`);R.files.length>12&&ne.push(` …ほか ${R.files.length-12} 件`)}return ne.join(`
|
|
88
|
+
`)},Fn=(R,B,Q)=>[`${Oe(B)} → ${We(Q)}${R.typeOnly?"(型のみの import)":""}`,...et(R,B.kind==="file")].join(`
|
|
89
|
+
`),ot=(R,B,Q,ne,xe,Se,Ce,Te)=>{const mt=Z/2,st=X(R),ct=st.length>0&&st.every(zt=>e.selection.has(zt)),_t=st.some(zt=>{var Br;return(Br=e.litKeys)==null?void 0:Br.has(zt)}),hr=st.reduce((zt,Br)=>zt+(e.commentCounts.get(Br)??0),0),tt=be(R,Se),Dn=`M${B},${Q} C${B+mt},${Q} ${ne-mt},${xe} ${ne},${xe}`,zn=zt=>[sh(zt,B,B+mt,ne-mt,ne),sh(zt,Q,Q,xe,xe)];return f.jsxs("g",{className:`plink${tt||_t?" active":""}${ct?" selected":""}`,onClick:zt=>e.onSelectKeys(st,za(zt)),onMouseEnter:()=>e.onHoverKey(st),onMouseLeave:()=>e.onHoverKey(null),children:[(ct||_t)&&f.jsx("path",{d:Dn,className:_t?"psel lit":"psel",style:{strokeWidth:lh(R)+7}}),f.jsx("path",{d:Dn,className:`medge ${R.status}${R.typeOnly?" typeonly":""}${tt||ct||_t?" active":""}`,style:{strokeWidth:lh(R)},markerEnd:`url(#parrow-${R.status})`}),f.jsx("path",{d:Dn,className:"phit",children:f.jsx("title",{children:`${Ce}
|
|
90
|
+
クリックで選択(⌘ / Shift で追加)`})}),hr>0&&f.jsxs("g",{className:"pcomment",children:[f.jsx("circle",{cx:zn(.5)[0],cy:zn(.5)[1],r:7}),f.jsx("text",{x:zn(.5)[0],y:zn(.5)[1]+3.5,textAnchor:"middle",children:hr})]}),Te!==null&&f.jsx("text",{x:zn(Te)[0],y:zn(Te)[1]-4,textAnchor:"middle",className:"pcount",children:R.before!==R.after?`${R.before}→${R.after}`:R.after})]},`${R.from}>${R.to}`)},Ai=(R,B)=>{const{dir:Q,name:ne}=V1(R,B);return f.jsxs(f.Fragment,{children:[Q&&f.jsx("tspan",{className:"pdir",children:Q}),f.jsx("tspan",{className:"pname",children:ne})]})},Xo=(R,B)=>{var Nf;const Q=B==="dependent",ne=(Q?se:Y).get(R.id),xe=Q?he:pe,Se=Q?N:ee,Ce=Q?k:g,Te=xe+S(R),mt=Se-S(R),st=R.file?`f:${R.file}`:R.kind==="group"||Q?`d:${R.dir}`:R.self?`p:${R.dir}`:R.id,ct=r.includes(st),_t=Q?E(R.id):W(R.id),hr=_t.length>0&&_t.every(rn=>rn.status==="added"),tt=R.file?(Nf=t.fileByPath.get(R.file))==null?void 0:Nf.status:void 0,Dn=b(R),zn=Q?"import している側の":"import している ",zt=R.kind==="group"?_(R):`import している ${R.fileCount} ファイル`,Br=R.canOpen?R.open?`
|
|
91
|
+
▾ でまとめる`:`
|
|
92
|
+
▸ で開いて、${zt}を表示`:"",sw=R.external?`${R.dir}(外部パッケージ)`:R.file?`${Ye(R.file)}${tt==="added"?"(今回追加したファイル)":tt==="modified"?"(今回変更したファイル)":""}`:R.kind==="group"?`${Ye(R.dir)}/ 配下(${zn}${_(R)}をまとめた行)`:Q?`${Ye(R.dir)}/ 直下の、import しているファイル`:`${Ye(R.dir)}${R.self?`
|
|
93
|
+
このパッケージ(フォルダ直下のファイル)だけ。下のフォルダは含まない`:""}`,lw=Q?"ここから出る依存":"ここに入る依存",Qo=z(R.file),Cf=U(Qo);return f.jsxs("g",{className:`pnode target ${R.kind}${Q?" dependent":""}${(Q?$.I:$.T).has(R.id)?" hid":""}${R.self?" self":""}${R.open?" open":""}${hr?" new":""}${ct?" pinned":""}${tt&&tt!=="unchanged"?` f-${tt}`:""}`,onMouseEnter:()=>C(R.id),onMouseLeave:()=>C(null),onClick:rn=>!uh(rn)&&e.onSelectKeys(H(_t),za(rn)),onDoubleClick:Qo?()=>{var rn;return(rn=e.onOpenFile)==null?void 0:rn.call(e,Qo)}:void 0,onContextMenu:K(Q?"I":"T",R.id,Qo),children:[f.jsx("title",{children:`${sw}
|
|
94
|
+
クリックで${lw}をすべて選択${Br}${Cf.dbl}
|
|
95
|
+
右クリックで${Cf.menu}線を非表示 / 表示`}),f.jsx("rect",{x:Te,y:ne,width:mt,height:dt,rx:6}),R.canOpen&&f.jsxs("g",{className:"pchev",onClick:rn=>{rn.stopPropagation(),e.onToggleTarget(R.id,!R.open)},onDoubleClick:vs,children:[f.jsx("title",{children:R.open?"まとめる":`開いて、${zt}を表示`}),f.jsx("rect",{x:Te,y:ne,width:10+Ce,height:dt}),f.jsx("text",{x:Te+8,y:ne+dt/2+4,children:R.open?"▾":"▸"})]}),f.jsxs("text",{x:Te+10+Ce,y:ne+dt/2+4,className:"plabel",children:[R.external?oh(R.label,mt-le-Ce):Ai(R.label,mt-le-Ce-(Dn?Kn(Dn):0)),Dn&&f.jsx("tspan",{className:"pnone",children:Dn})]}),!R.external&&f.jsxs("g",{className:`pbtn${ct?" on":""}`,onClick:rn=>{rn.stopPropagation(),e.onTogglePin(st)},onDoubleClick:vs,children:[f.jsx("title",{children:ct?"ピン留め中(クリックでピン留めを外す)":"ピン留めして、この先の依存をたどる"}),f.jsx("rect",{x:Te+mt-26,y:ne+4,width:20,height:dt-8,rx:4}),f.jsx(nc,{on:ct,x:Te+mt-23,y:ne+dt/2-7})]})]},R.id)},pr=(R,B,Q)=>R&&f.jsxs("text",{x:B,y:Je+10,className:"pcaption",children:[f.jsx("title",{children:Ye(R)}),oh(`${R}/ 以下`,Q)]});return f.jsxs("div",{className:"dep-panel",children:[f.jsxs("div",{className:"dep-panel-head",children:[f.jsx("strong",{children:"依存の可視化"}),f.jsxs("span",{className:"muted",children:[r.length?`ピン留め ${r.length}`:"",i?`${r.length?" + ":""}ホバー中 1`:""]}),f.jsx("span",{className:"tspacer"}),f.jsxs("label",{className:"ds-check",title:"依存先の列に、npm パッケージや Go の標準・外部パッケージも描きます(上の差分の数には含みません)",children:[f.jsx("input",{type:"checkbox",checked:l,onChange:R=>{a(R.target.checked),_v("external",R.target.checked?"1":"0")}}),"外部パッケージも表示"]}),f.jsx("button",{className:"ds-btn",onClick:e.onClearPins,disabled:r.length===0,children:"ピンをすべて外す"})]}),u.sources.length===0?f.jsxs("div",{className:"dep-panel-empty",children:["左のツリーの行にホバーすると、ここに表示され、右に依存先(使っているもの)、左に依存元(使っている側)が出ます。",f.jsx("br",{}),"ピンのアイコンでピン留めすると表示し続けるので、複数並べて依存の形を比べられます。"]}):f.jsx("div",{className:"dep-panel-scroll",ref:j,children:f.jsxs("svg",{width:$e,height:ve,className:`panel-svg${T||e.litKeys?" hovering":""}${Ee?" selecting":""}`,children:[f.jsx("defs",{children:["unchanged","added","removed"].map(R=>f.jsx("marker",{id:`parrow-${R}`,viewBox:"0 0 8 8",refX:"7",refY:"4",markerWidth:"8",markerHeight:"8",markerUnits:"userSpaceOnUse",orient:"auto",children:f.jsx("path",{d:"M0,0 L8,4 L0,8 z",className:`arrowhead ${R}`})},R))}),F&&f.jsxs("g",{className:"ptitle",children:[f.jsx("text",{x:he,y:Sn+10,children:"依存元(使っている側)"}),f.jsx("text",{x:fe,y:Sn+10,children:"ピン留め"}),f.jsx("text",{x:pe,y:Sn+10,children:"依存先(使っているもの)"})]}),pr(u.dependentPrefix,he,N),pr(u.sourcePrefix,fe,G),pr(u.targetPrefix,pe,ee),ut(A).map(R=>{const B=u.dependents.find(ne=>ne.id===R.from),Q=u.sources.find(ne=>ne.id===R.to);return ot(R,he+N,se.get(R.from)+dt/2,fe+S(Q)-1,ge.get(R.to)+dt/2,!0,Fn(R,B,Q),B.kind!=="file"?.2:null)}),ut(w).map(R=>{const B=u.sources.find(ne=>ne.id===R.from),Q=u.targets.find(ne=>ne.id===R.to);return ot(R,fe+G,ge.get(R.from)+dt/2,pe+S(Q)-1,Y.get(R.to)+dt/2,!1,kt(R,B,Q),B.kind!=="file"?.8:null)}),u.dependents.map(R=>Xo(R,"dependent")),u.sources.map(R=>{const B=ge.get(R.id),Q=D(R),ne=fe+S(R),xe=G-S(R),Se=R.kind==="container",Ce=Q===0&&!R.open,Te=Se?`/
|
|
96
|
+
ピン留めした ${R.files.length} ファイルをまとめた箱(Go ではこの箱がパッケージで、依存元の線はここに届きます)`:R.kind==="file"?"":`
|
|
97
|
+
${R.files.length} ファイル`,mt=H([...q(R.id),...Se?A.filter(tt=>tt.to===R.id):[]]),st=Se?"ファイルごと":"中のフォルダ・ファイルごと",ct=R.canOpen?R.open?`
|
|
98
|
+
▾ でまとめる`:`
|
|
99
|
+
▸ で開いて、${st}に分ける`:"",_t=R.kind==="file"?z(R.path):void 0,hr=U(_t);return f.jsxs("g",{"data-src":R.id,className:`pnode source ${R.kind} ${R.status}${$.S.has(R.id)?" hid":""}${R.pinned?" pinned":" temp"}${R.depth?" child":""}${R.open?" open":""}`,onMouseEnter:()=>C(R.id),onMouseLeave:()=>C(null),onClick:tt=>!uh(tt)&&e.onSelectKeys(mt,za(tt)),onDoubleClick:_t?()=>{var tt;return(tt=e.onOpenFile)==null?void 0:tt.call(e,_t)}:void 0,onContextMenu:K("S",R.id,_t),children:[f.jsx("title",{children:`${Ye(R.path)}${Te}
|
|
100
|
+
依存先 ${Q}
|
|
101
|
+
クリックで${Se?"この箱に出入りする":"ここから出る"}依存をすべて選択${ct}${hr.dbl}
|
|
102
|
+
右クリックで${hr.menu}線を非表示 / 表示`}),f.jsx("rect",{x:ne,y:B,width:xe,height:dt,rx:6}),R.canOpen&&f.jsxs("g",{className:"pchev",onClick:tt=>{tt.stopPropagation(),e.onToggleSource(R.id,!R.open)},onDoubleClick:vs,children:[f.jsx("title",{children:R.open?"まとめる":`開いて、${st}に分ける`}),f.jsx("rect",{x:ne,y:B,width:10+m,height:dt}),f.jsx("text",{x:ne+8,y:B+dt/2+4,children:R.open?"▾":"▸"})]}),f.jsxs("text",{x:ne+10+m,y:B+dt/2+4,className:"plabel",children:[Ai(R.label,xe-te-m-Kn(R.suffix??"")-(Ce?Kn(" 依存なし"):0)),R.suffix&&f.jsx("tspan",{className:"psuffix",children:R.suffix}),Ce&&f.jsx("tspan",{className:"pnone",children:" 依存なし"})]}),R.isPin&&f.jsxs("g",{className:"pbtn",onClick:tt=>{tt.stopPropagation(),e.onTogglePin(R.id)},onDoubleClick:vs,children:[f.jsx("title",{children:"ピン留め中(クリックでピン留めを外す)"}),f.jsx("rect",{x:fe+G-26,y:B+4,width:20,height:dt-8,rx:4}),f.jsx(nc,{on:R.pinned,x:fe+G-23,y:B+dt/2-7})]})]},R.id)}),u.targets.map(R=>Xo(R,"target"))]})}),I&&f.jsx("div",{className:"panel-menu",style:{left:I.x,top:I.y},role:"menu",onPointerDown:R=>R.stopPropagation(),children:(()=>{const R=ih(e.hidden,I.col,I.id),B=ne=>()=>{e.onHiddenChange(ne),P(null)},Q=I.file;return f.jsxs(f.Fragment,{children:[Q&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{role:"menuitem",onClick:()=>{var ne;(ne=e.onOpenFile)==null||ne.call(e,Q),P(null)},children:[f.jsx(_d,{size:14}),I.openAs]}),f.jsx("div",{className:"panel-menu-sep",role:"separator"})]}),R?f.jsxs("button",{role:"menuitem",onClick:B(dc(e.hidden,I.col,I.id)),children:[f.jsx(_a,{on:!0}),"表示"]}):f.jsxs("button",{role:"menuitem",onClick:B(new Set([...e.hidden,M1(I.col,I.id)])),children:[f.jsx(_a,{on:!1}),"非表示"]}),f.jsxs("button",{role:"menuitem",disabled:e.hidden.size===0,onClick:B(new Set),children:[f.jsx(_a,{on:!0}),"すべて表示"]})]})})()})]})}const xl=340,ch=220,dh=360,fh=260,Tv="depshape.layout";function K1(){try{const e=JSON.parse(localStorage.getItem(Tv)??"{}");return{tree:typeof e.tree=="number"&&e.tree>0?e.tree:void 0,side:typeof e.side=="number"&&e.side>0?e.side:xl}}catch{return{side:xl}}}function xs(e){try{localStorage.setItem(Tv,JSON.stringify(e))}catch{}}function ws(e,t,n){const r=Or*(n?2:1);let i=e.side;n&&(i=Math.max(fh,Math.min(i,t-r-ch-dh)));const o=t-r-(n?i:0);return{tree:e.tree===void 0?void 0:Math.max(ch,Math.min(e.tree,o-dh)),side:Math.max(fh,i)}}function G1(e,t){const n=e.tree===void 0?"minmax(0, 1fr)":`${e.tree}px`,r=e.tree===void 0?"minmax(0, 1.15fr)":"minmax(0, 1fr)";return[n,`${Or}px`,r,...t?[`${Or}px`,`${e.side}px`]:[]].join(" ")}const Qd="depshape.reviewed:",wl=e=>`${e.repoRoot}|${e.targetLabel}|${e.baseLabel}`,ph=e=>qt(Qd+e,{}),Y1=(e,t)=>Nt(Qd+e,t),X1=e=>Wo(Qd+e),$v=e=>`depshape.comments:${e}`;function Q1(e,t){const n=new Map;for(const r of e)r.status!=="unchanged"&&n.set(r.path,[]);for(const r of t){if(r.external||r.status==="unchanged")continue;let i=n.get(r.from);i||n.set(r.from,i=[]),i.push(`${r.status==="added"?"+":"-"} ${r.to}`)}return new Map([...n].map(([r,i])=>[r,lo(i.sort())]))}function Z1(e,t){const n=new Set;for(const[r,i]of e)t[r]===i&&n.add(r);return n}function hh(e,t,n){let r=!1;for(const i of t.keys())if(!(e!==""&&!i.startsWith(e+"/"))){if(!n.has(i))return!1;r=!0}return r}const Lv=e=>`import が ${e.added} 増え、${e.removed} 減った`,J1=e=>e.metaKey||e.ctrlKey||e.shiftKey;function eE(e,t){const n=new Map;for(const r of e.graph.edges){if(r.external||r.status==="unchanged")continue;const i=t.fileRep.get(r.from);if(!i)continue;let o=n.get(i);o||n.set(i,o={added:0,removed:0}),o[r.status]++}return n}const Ba=e=>t=>{t.stopPropagation(),e()};function tE(e){const{model:t,root:n,tree:r,open:i,mode:o,pins:s}=e,l=!!e.onOpenFile,[a,u]=O.useState(null),c=O.useRef(void 0),d=O.useRef(null),p=O.useRef(null),h=O.useRef(null),[y,x]=O.useState(K1),S=Uy(h),v=O.useRef(null),m=O.useMemo(()=>[...i].sort().join("|"),[i]),g=O.useMemo(()=>[...e.collapsed].sort().join("|"),[e.collapsed]),k=O.useMemo(()=>o==="all"?C1(n,i):N1(t,n,e.collapsed),[t,n,r,o,m,g]),_=O.useMemo(()=>eE(t,k),[t,k]),b=O.useMemo(()=>{const Y=[];let se=!1;const ve=be=>{for(const Ee of be)Ee.kind==="open"&&(Ee.collapsed?se=!0:(Y.push(Ee.path),ve(Ee.children)))};return ve(k.roots),{shown:Y,folded:se}},[k]),T=o==="all"?b.shown.length>0:!b.folded,C=O.useMemo(()=>new Set(s),[s]),[$,w]=O.useState(()=>new Map),A=(Y,se)=>w(ve=>new Map(ve).set(Y,se)),[I,P]=O.useState(()=>new Map),z=(Y,se)=>P(ve=>new Map(ve).set(Y,se)),[K,U]=O.useState(()=>new Set),[q,D]=O.useState([]),[W,E]=O.useState({editingId:null,body:""}),[X,H]=O.useState(null),[j,M]=O.useState(null),L=O.useRef(null),F=O.useMemo(()=>new Set(q),[q]),{comments:V,sidebarOpen:Z,onSidebarOpen:te}=e,le=O.useMemo(()=>V.filter(Y=>Oo(t,r,Y)!=="resolved"),[V,t,r]),re=O.useMemo(()=>{const Y=new Map;for(const se of le)for(const ve of se.targets)Y.set(ve,(Y.get(ve)??0)+1);return Y},[le]),ce=Y=>{const se=ve=>Y===""||ve.startsWith(Y+"/");return le.filter(ve=>ve.targets.some(be=>{const Ee=Si(be);return se(ir(Ee.kind==="item"?Ee.id:Ee.from.startsWith("i:")?Ee.to:Ee.from))})).length},oe=()=>{L.current?L.current.focus():window.setTimeout(()=>{var Y;return(Y=L.current)==null?void 0:Y.focus()},0)},de=(Y,se)=>{if(Y.length===0)return;let ve=[];D(be=>(se?ve=Y.every(Ie=>be.includes(Ie))?be.filter(Ie=>!Y.includes(Ie)):[...be,...Y.filter(Ie=>!be.includes(Ie))]:ve=be.length===Y.length&&Y.every(Ie=>be.includes(Ie))?[]:Y,ve)),Y.length&&te(!0)},we=()=>{D([]),E({editingId:null,body:""})},je=O.useRef(e.active);je.current=e.active,O.useEffect(()=>{const Y=se=>{!je.current||document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof HTMLInputElement||(se.key==="Escape"&&D([]),se.key==="c"&&!se.metaKey&&!se.ctrlKey&&!se.altKey&&(se.preventDefault(),te(!0),oe()))};return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[]);const N=()=>{if(!W.body.trim()||q.length===0)return;const Y=W.editingId?V.map(se=>se.id===W.editingId?{...se,targets:q,body:W.body.trim()}:se):[...V,{id:`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,targets:q,body:W.body.trim(),createdAt:Date.now()}];e.onCommentsChange(Y),we()},G=Y=>{const se=Y.targets.map(Si).flatMap(be=>be.kind==="link"?[be]:[]),ve=se.map(be=>be.from.startsWith("i:")?be.to:be.from);U(be=>{let Ee=new Set(be);for(const Ie of se){const ut=Ie.from.startsWith("i:");Ee=dc(dc(Ee,ut?"I":"S",Ie.from),ut?"S":"T",Ie.to)}return Ee}),e.onPin(ve.filter(be=>!be.startsWith("c:"))),P(be=>{const Ee=new Map(be);for(const Ie of ve)Ie.startsWith("f:")&&Ee.set(`c:${Me(Ie.slice(2))}`,!0);return Ee}),w(be=>{const Ee=new Map(be);for(const Ie of se){if(Ie.from.startsWith("i:")){const We=Ie.from.slice(2),Oe=We.startsWith("f:")?Me(We.slice(2)):We.slice(2);for(let et=Me(Oe);et;et=Me(et))Ee.set(`i:g:${et}`,!0);We.startsWith("f:")?Ee.set(`i:d:${Oe}`,!0).set(`i:g:${Oe}`,!0):We.startsWith("d:")?Ee.set(`i:d:${Oe}`,!1).set(`i:g:${Oe}`,!0):Ee.set(`i:g:${Oe}`,!1);continue}if(Ie.to.startsWith("x:"))continue;const ut=Ie.to.slice(2),Ye=Ie.to.startsWith("t:")?Me(ut):ut;for(let We=Me(Ye);We;We=Me(We))Ee.set(`g:${We}`,!0);Ie.to.startsWith("t:")?Ee.set(`d:${Ye}`,!0).set(`g:${Ye}`,!0):Ie.to.startsWith("d:")?Ee.set(`d:${Ye}`,!1).set(`g:${Ye}`,!0):Ee.set(`g:${Ye}`,!1)}return Ee}),D(Y.targets)},ee=Y=>{G(Y),E({editingId:Y.id,body:Y.body}),oe()},he=Y=>{window.clearTimeout(c.current),u(Y)},fe=()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>u(null),80)},pe=Y=>{var se;return((se=d.current)==null?void 0:se.querySelector(`[data-id="${CSS.escape(Y)}"]`))??null},$e=(Y,se)=>Y.getBoundingClientRect().top-se.getBoundingClientRect().top;O.useLayoutEffect(()=>{const Y=d.current;if(!Y||!v.current)return;const se=pe(v.current.id);se&&(Y.scrollTop+=$e(se,Y)-v.current.top),v.current=null},[k]);const ht=Y=>{const se=d.current,ve=pe(Y.id);se&&ve&&(v.current={id:Y.id,top:$e(ve,se)}),o==="changes"?e.onCollapseToggle(Y.path):e.onToggle(Y.path)},Ze=Y=>Y?`${t.graph.repoRoot}/${Y}`:t.graph.repoRoot,Je=Y=>{const se=Y.dir.stats,ve=[["added","追加"],["modified","変更"],["removed","削除"]].filter(([be])=>se[be]>0).map(([be,Ee])=>`${Ee} ${se[be]}`);return ve.length?`(${ve.join("・")})`:""},J=Y=>hh(Y.path,e.reviewTargets,e.reviewed)?`
|
|
103
|
+
中の変更したファイルはすべて確認済み`:"",ie=Y=>{switch(Y.kind){case"file":return`${Ze(Y.path)}
|
|
104
|
+
${Y.file.linesAfter??Y.file.linesBefore} 行`;case"dir":return`${Ze(Y.path)}
|
|
105
|
+
${Y.dir.stats.total} ファイル${Je(Y)}(クリックで開く)${J(Y)}`;case"open":return`${Ze(Y.path)}
|
|
106
|
+
${Y.dir.stats.total} ファイル${Je(Y)}(${Y.collapsed?"クリックで開く":"クリックで閉じる"})${J(Y)}`}},ye=Y=>{var Fn;const se=Y.kind==="open"&&!Y.collapsed,ve=Y.kind==="file"?Y.label:`${Y.label}/`,be=Y.kind==="open"&&!Y.collapsed?void 0:_.get(Y.id),Ee=C.has(Y.id),Ie=re.get(Vr(Y.id))??0,ut=Y.kind==="dir"||Y.kind==="open"&&Y.collapsed,Ye=Ie||(ut?ce(Y.path):0),We=Y.kind==="file"&&e.reviewTargets.has(Y.path),Oe=Y.kind==="file"?e.openLabel(Y.path):void 0,et=Y.kind==="file"?e.reviewed.has(Y.path):Y.kind==="dir"||Y.kind==="open"?hh(Y.path,e.reviewTargets,e.reviewed):!1,kt=["trow",Y.kind,Y.status,(Fn=Y.file)!=null&&Fn.isTest?"test":"",Ee?"pinned":"",et?"reviewed":"",a===Y.id?"hovered":"",F.has(Vr(Y.id))?"picked":"",X!=null&&X.has(Vr(Y.id))?"lit":""].filter(Boolean).join(" ");return f.jsxs("div",{className:kt,"data-id":Y.id,title:ie(Y),onMouseEnter:()=>he(Y.id),onMouseLeave:fe,onClick:ot=>{J1(ot)?de([Vr(Y.id)],!0):Y.kind!=="file"&&ht(Y)},onDoubleClick:Oe?()=>{var ot;return(ot=e.onOpenFile)==null?void 0:ot.call(e,Y.path)}:void 0,children:[Y.kind==="file"?f.jsxs(f.Fragment,{children:[We?f.jsx("input",{type:"checkbox",className:"tcheckbox",checked:et,onClick:ot=>ot.stopPropagation(),onDoubleClick:ot=>ot.stopPropagation(),onChange:ot=>e.onReviewed(Y.path,ot.target.checked),"aria-label":`${Y.path} を確認済みにする`,title:"確認済み(このファイルの依存がまた変わると外れます)"}):f.jsx("span",{className:"tcheckbox-space"}),f.jsx(bi,{status:Y.status,small:!0})]}):f.jsxs(f.Fragment,{children:[f.jsx("span",{className:`tfold${se?" open":""}`,children:f.jsx(Td,{size:12})}),Y.dir&&f.jsx(bi,{status:Y.status,small:!0,title:null})]}),f.jsx("span",{className:"tlabel",children:ve}),f.jsx("span",{className:"tspacer"}),be&&f.jsx($i,{stats:be,title:Lv(be)}),Ye>0&&f.jsx(Ao,{n:Ye,title:Ie?"この行へのコメント":"この中のファイルへのコメント(未対応)"}),l&&(Oe?f.jsx("button",{className:"tbtn tdiff",onClick:Ba(()=>{var ot;return(ot=e.onOpenFile)==null?void 0:ot.call(e,Y.path)}),title:`${Oe}(ダブルクリックでも開けます)`,"aria-label":Oe,children:f.jsx(_d,{size:13})}):f.jsx("span",{className:"tbtn-space"})),f.jsx("button",{className:"tbtn",onClick:Ba(()=>{D([Vr(Y.id)]),te(!0),oe()}),title:"この行にコメントを書く(⌘ / Shift + クリックで複数選択)","aria-label":"コメントする",children:f.jsx(Ti,{size:13})}),f.jsx("button",{className:`tbtn tpin${Ee?" on":""}`,onClick:Ba(()=>e.onTogglePin(Y.id)),title:Ee?"パネルにピン留め中(クリックでピン留めを外す)":"パネルにピン留めする(表示し続ける)",children:f.jsx(nc,{on:Ee})})]})},ge=Y=>Y.map(se=>se.kind==="open"?f.jsxs("div",{className:`tgroup ${se.status}${se.full?"":" pruned"}${se.collapsed?" collapsed":""}`,children:[ye(se),!se.collapsed&&f.jsx("div",{className:"tchildren",children:ge(se.children)})]},se.id):f.jsx("div",{children:ye(se)},se.id));return f.jsxs("div",{className:"map",children:[f.jsxs("div",{className:`map-body${Z?" with-sidebar":""}`,ref:h,style:{gridTemplateColumns:G1(S?ws(y,S,Z):y,Z)},children:[f.jsxs("aside",{className:"tree-col",ref:p,children:[f.jsxs("div",{className:"tree-head",children:[f.jsx("div",{className:"ds-seg tree-mode",role:"radiogroup","aria-label":"表示範囲",children:[["changes","変更","変更したファイルだけを表示(依存先は右のパネルに出ます)"],["all","全体","リポジトリ全体のツリーを表示(最初は変更のあるフォルダだけ開いています)"]].map(([Y,se,ve])=>f.jsx("button",{role:"radio","aria-checked":o===Y,className:o===Y?"on":"",onClick:()=>e.onModeChange(Y),title:ve,children:se},Y))}),f.jsx("button",{className:"tree-fold",onClick:()=>e.onFold(T,b.shown),title:T?"すべてのフォルダを閉じる":o==="all"?"変更のあるフォルダを開く":"すべてのフォルダを開く",children:T?"−":"+"})]}),f.jsx("div",{className:"map-scroll tree",ref:d,onMouseLeave:fe,children:ge(k.roots)})]}),f.jsx(Io,{title:"ドラッグでツリーとパネルの幅を変える(ダブルクリックで元に戻す)",start:()=>{var Y;return((Y=p.current)==null?void 0:Y.getBoundingClientRect().width)??0},onDrag:(Y,se)=>x(ve=>ws({...ve,tree:Y+se},S,Z)),onEnd:()=>x(Y=>(xs(Y),Y)),onReset:()=>x(Y=>(xs({...Y,tree:void 0}),{...Y,tree:void 0}))}),f.jsx(q1,{model:t,tree:r,pins:s,hovered:a&&!C.has(a)?a:null,onTogglePin:e.onTogglePin,onClearPins:e.onClearPins,selection:F,litKeys:X,commentCounts:re,onSelectKeys:de,onHoverKey:M,targetOpen:$,sourceOpen:I,onToggleSource:z,onToggleTarget:A,hidden:K,onHiddenChange:U,openLabel:e.openLabel,onOpenFile:e.onOpenFile}),Z&&f.jsx(Io,{title:"ドラッグでコメントの幅を変える(ダブルクリックで元に戻す)",start:()=>ws(y,S,!0).side,onDrag:(Y,se)=>x(ve=>ws({...ve,side:Y-se},S,!0)),onEnd:()=>x(Y=>(xs(Y),Y)),onReset:()=>x(Y=>(xs({...Y,side:xl}),{...Y,side:xl}))}),Z&&f.jsx(A1,{ref:L,model:t,tree:r,comments:V,selection:q,draft:W,onDraft:E,onSave:N,onCancel:we,onRemoveTarget:Y=>D(se=>se.filter(ve=>ve!==Y)),onClose:()=>te(!1),onShow:G,onEdit:ee,onDelete:Y=>{e.onCommentsChange(V.filter(se=>se.id!==Y)),W.editingId===Y&&we()},hoveredKeys:j,onHoverComment:Y=>H(Y?new Set(Y):null)})]}),f.jsx("div",{className:"legend",children:f.jsxs("span",{className:"muted",children:["行にホバーすると右のパネルに依存先が出ます ・ ピンのアイコンでピン留めし、複数並べて比べられます ・ 矢印や箱のクリック(⌘ / Shift で複数)・行の吹き出しでコメント(c キーで入力欄へ)・ 「+n 依存」= 今回増えた import ・",o==="changes"?" 変更していないファイルは「全体」で表示":" フォルダをクリックで開閉"]})})]})}const nE=200,mh={added:"今回追加",modified:"今回変更",removed:"今回削除"};function rE(e,t){const n=[],r=e.graph.files.filter(i=>i.status!=="unchanged").sort((i,o)=>i.path.localeCompare(o.path));for(const i of r){const o=(e.edgesByFrom.get(i.path)??[]).filter(a=>a.status!=="unchanged").sort((a,u)=>a.to.localeCompare(u.to));if(o.length===0)continue;if(n.length===nE)break;const s=`f:${i.path}`,l=[i.status==="removed"?`- ${i.path}(${mh.removed})`:`- ${i.path}(${mh[i.status]}) target: "${Vr(s)}"`];for(const a of o){const u=a.external?`x:${a.to}`:`d:${a.to}`,c=Yd(e,t,s,u),d=`${$1(e,u,c)}${c!=null&&c.typeOnly?"(型のみ)":""}`;l.push(a.status==="added"?` - 追加した import → ${d} target: "${Ev(s,u)}"`:` - 削除した import → ${d}`)}if(i.status!=="removed"&&o.some(a=>a.status==="added"&&!a.external)){const a=L1(e,t,i.dir);a&&l.push(` 参考: ${a}`)}n.push(l.join(`
|
|
107
|
+
`))}return n.length===0?"":["依存の変化(import しているファイルごと):",...n,"","コメントの付け方:",'- target: 上の target の値をそのまま。追加した import を指すなら "L:…"、ファイルそのものを指すなら "I:f:…"',"- path / side / line / endLine / code: null","- ここでは依存の向きと形だけを見てください(層をまたぐ import、同じフォルダの既存のファイルが使っていない依存先、循環、置き場所が合わないファイルなど)。コードの中身への指摘は、ファイルの差分の方に書いてください。","- 削除した import への指摘は、その import をしていたファイルの target に付けてください。"].join(`
|
|
108
|
+
`)}function iE(e,t,n,r){const i=[];for(const o of e){const s=o.target;!s||!/^(L:[^>]+>.+|I:.+)$/.test(s)||Xd(t,n,s)!=="open"||i.push({id:Id(),targets:[s],body:o.body,createdAt:Date.now(),ai:r})}return i}function oE({data:e,active:t,onComments:n,modules:r,openIn:i,ai:o,onAi:s}){const l=e.repoRoot,[a,u]=Pp(`depshape.expanded:${l}`),[c,d]=Pp(`depshape.collapsed:${l}`),p=`depshape.pins:${l}`,[h,y]=O.useState(()=>sE(qt(p,[])));O.useEffect(()=>Nt(p,h),[p,h]);const x=$v(wl(e)),[S,v]=O.useState(()=>$d(x)),[m,g]=O.useState(jv("mapMode","changes")),[k,_]=O.useState(!1),b=O.useMemo(()=>y1(e),[e]),T=O.useMemo(()=>v1(b),[b]),C=wl(e),[$,w]=O.useState(()=>ph(C));O.useEffect(()=>w(ph(C)),[C]);const A=O.useMemo(()=>Q1(e.files,e.edges),[e]),I=O.useMemo(()=>Z1(A,$),[A,$]),P=O.useCallback((ce,oe)=>{const de=A.get(ce);de&&w(we=>{const je={...we};return oe?je[ce]=de:delete je[ce],Y1(C,je),je})},[A,C]),z=O.useCallback(ce=>{v(ce),Ld(x,ce)},[x]);O.useEffect(()=>{const ce=S.filter(oe=>Oo(b,T.byPath,oe)!=="resolved").length;n({open:ce,prompt:()=>Sv(b,T.byPath,S).text,review:()=>rE(b,T.byPath)})},[S,b,T,n]);const K=O.useRef(S);K.current=S;const U=O.useRef(0),[q,D]=O.useState(null);O.useEffect(()=>{if(!o||o.seq===U.current)return;U.current=o.seq;const ce=o.items.filter(de=>de.module==="dep"),oe=iE(ce,b,T.byPath,o.agent);oe.length&&(z([...K.current,...oe]),_(!0)),D({seq:o.seq,placed:oe.length,dropped:ce.length-oe.length})},[o,b,T,z]),O.useEffect(()=>{q&&s(q)},[q,s]);const W=O.useCallback(ce=>d(oe=>{const de=new Set(oe);return de.has(ce)?de.delete(ce):de.add(ce),de}),[d]),E=O.useCallback(ce=>y(oe=>[...oe,...ce.filter(de=>!oe.includes(de))]),[]),X=O.useCallback(ce=>y(oe=>oe.includes(ce)?oe.filter(de=>de!==ce):[...oe,ce]),[]),H=O.useCallback(ce=>u(oe=>{const de=new Set(oe);if(de.has(ce))for(const we of[...de])(we===ce||we.startsWith(ce+"/"))&&de.delete(we);else de.add(ce);return de}),[u]),j=r.includes("file"),M=O.useCallback(ce=>{const oe=b.fileByPath.get(ce);if(!(!j||!oe))return oe.status==="unchanged"?"ファイルを開く":"差分を開く"},[b,j]),L=O.useMemo(()=>j?ce=>i("file",ce):null,[j,i]),F=O.useMemo(()=>{const ce=new Set;for(const oe of b.changedDirs){ce.add(oe);for(const de of gv(oe))ce.add(de)}return ce},[b]),V=O.useRef(!1);O.useEffect(()=>{m!=="all"||V.current||(V.current=!0,a.size===0&&u(new Set(F)))},[m,a,F,u]);const Z=(ce,oe)=>{m==="all"?u(ce?new Set:new Set(F)):d(ce?new Set(oe):new Set)},te=lE(b.graph.files),le=S.filter(ce=>Oo(b,T.byPath,ce)!=="resolved").length,re=aE(b.graph.edges);return f.jsxs("div",{className:"app",children:[f.jsxs(Fd,{children:[f.jsxs(Dd,{children:[f.jsx(Ei,{children:"ファイル"}),f.jsx(Pd,{stats:te,unit:"ファイル",showZero:!0}),f.jsx(zd,{}),f.jsx(Ei,{children:"依存"}),f.jsx($i,{stats:re,title:Lv(re),showZero:!0})]}),f.jsx(Bd,{}),f.jsx(Ud,{done:I.size,total:A.size,title:"確認済みにした、変更したファイル(そのファイルの依存がまた変わると外れます)"}),f.jsxs("button",{className:`ds-btn${k?" on":""}`,onClick:()=>_(!k),title:"コメントのサイドバーを開閉",children:[f.jsx(Ti,{size:13}),"コメント ",S.length,S.length>0&&f.jsxs("span",{className:"muted",children:["(未対応 ",le,")"]})]})]}),f.jsx("main",{children:f.jsx(tE,{model:b,root:T.root,tree:T.byPath,mode:m,onModeChange:ce=>{g(ce),_v("mapMode",ce)},open:a,onToggle:H,collapsed:c,onCollapseToggle:W,onFold:Z,pins:h,onTogglePin:X,onClearPins:()=>y([]),onPin:E,reviewTargets:A,reviewed:I,onReviewed:P,comments:S,onCommentsChange:z,sidebarOpen:k,onSidebarOpen:_,active:t,openLabel:M,onOpenFile:L})})]})}const sE=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[];function lE(e){const t={added:0,modified:0,removed:0};for(const n of e)n.status!=="unchanged"&&t[n.status]++;return t}function aE(e){const t={added:0,removed:0};for(const n of e)!n.external&&n.status!=="unchanged"&&t[n.status]++;return t}const uE={id:"dep",title:"依存",heading:"依存関係",description:"コードの依存関係(depshape): フォルダ・ファイルの import の変化",icon:R0,View:oE,badge:e=>e.files.filter(t=>t.status!=="unchanged").length||void 0,clearReview:e=>{Wo($v(wl(e))),X1(wl(e))}},_r=e=>!!e.file||!!e.plain;function gh(e,t=[]){const n={name:"",path:"",children:[]},r=new Map([[n,new Map]]),i=new Set(e.map(s=>s.path)),o=(s,l)=>{const a=s.split("/");let u=n;for(let c=0;c<a.length-1;c++){const d=r.get(u);let p=d.get(a[c]);p||(p={name:a[c],path:a.slice(0,c+1).join("/"),children:[]},u.children.push(p),d.set(a[c],p),r.set(p,new Map)),u=p}u.children.push({name:a[a.length-1],path:s,children:[],...l})};for(const s of e)o(s.path,{file:s});for(const s of t)i.has(s)||o(s,{plain:!0});return Av(Iv(n))}function Iv(e){let t={...e,children:e.children.map(Iv)};for(;t.path!==""&&!_r(t)&&t.children.length===1&&!_r(t.children[0]);){const n=t.children[0];t={...n,name:`${t.name}/${n.name}`}}return t}function Av(e){const t=e.children.map(Av).sort((n,r)=>_r(n)!==_r(r)?_r(n)?1:-1:n.name.localeCompare(r.name));return{...e,children:t}}function Rv(e){return e.file?[e.file]:e.children.flatMap(Rv)}function Ov(e){return _r(e)?[]:[...e.path?[e.path]:[],...e.children.flatMap(Ov)]}function cE(e){const t=new Set,n=r=>{if(_r(r))return!!r.file&&!r.file.unchanged;let i=!1;for(const o of r.children)n(o)&&(i=!0);return i&&r.path&&t.add(r.path),i};return n(e),t}function Mv(e,t){const n=t.trim().toLowerCase();if(!n)return e;if(e.file)return e.file.path.toLowerCase().includes(n)||(e.file.oldPath??"").toLowerCase().includes(n)?e:null;if(e.plain)return e.path.toLowerCase().includes(n)?e:null;const r=e.children.map(i=>Mv(i,n)).filter(i=>i!==null);return r.length||e.path===""?{...e,children:r}:null}const Ua=(e,t)=>t===0?e+1:e,Ha=(e,t)=>t===0?e:e+t-1,Pv=e=>!e.unchanged&&e.status!=="added"&&e.status!=="removed"&&!e.binary&&!e.large&&e.chunks.length>0;function Wa(e,t){const n={path:e,status:"modified",additions:0,deletions:0,unchanged:!0};if(!t)return{...n,chunks:[],loading:!0};if(t.binary)return{...n,chunks:[],binary:!0};if(t.large||!t.lines)return{...n,chunks:[],large:!0};const r=t.lines.length;if(r===0)return{...n,chunks:[]};const i=t.lines.map((o,s)=>({type:"normal",content:o,oldLine:s+1,newLine:s+1}));return{...n,chunks:[{section:"",oldStart:1,oldLines:r,newStart:1,newLines:r,lines:i}]}}function ql(e,t){if(!Pv(e))return[];const n=e.chunks;return Array.from({length:n.length+1},(r,i)=>{const o=n[i-1],s=n[i],l=o?Ha(o.newStart,o.newLines)+1:1,a=s?Ua(s.newStart,s.newLines)-1:t,u=o?Ha(o.oldStart,o.oldLines)-Ha(o.newStart,o.newLines):Ua(s.oldStart,s.oldLines)-Ua(s.newStart,s.newLines);return{index:i,from:l,to:a,delta:u}})}const wr=20,yh=(e,t)=>e.to===void 0?void 0:Math.max(0,e.to-e.from+1-((t==null?void 0:t.top)??0)-((t==null?void 0:t.bottom)??0));function dE(e,t,n){if(e.unchanged)return e.chunks.flatMap(l=>l.lines.map(a=>({kind:"line",line:a})));const r=[],i=ql(e,t==null?void 0:t.length),o=(l,a,u)=>{if(t)for(let c=a;c<=u;c++)t[c-1]!==void 0&&r.push({kind:"line",opened:!0,line:{type:"normal",content:t[c-1],oldLine:c+l.delta,newLine:c}})};e.chunks.forEach((l,a)=>{const u=i[a];if(u){const c=t?n[a]:void 0,d=yh(u,c),p=Math.min((c==null?void 0:c.top)??0,u.to-u.from+1);o(u,u.from,u.from+p-1),(d>0||a===0)&&r.push({kind:"gap",gap:u,hidden:d,chunk:l}),o(u,u.from+p+d,u.to)}else r.push({kind:"gap",gap:{index:a,from:1,to:0,delta:0},hidden:0,chunk:l});for(const c of l.lines)r.push({kind:"line",line:c})});const s=i[e.chunks.length];if(s){const l=t?n[s.index]:void 0,a=yh(s,l);t&&o(s,s.from,s.from+((l==null?void 0:l.top)??0)-1),(a===void 0||a>0)&&r.push({kind:"gap",gap:s,hidden:a})}return r}function fE(e,t,n,r){const i=(t.to??r)-t.from+1,o=e[t.index]??{top:0,bottom:0},s=Math.max(0,i-o.top-o.bottom),l=n==="all"?{top:i-o.bottom,bottom:o.bottom}:n==="down"?{...o,top:o.top+Math.min(wr,s)}:{...o,bottom:o.bottom+Math.min(wr,s)};return{...e,[t.index]:l}}function pE(e,t,n,r,i){let o=n;for(const s of ql(e,t)){const l=s.to??t;if(i<s.from||r>l)continue;const a=o[s.index]??{top:0,bottom:0},u=Math.min(l-s.from+1,Math.max(a.top,Math.min(i,l)-s.from+1+3));u!==a.top&&(o={...o,[s.index]:{...a,top:u}})}return o}function fc(e,t){for(const n of ql(e)){const r=t-n.delta;if(r>=n.from&&(n.to===void 0||r<=n.to))return r}}function Fv(e){const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.type==="normal"){t.push({old:r,new:r}),n++;continue}const i=[];for(;n<e.length&&e[n].type==="delete";)i.push(e[n++]);const o=[];for(;n<e.length&&e[n].type==="add";)o.push(e[n++]);for(let s=0;s<Math.max(i.length,o.length);s++)t.push({old:i[s],new:o[s]})}return t}const vh=500,xh=e=>e.match(/[\p{L}\p{N}_]+|\s+|[^\p{L}\p{N}_\s]/gu)??[];function hE(e,t){if(!e.trim()||!t.trim()||e===t||e.length>vh||t.length>vh)return;const n=xh(e),r=xh(t),i=r.length+1,o=new Uint16Array((n.length+1)*i);for(let d=n.length-1;d>=0;d--)for(let p=r.length-1;p>=0;p--)o[d*i+p]=n[d]===r[p]?o[(d+1)*i+p+1]+1:Math.max(o[(d+1)*i+p],o[d*i+p+1]);const s=new Array(n.length).fill(!1),l=new Array(r.length).fill(!1);for(let d=0,p=0;d<n.length&&p<r.length;)n[d]===r[p]?(s[d++]=!0,l[p++]=!0):o[(d+1)*i+p]>=o[d*i+p+1]?d++:p++;const a=d=>d.trim().length,u=n.reduce((d,p,h)=>d+(s[h]?a(p):0),0),c=n.reduce((d,p)=>d+a(p),0)+r.reduce((d,p)=>d+a(p),0);if(!(c===0||2*u/c<.4))return{old:wh(n,s),new:wh(r,l)}}function wh(e,t){t=t.map((i,o)=>i&&!(o>0&&o<e.length-1&&!e[o].trim()&&!t[o-1]&&!t[o+1]));const n=[];let r=0;return e.forEach((i,o)=>{const s=r+i.length;if(!t[o]){const l=n[n.length-1];l&&l[1]===r?l[1]=s:n.push([r,s])}r=s}),n}function mE(e){var n,r;const t=new Map;for(const i of Fv(e)){if(((n=i.old)==null?void 0:n.type)!=="delete"||((r=i.new)==null?void 0:r.type)!=="add")continue;const o=hE(i.old.content,i.new.content);o&&(t.set(`old:${i.old.oldLine}`,o.old),t.set(`new:${i.new.newLine}`,o.new))}return t}function gE(e,t){if(!t.length)return e;const n=[];let r=0;for(const i of e){const o=r+i.text.length;let s=r;for(const[l,a]of t){if(a<=s||l>=o)continue;l>s&&n.push({...i,text:i.text.slice(s-r,l-r)});const u=Math.min(a,o);n.push({...i,text:i.text.slice(Math.max(l,s)-r,u-r),mark:!0}),s=u}s<o&&n.push({...i,text:i.text.slice(s-r)}),r=o}return n}function yE(e){return lo([e.status,e.oldPath??"",e.modeChange??"",e.binary?"binary":"",e.chunks.map(t=>t.lines.filter(n=>n.type!=="normal").map(n=>`${n.type==="add"?"+":"-"}${n.content}`))])}const Dv=e=>e.chunks.reduce((t,n)=>t+n.lines.length,0);function vE(e){const t={added:0,modified:0,removed:0};for(const n of e)t[n.status==="renamed"?"modified":n.status]++;return t}function xE(e){return e.reduce((t,n)=>({added:t.added+n.additions,removed:t.removed+n.deletions}),{added:0,removed:0})}function Zd(e,t,n){const r=new Map;n&&t==="new"&&n.forEach((i,o)=>r.set(o+1,i));for(const i of e.chunks)for(const o of i.lines)t==="old"&&o.type!=="add"&&r.set(o.oldLine,o.content),t==="new"&&o.type!=="delete"&&r.set(o.newLine,o.content);if(n&&t==="old"){const i=Math.max(0,...e.chunks.map(o=>o.oldStart+o.oldLines))+n.length;for(let o=1;o<=i;o++){if(r.has(o))continue;const s=fc(e,o);s!==void 0&&n[s-1]!==void 0&&r.set(o,n[s-1])}}return r}const wE=e=>(e.endLine??e.line)-e.line+1;function Po(e,t,n){if(!e)return{state:"resolved"};const r=Zd(e,t.side,n),i=t.code.split(`
|
|
109
|
+
`),o=wE(t),s=u=>i.every((c,d)=>r.get(u+d)===c),l=(u,c)=>({state:c,line:u,...o>1?{endLine:u+o-1}:{}});if(s(t.line))return l(t.line,"open");let a;for(const[u,c]of r)c===i[0]&&s(u)&&(a===void 0||Math.abs(u-t.line)<Math.abs(a-t.line))&&(a=u);return a!==void 0?l(a,"open"):r.has(t.line)?l(t.line,"updated"):{state:"resolved"}}function kh(e,t){const n=Zd(e,t.side);for(let r=t.line;r<=(t.endLine??t.line);r++)if(!n.has(r))return!1;return!0}const xn=(e,t)=>e.files.find(n=>n.path===t),kE=(e,t,n)=>Po(xn(e,t.path),t,n).state;function bh(e,t,n=!1){return{id:Id(),path:e.path,side:e.side,line:e.line,...e.endLine&&e.endLine!==e.line?{endLine:e.endLine}:{},code:e.code,body:t,createdAt:Date.now(),...n?{unchanged:!0}:{}}}const pc=(e,t,n,r)=>`${e}:L${n}${r&&r!==n?`-L${r}`:""}${t==="old"?" (old)":""}`,bE={old:"変更前",new:"変更後"},hc=(e,t,n,r)=>{const i=`${n&&n!==t?`${t}〜${n}`:t} 行目`;return r?`${i}(変更なし)`:`${bE[e]}の ${i}`};function zv(e,t,n={}){const r=t.map(s=>{var l;return{c:s,at:Po(xn(e,s.path),s,(l=n.contents)==null?void 0:l.get(s.path))}}),i=n.includeResolved?r:r.filter(s=>s.at.state!=="resolved"),o=i.map(({c:s,at:l})=>Ad(pc(s.path,s.side,l.line??s.line,l.line!==void 0?l.endLine:s.endLine),s.body));return{text:Rd(o),included:i.length,skipped:t.length-i.length}}const Jd="fileshape.comments:",EE=e=>$d(Jd+e),SE=(e,t)=>Ld(Jd+e,t),CE=e=>Wo(Jd+e),Bv=(e,t)=>`path=${encodeURIComponent(e)}&side=${t}`;async function Uv(e,t){const n=await fetch(`/api/module/file/content?${Bv(e,t)}`);if(!n.ok)throw new Error(await n.text());return(await n.json()).lines}async function NE(){const e=await fetch("/api/module/file/files");if(!e.ok)throw new Error(await e.text());return(await e.json()).paths}async function Eh(e){const t=await fetch(`/api/module/file/plain?path=${encodeURIComponent(e)}`);if(t.status===404)return null;if(!t.ok)throw new Error(await t.text());return await t.json()}const Hv=(e,t,n)=>`/api/module/file/raw?${Bv(e,t)}&v=${n}`,jE=/\.(png|jpe?g|gif|webp|avif|bmp|ico|svg)$/i,mc=e=>jE.test(e),_E=e=>/\.(md|markdown|mdx)$/i.test(e),Wv=O.createContext(null),ef=()=>O.useContext(Wv),qr=(e,t)=>`${e}:${t}`;function TE({comments:e,composing:t}){var r;const n=ef();return f.jsxs("div",{className:"fs-thread",children:[e.map(i=>n.editing===i.id?f.jsx(gc,{initial:i.body,label:hc(i.side,i.line,i.endLine,i.unchanged),onSave:o=>n.update(i.id,o),onCancel:()=>n.edit(null)},i.id):f.jsx(tf,{c:i},i.id)),t&&f.jsx(gc,{initial:"",label:hc(t.side,t.line,t.endLine,!!((r=xn(n.run,t.path))!=null&&r.unchanged)),onSave:i=>n.add(t,i),onCancel:()=>n.compose(null)})]})}function tf({c:e,showWhere:t}){const n=ef(),r=Po(xn(n.run,e.path),e,n.contents.get(e.path));if(t&&n.editing===e.id)return f.jsx(gc,{initial:e.body,label:pc(e.path,e.side,e.line,e.endLine),onSave:o=>n.update(e.id,o),onCancel:()=>n.edit(null)});const i=e.endLine!==void 0&&e.endLine!==e.line;return f.jsx(Od,{body:e.body,state:r.state,ai:e.ai,top:t?f.jsxs("span",{className:"fs-comment-where",children:[pc(e.path,e.side,e.line,e.endLine)," ",f.jsx("code",{children:e.code.split(`
|
|
110
|
+
`)[0].trim()||"(空行)"}),i&&f.jsx("span",{className:"ds-muted",children:" ほか"})]}):i?f.jsx("span",{className:"ds-muted",children:hc(e.side,r.line??e.line,r.line!==void 0?r.endLine:e.endLine,e.unchanged)}):void 0,stateTitle:r.state==="updated"?`コメントしたときは: ${e.code.trim()}`:r.state==="resolved"?"この行は差分からなくなりました":void 0,onCopy:()=>_i(zv(n.run,[e],{includeResolved:!0,contents:n.contents}).text),onEdit:()=>n.edit(e.id),onDelete:()=>n.remove(e.id)})}function gc({initial:e,label:t,onSave:n,onCancel:r}){const[i,o]=O.useState(e);return f.jsx(Md,{autoFocus:!0,editing:e!=="",top:f.jsxs("span",{className:"ds-muted",children:[t,e===""&&"(行番号を Shift+クリックかドラッグすると範囲になります)"]}),value:i,placeholder:"気になる点や直してほしいこと",onChange:o,onSave:()=>i.trim()&&n(i.trim()),onCancel:r})}const $E=e=>Math.min(e.a,e.b),LE=e=>Math.max(e.a,e.b),Hi=(e,t)=>e==="old"?t.type!=="add"?t.oldLine:void 0:t.type!=="delete"?t.newLine:void 0,IE=O.memo(function({file:t,mode:n,rows:r,tokens:i,byLine:o,onExpand:s}){var A;const l=ef(),a=((A=l.composing)==null?void 0:A.path)===t.path?l.composing:null,u=O.useMemo(()=>{const I=new Map;for(const P of t.chunks)for(const[z,K]of mE(P.lines))I.set(z,K);return I},[t]),c=O.useMemo(()=>{const I={old:new Map,new:new Map};for(const P of r)if(P.kind==="line")for(const z of["old","new"]){const K=Hi(z,P.line);K!==void 0&&I[z].set(K,P.line.content)}return I},[r]),d=(I,P,z)=>{const K=Math.min(P,z),U=Math.max(P,z),q=[];let D=K;for(let W=K;W<=U;W++){const E=c[I].get(W);if(E===void 0)break;q.push(E),D=W}return{path:t.path,side:I,line:K,...D>K?{endLine:D}:{},code:q.join(`
|
|
111
|
+
`)}},[p,h]=O.useState(null),y=O.useRef(null);y.current=p;const x=O.useRef(()=>{});x.current=()=>{const I=y.current;h(null),I&&l.compose(d(I.side,I.a,I.b))};const S=p!==null;O.useEffect(()=>{if(!S)return;const I=()=>x.current();return window.addEventListener("mouseup",I),()=>window.removeEventListener("mouseup",I)},[S]);const v=p??(a?{side:a.side,a:a.line,b:a.endLine??a.line}:null),m=(I,P)=>!!v&&P!==void 0&&v.side===I&&P>=$E(v)&&P<=LE(v),g=(I,P)=>{const z=P?Hi(I,P):void 0;return!P||z===void 0?f.jsx("td",{className:"fs-num empty"}):f.jsx("td",{className:`fs-num${m(I,z)?" selected":""}`,onMouseDown:K=>{if(K.button===0){if(K.preventDefault(),K.shiftKey&&a&&a.side===I){l.compose(d(I,a.line,z));return}h({side:I,a:z,b:z})}},onMouseEnter:()=>{y.current&&y.current.side===I&&h({...y.current,b:z})},title:`${I==="old"?"変更前":"変更後"}の ${z} 行目にコメントする(Shift+クリックかドラッグで範囲)`,children:z})},k=(I,P)=>{const z=Hi(I,P),K=(P.type==="normal"?(i==null?void 0:i.get(qr("new",P.newLine)))??(i==null?void 0:i.get(qr("old",P.oldLine))):i==null?void 0:i.get(qr(I,z)))??[{types:"",text:P.content}];return gE(K,u.get(qr(I,z))??[]).map((q,D)=>{const W=[q.types?`token ${q.types}`:"",q.mark?`fs-word ${I}`:""].filter(Boolean).join(" ");return W?f.jsx("span",{className:W,children:q.text},D):f.jsx(O.Fragment,{children:q.text},D)})},_=(I,P)=>{const z=[...new Set(I.flatMap(([q,D])=>o.get(qr(q,D))??[]))],K=a?a.endLine??a.line:void 0,U=a&&I.some(([q,D])=>a.side===q&&K===D)?a:void 0;return!z.length&&!U?null:f.jsx("tr",{className:"fs-thread-row",children:f.jsx("td",{colSpan:P,children:f.jsx(TE,{comments:z,composing:U})})})},b=(I,P,z)=>{const{gap:K,hidden:U,chunk:q}=I,D=K.index>0,W=!!q,E=(H,j,M)=>f.jsx("button",{className:"fs-expand",onClick:()=>s(K,H),title:M,"aria-label":M,children:j}),X=U===void 0||U>0;return f.jsx("tr",{className:"fs-hunk",children:f.jsxs("td",{colSpan:P,children:[f.jsx("span",{className:"fs-expanders",children:X&&(U!==void 0&&U<=wr&&D&&W?E("all","↕",`${U} 行をすべて表示`):[W&&E("up","↑",`上の ${Math.min(wr,U??wr)} 行を表示`),D&&E("down","↓",U===void 0?"下の行を表示":`下の ${Math.min(wr,U)} 行を表示`),U!==void 0&&U>wr&&E("all","⇕",`${U} 行をすべて表示`)].filter(Boolean).map((H,j)=>f.jsx(O.Fragment,{children:H},j)))}),q?f.jsxs(f.Fragment,{children:["@@ -",q.oldStart,",",q.oldLines," +",q.newStart,",",q.newLines," @@",q.section&&f.jsxs("span",{className:"fs-hunk-section",children:[" ",q.section]})]}):f.jsx("span",{children:U===void 0?"ファイルの残りを表示":`残り ${U} 行`})]})},`g${z}`)};if(n==="unified"){const I=!!t.unchanged,P=I?3:4;return f.jsxs("table",{className:`fs-table unified${I?" plain":""}`,children:[f.jsxs("colgroup",{children:[!I&&f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{})]}),f.jsx("tbody",{children:r.map((z,K)=>{if(z.kind==="gap")return b(z,P,K);const U=z.line,q=U.type==="delete"?"old":"new",D=I?[["new",U.newLine]]:U.type==="normal"?[["old",U.oldLine],["new",U.newLine]]:[[q,Hi(q,U)]],W=D.some(([E,X])=>m(E,X));return f.jsxs(O.Fragment,{children:[f.jsxs("tr",{className:`fs-line ${U.type}${z.opened?" opened":""}${W?" selected":""}`,children:[!I&&g("old",U.type==="add"?void 0:U),g("new",U.type==="delete"?void 0:U),f.jsx("td",{className:"fs-sign",children:U.type==="add"?"+":U.type==="delete"?"-":" "}),f.jsx("td",{className:"fs-code",children:k(q,U)})]}),_(D,P)]},K)})})]})}const T=[];let C=[],$=new Set;const w=()=>{Fv(C).forEach((I,P)=>{var U,q;const z=[];I.old&&z.push(["old",I.old.oldLine]),I.new&&z.push(["new",I.new.newLine]);const K=(D,W)=>`${D?D.type:"empty"}${D&&m(W,Hi(W,D))?" selected":""}`;T.push(f.jsxs(O.Fragment,{children:[f.jsxs("tr",{className:`fs-line${I.old&&$.has(I.old)?" opened":""}`,children:[g("old",I.old),f.jsx("td",{className:`fs-sign ${K(I.old,"old")}`,children:((U=I.old)==null?void 0:U.type)==="delete"?"-":" "}),f.jsx("td",{className:`fs-code ${K(I.old,"old")}`,children:I.old&&k("old",I.old)}),g("new",I.new),f.jsx("td",{className:`fs-sign ${K(I.new,"new")}`,children:((q=I.new)==null?void 0:q.type)==="add"?"+":" "}),f.jsx("td",{className:`fs-code ${K(I.new,"new")}`,children:I.new&&k("new",I.new)})]}),_(z,6)]},`l${T.length}-${P}`))}),C=[],$=new Set};return r.forEach((I,P)=>{I.kind==="gap"?(w(),T.push(b(I,6,P))):(C.push(I.line),I.opened&&$.add(I.line))}),w(),f.jsxs("table",{className:"fs-table split",children:[f.jsxs("colgroup",{children:[f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{className:"fs-col-half"}),f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{className:"fs-col-half"})]}),f.jsx("tbody",{children:T})]})});var Vv={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
112
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
113
|
+
*
|
|
114
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
115
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
116
|
+
* @namespace
|
|
117
|
+
* @public
|
|
118
|
+
*/var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function m(g){return g instanceof a?new a(g.type,m(g.content),g.alias):Array.isArray(g)?g.map(m):g.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(m){return Object.prototype.toString.call(m).slice(8,-1)},objId:function(m){return m.__id||Object.defineProperty(m,"__id",{value:++o}),m.__id},clone:function m(g,k){k=k||{};var _,b;switch(l.util.type(g)){case"Object":if(b=l.util.objId(g),k[b])return k[b];_={},k[b]=_;for(var T in g)g.hasOwnProperty(T)&&(_[T]=m(g[T],k));return _;case"Array":return b=l.util.objId(g),k[b]?k[b]:(_=[],k[b]=_,g.forEach(function(C,$){_[$]=m(C,k)}),_);default:return g}},getLanguage:function(m){for(;m;){var g=i.exec(m.className);if(g)return g[1].toLowerCase();m=m.parentElement}return"none"},setLanguage:function(m,g){m.className=m.className.replace(RegExp(i,"gi"),""),m.classList.add("language-"+g)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(_){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(_.stack)||[])[1];if(m){var g=document.getElementsByTagName("script");for(var k in g)if(g[k].src==m)return g[k]}return null}},isActive:function(m,g,k){for(var _="no-"+g;m;){var b=m.classList;if(b.contains(g))return!0;if(b.contains(_))return!1;m=m.parentElement}return!!k}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(m,g){var k=l.util.clone(l.languages[m]);for(var _ in g)k[_]=g[_];return k},insertBefore:function(m,g,k,_){_=_||l.languages;var b=_[m],T={};for(var C in b)if(b.hasOwnProperty(C)){if(C==g)for(var $ in k)k.hasOwnProperty($)&&(T[$]=k[$]);k.hasOwnProperty(C)||(T[C]=b[C])}var w=_[m];return _[m]=T,l.languages.DFS(l.languages,function(A,I){I===w&&A!=m&&(this[A]=T)}),T},DFS:function m(g,k,_,b){b=b||{};var T=l.util.objId;for(var C in g)if(g.hasOwnProperty(C)){k.call(g,C,g[C],_||C);var $=g[C],w=l.util.type($);w==="Object"&&!b[T($)]?(b[T($)]=!0,m($,k,null,b)):w==="Array"&&!b[T($)]&&(b[T($)]=!0,m($,k,C,b))}}},plugins:{},highlightAll:function(m,g){l.highlightAllUnder(document,m,g)},highlightAllUnder:function(m,g,k){var _={callback:k,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",_),_.elements=Array.prototype.slice.apply(_.container.querySelectorAll(_.selector)),l.hooks.run("before-all-elements-highlight",_);for(var b=0,T;T=_.elements[b++];)l.highlightElement(T,g===!0,_.callback)},highlightElement:function(m,g,k){var _=l.util.getLanguage(m),b=l.languages[_];l.util.setLanguage(m,_);var T=m.parentElement;T&&T.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(T,_);var C=m.textContent,$={element:m,language:_,grammar:b,code:C};function w(I){$.highlightedCode=I,l.hooks.run("before-insert",$),$.element.innerHTML=$.highlightedCode,l.hooks.run("after-highlight",$),l.hooks.run("complete",$),k&&k.call($.element)}if(l.hooks.run("before-sanity-check",$),T=$.element.parentElement,T&&T.nodeName.toLowerCase()==="pre"&&!T.hasAttribute("tabindex")&&T.setAttribute("tabindex","0"),!$.code){l.hooks.run("complete",$),k&&k.call($.element);return}if(l.hooks.run("before-highlight",$),!$.grammar){w(l.util.encode($.code));return}if(g&&r.Worker){var A=new Worker(l.filename);A.onmessage=function(I){w(I.data)},A.postMessage(JSON.stringify({language:$.language,code:$.code,immediateClose:!0}))}else w(l.highlight($.code,$.grammar,$.language))},highlight:function(m,g,k){var _={code:m,grammar:g,language:k};if(l.hooks.run("before-tokenize",_),!_.grammar)throw new Error('The language "'+_.language+'" has no grammar.');return _.tokens=l.tokenize(_.code,_.grammar),l.hooks.run("after-tokenize",_),a.stringify(l.util.encode(_.tokens),_.language)},tokenize:function(m,g){var k=g.rest;if(k){for(var _ in k)g[_]=k[_];delete g.rest}var b=new d;return p(b,b.head,m),c(m,b,g,b.head,0),y(b)},hooks:{all:{},add:function(m,g){var k=l.hooks.all;k[m]=k[m]||[],k[m].push(g)},run:function(m,g){var k=l.hooks.all[m];if(!(!k||!k.length))for(var _=0,b;b=k[_++];)b(g)}},Token:a};r.Prism=l;function a(m,g,k,_){this.type=m,this.content=g,this.alias=k,this.length=(_||"").length|0}a.stringify=function m(g,k){if(typeof g=="string")return g;if(Array.isArray(g)){var _="";return g.forEach(function(w){_+=m(w,k)}),_}var b={type:g.type,content:m(g.content,k),tag:"span",classes:["token",g.type],attributes:{},language:k},T=g.alias;T&&(Array.isArray(T)?Array.prototype.push.apply(b.classes,T):b.classes.push(T)),l.hooks.run("wrap",b);var C="";for(var $ in b.attributes)C+=" "+$+'="'+(b.attributes[$]||"").replace(/"/g,""")+'"';return"<"+b.tag+' class="'+b.classes.join(" ")+'"'+C+">"+b.content+"</"+b.tag+">"};function u(m,g,k,_){m.lastIndex=g;var b=m.exec(k);if(b&&_&&b[1]){var T=b[1].length;b.index+=T,b[0]=b[0].slice(T)}return b}function c(m,g,k,_,b,T){for(var C in k)if(!(!k.hasOwnProperty(C)||!k[C])){var $=k[C];$=Array.isArray($)?$:[$];for(var w=0;w<$.length;++w){if(T&&T.cause==C+","+w)return;var A=$[w],I=A.inside,P=!!A.lookbehind,z=!!A.greedy,K=A.alias;if(z&&!A.pattern.global){var U=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,U+"g")}for(var q=A.pattern||A,D=_.next,W=b;D!==g.tail&&!(T&&W>=T.reach);W+=D.value.length,D=D.next){var E=D.value;if(g.length>m.length)return;if(!(E instanceof a)){var X=1,H;if(z){if(H=u(q,W,m,P),!H||H.index>=m.length)break;var F=H.index,j=H.index+H[0].length,M=W;for(M+=D.value.length;F>=M;)D=D.next,M+=D.value.length;if(M-=D.value.length,W=M,D.value instanceof a)continue;for(var L=D;L!==g.tail&&(M<j||typeof L.value=="string");L=L.next)X++,M+=L.value.length;X--,E=m.slice(W,M),H.index-=W}else if(H=u(q,0,E,P),!H)continue;var F=H.index,V=H[0],Z=E.slice(0,F),te=E.slice(F+V.length),le=W+E.length;T&&le>T.reach&&(T.reach=le);var re=D.prev;Z&&(re=p(g,re,Z),W+=Z.length),h(g,re,X);var ce=new a(C,I?l.tokenize(V,I):V,K,V);if(D=p(g,re,ce),te&&p(g,D,te),X>1){var oe={cause:C+","+w,reach:le};c(m,g,k,D.prev,W,oe),T&&oe.reach>T.reach&&(T.reach=oe.reach)}}}}}}function d(){var m={value:null,prev:null,next:null},g={value:null,prev:m,next:null};m.next=g,this.head=m,this.tail=g,this.length=0}function p(m,g,k){var _=g.next,b={value:k,prev:g,next:_};return g.next=b,_.prev=b,m.length++,b}function h(m,g,k){for(var _=g.next,b=0;b<k&&_!==m.tail;b++)_=_.next;g.next=_,_.prev=g,m.length-=b}function y(m){for(var g=[],k=m.head.next;k!==m.tail;)g.push(k.value),k=k.next;return g}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(m){var g=JSON.parse(m.data),k=g.language,_=g.code,b=g.immediateClose;r.postMessage(l.highlight(_,l.languages[k],k)),b&&r.close()},!1)),l;var x=l.util.currentScript();x&&(l.filename=x.src,x.hasAttribute("data-manual")&&(l.manual=!0));function S(){l.manual||l.highlightAll()}if(!l.manual){var v=document.readyState;v==="loading"||v==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",S):window.requestAnimationFrame?window.requestAnimationFrame(S):window.setTimeout(S,16)}return l}(t);e.exports&&(e.exports=n),typeof jf<"u"&&(jf.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var l={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};l["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var a={};a[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:l},n.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(x,S){return"✖ Error "+x+" while fetching file: "+S},o="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",a="loading",u="loaded",c="failed",d="pre[data-src]:not(["+l+'="'+u+'"]):not(['+l+'="'+a+'"])';function p(x,S,v){var m=new XMLHttpRequest;m.open("GET",x,!0),m.onreadystatechange=function(){m.readyState==4&&(m.status<400&&m.responseText?S(m.responseText):m.status>=400?v(i(m.status,m.statusText)):v(o))},m.send(null)}function h(x){var S=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(x||"");if(S){var v=Number(S[1]),m=S[2],g=S[3];return m?g?[v,Number(g)]:[v,void 0]:[v,v]}}n.hooks.add("before-highlightall",function(x){x.selector+=", "+d}),n.hooks.add("before-sanity-check",function(x){var S=x.element;if(S.matches(d)){x.code="",S.setAttribute(l,a);var v=S.appendChild(document.createElement("CODE"));v.textContent=r;var m=S.getAttribute("data-src"),g=x.language;if(g==="none"){var k=(/\.(\w+)$/.exec(m)||[,"none"])[1];g=s[k]||k}n.util.setLanguage(v,g),n.util.setLanguage(S,g);var _=n.plugins.autoloader;_&&_.loadLanguages(g),p(m,function(b){S.setAttribute(l,u);var T=h(S.getAttribute("data-range"));if(T){var C=b.split(/\r\n?|\n/g),$=T[0],w=T[1]==null?C.length:T[1];$<0&&($+=C.length),$=Math.max(0,Math.min($-1,C.length)),w<0&&(w+=C.length),w=Math.max(0,Math.min(w,C.length)),b=C.slice($,w).join(`
|
|
119
|
+
`),S.hasAttribute("data-start")||S.setAttribute("data-start",String($+1))}v.textContent=b,n.highlightElement(v)},function(b){S.setAttribute(l,c),v.textContent=b})}}),n.plugins.fileHighlight={highlight:function(S){for(var v=(S||document).querySelectorAll(d),m=0,g;g=v[m++];)n.highlightElement(g)}};var y=!1;n.fileHighlight=function(){y||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),y=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Vv);var AE=Vv.exports;const kl=_m(AE);(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism);(function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(a,u){return a=a.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(a,u)}i=o(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(a){return a?typeof a=="string"?a:typeof a.content=="string"?a.content:a.content.map(s).join(""):""},l=function(a){for(var u=[],c=0;c<a.length;c++){var d=a[c],p=!1;if(typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?u.length>0&&u[u.length-1].tagName===s(d.content[0].content[1])&&u.pop():d.content[d.content.length-1].content==="/>"||u.push({tagName:s(d.content[0].content[1]),openedBraces:0}):u.length>0&&d.type==="punctuation"&&d.content==="{"?u[u.length-1].openedBraces++:u.length>0&&u[u.length-1].openedBraces>0&&d.type==="punctuation"&&d.content==="}"?u[u.length-1].openedBraces--:p=!0),(p||typeof d=="string")&&u.length>0&&u[u.length-1].openedBraces===0){var h=s(d);c<a.length-1&&(typeof a[c+1]=="string"||a[c+1].type==="plain-text")&&(h+=s(a[c+1]),a.splice(c+1,1)),c>0&&(typeof a[c-1]=="string"||a[c-1].type==="plain-text")&&(h=s(a[c-1])+h,a.splice(c-1,1),c--),a[c]=new e.Token("plain-text",h,null,h)}d.content&&typeof d.content!="string"&&l(d.content)}};e.hooks.add("after-tokenize",function(a){a.language!=="jsx"&&a.language!=="tsx"||l(a.tokens)})})(Prism);(function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0})(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(Prism);(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(Prism);(function(e){function t(W,E){return W.replace(/<<(\d+)>>/g,function(X,H){return"(?:"+E[+H]+")"})}function n(W,E,X){return RegExp(t(W,E),"")}function r(W,E){for(var X=0;X<E;X++)W=W.replace(/<<self>>/g,function(){return"(?:"+W+")"});return W.replace(/<<self>>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function o(W){return"\\b(?:"+W.trim().replace(/ /g,"|")+")\\b"}var s=o(i.typeDeclaration),l=RegExp(o(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),a=o(i.typeDeclaration+" "+i.contextual+" "+i.other),u=o(i.type+" "+i.typeDeclaration+" "+i.other),c=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),d=r(/\((?:[^()]|<<self>>)*\)/.source,2),p=/@?\b[A-Za-z_]\w*\b/.source,h=t(/<<0>>(?:\s*<<1>>)?/.source,[p,c]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[a,h]),x=/\[\s*(?:,\s*)*\]/.source,S=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,x]),v=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[c,d,x]),m=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[v]),g=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[m,y,x]),k={keyword:l,punctuation:/[<>()?,.:[\]]/},_=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,b=/"(?:\\.|[^\\"\r\n])*"/.source,T=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[b]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:k},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[p,g]),lookbehind:!0,inside:k},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[p]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[s,h]),lookbehind:!0,inside:k},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:k},{pattern:n(/(\bwhere\s+)<<0>>/.source,[p]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[S]),lookbehind:!0,inside:k},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[g,u,p]),inside:k}],keyword:l,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[p]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[p]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[d]),lookbehind:!0,alias:"class-name",inside:k},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[g,y]),inside:k,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[g]),lookbehind:!0,inside:k,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[p,c]),inside:{function:n(/^<<0>>/.source,[p]),generic:{pattern:RegExp(c),alias:"class-name",inside:k}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[s,h,p,g,l.source,d,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[h,d]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:l,"class-name":{pattern:RegExp(g),greedy:!0,inside:k},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var C=b+"|"+_,$=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[C]),w=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[$]),2),A=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,I=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,w]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[A,I]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[A]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[w]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var P=/:[^}\r\n]+/.source,z=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[$]),2),K=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[z,P]),U=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[C]),2),q=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[U,P]);function D(W,E){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[W]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[E,P]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[K]),lookbehind:!0,greedy:!0,inside:D(K,z)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[q]),lookbehind:!0,greedy:!0,inside:D(q,U)}],char:{pattern:RegExp(_),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp})(Prism);(function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby})(Prism);(function(e){function t(n,r){return"___"+n.toUpperCase()+r+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,o){if(n.language===r){var s=n.tokenStack=[];n.code=n.code.replace(i,function(l){if(typeof o=="function"&&!o(l))return l;for(var a=s.length,u;n.code.indexOf(u=t(r,a))!==-1;)++a;return s[a]=l,u}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language!==r||!n.tokenStack)return;n.grammar=e.languages[r];var i=0,o=Object.keys(n.tokenStack);function s(l){for(var a=0;a<l.length&&!(i>=o.length);a++){var u=l[a];if(typeof u=="string"||u.content&&typeof u.content=="string"){var c=o[i],d=n.tokenStack[c],p=typeof u=="string"?u:u.content,h=t(r,c),y=p.indexOf(h);if(y>-1){++i;var x=p.substring(0,y),S=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),v=p.substring(y+h.length),m=[];x&&m.push.apply(m,s([x])),m.push(S),v&&m.push.apply(m,s([v])),typeof u=="string"?l.splice.apply(l,[a,1].concat(m)):u.content=m}}else u.content&&s(u.content)}return l}s(n.tokens)}}})})(Prism);(function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:o};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},l=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];e.languages.insertBefore("php","variable",{string:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:l,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(a){if(/<\?/.test(a.code)){var u=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;e.languages["markup-templating"].buildPlaceholders(a,"php",u)}}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"php")})})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(l,a){a=(a||"").replace(/m/g,"")+"m";var u=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return l});return RegExp(u,a)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(o),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(Prism);(function(e){var t=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function n(r){return r.replace(/__/g,function(){return t})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(Prism);(function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,s=0;s<i.length;s++)o[i[s]]=e.languages.bash[i[s]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(e.languages.markdown[c].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(p){if(!(!p||typeof p=="string"))for(var h=0,y=p.length;h<y;h++){var x=p[h];if(x.type!=="code"){d(x.content);continue}var S=x.content[1],v=x.content[3];if(S&&v&&S.type==="code-language"&&v.type==="code-block"&&typeof S.content=="string"){var m=S.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase();var g="language-"+m;v.alias?typeof v.alias=="string"?v.alias=[v.alias,g]:v.alias.push(g):v.alias=[g]}}}d(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",p=0,h=c.classes.length;p<h;p++){var y=c.classes[p],x=/language-(.+)/.exec(y);if(x){d=x[1];break}}var S=e.languages[d];if(S)c.content=e.highlight(u(c.content),S,d);else if(d&&d!=="none"&&e.plugins.autoloader){var v="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=v,e.plugins.autoloader.loadLanguages(d,function(){var m=document.getElementById(v);m&&(m.innerHTML=e.highlight(m.textContent,e.languages[d],d))})}}});var s=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},a=String.fromCodePoint||String.fromCharCode;function u(c){var d=c.replace(s,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(p,h){if(h=h.toLowerCase(),h[0]==="#"){var y;return h[1]==="x"?y=parseInt(h.slice(2),16):y=Number(h.slice(1)),a(y)}else{var x=l[h];return x||p}}),d}e.languages.md=e.languages.markdown})(Prism);Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}});Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]});Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/});Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}});Prism.languages.scss.atrule.inside.rest=Prism.languages.scss;(function(e){var t=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,n=/(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g,function(){return t}),r=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g,function(){return r}),o={pattern:RegExp(r),greedy:!0},s={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function l(a,u){return a=a.replace(/<OPT>/g,function(){return i}).replace(/<SP>/g,function(){return n}),RegExp(a,u)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:l(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[o,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:l(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:l(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:l(/(^ONBUILD<SP>)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:s,string:o,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:s},e.languages.dockerfile=e.languages.docker})(Prism);Prism.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/};Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/};Prism.hooks.add("after-tokenize",function(t){if(t.language!=="graphql")return;var n=t.tokens.filter(function(x){return typeof x!="string"&&x.type!=="comment"&&x.type!=="scalar"}),r=0;function i(x){return n[r+x]}function o(x,S){S=S||0;for(var v=0;v<x.length;v++){var m=i(v+S);if(!m||m.type!==x[v])return!1}return!0}function s(x,S){for(var v=1,m=r;m<n.length;m++){var g=n[m],k=g.content;if(g.type==="punctuation"&&typeof k=="string"){if(x.test(k))v++;else if(S.test(k)&&(v--,v===0))return m}}return-1}function l(x,S){var v=x.alias;v?Array.isArray(v)||(x.alias=v=[v]):x.alias=v=[],v.push(S)}for(;r<n.length;){var a=n[r++];if(a.type==="keyword"&&a.content==="mutation"){var u=[];if(o(["definition-mutation","punctuation"])&&i(1).content==="("){r+=2;var c=s(/^\($/,/^\)$/);if(c===-1)continue;for(;r<c;r++){var d=i(0);d.type==="variable"&&(l(d,"variable-input"),u.push(d.content))}r=c+1}if(o(["punctuation","property-query"])&&i(0).content==="{"&&(r++,l(i(0),"property-mutation"),u.length>0)){var p=s(/^\{$/,/^\}$/);if(p===-1)continue;for(var h=r;h<p;h++){var y=n[h];y.type==="variable"&&u.indexOf(y.content)>=0&&l(y,"variable-input")}}}}});(function(e){var t=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:t}},builtin:t,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})})(Prism);Prism.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/};Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/};(function(e){var t=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:t,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);const RE={ts:"typescript",mts:"typescript",cts:"typescript",tsx:"tsx",js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",go:"go",py:"python",rs:"rust",java:"java",kt:"kotlin",kts:"kotlin",swift:"swift",c:"c",h:"c",cc:"cpp",cpp:"cpp",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",json:"json",jsonc:"json",yml:"yaml",yaml:"yaml",toml:"toml",sh:"bash",bash:"bash",zsh:"bash",sql:"sql",md:"markdown",mdx:"markdown",css:"css",scss:"scss",html:"markup",htm:"markup",xml:"markup",svg:"markup",vue:"markup",hcl:"hcl",tf:"hcl",graphql:"graphql",gql:"graphql",proto:"protobuf",ini:"ini",lua:"lua",dart:"dart"},Sh={Dockerfile:"docker",Makefile:"makefile",GNUmakefile:"makefile",".env":"bash"};function OE(e){const t=e.split("/").pop()??"";if(Sh[t])return Sh[t];if(t.startsWith("Dockerfile"))return"docker";const n=t.includes(".")?t.split(".").pop().toLowerCase():"",r=RE[n];return r&&kl.languages[r]?r:void 0}function nf(e,t){const n=kl.languages[t];if(!n)return e.map(s=>[{types:"",text:s}]);const r=[[]],i=(s,l)=>{l.split(`
|
|
120
|
+
`).forEach((u,c)=>{c>0&&r.push([]),u&&r[r.length-1].push({types:s,text:u})})},o=(s,l)=>{for(const a of s)if(typeof a=="string")i(l,a);else{const u=[a.type,...a.alias?Array.isArray(a.alias)?a.alias:[a.alias]:[]].join(" "),c=l?`${l} ${u}`:u;typeof a.content=="string"?i(c,a.content):o(Array.isArray(a.content)?a.content:[a.content],c)}};for(o(kl.tokenize(e.join(`
|
|
121
|
+
`),n),"");r.length<e.length;)r.push([]);return r}const Ch=5e3,Nh=1e3;function ME(e,t){const n=OE(e.path);if(!n)return;let r=0;for(const o of e.chunks)for(const s of o.lines)if(++r>Ch||s.content.length>Nh)return;const i=new Map;for(const o of e.chunks)jh(o,"old",n,i),jh(o,"new",n,i);return t&&t.length<=Ch&&t.every(o=>o.length<=Nh)&&nf(t,n).forEach((o,s)=>i.set(`new:${s+1}`,o)),i}function jh(e,t,n,r){const i=e.lines.filter(s=>s.type==="normal"||s.type===(t==="old"?"delete":"add"));if(!i.length)return;const o=nf(i.map(s=>s.content),n);i.forEach((s,l)=>r.set(`${t}:${t==="old"?s.oldLine:s.newLine}`,o[l]))}function PE(e,t){const n=t==null?void 0:t.toLowerCase();if(!(!n||!kl.languages[n]||e.length>1e5))return nf(e.split(`
|
|
122
|
+
`),n)}function FE({file:e,version:t}){const n=e.status==="added"?["new"]:e.status==="removed"?["old"]:["old","new"];return f.jsx("div",{className:`fs-images n${n.length}`,children:n.map(r=>f.jsx(DE,{side:r,path:r==="old"?e.oldPath??e.path:e.path,version:t},r))})}function DE({side:e,path:t,version:n}){const[r,i]=O.useState(null),[o,s]=O.useState(!1);return f.jsxs("figure",{className:`fs-image ${e}`,children:[f.jsxs("figcaption",{children:[f.jsx("span",{className:`fs-image-side ${e}`,children:e==="old"?"変更前":"変更後"}),r&&f.jsx("span",{className:"ds-muted",children:r})]}),f.jsx("div",{className:"fs-image-frame",children:o?f.jsx("span",{className:"ds-muted",children:"表示できませんでした"}):f.jsx("img",{src:Hv(t,e,n),alt:`${t}(${e==="old"?"変更前":"変更後"})`,onLoad:l=>i(`${l.currentTarget.naturalWidth} × ${l.currentTarget.naturalHeight}`),onError:()=>s(!0)})})]})}function zE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const BE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HE={};function _h(e,t){return(HE.jsx?UE:BE).test(e)}const WE=/[ \t\n\f\r]/g;function VE(e){return typeof e=="object"?e.type==="text"?Th(e.value):!1:Th(e)}function Th(e){return e.replace(WE,"")===""}class qo{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}qo.prototype.normal={};qo.prototype.property={};qo.prototype.space=void 0;function qv(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new qo(n,r,t)}function yc(e){return e.toLowerCase()}class Dt{constructor(t,n){this.attribute=n,this.property=t}}Dt.prototype.attribute="";Dt.prototype.booleanish=!1;Dt.prototype.boolean=!1;Dt.prototype.commaOrSpaceSeparated=!1;Dt.prototype.commaSeparated=!1;Dt.prototype.defined=!1;Dt.prototype.mustUseProperty=!1;Dt.prototype.number=!1;Dt.prototype.overloadedBoolean=!1;Dt.prototype.property="";Dt.prototype.spaceSeparated=!1;Dt.prototype.space=void 0;let qE=0;const Ne=zr(),nt=zr(),vc=zr(),ue=zr(),De=zr(),Tr=zr(),Bt=zr();function zr(){return 2**++qE}const xc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:nt,commaOrSpaceSeparated:Bt,commaSeparated:Tr,number:ue,overloadedBoolean:vc,spaceSeparated:De},Symbol.toStringTag,{value:"Module"})),Va=Object.keys(xc);class rf extends Dt{constructor(t,n,r,i){let o=-1;if(super(t,n),$h(this,"space",i),typeof r=="number")for(;++o<Va.length;){const s=Va[o];$h(this,Va[o],(r&xc[s])===xc[s])}}}rf.prototype.defined=!0;function $h(e,t,n){n&&(e[t]=n)}function Li(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new rf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[yc(r)]=r,n[yc(o.attribute)]=r}return new qo(t,n,e.space)}const Kv=Li({properties:{ariaActiveDescendant:null,ariaAtomic:nt,ariaAutoComplete:null,ariaBusy:nt,ariaChecked:nt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:De,ariaCurrent:null,ariaDescribedBy:De,ariaDetails:null,ariaDisabled:nt,ariaDropEffect:De,ariaErrorMessage:null,ariaExpanded:nt,ariaFlowTo:De,ariaGrabbed:nt,ariaHasPopup:null,ariaHidden:nt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:De,ariaLevel:ue,ariaLive:null,ariaModal:nt,ariaMultiLine:nt,ariaMultiSelectable:nt,ariaOrientation:null,ariaOwns:De,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:nt,ariaReadOnly:nt,ariaRelevant:null,ariaRequired:nt,ariaRoleDescription:De,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:nt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Gv(e,t){return t in e?e[t]:t}function Yv(e,t){return Gv(e,t.toLowerCase())}const KE=Li({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tr,acceptCharset:De,accessKey:De,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alpha:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:De,autoFocus:Ne,autoPlay:Ne,blocking:De,capture:null,charSet:null,checked:Ne,cite:null,className:De,closedBy:null,colorSpace:null,cols:ue,colSpan:ue,command:null,commandFor:null,content:null,contentEditable:nt,controls:Ne,controlsList:De,coords:ue|Tr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:vc,draggable:nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:De,height:ue,hidden:vc,high:ue,href:null,hrefLang:null,htmlFor:De,httpEquiv:De,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:De,itemRef:De,itemScope:Ne,itemType:De,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,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:Ne,optimum:ue,pattern:null,ping:De,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:De,required:Ne,reversed:Ne,rows:ue,rowSpan:ue,sandbox:De,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootCustomElementRegistry:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shadowRootSerializable:Ne,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:nt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:nt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:De,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:nt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ne,disablePictureInPicture:Ne,disableRemotePlayback:Ne,exportParts:Tr,part:De,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:Yv}),GE=Li({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:Bt,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:De,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:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,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:Tr,g2:Tr,glyphName:Tr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:Bt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,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:ue,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:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:De,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Bt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Bt,rev:Bt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Bt,requiredFeatures:Bt,requiredFonts:Bt,requiredFormats:Bt,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:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:Bt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Bt,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Bt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Gv}),Xv=Li({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()}}),Qv=Li({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Yv}),Zv=Li({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),YE={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"},XE=/[A-Z]/g,Lh=/-[a-z]/g,QE=/^data[-\w.:]+$/i;function ZE(e,t){const n=yc(t);let r=t,i=Dt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&QE.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Lh,eS);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Lh.test(o)){let s=o.replace(XE,JE);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=rf}return new i(r,t)}function JE(e){return"-"+e.toLowerCase()}function eS(e){return e.charAt(1).toUpperCase()}const tS=qv([Kv,KE,Xv,Qv,Zv],"html"),of=qv([Kv,GE,Xv,Qv,Zv],"svg");function nS(e){return e.join(" ").trim()}var Ih=/\/\*(?:[^*]|\*(?!\/))*\*\//g,rS=/\n/g,iS=/^\s*/,oS=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,sS=/^:\s*/,lS=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,aS=/^[;\s]*/,uS=`
|
|
123
|
+
`,Ah="/",Rh="*",Wi="",cS="comment",dS="declaration";function fS(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var x=y.match(rS);x&&(n+=x.length);var S=y.lastIndexOf(uS);r=~S?y.length-S:r+y.length}function o(){var y={line:n,column:r};return function(x){return x.position=new s(y),u(),x}}function s(y){this.start=y,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(y){var x=new Error(t.source+":"+n+":"+r+": "+y);if(x.reason=y,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function a(y){var x=y.exec(e);if(x){var S=x[0];return i(S),e=e.slice(S.length),x}}function u(){a(iS)}function c(y){for(var x;x=d();)y.push(x);return y}function d(){var y=o();if(!(Ah!=e.charAt(0)||Rh!=e.charAt(1))){for(var x=2;Wi!=e.charAt(x)&&(Rh!=e.charAt(x)||Ah!=e.charAt(x+1));)++x;if(x+=2,Wi===e.charAt(x-1))return l("End of comment missing");var S=e.slice(2,x-2);return r+=2,i(S),e=e.slice(x),r+=2,y({type:cS,comment:S})}}function p(){var y=o(),x=a(oS);if(x){if(d(),!a(sS))return l("property missing ':'");var S=a(lS),v=y({type:dS,property:x[0].replace(Ih,Wi).trim(),value:S?S[0].replace(Ih,Wi).trim():Wi});return a(aS),v}}function h(){var y=[];c(y);for(var x;x=p();)y.push(x),c(y);return y}return u(),h()}function pS(e,t){let n=null;if(!e||typeof e!="string")return n;const r=fS(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:s,value:l}=o;i?t(s,l,o):l&&(n=n??{},n[s]=l)}),n}const Jv=ex("end"),sf=ex("start");function ex(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function hS(e){const t=sf(e),n=Jv(e);if(t&&n)return{start:t,end:n}}function co(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Oh(e.position):"start"in e||"end"in e?Oh(e):"line"in e||"column"in e?wc(e):""}function wc(e){return Mh(e&&e.line)+":"+Mh(e&&e.column)}function Oh(e){return wc(e&&e.start)+"-"+wc(e&&e.end)}function Mh(e){return e&&typeof e=="number"?e:1}class Kl extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=co(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Object.defineProperties(Kl.prototype,{file:{configurable:!0,enumerable:!0,value:"",writable:!0},name:{configurable:!0,enumerable:!0,value:"",writable:!0},reason:{configurable:!0,enumerable:!0,value:"",writable:!0},message:{configurable:!0,enumerable:!0,value:"",writable:!0},stack:{configurable:!0,enumerable:!0,value:"",writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});const lf={}.hasOwnProperty,mS=new Map,gS=/[A-Z]/g,yS=/-([a-z])/g,vS=new Set(["table","tbody","thead","tfoot","tr"]),xS=new Set(["td","th"]),tx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wS(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=_S(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=jS(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?of:tS,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=nx(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function nx(e,t,n){if(t.type==="element")return kS(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return bS(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return SS(e,t,n);if(t.type==="mdxjsEsm")return ES(e,t);if(t.type==="root")return CS(e,t,n);if(t.type==="text")return NS(e,t)}function kS(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=of,e.schema=i),e.ancestors.push(t);const o=ix(e,t.tagName,!1),s=TS(e,t);let l=uf(e,t);return vS.has(t.tagName)&&(l=l.filter(function(a){return typeof a=="string"?!VE(a):!0})),rx(e,s,o,t),af(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function bS(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Fo(e,t.position)}function ES(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Fo(e,t.position)}function SS(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=of,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:ix(e,t.name,!0),s=$S(e,t),l=uf(e,t);return rx(e,s,o,t),af(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function CS(e,t,n){const r={};return af(r,uf(e,t)),e.create(t,e.Fragment,r,n)}function NS(e,t){return t.value}function rx(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function af(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function jS(e,t,n){return r;function r(i,o,s,l){const u=Array.isArray(s.children)?n:t;return l?u(o,s,l):u(o,s)}}function _S(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),a=sf(r);return t(i,o,s,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function TS(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&lf.call(t.properties,i)){const o=LS(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&xS.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function $S(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Fo(e,t.position);else{const{name:i}=r;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else Fo(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function uf(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:mS;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const a=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(a){const u=i.get(a)||0;s=a+"-"+u,i.set(a,u+1)}}const l=nx(e,o,s);l!==void 0&&n.push(l)}return n}function LS(e,t,n){if(n==null||typeof n=="number"&&Number.isNaN(n))return;const r=ZE(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?zE(n):nS(n)),r.property==="style"?["style",typeof n=="object"?e.stylePropertyNameCase==="dom"?n:AS(n):IS(e,String(n))]:[e.elementAttributeNameCase==="react"&&r.space?YE[r.property]||r.property:r.attribute,n]}function IS(e,t){const n={};try{pS(t,function(r,i){if(r&&i){let o=r;o.slice(0,2)!=="--"&&(o=o.toLowerCase(),e.stylePropertyNameCase==="dom"&&(o.slice(0,4)==="-ms-"&&(o=o.slice(1)),o=o.replace(yS,MS))),n[o]=i}})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,o=new Kl("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=tx+"#cannot-parse-style-attribute",o}return n}function ix(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=_h(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=_h(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return lf.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Fo(e)}function Fo(e,t){const n=new Kl("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=tx+"#cannot-handle-mdx-estrees-without-createevaluater",n}function AS(e){const t={};let n;for(n in e)lf.call(e,n)&&(t[RS(n)]=e[n]);return t}function RS(e){if(e.slice(0,2)==="--")return e;let t=e.replace(gS,OS);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function OS(e){return"-"+e.toLowerCase()}function MS(e,t){return t.toUpperCase()}const qa={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"]},PS={};function Gl(e,t){const n=PS,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ox(e,r,i)}function ox(e,t,n){if(FS(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ph(e.children,t,n)}return Array.isArray(e)?Ph(e,t,n):""}function Ph(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ox(e[i],t,n);return r.join("")}function FS(e){return!!(e&&typeof e=="object")}const Fh=document.createElement("i");function cf(e){const t="&"+e+";";Fh.innerHTML=t;const n=Fh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function fn(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Zt(e,t){return e.length>0?(fn(e,e.length,0,t),e):t}const Dh={}.hasOwnProperty;function sx(e){const t={};let n=-1;for(;++n<e.length;)DS(t,e[n]);return t}function DS(e,t){let n;for(n in t){const i=(Dh.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){Dh.call(i,s)||(i[s]=[]);const l=o[s];zS(i[s],Array.isArray(l)?l:l?[l]:[])}}}function zS(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);fn(e,0,0,r)}function lx(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function pn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yt=fr(/[A-Za-z]/),vt=fr(/[\dA-Za-z]/),BS=fr(/[#-'*+\--9=?A-Z^-~]/);function bl(e){return e!==null&&(e<32||e===127)}const kc=fr(/\d/),US=fr(/[\dA-Fa-f]/),ax=fr(/[!-/:-@[-`{-~]/);function ke(e){return e!==null&&e<-2}function ze(e){return e!==null&&(e<0||e===32)}function _e(e){return e===-2||e===-1||e===32}const Ko=fr(new RegExp("\\p{P}|\\p{S}","u")),Pr=fr(/\s/);function fr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ii(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&vt(e.charCodeAt(n+1))&&vt(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Re(e,t,n,r){const i=r?r-1:1/0;let o=0;return s;function s(a){return _e(a)?(e.enter(n),l(a)):t(a)}function l(a){return _e(a)&&o++<i?(e.consume(a),l):(e.exit(n),t(a))}}function ux(e,t,n,r,i,o){let s=0;return l;function l(c){return _e(c)?(e.enter(r),a(c)):u(c)}function a(c){return _e(c)&&s<o?(e.consume(c),s++,a):(e.exit(r),u(c))}function u(c){return s>=i?t(c):n(c)}}const HS={tokenize:WS};function WS(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Re(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ke(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}let El=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){zh(this,t,n,r,!1)}addBefore(t,n,r){zh(this,t,n,r,!0)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0,this.index.clear()}};function zh(e,t,n,r,i){if(n===0&&r.length===0)return;const o=e.index.get(t);if(o){o[1]+=n,i?(r.push(...o[2]),o[2]=r):o[2].push(...r);return}const s=[t,n,r];e.map.push(s),e.index.set(t,s)}const VS={tokenize:qS},Bh={tokenize:KS};function qS(e){const t=this,n=[];let r=0,i,o,s;return l;function l(g){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,a,u)(g)}return u(g)}function a(g){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const k=t.events.length;let _=k,b;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){b=t.events[_][1].end;break}v(r);let T=k;for(;T<t.events.length;)t.events[T][1].end={...b},T++;const C=new El;return C.add(_+1,0,t.events.slice(k)),C.add(k,T-k,[]),C.consume(t.events),u(g)}return l(g)}function u(g){if(r===n.length){if(!i)return p(g);if(i.currentConstruct&&i.currentConstruct.concrete)return y(g);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bh,c,d)(g)}function c(g){return i&&m(),v(r),p(g)}function d(g){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,y(g)}function p(g){return t.containerState={},e.attempt(Bh,h,y)(g)}function h(g){return r++,n.push([t.currentConstruct,t.containerState]),p(g)}function y(g){if(g===null){i&&m(),v(0),e.consume(g);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(g)}function x(g){if(g===null){S(e.exit("chunkFlow"),!0),v(0),e.consume(g);return}return ke(g)?(e.consume(g),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(g),x)}function S(g,k){const _=t.sliceStream(g);if(k&&_.push(null),g.previous=o,o&&(o.next=g),o=g,i.defineSkip(g.start),i.write(_),t.parser.lazy[g.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<s&&(!i.events[b][1].end||i.events[b][1].end.offset>s))return;const T=t.events.length;let C=T,$,w;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){if($){w=t.events[C][1].end;break}$=!0}for(v(r),b=T;b<t.events.length;)t.events[b][1].end={...w},b++;const A=new El;A.add(C+1,0,t.events.slice(T)),A.add(T,b-T,[]),A.consume(t.events)}}function v(g){let k=n.length;for(;k-- >g;){const _=n[k];t.containerState=_[1],_[0].exit.call(t,e)}n.length=g}function m(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function KS(e,t,n){return Re(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ar(e){if(e===null||ze(e)||Pr(e))return 1;if(Ko(e))return 2}function Yl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const bc={name:"attention",resolveAll:GS,tokenize:YS};function GS(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const o=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,s={...e[i][1].end},l={...e[n][1].start};Uh(s,-o),Uh(l,o);const a={type:o>1?"strongSequence":"emphasisSequence",start:s,end:{...e[i][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:l},c={type:o>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},d={type:o>1?"strong":"emphasis",start:{...a.start},end:{...u.end}};e[i][1].end={...a.start},e[n][1].start={...u.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Zt(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=Zt(r,[["enter",d,t],["enter",a,t],["exit",a,t],["enter",c,t]]),r=Zt(r,Yl(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Zt(r,[["exit",c,t],["enter",u,t],["exit",u,t],["exit",d,t]]);let p=0;e[n][1].end.offset-e[n][1].start.offset&&(p=2,r=Zt(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),fn(e,i-1,n-i+3,r),n=i+r.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function YS(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ar(r);let o;return s;function s(a){return o=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===o)return e.consume(a),l;const u=e.exit("attentionSequence"),c=ar(a),d=!c||c===2&&i||n.includes(a)&&a!==42&&a!==95,p=!i||i===2&&c||n.includes(r)&&r!==42&&r!==95;return u._open=!!(o===42?d:d&&(i||!p)),u._close=!!(o===42?p:p&&(c||!d)),t(a)}}function Uh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const XS={name:"autolink",tokenize:QS};function QS(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return yt(h)?(e.consume(h),s):h===64?n(h):u(h)}function s(h){return h===43||h===45||h===46||vt(h)?(r=1,l(h)):u(h)}function l(h){return h===58?(e.consume(h),r=0,a):(h===43||h===45||h===46||vt(h))&&r++<32?(e.consume(h),l):(r=0,u(h))}function a(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||bl(h)?n(h):(e.consume(h),a)}function u(h){return h===64?(e.consume(h),c):BS(h)?(e.consume(h),u):n(h)}function c(h){return vt(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||vt(h))&&r++<63){const y=h===45?p:d;return e.consume(h),y}return n(h)}}const Go={partial:!0,tokenize:ZS};function ZS(e,t,n){return r;function r(o){return _e(o)?Re(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ke(o)?t(o):n(o)}}const cx={continuation:{tokenize:eC},exit:tC,name:"blockQuote",tokenize:JS};function JS(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return _e(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function eC(e,t,n){const r=this;return i;function i(s){return _e(s)?Re(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(cx,t,n)(s)}}function tC(e){e.exit("blockQuote")}const dx={name:"characterEscape",tokenize:nC};function nC(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return ax(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const fx={name:"characterReference",tokenize:rC};function rC(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),a}function a(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=vt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=US,c):(e.enter("characterReferenceValue"),o=7,s=kc,c(d))}function c(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return s===vt&&!cf(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),c):n(d)}}const Ec={partial:!0,tokenize:iC};function iC(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Hh={concrete:!0,name:"codeFenced",tokenize:oC};function oC(e,t,n){const r=this,i={partial:!0,tokenize:_};let o=0,s=0,l;return a;function a(b){return u(b)}function u(b){const T=r.events[r.events.length-1];return o=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,l=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(b)}function c(b){return b===l?(s++,e.consume(b),c):s<3?n(b):(e.exit("codeFencedFenceSequence"),_e(b)?Re(e,d,"whitespace")(b):d(b))}function d(b){return b===null||ke(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(Ec,x,k)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||ke(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(b)):_e(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Re(e,h,"whitespace")(b)):b===96&&b===l?n(b):(e.consume(b),p)}function h(b){return b===null||ke(b)?d(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||ke(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(b)):b===96&&b===l?n(b):(e.consume(b),y)}function x(b){return e.attempt(i,k,S)(b)}function S(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),v}function v(b){return o>0&&_e(b)?Re(e,m,"linePrefix",o+1)(b):m(b)}function m(b){return b===null||ke(b)?e.check(Ec,x,k)(b):(e.enter("codeFlowValue"),g(b))}function g(b){return b===null||ke(b)?(e.exit("codeFlowValue"),m(b)):(e.consume(b),g)}function k(b){return e.exit("codeFenced"),t(b)}function _(b,T,C){let $=0;return w;function w(K){return b.enter("lineEnding"),b.consume(K),b.exit("lineEnding"),A}function A(K){return b.enter("codeFencedFence"),_e(K)?Re(b,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):I(K)}function I(K){return K===l?(b.enter("codeFencedFenceSequence"),P(K)):C(K)}function P(K){return K===l?($++,b.consume(K),P):$>=s?(b.exit("codeFencedFenceSequence"),_e(K)?Re(b,z,"whitespace")(K):z(K)):C(K)}function z(K){return K===null||ke(K)?(b.exit("codeFencedFence"),T(K)):C(K)}}}const Ka={name:"codeIndented",tokenize:lC},sC={partial:!0,tokenize:aC};function lC(e,t,n){return r;function r(l){return e.enter("codeIndented"),ux(e,i,n,"linePrefix",4,4)(l)}function i(l){return l===null?s(l):ke(l)?e.attempt(sC,i,s)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||ke(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),o)}function s(l){return e.exit("codeIndented"),t(l)}}function aC(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ke(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ux(e,t,o,"linePrefix",4,4)(s)}function o(s){return ke(s)?i(s):n(s)}}const uC={name:"codeText",previous:dC,resolve:cC,tokenize:fC};function cC(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function dC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fC(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),a(d))}function a(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),a):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):ke(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||ke(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class pC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Vi(this.left,r),o.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),Vi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Vi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Vi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Vi(this.left,n.reverse())}}}function Vi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function px(e){const t={};let n=-1,r,i,o,s,l,a,u;const c=new pC(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,hC(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},l=c.slice(i,n),l.unshift(r),c.splice(i,n-i+1,l))}}return fn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function hC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,a=[],u={};let c,d,p=-1,h=n,y=0,x=0;const S=[x];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(x=p+1,S.push(x),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):S.pop(),p=S.length;p--;){const v=l.slice(S[p],S[p+1]),m=o.pop();a.push([m,m+v.length-1]),e.splice(m,2,v)}for(a.reverse(),p=-1;++p<a.length;)u[y+a[p][0]]=y+a[p][1],y+=a[p][1]-a[p][0]-1;return u}const mC={resolve:yC,tokenize:vC},gC={partial:!0,tokenize:xC};function yC(e){return px(e),e}function vC(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):ke(l)?e.check(gC,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function xC(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Re(e,o,"linePrefix")}function o(s){if(s===null||ke(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function hx(e,t,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(v){return v===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(v),e.exit(o),p):v===null||v===32||v===41||bl(v)?n(v):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(v))}function p(v){return v===62?(e.enter(o),e.consume(v),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===62?(e.exit("chunkString"),e.exit(l),p(v)):v===null||v===60||ke(v)?n(v):(e.consume(v),v===92?y:h)}function y(v){return v===60||v===62||v===92?(e.consume(v),h):h(v)}function x(v){return!c&&(v===null||v===41||ze(v))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(v)):c<u&&v===40?(e.consume(v),c++,x):v===41?(e.consume(v),c--,x):v===null||v===32||v===40||bl(v)?n(v):(e.consume(v),v===92?S:x)}function S(v){return v===40||v===41||v===92?(e.consume(v),x):x(v)}}function mx(e,t,n,r,i,o){const s=this;let l=0,a;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),c}function c(h){return l>999||h===null||h===91||h===93&&!a||h===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ke(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||ke(h)||l++>999?(e.exit("chunkString"),c(h)):(e.consume(h),a||(a=!_e(h)),h===92?p:d)}function p(h){return h===91||h===92||h===93?(e.consume(h),l++,d):d(h)}}function gx(e,t,n,r,i,o){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,a):n(p)}function a(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===s?(e.exit(o),a(s)):p===null?n(p):ke(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Re(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||ke(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?d:c)}function d(p){return p===s||p===92?(e.consume(p),c):c(p)}}function fo(e,t){let n;return r;function r(i){return ke(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):_e(i)?Re(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const wC={name:"definition",tokenize:bC},kC={partial:!0,tokenize:EC};function bC(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return mx.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return i=pn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return ze(h)?fo(e,u)(h):u(h)}function u(h){return hx(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(kC,d,d)(h)}function d(h){return _e(h)?Re(e,p,"whitespace")(h):p(h)}function p(h){return h===null||ke(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function EC(e,t,n){return r;function r(l){return ze(l)?fo(e,i)(l):n(l)}function i(l){return gx(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return _e(l)?Re(e,s,"whitespace")(l):s(l)}function s(l){return l===null||ke(l)?t(l):n(l)}}const SC={name:"hardBreakEscape",tokenize:CC};function CC(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ke(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const NC={name:"headingAtx",resolve:jC,tokenize:_C};function jC(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};fn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])}return e}function _C(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||ze(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||ke(c)?(e.exit("atxHeading"),t(c)):_e(c)?Re(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||ze(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const yx=["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"],Sc=["pre","script","style","textarea"],TC={concrete:!0,name:"htmlFlow",resolveTo:LC,tokenize:IC},$C={partial:!0,tokenize:AC};function LC(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 IC(e,t,n){const r=this;let i,o,s,l,a;return u;function u(j){return c(j)}function c(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),d}function d(j){return j===33?(e.consume(j),p):j===47?(e.consume(j),o=!0,x):j===63?(e.consume(j),i=3,r.interrupt?t:E):yt(j)?(e.consume(j),s=String.fromCharCode(j),S):n(j)}function p(j){return j===45?(e.consume(j),i=2,h):j===91?(e.consume(j),i=5,l=0,y):yt(j)?(e.consume(j),i=4,r.interrupt?t:E):n(j)}function h(j){return j===45?(e.consume(j),r.interrupt?t:E):n(j)}function y(j){const M="CDATA[";return j===M.charCodeAt(l++)?(e.consume(j),l===M.length?r.interrupt?t:I:y):n(j)}function x(j){return yt(j)?(e.consume(j),s=String.fromCharCode(j),S):n(j)}function S(j){if(j===null||j===47||j===62||ze(j)){const M=j===47,L=s.toLowerCase();return!M&&!o&&Sc.includes(L)?(i=1,r.interrupt?t(j):I(j)):yx.includes(s.toLowerCase())?(i=6,M?(e.consume(j),v):r.interrupt?t(j):I(j)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):o?m(j):g(j))}return j===45||vt(j)?(e.consume(j),s+=String.fromCharCode(j),S):n(j)}function v(j){return j===62?(e.consume(j),r.interrupt?t:I):n(j)}function m(j){return _e(j)?(e.consume(j),m):w(j)}function g(j){return j===47?(e.consume(j),w):j===58||j===95||yt(j)?(e.consume(j),k):_e(j)?(e.consume(j),g):w(j)}function k(j){return j===45||j===46||j===58||j===95||vt(j)?(e.consume(j),k):_(j)}function _(j){return j===61?(e.consume(j),b):_e(j)?(e.consume(j),_):g(j)}function b(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),a=j,T):_e(j)?(e.consume(j),b):C(j)}function T(j){return j===a?(e.consume(j),a=null,$):j===null||ke(j)?n(j):(e.consume(j),T)}function C(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||ze(j)?_(j):(e.consume(j),C)}function $(j){return j===47||j===62||_e(j)?g(j):n(j)}function w(j){return j===62?(e.consume(j),A):n(j)}function A(j){return j===null||ke(j)?I(j):_e(j)?(e.consume(j),A):n(j)}function I(j){return j===45&&i===2?(e.consume(j),U):j===60&&i===1?(e.consume(j),q):j===62&&i===4?(e.consume(j),X):j===63&&i===3?(e.consume(j),E):j===93&&i===5?(e.consume(j),W):ke(j)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check($C,H,P)(j)):j===null||ke(j)?(e.exit("htmlFlowData"),P(j)):(e.consume(j),I)}function P(j){return e.check(Ec,z,H)(j)}function z(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),K}function K(j){return j===null||ke(j)?P(j):(e.enter("htmlFlowData"),I(j))}function U(j){return j===45?(e.consume(j),E):I(j)}function q(j){return j===47?(e.consume(j),s="",D):I(j)}function D(j){if(j===62){const M=s.toLowerCase();return Sc.includes(M)?(e.consume(j),X):I(j)}return yt(j)&&s.length<8?(e.consume(j),s+=String.fromCharCode(j),D):I(j)}function W(j){return j===93?(e.consume(j),E):I(j)}function E(j){return j===62?(e.consume(j),X):j===45&&i===2?(e.consume(j),E):I(j)}function X(j){return j===null||ke(j)?(e.exit("htmlFlowData"),H(j)):(e.consume(j),X)}function H(j){return e.exit("htmlFlow"),t(j)}}function AC(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Go,t,n)}}const RC={name:"htmlText",tokenize:OC};function OC(e,t,n){const r=this;let i,o,s;return l;function l(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),a}function a(E){return E===33?(e.consume(E),u):E===47?(e.consume(E),_):E===63?(e.consume(E),g):yt(E)?(e.consume(E),C):n(E)}function u(E){return E===45?(e.consume(E),c):E===91?(e.consume(E),o=0,y):yt(E)?(e.consume(E),m):n(E)}function c(E){return E===45?(e.consume(E),h):n(E)}function d(E){return E===null?n(E):E===45?(e.consume(E),p):ke(E)?(s=d,q(E)):(e.consume(E),d)}function p(E){return E===45?(e.consume(E),h):d(E)}function h(E){return E===62?U(E):E===45?p(E):d(E)}function y(E){const X="CDATA[";return E===X.charCodeAt(o++)?(e.consume(E),o===X.length?x:y):n(E)}function x(E){return E===null?n(E):E===93?(e.consume(E),S):ke(E)?(s=x,q(E)):(e.consume(E),x)}function S(E){return E===93?(e.consume(E),v):x(E)}function v(E){return E===62?U(E):E===93?(e.consume(E),v):x(E)}function m(E){return E===null||E===62?U(E):ke(E)?(s=m,q(E)):(e.consume(E),m)}function g(E){return E===null?n(E):E===63?(e.consume(E),k):ke(E)?(s=g,q(E)):(e.consume(E),g)}function k(E){return E===62?U(E):g(E)}function _(E){return yt(E)?(e.consume(E),b):n(E)}function b(E){return E===45||vt(E)?(e.consume(E),b):T(E)}function T(E){return ke(E)?(s=T,q(E)):_e(E)?(e.consume(E),T):U(E)}function C(E){return E===45||vt(E)?(e.consume(E),C):E===47||E===62||ze(E)?$(E):n(E)}function $(E){return E===47?(e.consume(E),U):E===58||E===95||yt(E)?(e.consume(E),w):ke(E)?(s=$,q(E)):_e(E)?(e.consume(E),$):U(E)}function w(E){return E===45||E===46||E===58||E===95||vt(E)?(e.consume(E),w):A(E)}function A(E){return E===61?(e.consume(E),I):ke(E)?(s=A,q(E)):_e(E)?(e.consume(E),A):$(E)}function I(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),i=E,P):ke(E)?(s=I,q(E)):_e(E)?(e.consume(E),I):(e.consume(E),z)}function P(E){return E===i?(e.consume(E),i=void 0,K):E===null?n(E):ke(E)?(s=P,q(E)):(e.consume(E),P)}function z(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||ze(E)?$(E):(e.consume(E),z)}function K(E){return E===47||E===62||ze(E)?$(E):n(E)}function U(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function q(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),D}function D(E){return _e(E)?Re(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):W(E)}function W(E){return e.enter("htmlTextData"),s(E)}}const df={name:"labelEnd",resolveAll:DC,resolveTo:zC,tokenize:BC},MC={tokenize:UC},PC={tokenize:HC},FC={tokenize:WC};function DC(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&fn(e,0,e.length,n),e}function zC(e,t){let n=e.length,r=0,i,o,s;for(;n--;){const c=e[n][1];if(i){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[n][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(i=n,c.type!=="labelLink")){r=2;break}}else c.type==="labelEnd"&&(o=n)}const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",l,t],["enter",a,t]],s=Zt(s,e.slice(i+1,i+r+3)),s=Zt(s,[["enter",u,t]]),s=Zt(s,Yl(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),s=Zt(s,[["exit",u,t],e[o-2],e[o-1],["exit",a,t]]),s=Zt(s,e.slice(o+1)),s=Zt(s,[["exit",l,t]]),fn(e,i,e.length,s),e}function BC(e,t,n){const r=this,i=r._labelStarts;let o,s;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();o=i[i.length-1]}return l;function l(p){return o?o._inactive?d(p):(s=r.parser.defined.includes(pn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),a):n(p)}function a(p){return p===40?e.attempt(MC,c,s?c:d)(p):p===91?e.attempt(PC,c,s?u:d)(p):s?c(p):d(p)}function u(p){return e.attempt(FC,c,d)(p)}function c(p){return i.pop(),t(p)}function d(p){return o._balanced=!0,n(p)}}function UC(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ze(d)?fo(e,o)(d):o(d)}function o(d){return d===41?c(d):hx(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return ze(d)?fo(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?gx(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return ze(d)?fo(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function HC(e,t,n){const r=this;return i;function i(l){return mx.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(pn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function WC(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const VC={name:"labelStartImage",resolveAll:df.resolveAll,tokenize:qC};function qC(e,t,n){const r=this;let i;return o;function o(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),i=e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(a))}}const KC={name:"labelStartLink",resolveAll:df.resolveAll,tokenize:GC};function GC(e,t,n){const r=this;let i;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),i=e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(l))}}const Ga={name:"lineEnding",tokenize:YC};function YC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Re(e,t,"linePrefix")}}const Bs={name:"thematicBreak",tokenize:XC};function XC(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||ke(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),_e(u)?Re(e,l,"whitespace")(u):l(u))}}const At={continuation:{tokenize:eN},exit:nN,name:"list",tokenize:JC},QC={partial:!0,tokenize:rN},ZC={partial:!0,tokenize:tN};function JC(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(h){const y=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:kc(h)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Bs,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return kc(h)&&++s<10?(e.consume(h),a):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Go,r.interrupt?n:c,e.attempt(QC,p,d))}function c(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function d(h){return _e(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function eN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Go,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Re(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!_e(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ZC,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Re(e,e.attempt(At,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function tN(e,t,n){const r=this;return Re(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function nN(e){e.exit(this.containerState.type)}function rN(e,t,n){const r=this;return Re(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!_e(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Wh={name:"setextUnderline",resolveTo:iN,tokenize:oN};function iN(e,t){const n=new El;let r=e.length,i,o,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!s&&e[r][1].type==="definition"&&(s=r);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(n.add(o,0,[["enter",l,t]]),n.add(s+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[s][1].end}):e[i][1]=l,n.add(e.length,0,[["exit",l,t]]),n.consume(e),e}function oN(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),_e(u)?Re(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||ke(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const sN={tokenize:lN};function lN(e){const t=this,n=e.attempt(Go,r,e.attempt(this.parser.constructs.flowInitial,i,Re(e,e.attempt(this.parser.constructs.flow,i,e.attempt(mC,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const aN={resolveAll:xx()},uN=vx("string"),cN=vx("text");function vx(e){return{resolveAll:xx(e==="text"?dN:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=i[c];let p=-1;if(d)for(;++p<d.length;){const h=d[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function xx(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function dN(e,t){const n=new El;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],o=t.sliceStream(i);let s=o.length,l=-1,a=0,u;for(;s--;){const c=o[s];if(typeof c=="string"){for(l=c.length;c.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(c===-2)u=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(a=0),a){const c={type:r===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-a,offset:i.end.offset-a},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):n.add(r,0,[["enter",c,t],["exit",c,t]])}r++}return n.consume(e),e}const fN={42:At,43:At,45:At,48:At,49:At,50:At,51:At,52:At,53:At,54:At,55:At,56:At,57:At,62:cx},pN={91:wC},hN={[-2]:Ka,[-1]:Ka,32:Ka},mN={35:NC,42:Bs,45:[Wh,Bs],60:TC,61:Wh,95:Bs,96:Hh,126:Hh},gN={38:fx,92:dx},yN={[-5]:Ga,[-4]:Ga,[-3]:Ga,33:VC,38:fx,42:bc,60:[XS,RC],91:KC,92:[SC,dx],93:df,95:bc,96:uC},vN={null:[bc,aN]},xN={null:[42,95]},wN={null:[]},kN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:xN,contentInitial:pN,disable:wN,document:fN,flow:mN,flowInitial:hN,insideSpan:vN,string:gN,text:yN},Symbol.toStringTag,{value:"Module"}));function bN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const a={attempt:T(_),check:T(b),consume:m,enter:g,exit:k,interrupt:T(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:d};let c=t.tokenize.call(u,a);return t.resolveAll&&o.push(t),u;function d(A){return s=Zt(s,A),S(),s[s.length-1]!==null?[]:(C(t,0),u.events=Yl(o,u.events,u),u.events)}function p(A,I){return SN(h(A),I)}function h(A){return EN(s,A)}function y(){const{_bufferIndex:A,_index:I,line:P,column:z,offset:K}=r;return{_bufferIndex:A,_index:I,line:P,column:z,offset:K}}function x(A){i[A.line]=A.column,w()}function S(){for(;r._index<s.length;){const A=s[r._index];if(typeof A=="string"){const I=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<A.length;)v(A.charCodeAt(r._bufferIndex))}else v(A)}}function v(A){c=c(A)}function m(A){ke(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,w()):A!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=A}function g(A,I){const P=I||{};return P.type=A,P.start=y(),u.events.push(["enter",P,u]),l.push(P),P}function k(A){const I=l.pop();return I.end=y(),u.events.push(["exit",I,u]),I}function _(A,I){C(A,I.from)}function b(A,I){I.restore()}function T(A,I){return P;function P(z,K,U){let q,D,W,E;return Array.isArray(z)?H(z):"tokenize"in z?H([z]):X(z);function X(F){return V;function V(Z){const te=Z!==null&&F[Z],le=Z!==null&&F.null,re=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(le)?le:le?[le]:[]];return H(re)(Z)}}function H(F){return q=F,D=0,F.length===0?U:j(F[D])}function j(F){return V;function V(Z){return E=$(),W=F,F.partial||(u.currentConstruct=F),F.name&&u.parser.constructs.disable.null.includes(F.name)?L():F.tokenize.call(I?Object.assign(Object.create(u),I):u,a,M,L)(Z)}}function M(F){return A(W,E),K}function L(F){return E.restore(),++D<q.length?j(q[D]):U}}}function C(A,I){A.resolveAll&&!o.includes(A)&&o.push(A),A.resolve&&fn(u.events,I,u.events.length-I,A.resolve(u.events.slice(I),u)),A.resolveTo&&(u.events=A.resolveTo(u.events,u))}function $(){const A=y(),I=u.previous,P=u.currentConstruct,z=u.events.length,K=Array.from(l);return{from:z,restore:U};function U(){r=A,u.previous=I,u.currentConstruct=P,u.events.length=z,l=K,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function EN(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function SN(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
124
|
+
`;break}case-3:{s=`\r
|
|
125
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function CN(e){const r={constructs:sx([kN,...(e||{}).extensions||[]]),content:i(HS),defined:[],document:i(VS),flow:i(sN),lazy:{},string:i(uN),text:i(cN)};return r;function i(o){return s;function s(l){return bN(r,o,l)}}}function NN(e){for(;!px(e););return e}const Vh=/[\0\t\n\r]/g;function jN(){let e=1,t="",n=!0,r;return i;function i(o,s,l){o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o));const a=[];let u=0;for(t="",n&&(o.charCodeAt(0)===65279&&u++,n=void 0);u<o.length;){Vh.lastIndex=u;const c=Vh.exec(o),d=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(d);if(!c){t=o.slice(u);break}if(p===10&&u===d&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),u<d&&(a.push(o.slice(u,d)),e+=d-u),p){case 0:{a.push(65533),e++;break}case 9:{const h=Math.ceil(e/4)*4;for(a.push(-2);e++<h;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}u=d+1}return l&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const _N=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function TN(e){return e.replace(_N,$N)}function $N(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return lx(n.slice(o?2:1),o?16:10)}return cf(n)||e}const wx={}.hasOwnProperty;function LN(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),IN(n)(NN(CN(n).document().write(jN()(e,t,!0))))}function IN(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(he),autolinkProtocol:w,autolinkEmail:w,atxHeading:s(je),blockQuote:s(re),characterEscape:w,characterReference:w,codeFenced:s(ce),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(ce,l),codeText:s(oe,l),codeTextData:w,data:w,codeFlowValue:w,definition:s(de),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(we),hardBreakEscape:s(N),hardBreakTrailing:s(N),htmlFlow:s(G,l),htmlFlowData:w,htmlText:s(G,l),htmlTextData:w,image:s(ee),label:l,link:s(he),listItem:s(pe),listItemValue:h,listOrdered:s(fe,p),listUnordered:s(fe),paragraph:s($e),reference:M,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(je),strong:s(ht),thematicBreak:s(Je)},exit:{atxHeading:u(),atxHeadingSequence:b,autolink:u(),autolinkEmail:le,autolinkProtocol:te,blockQuote:u(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:F,characterReferenceMarkerNumeric:F,characterReferenceValue:V,characterReference:Z,codeFenced:u(v),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:A,codeIndented:u(m),codeText:u(U),codeTextData:A,data:A,definition:u(),definitionDestinationString:_,definitionLabelString:g,definitionTitleString:k,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(z),htmlFlowData:A,htmlText:u(K),htmlTextData:A,image:u(D),label:E,labelText:W,lineEnding:I,link:u(q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:L,resourceDestinationString:X,resourceTitleString:H,resource:j,setextHeading:u($),setextHeadingLineSequence:C,setextHeadingText:T,strong:u(),thematicBreak:u()}};kx(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ie={type:"root",children:[],position:void 0};const ye={stack:[ie],tokenStack:[],config:t,enter:a,exit:c,buffer:l,resume:d,data:n},ge=[],Y=[];let se=-1;for(;++se<J.length;)if(Y.push(J[se]),J[se][1].type==="listOrdered"||J[se][1].type==="listUnordered")if(J[se][0]==="enter")ge.push(Y.length-1);else{const ve=ge.pop();o(Y,ve)}for(J=Y,se=-1;++se<J.length;){const ve=t[J[se][0]];J[se][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...ye,sliceSerialize:J[se][2].sliceSerialize},J[se][1]),wx.call(ve,J[se][1].type)&&ve[J[se][1].type].call({...ye,sliceSerialize:J[se][2].sliceSerialize},J[se][1]),J[se][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...ye,sliceSerialize:J[se][2].sliceSerialize},J[se][1])}if(ye.tokenStack.length>0){const ve=ye.tokenStack[ye.tokenStack.length-1];(ve[1]||qh).call(ye,void 0,ve[0])}for(ie.position={start:Un(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Un(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se<t.transforms.length;)ie=t.transforms[se](ie)||ie;return ie}function i(J,ie,ye){let ge=-1;for(;++ge<J.length;)J[ge].call(ie,ye)}function o(J,ie){const ye=J.length-1;let ge=ie-1,Y=-1,se=!1,ve,be,Ee,Ie;const ut=[];for(;++ge<=ye;){const Oe=J[ge];switch(Oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Oe[0]==="enter"?Y++:Y--,Ie=void 0;break}case"lineEndingBlank":{Oe[0]==="enter"&&(ve&&!Ie&&!Y&&!Ee&&(Ee=ge),Ie=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ie=void 0}if(!Y&&Oe[0]==="enter"&&Oe[1].type==="listItemPrefix"||Y===-1&&Oe[0]==="exit"&&(Oe[1].type==="listUnordered"||Oe[1].type==="listOrdered")){if(ve){let et=ge;for(be=void 0;et--;){const kt=J[et];if(kt[1].type==="lineEnding"||kt[1].type==="lineEndingBlank"){if(kt[0]==="exit")continue;be&&(J[be][1].type="lineEndingBlank",se=!0),kt[1].type="lineEnding",be=et}else if(!(kt[1].type==="linePrefix"||kt[1].type==="blockQuotePrefix"||kt[1].type==="blockQuotePrefixWhitespace"||kt[1].type==="blockQuoteMarker"||kt[1].type==="listItemIndent"))break}Ee&&(!be||Ee<be)&&(ve._spread=!0),ve.end=Object.assign({},be?J[be][1].start:Oe[1].end),ut.push({at:be||ge,event:["exit",ve,Oe[2]]})}if(Oe[1].type==="listItemPrefix"){const et={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};ve=et,ut.push({at:ge,event:["enter",et,Oe[2]]}),Ee=void 0,Ie=!0}}}const Ye=J.splice(ie);let We=0;for(ge=-1;++ge<Ye.length;){for(;We<ut.length&&ut[We].at===ie+ge;)J.push(ut[We++].event);J.push(Ye[ge])}J[ie][1]._spread=se}function s(J,ie){return ye;function ye(ge){a.call(this,J(ge),ge),ie&&ie.call(this,ge)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(J,ie,ye){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ie,ye||void 0]),J.position={start:Un(ie.start),end:void 0}}function u(J){return ie;function ie(ye){J&&J.call(this,ye),c.call(this,ye)}}function c(J,ie){const ye=this.stack.pop(),ge=this.tokenStack.pop();if(!ge)throw new Error("Cannot close `"+J.type+"` ("+co({start:J.start,end:J.end})+"): it’s not open");ge[0].type!==J.type&&(ie?ie.call(this,J,ge[0]):(ge[1]||qh).call(this,J,ge[0])),ye.position.end=Un(J.end)}function d(){return Gl(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function h(J){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=J}function x(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J.replace(/(\r?\n|\r)$/g,"")}function g(J){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.label=ie,ye.identifier=pn(this.sliceSerialize(J)).toLowerCase()}function k(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.title=J}function _(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.url=J}function b(J){const ie=this.stack[this.stack.length-1];if(!ie.depth){const ye=this.sliceSerialize(J).length;ie.depth=ye}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function C(J){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function w(J){const ye=this.stack[this.stack.length-1].children;let ge=ye[ye.length-1];(!ge||ge.type!=="text")&&(ge=Ze(),ge.position={start:Un(J.start),end:void 0},ye.push(ge)),this.stack.push(ge)}function A(J){const ie=this.stack.pop();ie.value+=this.sliceSerialize(J),ie.position.end=Un(J.end)}function I(J){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=ie.children[ie.children.length-1];ye.position.end=Un(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ie.type)&&(w.call(this,J),A.call(this,J))}function P(){this.data.atHardBreak=!0}function z(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J}function K(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J}function U(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J}function q(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ie,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function D(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ie,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function W(J){const ie=this.sliceSerialize(J),ye=this.stack[this.stack.length-2];ye.label=TN(ie),ye.identifier=pn(ie).toLowerCase()}function E(){const J=this.stack[this.stack.length-1],ie=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const ge=J.children;ye.children=ge}else ye.alt=ie}function X(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.url=J}function H(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.title=J}function j(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function L(J){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.label=ie,ye.identifier=pn(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function F(J){this.data.characterReferenceType=J.type}function V(J){const ie=this.sliceSerialize(J),ye=this.data.characterReferenceType;let ge;ye?(ge=lx(ie,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ge=cf(ie);const Y=this.stack[this.stack.length-1];Y.value+=ge}function Z(J){const ie=this.stack.pop();ie.position.end=Un(J.end)}function te(J){A.call(this,J);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(J)}function le(J){A.call(this,J);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(J)}function re(){return{type:"blockquote",children:[],position:void 0}}function ce(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function oe(){return{type:"inlineCode",value:"",position:void 0}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function we(){return{type:"emphasis",children:[],position:void 0}}function je(){return{type:"heading",depth:0,children:[],position:void 0}}function N(){return{type:"break",position:void 0}}function G(){return{type:"html",value:"",position:void 0}}function ee(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function he(){return{type:"link",title:null,url:"",children:[],position:void 0}}function fe(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[],position:void 0}}function pe(J){return{type:"listItem",spread:J._spread,checked:null,children:[],position:void 0}}function $e(){return{type:"paragraph",children:[],position:void 0}}function ht(){return{type:"strong",children:[],position:void 0}}function Ze(){return{type:"text",value:"",position:void 0}}function Je(){return{type:"thematicBreak",position:void 0}}}function Un(e){return{line:e.line,column:e.column,offset:e.offset}}function kx(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?kx(e,r):AN(e,r)}}function AN(e,t){let n;for(n in t)if(wx.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function qh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+co({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+co({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+co({start:t.start,end:t.end})+") is still open")}function RN(e){const t=this;t.parser=n;function n(r){return LN(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ON(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function MN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
126
|
+
`}]}function PN(e,t){const n=t.value?t.value+`
|
|
127
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function FN(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DN(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zN(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ii(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,l+=1,e.footnoteCounts.set(r,l);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function BN(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UN(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function bx(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function HN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return bx(e,t);const i={src:Ii(r.url||"")};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function WN(e,t){const n={src:Ii(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function VN(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function qN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return bx(e,t);const i={href:Ii(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function KN(e,t){const n={href:Ii(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function GN(e,t,n){const r=e.all(t),i=n?YN(n):Ex(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const c=r[l];(i||l!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
|
|
128
|
+
`}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&s.push({type:"text",value:`
|
|
129
|
+
`});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function YN(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const{children:n}=e;let r=-1;for(;!t&&++r<n.length;)t=Ex(n[r])}return t}function Ex(e){const{spread:t}=e;return t??e.children.length>1}function XN(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function QN(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZN(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function JN(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ej(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=sf(t.children[1]),a=Jv(t.children[t.children.length-1]);l&&a&&(s.position={start:l,end:a}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function tj(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let a=-1;const u=[];for(;++a<l;){const d=t.children[a],p={},h=s?s[a]:void 0;h&&(p.align=h);let y={type:"element",tagName:o,properties:p,children:[]};d&&(y.children=e.all(d),e.patch(d,y),y=e.applyData(d,y)),u.push(y)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function nj(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Kh=9,Gh=32;function rj(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Yh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Yh(t.slice(i),i>0,!1)),o.join("")}function Yh(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Kh||o===Gh;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Kh||o===Gh;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function ij(e,t){const n={type:"text",value:rj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function oj(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const sj={blockquote:ON,break:MN,code:PN,delete:FN,emphasis:DN,footnoteReference:zN,heading:BN,html:UN,imageReference:HN,image:WN,inlineCode:VN,linkReference:qN,link:KN,listItem:GN,list:XN,paragraph:QN,root:ZN,strong:JN,table:ej,tableCell:nj,tableRow:tj,text:ij,thematicBreak:oj,toml:ks,yaml:ks,definition:ks,footnoteDefinition:ks};function ks(){}const Sx=-1,Xl=0,po=1,Sl=2,ff=3,pf=4,hf=5,mf=6,Cx=7,Nx=8,{defineProperty:lj}=Object,jx=typeof self=="object"?self:globalThis,Xh=(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 jx[e](t)},aj=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case Xl:case Sx:return n(s,i);case po:{const l=n([],i);for(const a of s)l.push(r(a));return l}case Sl:{const l=n({},i);for(const[a,u]of s){const c=r(a),d=r(u);c==="__proto__"?lj(l,c,{value:d,configurable:!0,enumerable:!0,writable:!0}):l[c]=d}return l}case ff:return n(new Date(s),i);case pf:{const{source:l,flags:a}=s;return n(new RegExp(l,a),i)}case hf:{const l=n(new Map,i);for(const[a,u]of s)l.set(r(a),r(u));return l}case mf:{const l=n(new Set,i);for(const a of s)l.add(r(a));return l}case Cx:{const{name:l,message:a}=s;return n(typeof jx[l]=="function"?Xh(l,a):new Error(a),i)}case Nx:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}case"-0":return-0}return n(Xh(o,s),i)};return r},Qh=e=>aj(new Map,e)(0),vr="",{toString:uj}={},{keys:cj,is:dj}=Object,qi=e=>{const t=typeof e;if(t!=="object"||!e)return[Xl,t];const n=uj.call(e).slice(8,-1);switch(n){case"Array":return[po,vr];case"Object":return[Sl,vr];case"Date":return[ff,vr];case"RegExp":return[pf,vr];case"Map":return[hf,vr];case"Set":return[mf,vr];case"DataView":return[po,n]}return n.includes("Array")?[po,n]:e instanceof Error?[Cx,e.name||"Error"]:[Sl,n]},bs=([e,t])=>e===Xl&&(t==="function"||t==="symbol"),fj=(e,t,n,r)=>{const i=(s,l)=>{const a=r.push(s)-1;return n.set(l,a),a},o=s=>{if(n.has(s))return n.get(s);let[l,a]=qi(s);switch(l){case Xl:{let c=s;switch(a){case"bigint":l=Nx,c=s.toString();break;case"number":if(!s&&dj(s,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);c=null;break;case"undefined":return i([Sx],s)}return i([l,c],s)}case po:{if(a){let p=s;return a==="DataView"?p=new Uint8Array(s.buffer):a==="ArrayBuffer"&&(p=new Uint8Array(s)),i([a,[...p]],s)}const c=[],d=i([l,c],s);for(const p of s)c.push(o(p));return d}case Sl:{if(a)switch(a){case"BigInt":return i([a,s.toString()],s);case"Boolean":case"Number":case"String":return i([a,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const c=[],d=i([l,c],s);for(const p of cj(s))(e||!bs(qi(s[p])))&&c.push([o(p),o(s[p])]);return d}case ff:return i([l,isNaN(s.getTime())?vr:s.toISOString()],s);case pf:{const{source:c,flags:d}=s;return i([l,{source:c,flags:d}],s)}case hf:{const c=[],d=i([l,c],s);for(const[p,h]of s)(e||!(bs(qi(p))||bs(qi(h))))&&c.push([o(p),o(h)]);return d}case mf:{const c=[],d=i([l,c],s);for(const p of s)(e||!bs(qi(p)))&&c.push(o(p));return d}}const{message:u}=s;return i([l,{name:a,message:u}],s)};return o},Zh=(e,{json:t,lossy:n}={})=>{const r=[];return fj(!(t||n),!!t,new Map,r)(e),r},Cl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Qh(Zh(e,t)):structuredClone(e):(e,t)=>Qh(Zh(e,t));function pj(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function hj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function mj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pj,r=e.options.footnoteBackLabel||hj,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[],a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);c&&(l[u]=e.all(c))}for(u=-1;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=l[u],p=String(c.identifier).toUpperCase(),h=Ii(p.toLowerCase());let y=0;const x=[],S=e.footnoteCounts.get(p);for(;S!==void 0&&++y<=S;){x.length>0&&x.push({type:"text",value:" "});let g=typeof n=="string"?n:n(u,y);typeof g=="string"&&(g={type:"text",value:g}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,y),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const g=v.children[v.children.length-1];g&&g.type==="text"?g.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else d.push(...x);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(c,m),a.push(m)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Cl(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
130
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
131
|
+
`}]}}const Ql=function(e){if(e==null)return xj;if(typeof e=="function")return Zl(e);if(typeof e=="object")return Array.isArray(e)?gj(e):yj(e);if(typeof e=="string")return vj(e);throw new Error("Expected function, string, or object as test")};function gj(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ql(e[n]);return Zl(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function yj(e){const t=e;return Zl(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function vj(e){return Zl(t);function t(n){return n&&n.type===e}}function Zl(e){return t;function t(n,r,i){return!!(wj(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function xj(){return!0}function wj(e){return e!==null&&typeof e=="object"&&"type"in e}const _x=[],kj=!0,ho=!1,Cc="skip";function Nc(e,t,n,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,o,s,l,a;if(typeof n=="function"||n&&typeof n=="object"?(o=t,s=n,r&&(i=!1)):(s=t,n&&(i=!1)),typeof s=="function")l=s;else if(s&&typeof s=="object"){if(!(s.enter===null||s.enter===void 0))if(typeof s.enter=="function")l=s.enter;else throw new Error("Unexpected value `"+s.enter+"` for `visitors.enter`, expected optional visitor");if(typeof s.exit=="function")a=s.exit;else throw new Error("Unexpected value `"+s.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+s+"` for `enter` or `visitors`, expected visitor or object with visitors");const u=Ql(o),c=i?1:-1;d(e,void 0,[])();function d(p,h,y){const x=p&&typeof p=="object"?p:{};if(typeof x.type=="string"){const v=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(p.type+(v?"<"+v+">":""))+")"})}return S;function S(){const v=!o||u(p,h,y[y.length-1]||void 0);let m=_x;if(l&&v&&(m=Jh(l(p,y,h)),m[0]===ho))return m;if("children"in p&&p.children){const g=p;if(g.children&&m[0]!==Cc){let k=(i?-1:g.children.length)+c;const _=[...y,g];for(;k>-1&&k<g.children.length;){const b=g.children[k],T=d(b,k,_)();if(T[0]===ho)return T;k=typeof T[1]=="number"?T[1]:k+c}}}if(a&&v){const g=Jh(a(p,y,h));if(g[0]===Cc)throw new Error("Unexpected value `"+g[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(g[0]===ho||typeof g[1]=="number")return g}return m}}}function Jh(e){return Array.isArray(e)?e:typeof e=="number"?[kj,e]:e==null?_x:[e]}function Jl(e,t,n,r){let i,o,s;o=t,s=n,typeof o=="function"?Nc(e,i,jc(o),s):Nc(e,i,bj(o),s)}function bj(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?jc(e.enter):e.enter,exit:typeof e.exit=="function"?jc(e.exit):e.exit}}function jc(e){return t;function t(n,r,i){return e(n,i,r[r.length-1])}}const _c={}.hasOwnProperty,Ej={};function Sj(e,t){const n=t||Ej,r=new Map,i=new Map,o=new Map,s={...sj,...n.handlers},l={all:u,applyData:Nj,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:a,options:n,patch:Cj,wrap:_j};return Jl(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=String(c.identifier).toUpperCase();c.type==="definition"?r.has(d)||r.set(d,c):i.has(d)||i.set(d,c)}}),l;function a(c,d){const{type:p}=c,h=l.handlers[p];if(_c.call(l.handlers,p)&&h)return h(l,c,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in c){const{children:x,...S}=c;return{...Cl(S),children:l.all(c)}}return Cl(c)}return(l.options.unknownHandler||jj)(l,c,d)}function u(c){const d=[];if("children"in c){const p=c.children;let h=-1;for(;++h<p.length;){const y=l.one(p[h],c);if(y){if(h&&p[h-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=em(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=em(x.value))}Array.isArray(y)?d.push(...y):d.push(y)}}}return d}}function Cj(e,t){e.position&&(t.position=hS(e))}function Nj(e,t){let n=t;if(e&&e.data){const{hChildren:r,hName:i,hProperties:o}=e.data;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const s="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,Cl(o)),"children"in n&&n.children&&r!==null&&r!==void 0&&(n.children=r)}return n}function jj(e,t){const n=t.data||{},r="value"in t&&!(_c.call(n,"hProperties")||_c.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _j(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
132
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
133
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
134
|
+
`}),n}function em(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function tm(e,t){const n=Sj(e,t),r=n.one(e,void 0),i=mj(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
135
|
+
`},i),o}function Tj(e,t){return e&&"run"in e?async function(n,r){const i=tm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return tm(n,{file:r,...e||t})}}function nm(e){if(e)throw e}var Us=Object.prototype.hasOwnProperty,Tx=Object.prototype.toString,rm=Object.defineProperty,im=Object.getOwnPropertyDescriptor,om=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Tx.call(t)==="[object Array]"},sm=function(t){if(!t||Tx.call(t)!=="[object Object]")return!1;var n=Us.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Us.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Us.call(t,i)},lm=function(t,n){rm&&n.name==="__proto__"?rm(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},am=function(t,n){if(n==="__proto__")if(Us.call(t,n)){if(im)return im(t,n).value}else return;return t[n]},$j=function e(){var t,n,r,i,o,s,l=arguments[0],a=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});a<u;++a)if(t=arguments[a],t!=null)for(n in t)r=am(l,n),i=am(t,n),l!==i&&(c&&i&&(sm(i)||(o=om(i)))?(o?(o=!1,s=r&&om(r)?r:[]):s=r&&sm(r)?r:{},lm(l,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&lm(l,{name:n,newValue:i}));return l};const Ya=_m($j);function Tc(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 Lj(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(a,...u){const c=e[++o];let d=-1;if(a){s(a);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?Ij(c,l)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Ij(e,t){let n;return r;function r(...s){const l=e.length>s.length;let a;l&&s.push(i);try{a=e.apply(this,s)}catch(u){const c=u;if(l&&n)throw c;return i(c)}l||(a&&a.then&&typeof a.then=="function"?a.then(o,i):a instanceof Error?i(a):o(a))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const vn={basename:Aj,dirname:Rj,extname:Oj,join:Mj,sep:"/"};function Aj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Yo(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Rj(e){if(Yo(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Oj(e){Yo(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Mj(...e){let t=-1,n;for(;++t<e.length;)Yo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Pj(n)}function Pj(e){Yo(e);const t=e.codePointAt(0)===47;let n=Fj(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Fj(e,t){let n="",r=0,i=-1,o=0,s=-1,l,a;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function Yo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Dj={cwd:zj};function zj(){return"/"}function $c(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Bj(e){if(typeof e=="string")e=new URL(e);else if(!$c(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 Uj(e)}function Uj(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Xa=["history","path","basename","stem","extname","dirname"];class $x{constructor(t){let n;t?$c(t)?n={path:t}:typeof t=="string"||Hj(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Dj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Xa.length;){const o=Xa[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Xa.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?vn.basename(this.path):void 0}set basename(t){Za(t,"basename"),Qa(t,"basename"),this.path=vn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vn.dirname(this.path):void 0}set dirname(t){um(this.basename,"dirname"),this.path=vn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vn.extname(this.path):void 0}set extname(t){if(Qa(t,"extname"),um(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=vn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$c(t)&&(t=Bj(t)),Za(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vn.basename(this.path,this.extname):void 0}set stem(t){Za(t,"stem"),Qa(t,"stem"),this.path=vn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Kl(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Qa(e,t){if(e&&e.includes(vn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vn.sep+"`")}function Za(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function um(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Hj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Wj=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},Vj={}.hasOwnProperty;class gf extends Wj{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=Lj()}copy(){const t=new gf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ya(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(tu("data",this.frozen),this.namespace[t]=n,this):Vj.call(this.namespace,t)&&this.namespace[t]||void 0:t?(tu("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Es(t),r=this.parser||this.Parser;return Ja("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ja("process",this.parser||this.Parser),eu("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=Es(t),a=r.parse(l);r.run(a,l,function(c,d,p){if(c||!d||!p)return u(c);const h=d,y=r.stringify(h,p);Gj(y)?p.value=y:p.result=y,u(c,p)});function u(c,d){c||!d?s(c):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Ja("processSync",this.parser||this.Parser),eu("processSync",this.compiler||this.Compiler),this.process(t,i),dm("processSync","process",n),r;function i(o,s){n=!0,nm(o),r=s}}run(t,n,r){cm(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const a=Es(n);i.run(t,a,u);function u(c,d,p){const h=d||t;c?l(c):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),dm("runSync","run",r),i;function o(s,l){nm(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Es(n),i=this.compiler||this.Compiler;return eu("stringify",i),cm(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(tu("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;a(c,d)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=Ya(!0,i.settings,u.settings))}function l(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];o(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,c){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===u){p=d;break}if(p===-1)r.push([u,...c]);else if(c.length>0){let[h,...y]=c;const x=r[p][1];Tc(x)&&Tc(h)&&(h=Ya(!0,x,h)),r[p]=[u,h,...y]}}}}const qj=new gf().freeze();function Ja(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function eu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function tu(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 cm(e){if(!Tc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function dm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Es(e){return Kj(e)?e:new $x(e)}function Kj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Gj(e){return typeof e=="string"||Yj(e)}function Yj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",fm=[],pm={allowDangerousHtml:!0},Qj=/^(https?|ircs?|mailto|xmpp)$/i,Zj=[{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 Jj(e){const t=e_(e),n=t_(e);return n_(t.runSync(t.parse(n),n),e)}function e_(e){const t=e.rehypePlugins||fm,n=e.remarkPlugins||fm,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...pm}:pm;return qj().use(RN).use(n).use(Tj,r).use(t)}function t_(e){const t=e.children||"",n=new $x;return typeof t=="string"&&(n.value=t),n}function n_(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,a=t.urlTransform||Lx;for(const c of Zj)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+Xj+c.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Jl(e,u),wS(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(c,d,p){if(c.type==="raw"&&p&&typeof d=="number")return s?p.children.splice(d,1):p.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let h;for(h in qa)if(Object.hasOwn(qa,h)&&Object.hasOwn(c.properties,h)){const y=c.properties[h],x=qa[h];(x===null||x.includes(c.tagName))&&(c.properties[h]=a(String(y||""),h,c))}}if(c.type==="element"){let h=n?!n.includes(c.tagName):o?o.includes(c.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(c,d,p)),h&&p&&typeof d=="number")return l&&c.children?p.children.splice(d,1,...c.children):p.children.splice(d,1),d}}}function Lx(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Qj.test(e.slice(0,t))?e:""}function hm(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function r_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function i_(e,t,n){const i=Ql((n||{}).ignore||[]),o=o_(t);let s=-1;for(;++s<o.length;)Nc(e,l);function l(u,c,d){if(u.type==="text"&&typeof d=="number")return a(u,c,d);if(i(u,d,c[c.length-1]))return Cc}function a(u,c,d){const p=c[c.length-1],h=o[s][0],y=o[s][1];let x=0,S=!1,v=[];h.lastIndex=0;let m=h.exec(u.value);for(;m;){const k=m.index,_={index:m.index,input:m.input,stack:[...c,u]};let b=y(...m,_);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1)h.lastIndex=k+1;else{if(x!==k&&g({type:"text",value:u.value.slice(x,k)}),Array.isArray(b))for(const T of b)g(T);else b&&g(b);x=k+m[0].length,S=!0}if(!h.global)break;m=h.exec(u.value)}return S?(x<u.value.length&&g({type:"text",value:u.value.slice(x)}),p.children.splice(d,1,...v)):v=[u],d+v.length;function g(k){const _=v[v.length-1];_&&_.type==="text"&&k.type==="text"?_.value+=k.value:v.push(k)}}}function o_(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([s_(i[0]),l_(i[1])])}return t}function s_(e){return typeof e=="string"?new RegExp(r_(e),"g"):e}function l_(e){return typeof e=="function"?e:function(){return e}}const nu="phrasing",ru=["autolink","link","image","label"];function a_(){return{transforms:[m_],enter:{literalAutolink:c_,literalAutolinkEmail:iu,literalAutolinkHttp:iu,literalAutolinkWww:iu},exit:{literalAutolink:h_,literalAutolinkEmail:p_,literalAutolinkHttp:d_,literalAutolinkWww:f_}}}function u_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nu,notInConstruct:ru},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nu,notInConstruct:ru},{character:":",before:"[ps]",after:"\\/",inConstruct:nu,notInConstruct:ru}]}}function c_(e){this.enter({type:"link",title:null,url:"",children:[],position:void 0},e)}function iu(e){this.config.enter.autolinkProtocol.call(this,e)}function d_(e){this.config.exit.autolinkProtocol.call(this,e)}function f_(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 p_(e){this.config.exit.autolinkEmail.call(this,e)}function h_(e){this.exit(e)}function m_(e){i_(e,[[new RegExp("(?<![\\da-z])(https?:\\/\\/|www(?=\\.))([\\w-]*\\.[\\w\\-.]*)([^\\t\\n\\r ]*)","gi"),g_],[new RegExp("(?<![\\w+\\-.@])xmpp:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)(\\/(?:[\\w\\-/]|\\.(?=[\\dA-Za-z]))*)?","g"),x_],[new RegExp("(?<![\\w+\\-.@])mailto:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),v_],[new RegExp("(?<![\\w+\\-.]|(?:^|[^\\d@A-Za-z])(?:mailto|xmpp):)([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),y_]],{ignore:["link","linkReference"]})}function g_(e,t,n,r,i){if(!b_(i))return!1;let o="";if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),Ko(n.charCodeAt(0))||!w_(n))return!1;const s=k_(n+r),l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0],position:void 0}],position:void 0};return s[1]?[l,{type:"text",value:s[1],position:void 0}]:l}function y_(e,t,n){return/[\d\-_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n,position:void 0}],position:void 0}}function v_(e,t,n){if(/[\d\-_]$/.test(n))return!1;const r="mailto:"+t+"@"+n;return{type:"link",title:null,url:r,children:[{type:"text",value:r,position:void 0}],position:void 0}}function x_(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)==="@"))return!1;const o="xmpp:"+t+"@"+n+(r||"");return{type:"link",title:null,url:o,children:[{type:"text",value:o,position:void 0}],position:void 0}}function w_(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function k_(e){let t=e.length;for(;t>0;){const s=e.charCodeAt(t-1);if(s===33||s===34||s===38||s===39||s===41||s===44||s===46||s===58||s===59||s===60||s===62||s===63||s===93||s===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(")");const i=hm(e,"(");let o=hm(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function b_(e){const t=e.input.charCodeAt(e.index-1);return e.index===0||Pr(t)||Ko(t)}Ix.peek=L_;function E_(){this.buffer()}function S_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function C_(){this.buffer()}function N_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function j_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function __(e){this.exit(e)}function T_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $_(e){this.exit(e)}function L_(){return"["}function Ix(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),s(),o+=i.move("]"),o}function I_(){return{enter:{gfmFootnoteCallString:E_,gfmFootnoteCall:S_,gfmFootnoteDefinitionLabelString:C_,gfmFootnoteDefinition:N_},exit:{gfmFootnoteCallString:j_,gfmFootnoteCall:__,gfmFootnoteDefinitionLabelString:T_,gfmFootnoteDefinition:$_}}}function A_(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ix},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const l=o.createTracker(s);let a=l.move("[^");const u=o.enter("footnoteDefinition"),c=o.enter("label");return a+=l.move(o.safe(o.associationId(r),{before:a,after:"]"})),c(),a+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),a+=l.move((t?`
|
|
136
|
+
`:" ")+o.indentLines(o.containerFlow(r,l.current()),t?Ax:R_))),u(),a}}function R_(e,t,n){return t===0?e:Ax(e,t,n)}function Ax(e,t,n){return(n?"":" ")+e}const O_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yf.attention=z_;yf.peek=B_;function M_(){return{canContainEols:["delete"],enter:{strikethrough:F_},exit:{strikethrough:D_}}}function P_(){return{handlers:{delete:yf},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:O_}]}}function F_(e){this.enter({type:"delete",children:[],position:void 0},e)}function D_(e){this.exit(e)}function yf(e,t,n,r){const i=n.createTracker(r),o=n.stack.includes("strikethrough")?"~":"~~",s=n.enter("strikethrough");let l=i.move(o);return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move(o),s(),l}function z_(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function B_(){return"~"}function U_(e){return e.length}function H_(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||U_,o=[],s=[],l=[],a=[];let u=0,c=-1;for(;++c<e.length;){const x=[],S=[];let v=-1;for(e[c].length>u&&(u=e[c].length);++v<e[c].length;){const m=W_(e[c][v]);if(n.alignDelimiters!==!1){const g=i(m);S[v]=g,(a[v]===void 0||g>a[v])&&(a[v]=g)}x.push(m)}s[c]=x,l[c]=S}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)o[d]=mm(r[d]);else{const x=mm(r);for(;++d<u;)o[d]=x}d=-1;const p=[],h=[];for(;++d<u;){const x=o[d];let S="",v="";x===99?(S=":",v=":"):x===108?S=":":x===114&&(v=":");let m=n.alignDelimiters===!1?1:Math.max(1,a[d]-S.length-v.length);const g=S+"-".repeat(m)+v;n.alignDelimiters!==!1&&(m=S.length+m+v.length,m>a[d]&&(a[d]=m),h[d]=m),p[d]=g}s.splice(1,0,p),l.splice(1,0,h),c=-1;const y=[];for(;++c<s.length;){const x=s[c],S=l[c],v=n.fillRows===!1?Math.max(1,s[c===1?0:c].length):u;d=-1;const m=[];for(;++d<v;){const g=x[d]||"";let k="",_="";if(n.alignDelimiters!==!1){const b=a[d]-(S[d]||0),T=o[d];if(T===114)k=" ".repeat(b);else if(T===99){const C=b/2;b%2?(k=" ".repeat(C+.5),_=" ".repeat(C-.5)):(k=" ".repeat(C),_=k)}else _=" ".repeat(b)}n.delimiterStart!==!1&&!d&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||d)&&m.push(" "),n.alignDelimiters!==!1&&m.push(k),m.push(g),n.alignDelimiters!==!1&&m.push(_),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||d!==v-1)&&m.push("|")}y.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return y.join(`
|
|
137
|
+
`)}function W_(e){return e==null?"":String(e)}function mm(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const V_=Ql(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function q_(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),K_);return i(),s}function K_(e,t,n){return">"+(n?"":" ")+e}function G_(e,t){return gm(e,t.inConstruct,!0)&&!gm(e,t.notInConstruct,!1)}function gm(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ym(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const o=n.unsafe[i];if(o.character===`
|
|
138
|
+
`&&!o.before&&!o.after&&G_(n.stack,o))return/[\t ]/.test(r.before)?"":" "}return`\\
|
|
139
|
+
`}function Y_(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function X_(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Q_(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 Z_(e,t,n,r){const i=Q_(n),o=e.value||"";if(X_(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(o,J_);return d(),p}const s=n.createTracker(r),l=i.repeat(Math.max(Y_(o,i)+1,3)),a=n.enter("codeFenced"),u=i==="`"?"GraveAccent":"Tilde";let c=s.move(l);if(e.lang){const d=n.enter(`codeFencedLang${u}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${u}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
|
|
140
|
+
`,encode:["`"],...s.current()})),d()}return c+=s.move(`
|
|
141
|
+
`),o&&(c+=s.move(o+`
|
|
142
|
+
`)),c+=s.move(l),a(),c}function J_(e,t,n){return(n?"":" ")+e}function vf(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 eT(e,t,n,r){const i=vf(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
143
|
+
`,...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),s(),u}function tT(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 Nl(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function hi(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function Rx(e){return"&#x"+e.toString(16).toUpperCase()+";"}function vm(e,t,n){const r=ar(e),i=ar(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function nT(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const l=e.charCodeAt(2);return l===45?2:l===91?5:yt(l)?4:void 0}if(t===63)return 3;const n=t===47,r=n?2:1;let i=r,o=e.charCodeAt(i);if(!yt(o))return;for(;o===45||vt(o);)o=e.charCodeAt(++i);const s=e.slice(r,i).toLowerCase();return!n&&o!==47&&Sc.includes(s)?1:yx.includes(s)?6:7}const Ox=new Map([["*",!1],["_",!0]]);function rT(e,t,n){const r=new Set;for(const o of e){const s=n.get(o);if(s&&o.attention&&t.some(l=>l.attention===o.attention))for(const l of s.tokens)r.add(l.attention)}const i=[];for(const o of e)o.attention&&r.delete(o.attention)&&i.push(o.attention);return i.reverse(),i}function Mx(e,t,n){const r=[],i=new Map,o=new Map;let s=0;for(;s<e.length;){if(!e[s].attention){s++;continue}const l=e[s].value.charAt(0),a=Ox.get(l);let u=s+1;for(;u<e.length&&e[u].attention&&e[u].value.charAt(0)===l;)u++;const c=s?e[s-1].value:t,d=ar(c.charCodeAt(c.length-1)),p=ar((u<e.length?e[u].value:n).charCodeAt(0)),h=!p||p===2&&!!d,y=!d||d===2&&!!p,x={tokens:e.slice(s,u),markers:[],start:0,end:0,open:a?h&&(!!d||!y):h,close:a?y&&(!!p||!h):y,split:a!==void 0};for(const S of x.tokens){i.set(S,[...x.tokens]),o.set(S,x);let v=S.value.length;for(;v--;)x.markers.push(S)}x.end=x.markers.length,r.push(x),s=u}for(oT(r,i),s=-1;++s<e.length;){const l=i.get(e[s]);if(l)return{attention:rT(e,l,o),index:s}}}function Ss(e,t){const n=e[t?0:e.length-1];if(!n||n.attention)return;const r=t?Nl(n.value):hi(n.value),i=Rx(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let o=n.value.slice(0,n.value.length-r.length),s=0;for(;o.charCodeAt(o.length-1-s)===92;)s++;s%2&&(o+="\\"),n.value=o+i}}function iT(e,t,n,r,i){for(const o of n.attention){const s=t.get(o)||o.sequences[0];for(const l of o.sequences){if(l===s)continue;const a=new Map(t);a.set(o,l);const u=ea(e,a,r,i),c=Mx(u,r,i);if(!c||c.index>n.index)return{chosen:a,mistake:c,tokens:u}}}}function oT(e,t){const n=new Map;for(const r of e){const i=r.tokens[0].value.charAt(0);let o=n.get(i);o||(o=[],n.set(i,o));let s=r.close?o.length:0;for(;s--&&r.start<r.end;){const l=o[s],a=l.end-l.start,u=r.end-r.start;if(r.split?(l.close||r.open)&&u%3&&!((a+u)%3):a!==l.markers.length||a!==u)continue;const c=r.split?a>1&&u>1?2:1:u,d=l.markers.slice(l.end-c,l.end),p=r.markers.slice(r.start,r.start+c),h=d[0],y=p[0];if(h===d[c-1]&&h.value.length===c&&y===p[c-1]&&y.value.length===c&&h.attention===y.attention)t.delete(h),t.delete(y);else{const x=[...new Set([...d,...p])];for(const S of x){const v=t.get(S);v&&v.push(...x)}}l.end-=c,r.start+=c,l.start===l.end&&o.splice(s,1),s=o.length}r.open&&r.start<r.end&&o.push(r)}}function sT(e,t,n){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const i of n)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");const r=[];for(const i of t){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!ax(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(const o of n)r.push(i.repeat(o))}return r}function lT(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let s=-1,l=n.before;r.push(-1);let a=t.createTracker(n);for(;++s<i.length;){const u=i[s];let c;if(r[r.length-1]=s,s+1<i.length){let h=t.handle.handlers[i[s+1].type];h&&h.peek&&(h=h.peek),c=h?Nl(h(i[s+1],e,t,{before:"",after:"",...a.current()})):""}else c=n.after;const d=o[o.length-1];typeof d=="string"&&(l==="\r"||l===`
|
|
144
|
+
`)&&u.type==="html"&&nT(u.value)!==7&&(o[o.length-1]=d.replace(/(\r?\n|\r)$/," "),l=" ",a=t.createTracker(n),a.move(ta(o,n.before,n.after)));const p=t.handle.handlers[u.type];if(p&&p.attention){const h=xf(u,p.attention,t,a);if(!h)continue;o.push(h),l=hi(h.sequences[0])}else{const h=t.handle(u,e,t,{...a.current(),after:c,before:l});if(!h)continue;a.move(h),o.push(h),l=hi(h)}}return r.pop(),o}function xf(e,t,n,r){const{construct:i,markers:o,sizes:s}=t(e,n),l=sT(e.type,o,s),a=l[0],u=n.enter(i),c=n.createTracker(r.current());c.move(a);const d=lT(e,n,{...c.current(),before:a,after:a});if(u(),d.length!==0)return r.move(a),r.move(ta(d,a,a)),r.move(a),{children:d,sequences:l}}function xm(e,t,n,r){let i=ea(e,t,n,r),o=Mx(i,n,r);for(;o;){const s=iT(e,t,o,n,r);if(!s)return;t=s.chosen,i=s.tokens,o=s.mistake}return i}function Px(e,t,n,r){let i=n,o=-1;for(;++o<e.length;){const s=e[o];if(typeof s=="string"){i="";continue}const l=o===e.length-1?r:"",a=s.sequences.find(function(u){const c=u.charAt(0);return c!==i.charAt(0)&&c!==l.charAt(0)||e.length===1&&Ox.has(c)&&u.length>n.length})||s.sequences[0];a!==s.sequences[0]&&t.set(s,a),Px(s.children,t,a,a),i=a}}function ea(e,t,n,r){const i=[];let o,s=hi(n),l=-1;for(;++l<e.length;){const a=e[l];if(typeof a=="string"){const g={value:a,attention:void 0};o&&o===Nl(a)&&Ss([g],!0),o=void 0,i.push(g),g.value&&(s=hi(g.value));continue}const u=t.get(a)||a.sequences[0],c=u.charAt(0),d=e[l+1],p=s,h=Nl(d===void 0?r:typeof d=="string"?d:t.get(d)||d.sequences[0]),y=ea(a.children,t,u,u),x=y[0].value,S=vm(p.charCodeAt(p.length-1),x.charCodeAt(0),c);S.inside&&Ss(y,!0);const v=hi(y[y.length-1].value),m=vm(h.charCodeAt(0),v.charCodeAt(v.length-1),c);m.inside&&Ss(y,!1),S.outside&&p!==`
|
|
145
|
+
`&&p!=="\r"&&Ss(i,!1),m.outside&&(o=h),i.push({value:u,attention:a},...y,{value:u,attention:a}),s=u.charAt(u.length-1)}return i}function ta(e,t,n){const r=new Map;Px(e,r,t,n);const i=(r.size>0?xm(e,r,t,n):void 0)||xm(e,new Map,t,n)||ea(e,new Map,t,n);let o="";for(const s of i)o+=s.value;return o}wf.attention=Fx;wf.peek=aT;function wf(e,t,n,r){const i=n.enter("phrasing"),o=xf(e,Fx,n,n.createTracker(r)),s=o?ta([o],r.before,r.after):"";return i(),s}function Fx(e,t){return{construct:"emphasis",markers:tT(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function aT(e,t,n){return n.options.emphasis||"*"}function uT(e,t){let n=!1;return Jl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ho}),!!((!e.depth||e.depth<3)&&Gl(e)&&(t.options.setext||n))}function cT(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(uT(e,n)){const d=n.enter("headingSetext"),p=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
|
|
146
|
+
`,after:`
|
|
147
|
+
`});return p(),d(),h+`
|
|
148
|
+
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
149
|
+
`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
150
|
+
`,...o.current()});const c=u.charCodeAt(0);return(c===9||c===32)&&(u=Rx(c)+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}Dx.peek=dT;function Dx(e){return e.value||""}function dT(){return"<"}zx.peek=fT;function zx(e,t,n,r){const i=vf(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function fT(){return"!"}Bx.peek=pT;function Bx(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const u=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=c.filter(function(p){return p!=="phrasing"}),s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function pT(){return"!"}Ux.peek=hT;function Ux(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);if(!s.atBreak)continue;let a;for(;a=l.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function hT(){return"`"}function Hx(e,t){const n=Gl(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Wx.peek=mT;function Wx(e,t,n,r){const i=vf(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);if(Hx(e,n)){const y=n.stack;n.stack=y.filter(function(v){return v!=="phrasing"});const x=n.enter("autolink");let S=s.move("<");return S+=s.move(n.containerPhrasing(e,{before:S,after:">",...s.current()})),S+=s.move(">"),x(),n.stack=y,S}const l=n.enter("link");let a=n.enter("label"),u=s.move("[");const c=n.containerPhrasing(e,{before:u,after:"](",...s.current()});u+=s.move(c),a(),u+=s.move("](");const d=/[\0- \u007F]/.test(e.url),p=r.before.charAt(r.before.length-1);let h=e.title||void 0;if(!h&&!d&&(p===`
|
|
151
|
+
`||p==="\r")){let y=0;for(;y<c.length&&c.charCodeAt(y)!==93;)y+=c.charCodeAt(y)===92?2:1;c.charCodeAt(y+1)===58&&(h="")}return!e.url&&typeof h=="string"||d?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:typeof h=="string"?" ":")",...s.current()}))),a(),typeof h=="string"&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(h,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function mT(e,t,n){return Hx(e,n)?"<":"["}Vx.peek=gT;function Vx(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=c.filter(function(p){return p!=="phrasing"}),s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function gT(){return"["}function kf(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 yT(e){const t=kf(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function vT(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 qx(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 xT(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?vT(n):kf(n);const l=e.ordered?s==="."?")":".":yT(n);let a=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),qx(n)===s&&c){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function wT(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 kT(e,t,n,r){const i=wT(n);let o=n.bulletCurrent||kf(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),c);return a(),u;function c(d,p,h){return p?(h?"":" ".repeat(s))+d:(h?o:o+" ".repeat(s-o.length))+d}}function bT(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}function ET(e,t,n,r){if(!e.children.some(function(l){return V_(l)}))return n.containerFlow(e,r);const o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),s}function ST(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}bf.attention=Kx;bf.peek=CT;function bf(e,t,n,r){const i=n.enter("phrasing"),o=xf(e,Kx,n,n.createTracker(r)),s=o?ta([o],r.before,r.after):"";return i(),s}function Kx(e,t){return{construct:"strong",markers:ST(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function CT(e,t,n){return n.options.strong||"*"}function NT(e,t,n,r){const i=t?t.children:[],o=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[o+1],beforeNode:i[o-1]})}function jT(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 _T(e,t,n){const r=(qx(n)+(n.options.ruleSpaces?" ":"")).repeat(jT(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Lc={blockquote:q_,break:ym,code:Z_,definition:eT,emphasis:wf,hardBreak:ym,heading:cT,html:Dx,image:zx,imageReference:Bx,inlineCode:Ux,link:Wx,linkReference:Vx,list:xT,listItem:kT,paragraph:bT,root:ET,strong:bf,text:NT,thematicBreak:_T};function TT(){return{enter:{table:$T,tableData:wm,tableHeader:wm,tableRow:IT},exit:{codeText:AT,table:LT,tableData:ou,tableHeader:ou,tableRow:ou}}}function $T(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[],position:void 0},e),this.data.inTable=!0}function LT(e){this.exit(e),this.data.inTable=void 0}function IT(e){this.enter({type:"tableRow",children:[],position:void 0},e)}function ou(e){this.exit(e)}function wm(e){this.enter({type:"tableCell",children:[],position:void 0},e)}function AT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,RT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function RT(e,t){return t==="|"?t:e}function OT(e){const t=e||{},{tableCellPadding:n,tablePipeAlign:r,stringLength:i}=t,o=n?" ":"|";return{handlers:{inlineCode:p,table:s,tableCell:a,tableRow:l},join:[MT],unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
152
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}]};function s(h,y,x,S){const v=c(h,x,S),m=v[0];if(m){let g=h.align?h.align.length:0,k=-1;if(!g)for(;++k<v.length;)v[k].length>g&&(g=v[k].length);for(;m.length<g;)m.push("")}return u(v,h.align)}function l(h,y,x,S){const v=d(h,x,S),m=u([v]);return m.slice(0,m.indexOf(`
|
|
153
|
+
`))}function a(h,y,x,S){const v=x.enter("tableCell"),m=x.enter("phrasing"),g=x.containerPhrasing(h,{...S,before:o,after:o});return m(),v(),g}function u(h,y){return H_(h,{align:y,alignDelimiters:r,fillRows:!1,padding:n,stringLength:i})}function c(h,y,x){const{children:S}=h;let v=-1;const m=[],g=y.enter("table");for(;++v<S.length;)m[v]=d(S[v],y,x);return g(),m}function d(h,y,x){const{children:S}=h;let v=-1;const m=[],g=y.enter("tableRow");for(;++v<S.length;)m[v]=a(S[v],h,y,x);return g(),m}function p(h,y,x){const S=Lc.inlineCode(h,y,x);if(!x.stack.includes("tableCell"))return S;const v=[];let m=0,g=S.indexOf("|");for(;g!==-1;){let k=g;for(;k>m&&S.charCodeAt(k-1)===92;)k--;v.push(S.slice(m,g)),(g-k)%2===0&&v.push("\\"),m=g,g=S.indexOf("|",g+1)}return v.push(S.slice(m)),v.join("")}}function MT(e,t,n,r){if(e.type==="table"&&n.type==="listItem"&&n.spread===!1&&(t.type==="definition"||t.type==="heading"&&PT(t,r)||t.type==="paragraph"||t.type==="table"))return 1}function PT(e,t){let n=!1;return Jl(e,function(r){if(r.type==="break"||"value"in r&&/\r?\n|\r/.test(r.value))return n=!0,ho}),!!((!e.depth||e.depth<3)&&Gl(e)&&(t.options.setext||n))}function FT(){return{exit:{taskListCheckValueChecked:km,taskListCheckValueUnchecked:km,paragraph:zT}}}function DT(){return{handlers:{paragraph:BT},join:[UT]}}function km(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function zT(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start={...r.position.start}))}}this.exit(e)}function BT(e,t,n,r){if(!t||t.type!=="listItem"||Gx(t)!==e)return Lc.paragraph(e,t,n,r);const i="["+(t.checked?"x":" ")+"] ",o=n.createTracker(r);o.move(i);const s=Lc.paragraph(e.children.length>0?e:{type:"paragraph",children:[{type:"text",value:" "}]},t,n,{...r,...o.current()});return i+s}function UT(e,t,n){if(!(e.type==="definition"&&n.type==="listItem"))return;const r=Gx(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function Gx(e){if(typeof e.checked=="boolean")for(const t of e.children){if(t.type==="paragraph")return t;if(t.type!=="definition")return}}function HT(){return[a_(),I_(),M_(),TT(),FT()]}function WT(e){return{extensions:[u_(),A_(e),P_(),OT(e),DT()]}}const VT={tokenize:QT,partial:!0},Yx={tokenize:ZT,partial:!0},Xx={tokenize:JT,partial:!0},Qx={tokenize:e$,partial:!0},qT={tokenize:t$,partial:!0},Zx={name:"wwwAutolink",tokenize:YT,previous:ew},Jx={name:"protocolAutolink",tokenize:XT,previous:tw},Pn={name:"emailAutolink",tokenize:GT,previous:nw},En={};function KT(){return{text:En}}let mr=48;for(;mr<123;)En[mr]=Pn,mr++,mr===58?mr=65:mr===91&&(mr=97);En[43]=Pn;En[45]=Pn;En[46]=Pn;En[95]=Pn;En[72]=[Pn,Jx];En[104]=[Pn,Jx];En[87]=[Pn,Zx];En[119]=[Pn,Zx];function GT(e,t,n){const r=this;let i,o;return s;function s(d){return!Ic(d)||!nw.call(r,r.previous)||Ef(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return Ic(d)?(e.consume(d),l):d===64?(e.consume(d),a):n(d)}function a(d){return d===46?e.check(qT,c,u)(d):d===45||d===95||vt(d)?(o=!0,e.consume(d),a):c(d)}function u(d){return e.consume(d),i=!0,a}function c(d){return o&&i&&yt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function YT(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!ew.call(r,r.previous)||Ef(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(VT,e.attempt(Yx,e.attempt(Xx,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function XT(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&tw.call(r,r.previous)&&!Ef(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(yt(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),a}return n(d)}function a(d){return d===47?(e.consume(d),o?u:(o=!0,a)):n(d)}function u(d){return d===null||bl(d)||ze(d)||Pr(d)||Ko(d)?n(d):e.attempt(Yx,e.attempt(Xx,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function QT(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function ZT(e,t,n){let r,i,o;return s;function s(u){return u===46||u===95?e.check(Qx,a,l)(u):u===null||ze(u)||Pr(u)||u!==45&&Ko(u)?a(u):(o=!0,e.consume(u),s)}function l(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function a(u){return i||r||!o?n(u):t(u)}}function JT(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Qx,t,o)(s):s===null||ze(s)||Pr(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function e$(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),o):l===93?(e.consume(l),i):l===60||l===null||ze(l)||Pr(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||ze(l)||Pr(l)?t(l):r(l)}function o(l){return yt(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):yt(l)?(e.consume(l),s):n(l)}}function t$(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return vt(o)?n(o):t(o)}}function ew(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ze(e)}function tw(e){return!yt(e)}function nw(e){return!(e===47||Ic(e))}function Ic(e){return e===43||e===45||e===46||e===95||vt(e)}function Ef(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const n$={tokenize:c$,partial:!0};function r$(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:l$,continuation:{tokenize:a$},exit:u$}},text:{91:{name:"gfmFootnoteCall",tokenize:s$},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:i$,resolveTo:o$}}}}function i$(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return l;function l(a){if(!s||!s._balanced)return n(a);const u=pn(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function o$(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function s$(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),a}function a(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!s||d===null||d===91||ze(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(pn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ze(d)||(s=!0),o++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,u):u(d)}}function l$(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(y)}function c(y){if(s>999||y===93&&!l||y===null||y===91||ze(y))return n(y);if(y===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return o=pn(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return ze(y)||(l=!0),s++,e.consume(y),y===92?d:c}function d(y){return y===91||y===92||y===93?(e.consume(y),s++,c):c(y)}function p(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(o)||i.push(o),Re(e,h,"gfmFootnoteDefinitionWhitespace")):n(y)}function h(y){return t(y)}}function a$(e,t,n){return e.check(Go,t,e.attempt(n$,t,n))}function u$(e){e.exit("gfmFootnoteDefinition")}function c$(e,t,n){const r=this;return Re(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function d$(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let u=a;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[a][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[a][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[a][1].start)},p=[["enter",c,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",d,l]],h=l.parser.constructs.insideSpan.null;h&&fn(p,p.length,0,Yl(h,s.slice(u+1,a),l)),fn(p,p.length,0,[["exit",d,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",c,l]]),fn(s,u-1,a-u+3,p),a=u+p.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function o(s,l,a){const u=this.previous,c=this.events;let d=0;return p;function p(y){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(y):(s.enter("strikethroughSequenceTemporary"),h(y))}function h(y){const x=ar(u);if(y===126)return d>1?a(y):(s.consume(y),d++,h);if(d<2&&!n)return a(y);const S=s.exit("strikethroughSequenceTemporary"),v=ar(y);return S._open=!v||v===2&&!!x,S._close=!x||x===2&&!!v,l(y)}}}class f${constructor(){this.map=[],this.index=new Map}add(t,n,r){p$(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0,this.index.clear()}}function p$(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const o=[t,n,r];e.map.push(o),e.index.set(t,o)}function h$(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function m$(){return{flow:{null:{name:"table",tokenize:g$,resolveAll:y$}}}}function g$(e,t,n){const r=this;let i=0,o=0,s;return l;function l(w){let A=r.events.length-1;for(;A>-1;){const{type:z}=r.events[A][1];if(z==="lineEnding"||z==="linePrefix")A--;else break}const I=A>-1?r.events[A][1].type:null,P=I==="tableHead"||I==="tableRow"?b:a;return P===b&&r.parser.lazy[r.now().line]?n(w):P(w)}function a(w){return e.enter("tableHead"),e.enter("tableRow"),u(w)}function u(w){return w===124||(s=!0,o+=1),c(w)}function c(w){return w===null?n(w):ke(w)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),h):n(w):_e(w)?Re(e,c,"whitespace")(w):(o+=1,s&&(s=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(w)))}function d(w){return w===null||w===124||ze(w)?(e.exit("data"),c(w)):(e.consume(w),w===92?p:d)}function p(w){return w===92||w===124?(e.consume(w),d):d(w)}function h(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),s=!1,_e(w)?Re(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):y(w))}function y(w){return w===45||w===58?S(w):w===124?(s=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),x):_(w)}function x(w){return _e(w)?Re(e,S,"whitespace")(w):S(w)}function S(w){return w===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),v):w===45?(o+=1,v(w)):w===null||ke(w)?k(w):_(w)}function v(w){return w===45?(e.enter("tableDelimiterFiller"),m(w)):_(w)}function m(w){return w===45?(e.consume(w),m):w===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(w))}function g(w){return _e(w)?Re(e,k,"whitespace")(w):k(w)}function k(w){return w===124?y(w):w===null||ke(w)?!s||i!==o?_(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):_(w)}function _(w){return n(w)}function b(w){return e.enter("tableRow"),T(w)}function T(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),T):w===null||ke(w)?(e.exit("tableRow"),t(w)):_e(w)?Re(e,T,"whitespace")(w):(e.enter("data"),C(w))}function C(w){return w===null||w===124||ze(w)?(e.exit("data"),T(w)):(e.consume(w),w===92?$:C)}function $(w){return w===92||w===124?(e.consume(w),C):C(w)}}function y$(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,a=0,u,c,d;const p=new f$;for(;++n<e.length;){const h=e[n],y=h[1];h[0]==="enter"?y.type==="tableHead"?(l=!1,a!==0&&(bm(p,t,a,u,c),c=void 0,a=0),u={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},p.add(n,0,[["enter",u,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,c={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},p.add(n,0,[["enter",c,t]])),i=y.type==="tableDelimiterRow"?2:c?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=Cs(p,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=Cs(p,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):y.type==="tableHead"?(l=!0,a=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(a=n,o[1]!==0?(s[0]=s[1],d=Cs(p,t,o,i,n,d)):s[1]!==0&&(d=Cs(p,t,s,i,n,d)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(s[3]=n)}for(a!==0&&bm(p,t,a,u,c),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=h$(t.events,n))}return e}function Cs(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},Kr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=Kr(t.events,n[1]);if(o={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Kr(t.events,n[2]),c=Kr(t.events,n[3]),d={type:l,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,x=n[3]-n[2]-1;e.add(y,x,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},Kr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function bm(e,t,n,r,i){const o=[],s=Kr(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function Kr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const v$={name:"tasklistCheck",tokenize:w$};function x$(){return{text:{91:v$}}}function w$(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return ze(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return ke(a)?t(a):_e(a)?e.check({tokenize:k$},t,n)(a):n(a)}}function k$(e,t,n){return Re(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function b$(e){return sx([KT(),r$(),d$(e),m$(),x$()])}const E$={};function S$(e){const t=this,n=e||E$,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(b$(n)),o.push(HT()),s.push(WT(n))}function C$({file:e,split:t,version:n}){const r=e.status==="added"?["new"]:e.status==="removed"?["old"]:t?["old","new"]:["new"];return f.jsx("div",{className:`fs-md-sides n${r.length}`,children:r.map(i=>f.jsx(N$,{side:i,path:i==="old"?e.oldPath??e.path:e.path,diffPath:e.path,version:n,labelled:r.length>1},i))})}function N$({side:e,path:t,diffPath:n,version:r,labelled:i}){const[o,s]=O.useState(null),[l,a]=O.useState(null);O.useEffect(()=>{let c=!0;return a(null),Uv(n,e).then(d=>c&&s(d.join(`
|
|
154
|
+
`)),d=>c&&a(d instanceof Error?d.message:String(d))),()=>{c=!1}},[n,e,r]);const u={a:({href:c,children:d})=>c&&/^(https?:|mailto:)/i.test(c)?f.jsx("a",{href:c,target:"_blank",rel:"noreferrer noopener",children:d}):f.jsx("span",{className:"fs-md-link",title:c,children:d}),code:({className:c,children:d})=>{var x;const p=(x=/language-([\w+-]+)/.exec(c??""))==null?void 0:x[1],h=String(d??"").replace(/\n$/,""),y=p?PE(h,p):void 0;return y?f.jsx("code",{className:c,children:y.map((S,v)=>f.jsxs("span",{children:[S.map((m,g)=>m.types?f.jsx("span",{className:`token ${m.types}`,children:m.text},g):m.text),v<y.length-1&&`
|
|
155
|
+
`]},v))}):f.jsx("code",{className:c,children:d})}};return f.jsxs("div",{className:`fs-md-side ${e}`,children:[i&&f.jsx("div",{className:`fs-image-side ${e}`,children:e==="old"?"変更前":"変更後"}),l?f.jsxs("div",{className:"ds-muted",children:["読み込めませんでした: ",l]}):o===null?f.jsx("div",{className:"ds-muted",children:"読み込み中…"}):f.jsx("div",{className:"fs-md",children:f.jsx(Jj,{remarkPlugins:[S$],components:u,urlTransform:(c,d)=>j$(c,d,t,e,r),children:o})})]})}function j$(e,t,n,r,i){if(t!=="src"||/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//"))return Lx(e);const o=_$(n,e.replace(/[?#].*$/,""));return o?Hv(o,r,i):""}function _$(e,t){let n=t;try{n=decodeURIComponent(t)}catch{}const r=n.startsWith("/")?[]:e.split("/").slice(0,-1);for(const i of n.split("/"))if(!(i===""||i==="."))if(i===".."){if(!r.length)return null;r.pop()}else r.push(i);return r.length?r.join("/"):null}const rw=1500;function iw(e){if(mc(e.path))return{label:"画像",first:e.binary?"preview":"diff"};if(_E(e.path)&&!e.binary&&!e.large)return{label:"プレビュー",first:"diff"}}const T$=O.memo(function(t){const{file:n}=t,r=O.useRef(null),i=I$(r,t.scrollRoot),[o,s]=O.useState(!1),l=Dv(n),a=iw(n),u=a?t.view:"diff",c=O.useMemo(()=>dE(n,t.content,t.expansion),[n,t.content,t.expansion]),d=O.useMemo(()=>i?ME(n,t.content):void 0,[n,t.content,i]);O.useEffect(()=>(t.register(n.path,r.current),()=>t.register(n.path,null)),[n.path,t.register]);const p=async()=>{await _i(n.path),s(!0),window.setTimeout(()=>s(!1),1400)},h=!!n.unchanged,y=h?L$(n):$$(n),x=()=>u==="preview"?i?mc(n.path)?f.jsx(FE,{file:n,version:t.version}):f.jsx(C$,{file:n,split:t.mode==="split",version:t.version}):f.jsx("div",{className:"fs-placeholder",style:{height:240}}):y?f.jsx("div",{className:"fs-note",children:y}):i?f.jsx(IE,{file:n,mode:h?"unified":t.mode,rows:c,tokens:d,byLine:t.byLine,onExpand:(S,v)=>t.onExpand(n.path,S,v)}):f.jsx("div",{className:"fs-placeholder",style:{height:(l+n.chunks.length)*20}});return f.jsxs("section",{ref:r,className:`fs-file${t.reviewed?" reviewed":""}${h?" unchanged":""}`,"data-path":n.path,children:[f.jsxs("header",{className:"fs-file-head",children:[f.jsx("button",{className:`fs-fold${t.open?" open":""}`,onClick:()=>t.onToggle(n.path),"aria-label":t.open?"折りたたむ":"開く","aria-expanded":t.open,children:f.jsx(Td,{size:14})}),f.jsx(bi,{status:h?"unchanged":n.status}),f.jsxs("span",{className:"fs-file-path",title:n.oldPath?`${n.oldPath} → ${n.path}`:n.path,onClick:()=>t.onToggle(n.path),children:[n.oldPath&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"fs-old-path",children:n.oldPath}),f.jsx("span",{className:"ds-muted",children:" → "})]}),n.path]}),f.jsx("button",{className:"fs-icon-btn",onClick:()=>void p(),title:o?"コピーしました":"パスをコピー","aria-label":"パスをコピー",children:f.jsx(Hy,{size:13})}),n.generated&&f.jsx("span",{className:"fs-tag",title:"ロックファイルや生成されたコード(最初は折りたたんでいます)",children:"生成"}),h&&f.jsx("span",{className:"fs-tag",title:"ツリーの「全体」から開いた、変更していないファイル",children:"変更なし"}),f.jsx("span",{className:"ds-spacer"}),a&&!(mc(n.path)&&n.binary)&&f.jsx("span",{className:"ds-seg fs-view-seg",role:"radiogroup","aria-label":"表示",children:[["diff","差分"],["preview",a.label]].map(([S,v])=>f.jsx("button",{role:"radio","aria-checked":u===S,className:u===S?"on":"",onClick:()=>t.onView(n.path,S),children:v},S))}),t.commentCount>0&&f.jsx(Ao,{n:t.commentCount,title:`コメント ${t.commentCount}`}),h?t.onClose&&f.jsx("button",{className:"ds-btn",onClick:()=>t.onClose(n.path),title:"一覧から外す(ツリーの「全体」からまた開けます)",children:"閉じる"}):f.jsxs(f.Fragment,{children:[f.jsx($i,{stats:{added:n.additions,removed:n.deletions},title:`追加 ${n.additions} 行・削除 ${n.deletions} 行`}),f.jsxs("label",{className:"ds-check fs-viewed",title:"確認済みにすると折りたたみます(このファイルがまた変わると外れます)",children:[f.jsx("input",{type:"checkbox",checked:t.reviewed,onChange:S=>t.onReviewed(n.path,S.target.checked)}),"確認済み"]})]})]}),t.open&&f.jsxs("div",{className:"fs-file-body",children:[t.orphans.length>0&&f.jsxs("div",{className:"fs-orphans",children:[f.jsx("div",{className:"ds-muted",children:"差分からなくなった行へのコメント"}),t.orphans.map(S=>f.jsx(tf,{c:S,showWhere:!0},S.id))]}),x()]}),!t.open&&(n.generated||l>rw)&&!t.reviewed&&f.jsxs("div",{className:"fs-folded",children:[n.generated?"生成されたファイルのため折りたたんでいます":`大きな差分(${l} 行)のため折りたたんでいます`,f.jsx("button",{className:"ds-link",onClick:()=>t.onToggle(n.path),children:"表示する"})]})]})});function $$(e){if(e.binary)return"バイナリファイルのため、行の差分はありません";if(e.large)return"大きすぎるため、行の差分を表示していません";if(!(e.chunks.length>0))return e.modeChange?`ファイルのモードだけが変わりました(${e.modeChange})`:e.status==="renamed"?"名前だけが変わりました(内容の変更はありません)":"空のファイルです"}function L$(e){return e.loading?"読み込み中…":e.binary?"バイナリファイルです":e.large?"大きすぎるため、内容を表示していません":e.chunks.length===0?"空のファイルです":void 0}function I$(e,t){const[n,r]=O.useState(!1);return O.useEffect(()=>{const i=e.current;if(n||!i||!t)return;const o=new IntersectionObserver(s=>{s.some(l=>l.isIntersecting)&&r(!0)},{root:t,rootMargin:"1200px 0px"});return o.observe(i),()=>o.disconnect()},[e,t,n]),n}const Em=(e,t)=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n};function A$({mode:e,onMode:t,tree:n,error:r,current:i,reviewed:o,commentCounts:s,onSelect:l,onReviewed:a}){var b,T;const[u,c]=O.useState(""),d=e==="all",[p,h]=O.useState(new Set),[y,x]=O.useState(null),S=O.useMemo(()=>d&&n?cE(n):null,[d,n]);O.useEffect(()=>{S&&y===null&&x(S)},[S,y]);const v=O.useMemo(()=>n?Mv(n,u):null,[n,u]),m=O.useMemo(()=>n&&!d?Ov(n):[],[n,d]),g=C=>{var $;return u.trim()!==""||(d?(($=y??S)==null?void 0:$.has(C))===!0:!p.has(C))},k=C=>d?x($=>Em($??S??new Set,C)):h($=>Em($,C)),_=(C,$)=>{var I;const w={paddingLeft:8+$*12};if(C.plain||(I=C.file)!=null&&I.unchanged)return f.jsxs("div",{className:`fs-tree-row file plain${i===C.path?" current":""}${C.file?" shown":""}`,style:w,onClick:()=>l(C.path),title:`${C.path}(変更なし)`,children:[f.jsx("span",{className:"fs-tree-check-space"}),f.jsx(bi,{status:"unchanged",small:!0}),f.jsx("span",{className:"fs-tree-name",children:C.name}),(s.get(C.path)??0)>0&&f.jsx(Ao,{n:s.get(C.path)})]},C.path);if(C.file){const P=C.file,z=s.get(P.path)??0,K=o.has(P.path);return f.jsxs("div",{className:`fs-tree-row file${i===P.path?" current":""}${K?" reviewed":""}`,style:w,onClick:()=>l(P.path),title:P.oldPath?`${P.oldPath} → ${P.path}`:P.path,children:[f.jsx("input",{type:"checkbox",className:"fs-tree-check",checked:K,onClick:U=>U.stopPropagation(),onChange:U=>a(P.path,U.target.checked),"aria-label":`${P.path} を確認済みにする`,title:"確認済み"}),f.jsx(bi,{status:P.status,small:!0}),f.jsx("span",{className:"fs-tree-name",children:C.name}),z>0&&f.jsx(Ao,{n:z}),f.jsxs("span",{className:"fs-tree-counts",children:[P.additions>0&&f.jsxs("span",{className:"added",children:["+",P.additions]}),P.deletions>0&&f.jsxs("span",{className:"removed",children:["−",P.deletions]})]})]},C.path)}const A=g(C.path);return f.jsxs("div",{children:[f.jsxs("div",{className:`fs-tree-row dir${d&&S&&!S.has(C.path)?" plain":""}`,style:w,onClick:()=>k(C.path),title:C.path,children:[f.jsx("span",{className:`fs-fold small${A?" open":""}`,children:f.jsx(Td,{size:12})}),f.jsx("span",{className:"fs-tree-name",children:C.name})]}),A&&C.children.map(P=>_(P,$+1))]},C.path)};return f.jsxs("aside",{className:"fs-tree",children:[f.jsxs("div",{className:"fs-tree-head",children:[f.jsx("div",{className:"ds-seg fs-tree-mode",role:"radiogroup","aria-label":"ツリーに出すファイル",children:[["changes","変更","変更したファイルだけ"],["all","全体","リポジトリのすべてのファイル(変更していないファイルはクリックで開きます)"]].map(([C,$,w])=>f.jsx("button",{role:"radio","aria-checked":e===C,className:e===C?"on":"",onClick:()=>t(C),title:w,children:$},C))}),d?f.jsx("button",{className:"fs-icon-btn",disabled:!S,onClick:()=>{var C;return x((C=y??S)!=null&&C.size?new Set:S)},title:(b=y??S)!=null&&b.size?"すべてのフォルダを閉じる":"変更のあるフォルダを開く",children:(T=y??S)!=null&&T.size?"−":"+"}):m.length>0&&f.jsx("button",{className:"fs-icon-btn",onClick:()=>h(p.size?new Set:new Set(m)),title:p.size?"すべてのフォルダを開く":"すべてのフォルダを閉じる",children:p.size?"+":"−"}),f.jsx("input",{className:"fs-filter",type:"search",placeholder:"ファイルを絞り込む",value:u,onChange:C=>c(C.target.value)})]}),f.jsx("div",{className:"fs-tree-body",children:r?f.jsxs("div",{className:"fs-tree-empty ds-muted",children:["リポジトリのファイルを読めませんでした: ",r]}):v?v.children.length>0?v.children.map(C=>_(C,0)):f.jsx("div",{className:"fs-tree-empty ds-muted",children:u?"一致するファイルはありません":d?"ファイルはありません":"変更されたファイルはありません"}):f.jsx("div",{className:"fs-tree-empty ds-muted",children:"読み込み中…"})})]})}const Sf="fileshape.reviewed:",Ac=e=>`${e.repoRoot}|${e.targetLabel}|${e.baseLabel}`,Sm=e=>qt(Sf+e,{}),R$=(e,t)=>Nt(Sf+e,t),O$=e=>Wo(Sf+e),M$=e=>new Map(e.map(t=>[t.path,yE(t)]));function P$(e,t){const n=new Set;for(const[r,i]of e)t[r]===i&&n.add(r);return n}const su=300,F$={added:"A",modified:"M",removed:"D",renamed:"R"};function D$(e){const t=[e.additions||e.deletions?`+${e.additions} −${e.deletions}`:"",e.binary?"バイナリ":"",e.large?"大きいファイル":""].filter(Boolean),n=e.status==="renamed"&&e.oldPath?`${e.oldPath} → ${e.path}`:e.path;return`- ${F$[e.status]} ${n}${t.length?`(${t.join("、")})`:""}`}function z$(e){const t=e.files.filter(i=>!i.unchanged&&!i.generated),n=e.files.filter(i=>!i.unchanged&&i.generated).length,r=[`変更されたファイル(${t.length}):`,...t.slice(0,su).map(D$)];return t.length>su&&r.push(`- ほか ${t.length-su} ファイル`),n&&r.push(`(生成されたファイル ${n} 個は対象外)`),r.push("","コメントの付け方:","- path: ファイルのパス(リポジトリのルートから)",'- line: 指摘する行の番号。side が "new" なら変更後のファイルの行、"old" なら変更前のファイルの行','- side: ふつうは "new"。削除された行を指すときだけ "old"',"- code: その行のコードをファイルにあるとおりに(複数行のときは改行でつなぎ、endLine に最後の行の番号。1行なら endLine は null)","- target: null",'- 変更されていないファイルの行も指せます(この変更に合わせて直すべき箇所など)。そのときも side は "new"'),r.join(`
|
|
156
|
+
`)}function Cm(e,t,n){const r=e.status==="removed"?"old":e.status==="added"||e.unchanged?"new":t.side??"new",i=Zd(e,r,n);if(i.size===0)return null;const o=(t.code??"").replace(/\n+$/,"").split(`
|
|
157
|
+
`),s=t.line??1,l=c=>{let d;for(const p of i.keys())o.every((h,y)=>i.has(p+y)&&c(i.get(p+y),h))&&(d===void 0||Math.abs(p-s)<Math.abs(d-s))&&(d=p);return d},a=(c,d)=>({path:e.path,side:r,line:c,...d>1?{endLine:c+d-1}:{},code:Array.from({length:d},(p,h)=>i.get(c+h)??"").join(`
|
|
158
|
+
`)});if(o.some(c=>c.trim()!=="")){const c=l((d,p)=>d===p)??l((d,p)=>d.trim()===p.trim());if(c!==void 0)return{target:a(c,o.length),exact:!0}}if(t.line===null||!i.has(t.line))return null;let u=t.endLine!==null&&t.endLine>t.line?t.endLine-t.line+1:1;for(;u>1&&!i.has(t.line+u-1);)u--;return{target:a(t.line,u),exact:!1}}const B$=(e,t)=>e.files.find(n=>n.path===t)??e.files.find(n=>n.oldPath===t),lu="fileshape.treeWidth",au=280,U$={};function H$({data:e,active:t,onComments:n,request:r,ai:i,onAi:o}){var R;const s=Ac(e),[l,a]=O.useState(()=>EE(s)),u=`fileshape.opened:${s}`,[c,d]=O.useState(()=>W$(qt(u,[])));O.useEffect(()=>Nt(u,c),[u,c]);const[p,h]=O.useState(new Map),y=O.useRef(new Set),x=O.useMemo(()=>new Set(e.files.map(B=>B.path)),[e]),S=O.useMemo(()=>[...new Set([...c,...l.filter(B=>B.unchanged).map(B=>B.path)])].filter(B=>!x.has(B)),[c,l,x]);O.useEffect(()=>{for(const B of S){if(p.has(B)||y.current.has(B))continue;const Q=y.current;Q.add(B);const ne=xe=>{y.current===Q&&(Q.delete(B),h(Se=>new Map(Se).set(B,xe)))};Eh(B).then(xe=>ne(xe?Wa(B,xe):null),()=>ne(null))}},[S,p]),O.useEffect(()=>{c.some(B=>p.get(B)===null)&&d(B=>B.filter(Q=>p.get(Q)!==null))},[p,c]);const v=O.useMemo(()=>S.filter(B=>p.get(B)!==null).map(B=>p.get(B)??Wa(B,void 0)),[S,p]),m=O.useMemo(()=>v.length?{...e,files:[...e.files,...v]}:e,[e,v]),g=O.useMemo(()=>new Set(l.map(B=>B.path)),[l]),k=O.useCallback(B=>d(Q=>Q.filter(ne=>ne!==B)),[]),_=O.useMemo(()=>gh(m.files),[m]),b=O.useMemo(()=>Rv(_),[_]),[T,C]=O.useState(()=>rc("fileshape","treeMode","changes")),$=B=>{C(B),ic("fileshape","treeMode",B)},[w,A]=O.useState(null);O.useEffect(()=>{if(T!=="all"||(w==null?void 0:w.diff)===e)return;let B=!0;return NE().then(Q=>B&&A({diff:e,paths:Q}),Q=>B&&A({diff:e,error:Q instanceof Error?Q.message:String(Q)})),()=>{B=!1}},[T,e,w]);const I=(w==null?void 0:w.diff)===e?w.paths:void 0,P=O.useMemo(()=>T==="changes"?_:I?gh(m.files,I):null,[T,_,m,I]),[z,K]=O.useState(()=>rc("fileshape","mode","unified")),U=B=>{K(B),ic("fileshape","mode",B)},[q,D]=O.useState(()=>Sm(s));O.useEffect(()=>D(Sm(s)),[s]);const W=O.useMemo(()=>M$(e.files),[e]),E=O.useMemo(()=>P$(W,q),[W,q]),[X,H]=O.useState({}),j=B=>{if(B in X)return X[B];const Q=xn(m,B);return!Q||!(E.has(B)||Q.generated||Dv(Q)>rw)},M=O.useRef(j);M.current=j;const L=O.useCallback(B=>H(Q=>({...Q,[B]:!M.current(B)})),[]),[F,V]=O.useState(new Map),[Z,te]=O.useState({}),[le,re]=O.useState(0),ce=O.useRef(new Map),oe=O.useRef(!0);O.useEffect(()=>{if(oe.current){oe.current=!1;return}ce.current=new Map,V(new Map),te({}),re(B=>B+1),y.current=new Set,h(new Map)},[e]);const de=O.useCallback(B=>{let Q=ce.current.get(B);if(!Q){const ne=ce.current;Q=Uv(B,"new").then(xe=>(ce.current===ne&&V(Se=>new Map(Se).set(B,xe)),xe)),Q.catch(()=>ne.delete(B)),ne.set(B,Q)}return Q},[]),we=O.useCallback(async(B,Q,ne)=>{const xe=xn(m,B);if(!xe)return;let Se;try{Se=await de(B)}catch(Te){window.alert(`ファイルを読めませんでした: ${Te instanceof Error?Te.message:String(Te)}`);return}const Ce=ql(xe,Se.length)[Q.index];Ce&&te(Te=>({...Te,[B]:fE(Te[B]??{},Ce,ne,Se.length)}))},[m,de]),[je,N]=O.useState({}),G=O.useCallback((B,Q)=>N(ne=>({...ne,[B]:Q})),[]),ee=O.useRef(new Map),he=O.useCallback((B,Q)=>{Q?ee.current.set(B,Q):ee.current.delete(B)},[]),[fe,pe]=O.useState(null),$e=O.useCallback((B,Q)=>{const ne=W.get(B);if(ne&&(D(xe=>{const Se={...xe};return Q?Se[B]=ne:delete Se[B],R$(s,Se),Se}),H(xe=>({...xe,[B]:!Q})),Q)){const xe=ee.current.get(B),Se=fe;xe&&Se&&xe.getBoundingClientRect().top<Se.getBoundingClientRect().top&&xe.scrollIntoView({block:"start"})}},[W,s,fe]),[ht,Ze]=O.useState(null),[Je,J]=O.useState(null),ie=O.useCallback(B=>{a(B),SE(s,B)},[s]),ye=O.useMemo(()=>({run:m,comments:l,contents:F,composing:ht,editing:Je,compose:B=>{Ze(B),J(null)},edit:B=>{J(B),Ze(null)},add:(B,Q)=>{var ne;ie([...l,bh(B,Q,!!((ne=xn(m,B.path))!=null&&ne.unchanged))]),Ze(null)},update:(B,Q)=>{ie(l.map(ne=>ne.id===B?{...ne,body:Q}:ne)),J(null)},remove:B=>ie(l.filter(Q=>Q.id!==B))}),[m,l,F,ht,Je,ie]),ge=O.useMemo(()=>{const B=new Map,Q=[];for(const ne of l){const xe=xn(m,ne.path);if(!xe){Q.push(ne);continue}let Se=B.get(ne.path);Se||B.set(ne.path,Se={byLine:new Map,orphans:[]});const Ce=Po(xe,ne,F.get(ne.path));if(Ce.line===void 0)Se.orphans.push(ne);else{const Te=qr(ne.side,Ce.endLine??Ce.line);Se.byLine.set(Te,[...Se.byLine.get(Te)??[],ne])}}return{byFile:B,gone:Q}},[l,m,F]);O.useEffect(()=>{for(const B of l){const Q=xn(m,B.path);Q&&!kh(Q,B)&&!F.has(B.path)&&de(B.path).catch(()=>{})}te(B=>{let Q=B;for(const ne of l){const xe=xn(m,ne.path),Se=F.get(ne.path);if(!xe||!Se||kh(xe,ne))continue;const Ce=Po(xe,ne,Se);if(Ce.line===void 0)continue;const Te=Ce.endLine??Ce.line,[mt,st]=ne.side==="new"?[Ce.line,Te]:[fc(xe,Ce.line)??Ce.line,fc(xe,Te)??Te],ct=pE(xe,Se.length,Q[ne.path]??{},mt,st);ct!==(Q[ne.path]??{})&&JSON.stringify(ct)!==JSON.stringify(Q[ne.path]??{})&&(Q={...Q,[ne.path]:ct})}return Q})},[l,F,m,de]);const Y=O.useMemo(()=>({byLine:new Map,orphans:[]}),[]),se=O.useMemo(()=>{const B=new Map;for(const Q of l)B.set(Q.path,(B.get(Q.path)??0)+1);return B},[l]);O.useEffect(()=>{const B=l.filter(Q=>kE(m,Q,F.get(Q.path))!=="resolved").length;n({open:B,prompt:()=>zv(m,l,{contents:F}).text,review:()=>z$(e)})},[l,m,F,e,n]);const ve=O.useRef(l);ve.current=l;const be=O.useRef(0),[Ee,Ie]=O.useState(null);O.useEffect(()=>{if(!i||i.seq===be.current)return;be.current=i.seq;const B=i.items.filter(Q=>Q.module==="file");(async()=>{const Q=[];for(const ne of B){if(!ne.path)continue;let xe=B$(e,ne.path),Se=!1;if(!xe){const Te=await Eh(ne.path).catch(()=>null);if(!Te)continue;xe=Wa(ne.path,Te),Se=!0}let Ce=Cm(xe,ne);if(!(Ce!=null&&Ce.exact)&&Pv(xe)){const Te=await de(xe.path).catch(()=>{});Te&&(Ce=Cm(xe,ne,Te)??Ce)}Ce&&Q.push({...bh(Ce.target,ne.body,Se),ai:i.agent})}Q.length&&ie([...ve.current,...Q]),Ie({seq:i.seq,placed:Q.length,dropped:B.length-Q.length})})()},[i,e,de,ie]),O.useEffect(()=>{Ee&&o(Ee)},[Ee,o]);const[ut,Ye]=O.useState(((R=b[0])==null?void 0:R.path)??null);O.useEffect(()=>{if(!fe)return;let B=0;const Q=()=>{cancelAnimationFrame(B),B=requestAnimationFrame(()=>{var Se;const ne=fe.getBoundingClientRect().top+8;let xe=((Se=b[0])==null?void 0:Se.path)??null;for(const Ce of b){const Te=ee.current.get(Ce.path);if(Te)if(Te.getBoundingClientRect().top<=ne)xe=Ce.path;else break}Ye(xe)})};return fe.addEventListener("scroll",Q,{passive:!0}),()=>{fe.removeEventListener("scroll",Q),cancelAnimationFrame(B)}},[fe,b]);const We=O.useRef(null),Oe=B=>{var mt;j(B)||H(st=>({...st,[B]:!0})),Ye(B),(mt=We.current)==null||mt.stop();const Q=fe;if(!Q)return;let ne=0,xe=0;const Se=performance.now(),Ce=()=>{cancelAnimationFrame(ne),Q.removeEventListener("wheel",Ce),Q.removeEventListener("touchmove",Ce),Q.removeEventListener("keydown",Ce),We.current=null},Te=()=>{const st=ee.current.get(B);if(st){const ct=st.getBoundingClientRect().top-Q.getBoundingClientRect().top-(parseFloat(getComputedStyle(Q).paddingTop)||0),_t=Q.scrollTop+Q.clientHeight>=Q.scrollHeight-1;Math.abs(ct)>1&&!(_t&&ct>0)?(Q.scrollTop+=ct,xe=0):xe++}if(xe>10||performance.now()-Se>1500)return Ce();ne=requestAnimationFrame(Te)};Q.addEventListener("wheel",Ce,{passive:!0}),Q.addEventListener("touchmove",Ce,{passive:!0}),Q.addEventListener("keydown",Ce),We.current={stop:Ce},ne=requestAnimationFrame(Te)};O.useEffect(()=>()=>{var B;return(B=We.current)==null?void 0:B.stop()},[]);const et=B=>{m.files.some(Q=>Q.path===B)||d(Q=>Q.includes(B)?Q:[...Q,B]),Oe(B)},kt=O.useRef(0);O.useEffect(()=>{if(!r||!t||!fe||r.seq===kt.current)return;kt.current=r.seq;const B=b.find(Q=>Q.path===r.target)??b.find(Q=>Q.oldPath===r.target);et(B?B.path:r.target)});const[Fn,ot]=O.useState(()=>qt(lu,au)),Ai=O.useRef(null),Xo=vE(e.files),pr=xE(e.files);return f.jsx(Wv.Provider,{value:ye,children:f.jsxs("div",{className:"fs-app",ref:Ai,style:{gridTemplateColumns:`${Fn}px ${Or}px minmax(0, 1fr)`},"data-active":t||void 0,children:[f.jsxs(Fd,{children:[f.jsxs(Dd,{children:[f.jsx(Ei,{children:"ファイル"}),f.jsx(Pd,{stats:Xo,unit:"ファイル",showZero:!0}),f.jsx(zd,{}),f.jsx(Ei,{children:"行"}),f.jsx($i,{stats:pr,title:`追加 ${pr.added} 行・削除 ${pr.removed} 行`,showZero:!0})]}),f.jsx(Bd,{}),f.jsx(Ud,{done:E.size,total:W.size,title:"確認済みにしたファイル(そのファイルがまた変わると外れます)"}),f.jsx("div",{className:"ds-seg",role:"radiogroup","aria-label":"表示",children:[["unified","Unified"],["split","Split"]].map(([B,Q])=>f.jsx("button",{role:"radio","aria-checked":z===B,className:z===B?"on":"",onClick:()=>U(B),children:Q},B))})]}),f.jsx(A$,{mode:T,onMode:$,tree:P,error:T==="all"&&(w==null?void 0:w.diff)===e?w.error??null:null,current:ut,reviewed:E,commentCounts:se,onSelect:et,onReviewed:$e}),f.jsx(Io,{title:"ドラッグで幅を変更(ダブルクリックで戻す)",start:()=>Fn,onDrag:(B,Q)=>{var ne;return ot(Math.max(160,Math.min(B+Q,(((ne=Ai.current)==null?void 0:ne.clientWidth)??1200)-320)))},onEnd:()=>Nt(lu,Fn),onReset:()=>{ot(au),Nt(lu,au)}}),f.jsxs("main",{className:"fs-main",ref:pe,children:[ge.gone.length>0&&f.jsxs("div",{className:"fs-orphans top",children:[f.jsx("div",{className:"ds-muted",children:"差分からなくなったファイルへのコメント"}),ge.gone.map(B=>f.jsx(tf,{c:B,showWhere:!0},B.id))]}),b.length===0&&f.jsx("div",{className:"fs-empty",children:"変更されたファイルはありません"}),b.map(B=>{var ne;const Q=ge.byFile.get(B.path)??Y;return f.jsx(T$,{file:B,mode:z,open:j(B.path),reviewed:E.has(B.path),content:F.get(B.path),expansion:Z[B.path]??U$,view:je[B.path]??((ne=iw(B))==null?void 0:ne.first)??"diff",version:le,byLine:Q.byLine,orphans:Q.orphans,commentCount:se.get(B.path)??0,scrollRoot:fe,onToggle:L,onReviewed:$e,onExpand:we,onView:G,register:he,onClose:B.unchanged&&!g.has(B.path)?k:void 0},B.path)})]})]})})}const W$=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[],V$={id:"file",title:"ファイル",heading:"ファイルの差分",description:"ファイルの差分(fileshape): 変更された各ファイルの行の差分",icon:_d,View:H$,badge:e=>e.files.length||void 0,clearReview:e=>{CE(Ac(e)),O$(Ac(e))}},ow=[V$,uE,g1],Nm="diffshape.cleaned";function q$(e){if(!(!e.clean||qt(Nm,"")===e.clean)){for(const t of ow)e.modules.includes(t.id)&&t.clearReview(e);Nt(Nm,e.clean)}}async function jm(e){const t=await fetch(e);if(!t.ok)throw new Error(await t.text());return await t.json()}function uu(){const e=window.location.hash.replace(/^#\/?/,""),t=e.indexOf("/");if(t<0)return{module:e,target:null};let n;try{n=decodeURIComponent(e.slice(t+1))}catch{n=e.slice(t+1)}return{module:e.slice(0,t),target:n||null}}const K$=(e,t)=>`${e}/${t.split("/").map(encodeURIComponent).join("/")}`;function G$(){const[e,t]=O.useState(null),[n,r]=O.useState(null),[i,o]=O.useState({}),[s,l]=O.useState(!1),[a,u]=O.useState(()=>uu().module),[c,d]=O.useState(()=>{const H=uu();return H.target?{[H.module]:{target:H.target,seq:1}}:{}}),[p,h]=O.useState({}),[y,x]=O.useState(null),S=O.useMemo(()=>e?ow.filter(H=>e.modules.includes(H.id)):[],[e]),v=O.useCallback(async H=>{try{const j=await jm(`/api/info${H?"?refresh=1":""}`);q$(j),t(j),r(null),o(M=>Object.fromEntries(j.modules.map(L=>{var F;return[L,((F=M[L])==null?void 0:F.state)==="ready"?M[L]:{state:"loading"}]}))),await Promise.all(j.modules.map(async M=>{let L;try{const F=await jm(`/api/module/${M}`);L="error"in F?{state:"error",error:F.error}:{state:"ready",data:F.data}}catch(F){L={state:"error",error:F instanceof Error?F.message:String(F)}}o(F=>({...F,[M]:L}))}))}catch(j){r(j instanceof Error?j.message:String(j))}},[]);O.useEffect(()=>{v(!1)},[v]);const m=O.useCallback(()=>{const H=uu();if(u(H.module),H.target){const j=H.target;d(M=>{var L;return{...M,[H.module]:{target:j,seq:(((L=M[H.module])==null?void 0:L.seq)??0)+1}}})}},[]);O.useEffect(()=>(window.addEventListener("hashchange",m),()=>window.removeEventListener("hashchange",m)),[m]);const g=S.find(H=>H.id===a)??S[0],k=H=>{window.location.hash=H,u(H)},_=O.useCallback((H,j)=>{const M=K$(H,j);window.location.hash.replace(/^#\/?/,"")===M?m():window.location.hash=M},[m]),b=O.useMemo(()=>S.map(H=>H.id),[S]),T=O.useRef(new Map),C=H=>{let j=T.current.get(H);return j||T.current.set(H,j=M=>h(L=>({...L,[H]:M}))),j},$=O.useCallback(async()=>{l(!0),await v(!0),l(!1)},[v]),w=O.useCallback(H=>{x(H),window.setTimeout(()=>x(j=>j===H?null:j),4e3)},[]),[A,I]=O.useState(null),[P,z]=O.useState({}),K=O.useRef(new Map),U=H=>{let j=K.current.get(H);return j||K.current.set(H,j=M=>z(L=>({...L,[H]:M}))),j},[q,D]=O.useState(!1),W=S.filter(H=>{var j;return(((j=p[H.id])==null?void 0:j.open)??0)>0}),E=W.reduce((H,j)=>H+p[j.id].open,0),X=async()=>{!e||E===0||(await _i(Ky(e,W.map(H=>({id:H.id,heading:H.heading,comments:p[H.id].prompt()})))),w(`${E} 件をコピーしました`))};return n?f.jsxs("div",{className:"shell-message",children:["読み込めませんでした: ",n]}):!e||!g?f.jsx("div",{className:"shell-message shell-muted",children:"解析中…"}):f.jsxs("div",{className:`shell ${S.length>1?"with-rail":""}`,children:[S.length>1&&f.jsx("nav",{className:"rail","aria-label":"モジュール",children:S.map(H=>{var j;return f.jsx(Y$,{module:H,loaded:i[H.id],active:H===g,comments:((j=p[H.id])==null?void 0:j.open)??0,onClick:()=>k(H.id)},H.id)})}),f.jsxs("header",{className:"shell-head",children:[f.jsx("span",{className:"shell-brand",children:"diffshape"}),S.length===1&&f.jsx("span",{className:"shell-module",children:g.title}),f.jsxs("span",{className:"shell-compare",title:`${e.repoRoot}
|
|
159
|
+
${e.baseLabel} → ${e.targetLabel}`,children:[f.jsx("span",{className:"ds-ref",children:e.baseLabel}),f.jsx("span",{className:"shell-muted",children:"→"}),f.jsx("span",{className:"ds-ref",children:e.targetLabel})]}),f.jsx("span",{className:"shell-spacer"}),y&&f.jsx("span",{className:"shell-note",children:y}),f.jsxs("button",{className:"ds-btn ds-btn-note",onClick:()=>void X(),disabled:E===0,title:E?`未対応のコメント(${W.map(H=>`${H.title} ${p[H.id].open}`).join("、")})を AI に貼れる形でコピー(場所と本文だけ)`:"未対応のコメントはありません",children:[f.jsx(Hy,{size:13}),"AI 用にコピー",E>0?`(${E})`:""]}),f.jsx(Y0,{info:e,modules:S,current:g,reports:p,acks:P,onBatch:I,onReload:$,onFixing:D,flash:w}),f.jsxs("button",{className:"ds-btn",onClick:()=>void $(),disabled:s||q,title:q?"AI が修正しています(終わると自動で読み直します)":"リポジトリを読み直して比較し直す",children:[f.jsx(M0,{size:13,className:s?"shell-spin":void 0}),s?"解析中…":"再読み込み"]})]}),f.jsx("main",{className:"shell-body",children:S.map(H=>{const j=i[H.id]??{state:"loading"},M=H===g;return f.jsxs("section",{className:"shell-module-root","data-module":H.id,hidden:!M,children:[j.state==="loading"&&f.jsx("div",{className:"shell-message shell-muted",children:"解析中…"}),j.state==="error"&&f.jsxs("div",{className:"shell-message",children:[f.jsx("p",{children:H.description}),f.jsx("p",{className:"shell-error",children:j.error})]}),j.state==="ready"&&f.jsx(H.View,{data:j.data,active:M,onComments:C(H.id),modules:b,openIn:_,request:c[H.id]??null,ai:A,onAi:U(H.id)},`${e.targetLabel}|${e.baseLabel}`)]},H.id)})})]})}function Y$({module:e,loaded:t,active:n,comments:r,onClick:i}){var l;const o=(t==null?void 0:t.state)==="ready"?(l=e.badge)==null?void 0:l.call(e,t.data):void 0,s=e.icon;return f.jsxs("button",{className:`rail-btn ${n?"on":""} ${(t==null?void 0:t.state)==="error"?"unavailable":""}`,onClick:i,title:`${e.description}${o?`
|
|
160
|
+
変更 ${o}`:""}${r?`
|
|
161
|
+
未対応のコメント ${r}`:""}`,"aria-label":e.title,"aria-current":n?"page":void 0,children:[f.jsx(s,{size:20}),f.jsx("span",{className:"rail-label",children:e.title}),o!==void 0&&f.jsx("span",{className:"rail-badge",children:o>99?"99+":o}),r>0&&f.jsx("span",{className:"rail-dot"})]})}By(document.getElementById("root")).render(f.jsx(O.StrictMode,{children:f.jsx(G$,{})}));
|