vzcode 1.2.0 → 1.4.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/dist/assets/{index-BmJyUPq5.js → index-Bx5B6Xgl.js} +45 -45
- package/dist/assets/{index-CWMOj-be.css → index-ClPo_hzs.css} +1 -1
- package/dist/assets/index-wJsFLYuD.js +156 -0
- package/dist/assets/{worker-DtIkBAuN.js → worker-DqNV0IYq.js} +206 -197
- package/dist/index.html +2 -2
- package/package.json +34 -22
- package/src/client/CodeEditor/getOrCreateEditor.ts +4 -1
- package/src/client/CodeEditor/index.tsx +9 -2
- package/src/client/CodeEditor/json1PresenceDisplay.ts +33 -0
- package/src/client/CodeEditor/rainbowBrackets.ts +110 -0
- package/src/client/VZCodeContext.tsx +14 -0
- package/src/client/VZSidebar/index.tsx +2 -1
- package/src/client/VZSidebar/styles.scss +1 -0
- package/src/client/themes/themes.ts +19 -1
- package/src/client/useKeyboardShortcuts.ts +297 -2
- package/src/client/useTypeScript/worker/constants.ts +14 -0
- package/src/client/useTypeScript/worker/index.ts +1 -12
- package/src/server/index.js +5 -2
- package/dist/assets/index-Blj_0vZF.js +0 -155
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
function G2(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(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"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(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 n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var Vr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Pn(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var N_={exports:{}},sg={},I_={exports:{}},Ct={};/**
|
|
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 ff=Symbol.for("react.element"),H2=Symbol.for("react.portal"),K2=Symbol.for("react.fragment"),J2=Symbol.for("react.strict_mode"),eM=Symbol.for("react.profiler"),tM=Symbol.for("react.provider"),rM=Symbol.for("react.context"),nM=Symbol.for("react.forward_ref"),iM=Symbol.for("react.suspense"),oM=Symbol.for("react.memo"),sM=Symbol.for("react.lazy"),eb=Symbol.iterator;function aM(t){return t===null||typeof t!="object"?null:(t=eb&&t[eb]||t["@@iterator"],typeof t=="function"?t:null)}var W_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B_=Object.assign,L_={};function ou(t,e,r){this.props=t,this.context=e,this.refs=L_,this.updater=r||W_}ou.prototype.isReactComponent={};ou.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};ou.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function V_(){}V_.prototype=ou.prototype;function Av(t,e,r){this.props=t,this.context=e,this.refs=L_,this.updater=r||W_}var Mv=Av.prototype=new V_;Mv.constructor=Av;B_(Mv,ou.prototype);Mv.isPureReactComponent=!0;var tb=Array.isArray,X_=Object.prototype.hasOwnProperty,jv={current:null},F_={key:!0,ref:!0,__self:!0,__source:!0};function U_(t,e,r){var n,i={},o=null,s=null;if(e!=null)for(n in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)X_.call(e,n)&&!F_.hasOwnProperty(n)&&(i[n]=e[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(n in a=t.defaultProps,a)i[n]===void 0&&(i[n]=a[n]);return{$$typeof:ff,type:t,key:o,ref:s,props:i,_owner:jv.current}}function lM(t,e){return{$$typeof:ff,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Dv(t){return typeof t=="object"&&t!==null&&t.$$typeof===ff}function uM(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var rb=/\/+/g;function Wg(t,e){return typeof t=="object"&&t!==null&&t.key!=null?uM(""+t.key):e.toString(36)}function kd(t,e,r,n,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var s=!1;if(t===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case ff:case H2:s=!0}}if(s)return s=t,i=i(s),t=n===""?"."+Wg(s,0):n,tb(i)?(r="",t!=null&&(r=t.replace(rb,"$&/")+"/"),kd(i,e,r,"",function(c){return c})):i!=null&&(Dv(i)&&(i=lM(i,r+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(rb,"$&/")+"/")+t)),e.push(i)),1;if(s=0,n=n===""?".":n+":",tb(t))for(var a=0;a<t.length;a++){o=t[a];var l=n+Wg(o,a);s+=kd(o,e,r,l,i)}else if(l=aM(t),typeof l=="function")for(t=l.call(t),a=0;!(o=t.next()).done;)o=o.value,l=n+Wg(o,a++),s+=kd(o,e,r,l,i);else if(o==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return s}function Nf(t,e,r){if(t==null)return t;var n=[],i=0;return kd(t,n,"","",function(o){return e.call(r,o,i++)}),n}function cM(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var jn={current:null},xd={transition:null},fM={ReactCurrentDispatcher:jn,ReactCurrentBatchConfig:xd,ReactCurrentOwner:jv};function Y_(){throw Error("act(...) is not supported in production builds of React.")}Ct.Children={map:Nf,forEach:function(t,e,r){Nf(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Nf(t,function(){e++}),e},toArray:function(t){return Nf(t,function(e){return e})||[]},only:function(t){if(!Dv(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Ct.Component=ou;Ct.Fragment=K2;Ct.Profiler=eM;Ct.PureComponent=Av;Ct.StrictMode=J2;Ct.Suspense=iM;Ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fM;Ct.act=Y_;Ct.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=B_({},t.props),i=t.key,o=t.ref,s=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,s=jv.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)X_.call(e,l)&&!F_.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:ff,type:t.type,key:i,ref:o,props:n,_owner:s}};Ct.createContext=function(t){return t={$$typeof:rM,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:tM,_context:t},t.Consumer=t};Ct.createElement=U_;Ct.createFactory=function(t){var e=U_.bind(null,t);return e.type=t,e};Ct.createRef=function(){return{current:null}};Ct.forwardRef=function(t){return{$$typeof:nM,render:t}};Ct.isValidElement=Dv;Ct.lazy=function(t){return{$$typeof:sM,_payload:{_status:-1,_result:t},_init:cM}};Ct.memo=function(t,e){return{$$typeof:oM,type:t,compare:e===void 0?null:e}};Ct.startTransition=function(t){var e=xd.transition;xd.transition={};try{t()}finally{xd.transition=e}};Ct.unstable_act=Y_;Ct.useCallback=function(t,e){return jn.current.useCallback(t,e)};Ct.useContext=function(t){return jn.current.useContext(t)};Ct.useDebugValue=function(){};Ct.useDeferredValue=function(t){return jn.current.useDeferredValue(t)};Ct.useEffect=function(t,e){return jn.current.useEffect(t,e)};Ct.useId=function(){return jn.current.useId()};Ct.useImperativeHandle=function(t,e,r){return jn.current.useImperativeHandle(t,e,r)};Ct.useInsertionEffect=function(t,e){return jn.current.useInsertionEffect(t,e)};Ct.useLayoutEffect=function(t,e){return jn.current.useLayoutEffect(t,e)};Ct.useMemo=function(t,e){return jn.current.useMemo(t,e)};Ct.useReducer=function(t,e,r){return jn.current.useReducer(t,e,r)};Ct.useRef=function(t){return jn.current.useRef(t)};Ct.useState=function(t){return jn.current.useState(t)};Ct.useSyncExternalStore=function(t,e,r){return jn.current.useSyncExternalStore(t,e,r)};Ct.useTransition=function(){return jn.current.useTransition()};Ct.version="18.3.1";I_.exports=Ct;var N=I_.exports;const Di=Pi(N),hM=G2({__proto__:null,default:Di},[N]);/**
|
|
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 dM=N,pM=Symbol.for("react.element"),gM=Symbol.for("react.fragment"),OM=Object.prototype.hasOwnProperty,mM=dM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yM={key:!0,ref:!0,__self:!0,__source:!0};function z_(t,e,r){var n,i={},o=null,s=null;r!==void 0&&(o=""+r),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)OM.call(e,n)&&!yM.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:pM,type:t,key:o,ref:s,props:i,_owner:mM.current}}sg.Fragment=gM;sg.jsx=z_;sg.jsxs=z_;N_.exports=sg;var q=N_.exports,G_={exports:{}},ii={},H_={exports:{}},K_={};/**
|
|
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(t){function e(D,X){var G=D.length;D.push(X);e:for(;0<G;){var se=G-1>>>1,ce=D[se];if(0<i(ce,X))D[se]=X,D[G]=ce,G=se;else break e}}function r(D){return D.length===0?null:D[0]}function n(D){if(D.length===0)return null;var X=D[0],G=D.pop();if(G!==X){D[0]=G;e:for(var se=0,ce=D.length,U=ce>>>1;se<U;){var K=2*(se+1)-1,oe=D[K],Re=K+1,T=D[Re];if(0>i(oe,G))Re<ce&&0>i(T,oe)?(D[se]=T,D[Re]=G,se=Re):(D[se]=oe,D[K]=G,se=K);else if(Re<ce&&0>i(T,G))D[se]=T,D[Re]=G,se=Re;else break e}}return X}function i(D,X){var G=D.sortIndex-X.sortIndex;return G!==0?G:D.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,f=null,h=3,d=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(D){for(var X=r(c);X!==null;){if(X.callback===null)n(c);else if(X.startTime<=D)n(c),X.sortIndex=X.expirationTime,e(l,X);else break;X=r(c)}}function b(D){if(g=!1,v(D),!p)if(r(l)!==null)p=!0,M(w);else{var X=r(c);X!==null&&B(b,X.startTime-D)}}function w(D,X){p=!1,g&&(g=!1,y(P),P=-1),d=!0;var G=h;try{for(v(X),f=r(l);f!==null&&(!(f.expirationTime>X)||D&&!E());){var se=f.callback;if(typeof se=="function"){f.callback=null,h=f.priorityLevel;var ce=se(f.expirationTime<=X);X=t.unstable_now(),typeof ce=="function"?f.callback=ce:f===r(l)&&n(l),v(X)}else n(l);f=r(l)}if(f!==null)var U=!0;else{var K=r(c);K!==null&&B(b,K.startTime-X),U=!1}return U}finally{f=null,h=G,d=!1}}var _=!1,C=null,P=-1,k=5,x=-1;function E(){return!(t.unstable_now()-x<k)}function R(){if(C!==null){var D=t.unstable_now();x=D;var X=!0;try{X=C(!0,D)}finally{X?I():(_=!1,C=null)}}else _=!1}var I;if(typeof O=="function")I=function(){O(R)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,H=F.port2;F.port1.onmessage=R,I=function(){H.postMessage(null)}}else I=function(){m(R,0)};function M(D){C=D,_||(_=!0,I())}function B(D,X){P=m(function(){D(t.unstable_now())},X)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(D){D.callback=null},t.unstable_continueExecution=function(){p||d||(p=!0,M(w))},t.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"):k=0<D?Math.floor(1e3/D):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(D){switch(h){case 1:case 2:case 3:var X=3;break;default:X=h}var G=h;h=X;try{return D()}finally{h=G}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(D,X){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var G=h;h=D;try{return X()}finally{h=G}},t.unstable_scheduleCallback=function(D,X,G){var se=t.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?se+G:se):G=se,D){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=G+ce,D={id:u++,callback:X,priorityLevel:D,startTime:G,expirationTime:ce,sortIndex:-1},G>se?(D.sortIndex=G,e(c,D),r(l)===null&&D===r(c)&&(g?(y(P),P=-1):g=!0,B(b,G-se))):(D.sortIndex=ce,e(l,D),p||d||(p=!0,M(w))),D},t.unstable_shouldYield=E,t.unstable_wrapCallback=function(D){var X=h;return function(){var G=h;h=X;try{return D.apply(this,arguments)}finally{h=G}}}})(K_);H_.exports=K_;var vM=H_.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 bM=N,ni=vM;function Se(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var J_=new Set,kc={};function Ea(t,e){Zl(t,e),Zl(t+"Capture",e)}function Zl(t,e){for(kc[t]=e,t=0;t<e.length;t++)J_.add(e[t])}var Ao=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pm=Object.prototype.hasOwnProperty,SM=/^[: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]*$/,nb={},ib={};function wM(t){return pm.call(ib,t)?!0:pm.call(nb,t)?!1:SM.test(t)?ib[t]=!0:(nb[t]=!0,!1)}function PM(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function kM(t,e,r,n){if(e===null||typeof e>"u"||PM(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Dn(t,e,r,n,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var dn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){dn[t]=new Dn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];dn[e]=new Dn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){dn[t]=new Dn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){dn[t]=new Dn(t,2,!1,t,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(t){dn[t]=new Dn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){dn[t]=new Dn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){dn[t]=new Dn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){dn[t]=new Dn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){dn[t]=new Dn(t,5,!1,t.toLowerCase(),null,!1,!1)});var qv=/[\-:]([a-z])/g;function Zv(t){return t[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(t){var e=t.replace(qv,Zv);dn[e]=new Dn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(qv,Zv);dn[e]=new Dn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(qv,Zv);dn[e]=new Dn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){dn[t]=new Dn(t,1,!1,t.toLowerCase(),null,!1,!1)});dn.xlinkHref=new Dn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){dn[t]=new Dn(t,1,!1,t.toLowerCase(),null,!0,!0)});function Nv(t,e,r,n){var i=dn.hasOwnProperty(e)?dn[e]:null;(i!==null?i.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(kM(e,r,i,n)&&(r=null),n||i===null?wM(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var No=bM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,If=Symbol.for("react.element"),al=Symbol.for("react.portal"),ll=Symbol.for("react.fragment"),Iv=Symbol.for("react.strict_mode"),gm=Symbol.for("react.profiler"),e$=Symbol.for("react.provider"),t$=Symbol.for("react.context"),Wv=Symbol.for("react.forward_ref"),Om=Symbol.for("react.suspense"),mm=Symbol.for("react.suspense_list"),Bv=Symbol.for("react.memo"),Yo=Symbol.for("react.lazy"),r$=Symbol.for("react.offscreen"),ob=Symbol.iterator;function Su(t){return t===null||typeof t!="object"?null:(t=ob&&t[ob]||t["@@iterator"],typeof t=="function"?t:null)}var Cr=Object.assign,Bg;function zu(t){if(Bg===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Bg=e&&e[1]||""}return`
|
|
34
|
+
`+Bg+t}var Lg=!1;function Vg(t,e){if(!t||Lg)return"";Lg=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var n=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){n=c}t.call(e.prototype)}else{try{throw Error()}catch(c){n=c}t()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
|
35
|
+
`),o=n.stack.split(`
|
|
36
|
+
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var l=`
|
|
37
|
+
`+i[s].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{Lg=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?zu(t):""}function xM(t){switch(t.tag){case 5:return zu(t.type);case 16:return zu("Lazy");case 13:return zu("Suspense");case 19:return zu("SuspenseList");case 0:case 2:case 15:return t=Vg(t.type,!1),t;case 11:return t=Vg(t.type.render,!1),t;case 1:return t=Vg(t.type,!0),t;default:return""}}function ym(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ll:return"Fragment";case al:return"Portal";case gm:return"Profiler";case Iv:return"StrictMode";case Om:return"Suspense";case mm:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case t$:return(t.displayName||"Context")+".Consumer";case e$:return(t._context.displayName||"Context")+".Provider";case Wv:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Bv:return e=t.displayName||null,e!==null?e:ym(t.type)||"Memo";case Yo:e=t._payload,t=t._init;try{return ym(t(e))}catch{}}return null}function _M(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ym(e);case 8:return e===Iv?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ws(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function n$(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function $M(t){var e=n$(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){n=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Wf(t){t._valueTracker||(t._valueTracker=$M(t))}function i$(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=n$(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function tp(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function vm(t,e){var r=e.checked;return Cr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function sb(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=ws(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function o$(t,e){e=e.checked,e!=null&&Nv(t,"checked",e,!1)}function bm(t,e){o$(t,e);var r=ws(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Sm(t,e.type,r):e.hasOwnProperty("defaultValue")&&Sm(t,e.type,ws(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ab(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Sm(t,e,r){(e!=="number"||tp(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Gu=Array.isArray;function wl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+ws(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function wm(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Se(91));return Cr({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function lb(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(Se(92));if(Gu(r)){if(1<r.length)throw Error(Se(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:ws(r)}}function s$(t,e){var r=ws(e.value),n=ws(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function ub(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function a$(t){switch(t){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 Pm(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?a$(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Bf,l$=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Bf=Bf||document.createElement("div"),Bf.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Bf.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function xc(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var lc={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},CM=["Webkit","ms","Moz","O"];Object.keys(lc).forEach(function(t){CM.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),lc[e]=lc[t]})});function u$(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||lc.hasOwnProperty(t)&&lc[t]?(""+e).trim():e+"px"}function c$(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=u$(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var EM=Cr({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 km(t,e){if(e){if(EM[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Se(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Se(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Se(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Se(62))}}function xm(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 _m=null;function Lv(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var $m=null,Pl=null,kl=null;function cb(t){if(t=pf(t)){if(typeof $m!="function")throw Error(Se(280));var e=t.stateNode;e&&(e=fg(e),$m(t.stateNode,t.type,e))}}function f$(t){Pl?kl?kl.push(t):kl=[t]:Pl=t}function h$(){if(Pl){var t=Pl,e=kl;if(kl=Pl=null,cb(t),e)for(t=0;t<e.length;t++)cb(e[t])}}function d$(t,e){return t(e)}function p$(){}var Xg=!1;function g$(t,e,r){if(Xg)return t(e,r);Xg=!0;try{return d$(t,e,r)}finally{Xg=!1,(Pl!==null||kl!==null)&&(p$(),h$())}}function _c(t,e){var r=t.stateNode;if(r===null)return null;var n=fg(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(Se(231,e,typeof r));return r}var Cm=!1;if(Ao)try{var wu={};Object.defineProperty(wu,"passive",{get:function(){Cm=!0}}),window.addEventListener("test",wu,wu),window.removeEventListener("test",wu,wu)}catch{Cm=!1}function QM(t,e,r,n,i,o,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(r,c)}catch(u){this.onError(u)}}var uc=!1,rp=null,np=!1,Em=null,TM={onError:function(t){uc=!0,rp=t}};function RM(t,e,r,n,i,o,s,a,l){uc=!1,rp=null,QM.apply(TM,arguments)}function AM(t,e,r,n,i,o,s,a,l){if(RM.apply(this,arguments),uc){if(uc){var c=rp;uc=!1,rp=null}else throw Error(Se(198));np||(np=!0,Em=c)}}function Qa(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function O$(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function fb(t){if(Qa(t)!==t)throw Error(Se(188))}function MM(t){var e=t.alternate;if(!e){if(e=Qa(t),e===null)throw Error(Se(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var o=i.alternate;if(o===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===r)return fb(i),t;if(o===n)return fb(i),e;o=o.sibling}throw Error(Se(188))}if(r.return!==n.return)r=i,n=o;else{for(var s=!1,a=i.child;a;){if(a===r){s=!0,r=i,n=o;break}if(a===n){s=!0,n=i,r=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===r){s=!0,r=o,n=i;break}if(a===n){s=!0,n=o,r=i;break}a=a.sibling}if(!s)throw Error(Se(189))}}if(r.alternate!==n)throw Error(Se(190))}if(r.tag!==3)throw Error(Se(188));return r.stateNode.current===r?t:e}function m$(t){return t=MM(t),t!==null?y$(t):null}function y$(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=y$(t);if(e!==null)return e;t=t.sibling}return null}var v$=ni.unstable_scheduleCallback,hb=ni.unstable_cancelCallback,jM=ni.unstable_shouldYield,DM=ni.unstable_requestPaint,jr=ni.unstable_now,qM=ni.unstable_getCurrentPriorityLevel,Vv=ni.unstable_ImmediatePriority,b$=ni.unstable_UserBlockingPriority,ip=ni.unstable_NormalPriority,ZM=ni.unstable_LowPriority,S$=ni.unstable_IdlePriority,ag=null,fo=null;function NM(t){if(fo&&typeof fo.onCommitFiberRoot=="function")try{fo.onCommitFiberRoot(ag,t,void 0,(t.current.flags&128)===128)}catch{}}var qi=Math.clz32?Math.clz32:BM,IM=Math.log,WM=Math.LN2;function BM(t){return t>>>=0,t===0?32:31-(IM(t)/WM|0)|0}var Lf=64,Vf=4194304;function Hu(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function op(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,o=t.pingedLanes,s=r&268435455;if(s!==0){var a=s&~i;a!==0?n=Hu(a):(o&=s,o!==0&&(n=Hu(o)))}else s=r&~i,s!==0?n=Hu(s):o!==0&&(n=Hu(o));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-qi(e),i=1<<r,n|=t[r],e&=~i;return n}function LM(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 VM(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var s=31-qi(o),a=1<<s,l=i[s];l===-1?(!(a&r)||a&n)&&(i[s]=LM(a,e)):l<=e&&(t.expiredLanes|=a),o&=~a}}function Qm(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function w$(){var t=Lf;return Lf<<=1,!(Lf&4194240)&&(Lf=64),t}function Fg(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function hf(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-qi(e),t[e]=r}function XM(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var i=31-qi(r),o=1<<i;e[i]=0,n[i]=-1,t[i]=-1,r&=~o}}function Xv(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-qi(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}var Kt=0;function P$(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var k$,Fv,x$,_$,$$,Tm=!1,Xf=[],hs=null,ds=null,ps=null,$c=new Map,Cc=new Map,es=[],FM="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 db(t,e){switch(t){case"focusin":case"focusout":hs=null;break;case"dragenter":case"dragleave":ds=null;break;case"mouseover":case"mouseout":ps=null;break;case"pointerover":case"pointerout":$c.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cc.delete(e.pointerId)}}function Pu(t,e,r,n,i,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},e!==null&&(e=pf(e),e!==null&&Fv(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function UM(t,e,r,n,i){switch(e){case"focusin":return hs=Pu(hs,t,e,r,n,i),!0;case"dragenter":return ds=Pu(ds,t,e,r,n,i),!0;case"mouseover":return ps=Pu(ps,t,e,r,n,i),!0;case"pointerover":var o=i.pointerId;return $c.set(o,Pu($c.get(o)||null,t,e,r,n,i)),!0;case"gotpointercapture":return o=i.pointerId,Cc.set(o,Pu(Cc.get(o)||null,t,e,r,n,i)),!0}return!1}function C$(t){var e=aa(t.target);if(e!==null){var r=Qa(e);if(r!==null){if(e=r.tag,e===13){if(e=O$(r),e!==null){t.blockedOn=e,$$(t.priority,function(){x$(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function _d(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=Rm(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);_m=n,r.target.dispatchEvent(n),_m=null}else return e=pf(r),e!==null&&Fv(e),t.blockedOn=r,!1;e.shift()}return!0}function pb(t,e,r){_d(t)&&r.delete(e)}function YM(){Tm=!1,hs!==null&&_d(hs)&&(hs=null),ds!==null&&_d(ds)&&(ds=null),ps!==null&&_d(ps)&&(ps=null),$c.forEach(pb),Cc.forEach(pb)}function ku(t,e){t.blockedOn===e&&(t.blockedOn=null,Tm||(Tm=!0,ni.unstable_scheduleCallback(ni.unstable_NormalPriority,YM)))}function Ec(t){function e(i){return ku(i,t)}if(0<Xf.length){ku(Xf[0],t);for(var r=1;r<Xf.length;r++){var n=Xf[r];n.blockedOn===t&&(n.blockedOn=null)}}for(hs!==null&&ku(hs,t),ds!==null&&ku(ds,t),ps!==null&&ku(ps,t),$c.forEach(e),Cc.forEach(e),r=0;r<es.length;r++)n=es[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<es.length&&(r=es[0],r.blockedOn===null);)C$(r),r.blockedOn===null&&es.shift()}var xl=No.ReactCurrentBatchConfig,sp=!0;function zM(t,e,r,n){var i=Kt,o=xl.transition;xl.transition=null;try{Kt=1,Uv(t,e,r,n)}finally{Kt=i,xl.transition=o}}function GM(t,e,r,n){var i=Kt,o=xl.transition;xl.transition=null;try{Kt=4,Uv(t,e,r,n)}finally{Kt=i,xl.transition=o}}function Uv(t,e,r,n){if(sp){var i=Rm(t,e,r,n);if(i===null)rO(t,e,n,ap,r),db(t,n);else if(UM(i,t,e,r,n))n.stopPropagation();else if(db(t,n),e&4&&-1<FM.indexOf(t)){for(;i!==null;){var o=pf(i);if(o!==null&&k$(o),o=Rm(t,e,r,n),o===null&&rO(t,e,n,ap,r),o===i)break;i=o}i!==null&&n.stopPropagation()}else rO(t,e,n,null,r)}}var ap=null;function Rm(t,e,r,n){if(ap=null,t=Lv(n),t=aa(t),t!==null)if(e=Qa(t),e===null)t=null;else if(r=e.tag,r===13){if(t=O$(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return ap=t,null}function E$(t){switch(t){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(qM()){case Vv:return 1;case b$:return 4;case ip:case ZM:return 16;case S$:return 536870912;default:return 16}default:return 16}}var is=null,Yv=null,$d=null;function Q$(){if($d)return $d;var t,e=Yv,r=e.length,n,i="value"in is?is.value:is.textContent,o=i.length;for(t=0;t<r&&e[t]===i[t];t++);var s=r-t;for(n=1;n<=s&&e[r-n]===i[o-n];n++);return $d=i.slice(t,1<n?1-n:void 0)}function Cd(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ff(){return!0}function gb(){return!1}function oi(t){function e(r,n,i,o,s){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ff:gb,this.isPropagationStopped=gb,this}return Cr(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ff)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ff)},persist:function(){},isPersistent:Ff}),e}var su={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zv=oi(su),df=Cr({},su,{view:0,detail:0}),HM=oi(df),Ug,Yg,xu,lg=Cr({},df,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gv,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==xu&&(xu&&t.type==="mousemove"?(Ug=t.screenX-xu.screenX,Yg=t.screenY-xu.screenY):Yg=Ug=0,xu=t),Ug)},movementY:function(t){return"movementY"in t?t.movementY:Yg}}),Ob=oi(lg),KM=Cr({},lg,{dataTransfer:0}),JM=oi(KM),ej=Cr({},df,{relatedTarget:0}),zg=oi(ej),tj=Cr({},su,{animationName:0,elapsedTime:0,pseudoElement:0}),rj=oi(tj),nj=Cr({},su,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ij=oi(nj),oj=Cr({},su,{data:0}),mb=oi(oj),sj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aj={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"},lj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uj(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=lj[t])?!!e[t]:!1}function Gv(){return uj}var cj=Cr({},df,{key:function(t){if(t.key){var e=sj[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Cd(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?aj[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gv,charCode:function(t){return t.type==="keypress"?Cd(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Cd(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),fj=oi(cj),hj=Cr({},lg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yb=oi(hj),dj=Cr({},df,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gv}),pj=oi(dj),gj=Cr({},su,{propertyName:0,elapsedTime:0,pseudoElement:0}),Oj=oi(gj),mj=Cr({},lg,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),yj=oi(mj),vj=[9,13,27,32],Hv=Ao&&"CompositionEvent"in window,cc=null;Ao&&"documentMode"in document&&(cc=document.documentMode);var bj=Ao&&"TextEvent"in window&&!cc,T$=Ao&&(!Hv||cc&&8<cc&&11>=cc),vb=" ",bb=!1;function R$(t,e){switch(t){case"keyup":return vj.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function A$(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ul=!1;function Sj(t,e){switch(t){case"compositionend":return A$(e);case"keypress":return e.which!==32?null:(bb=!0,vb);case"textInput":return t=e.data,t===vb&&bb?null:t;default:return null}}function wj(t,e){if(ul)return t==="compositionend"||!Hv&&R$(t,e)?(t=Q$(),$d=Yv=is=null,ul=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return T$&&e.locale!=="ko"?null:e.data;default:return null}}var Pj={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 Sb(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Pj[t.type]:e==="textarea"}function M$(t,e,r,n){f$(n),e=lp(e,"onChange"),0<e.length&&(r=new zv("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var fc=null,Qc=null;function kj(t){X$(t,0)}function ug(t){var e=hl(t);if(i$(e))return t}function xj(t,e){if(t==="change")return e}var j$=!1;if(Ao){var Gg;if(Ao){var Hg="oninput"in document;if(!Hg){var wb=document.createElement("div");wb.setAttribute("oninput","return;"),Hg=typeof wb.oninput=="function"}Gg=Hg}else Gg=!1;j$=Gg&&(!document.documentMode||9<document.documentMode)}function Pb(){fc&&(fc.detachEvent("onpropertychange",D$),Qc=fc=null)}function D$(t){if(t.propertyName==="value"&&ug(Qc)){var e=[];M$(e,Qc,t,Lv(t)),g$(kj,e)}}function _j(t,e,r){t==="focusin"?(Pb(),fc=e,Qc=r,fc.attachEvent("onpropertychange",D$)):t==="focusout"&&Pb()}function $j(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ug(Qc)}function Cj(t,e){if(t==="click")return ug(e)}function Ej(t,e){if(t==="input"||t==="change")return ug(e)}function Qj(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ii=typeof Object.is=="function"?Object.is:Qj;function Tc(t,e){if(Ii(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!pm.call(e,i)||!Ii(t[i],e[i]))return!1}return!0}function kb(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function xb(t,e){var r=kb(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=kb(r)}}function q$(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?q$(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Z$(){for(var t=window,e=tp();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=tp(t.document)}return e}function Kv(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Tj(t){var e=Z$(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&q$(r.ownerDocument.documentElement,r)){if(n!==null&&Kv(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!t.extend&&o>n&&(i=n,n=o,o=i),i=xb(r,o);var s=xb(r,n);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>n?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Rj=Ao&&"documentMode"in document&&11>=document.documentMode,cl=null,Am=null,hc=null,Mm=!1;function _b(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Mm||cl==null||cl!==tp(n)||(n=cl,"selectionStart"in n&&Kv(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),hc&&Tc(hc,n)||(hc=n,n=lp(Am,"onSelect"),0<n.length&&(e=new zv("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=cl)))}function Uf(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var fl={animationend:Uf("Animation","AnimationEnd"),animationiteration:Uf("Animation","AnimationIteration"),animationstart:Uf("Animation","AnimationStart"),transitionend:Uf("Transition","TransitionEnd")},Kg={},N$={};Ao&&(N$=document.createElement("div").style,"AnimationEvent"in window||(delete fl.animationend.animation,delete fl.animationiteration.animation,delete fl.animationstart.animation),"TransitionEvent"in window||delete fl.transitionend.transition);function cg(t){if(Kg[t])return Kg[t];if(!fl[t])return t;var e=fl[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in N$)return Kg[t]=e[r];return t}var I$=cg("animationend"),W$=cg("animationiteration"),B$=cg("animationstart"),L$=cg("transitionend"),V$=new Map,$b="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 Rs(t,e){V$.set(t,e),Ea(e,[t])}for(var Jg=0;Jg<$b.length;Jg++){var eO=$b[Jg],Aj=eO.toLowerCase(),Mj=eO[0].toUpperCase()+eO.slice(1);Rs(Aj,"on"+Mj)}Rs(I$,"onAnimationEnd");Rs(W$,"onAnimationIteration");Rs(B$,"onAnimationStart");Rs("dblclick","onDoubleClick");Rs("focusin","onFocus");Rs("focusout","onBlur");Rs(L$,"onTransitionEnd");Zl("onMouseEnter",["mouseout","mouseover"]);Zl("onMouseLeave",["mouseout","mouseover"]);Zl("onPointerEnter",["pointerout","pointerover"]);Zl("onPointerLeave",["pointerout","pointerover"]);Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ku="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(" "),jj=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ku));function Cb(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,AM(n,e,void 0,t),t.currentTarget=null}function X$(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var o=void 0;if(e)for(var s=n.length-1;0<=s;s--){var a=n[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;Cb(i,a,c),o=l}else for(s=0;s<n.length;s++){if(a=n[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;Cb(i,a,c),o=l}}}if(np)throw t=Em,np=!1,Em=null,t}function ur(t,e){var r=e[Nm];r===void 0&&(r=e[Nm]=new Set);var n=t+"__bubble";r.has(n)||(F$(e,t,2,!1),r.add(n))}function tO(t,e,r){var n=0;e&&(n|=4),F$(r,t,n,e)}var Yf="_reactListening"+Math.random().toString(36).slice(2);function Rc(t){if(!t[Yf]){t[Yf]=!0,J_.forEach(function(r){r!=="selectionchange"&&(jj.has(r)||tO(r,!1,t),tO(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Yf]||(e[Yf]=!0,tO("selectionchange",!1,e))}}function F$(t,e,r,n){switch(E$(e)){case 1:var i=zM;break;case 4:i=GM;break;default:i=Uv}r=i.bind(null,e,r,t),i=void 0,!Cm||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function rO(t,e,r,n,i){var o=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var a=n.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=n.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;s=s.return}for(;a!==null;){if(s=aa(a),s===null)return;if(l=s.tag,l===5||l===6){n=o=s;continue e}a=a.parentNode}}n=n.return}g$(function(){var c=o,u=Lv(r),f=[];e:{var h=V$.get(t);if(h!==void 0){var d=zv,p=t;switch(t){case"keypress":if(Cd(r)===0)break e;case"keydown":case"keyup":d=fj;break;case"focusin":p="focus",d=zg;break;case"focusout":p="blur",d=zg;break;case"beforeblur":case"afterblur":d=zg;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=Ob;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=JM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=pj;break;case I$:case W$:case B$:d=rj;break;case L$:d=Oj;break;case"scroll":d=HM;break;case"wheel":d=yj;break;case"copy":case"cut":case"paste":d=ij;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=yb}var g=(e&4)!==0,m=!g&&t==="scroll",y=g?h!==null?h+"Capture":null:h;g=[];for(var O=c,v;O!==null;){v=O;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,y!==null&&(b=_c(O,y),b!=null&&g.push(Ac(O,b,v)))),m)break;O=O.return}0<g.length&&(h=new d(h,p,null,r,u),f.push({event:h,listeners:g}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",d=t==="mouseout"||t==="pointerout",h&&r!==_m&&(p=r.relatedTarget||r.fromElement)&&(aa(p)||p[Mo]))break e;if((d||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,d?(p=r.relatedTarget||r.toElement,d=c,p=p?aa(p):null,p!==null&&(m=Qa(p),p!==m||p.tag!==5&&p.tag!==6)&&(p=null)):(d=null,p=c),d!==p)){if(g=Ob,b="onMouseLeave",y="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(g=yb,b="onPointerLeave",y="onPointerEnter",O="pointer"),m=d==null?h:hl(d),v=p==null?h:hl(p),h=new g(b,O+"leave",d,r,u),h.target=m,h.relatedTarget=v,b=null,aa(u)===c&&(g=new g(y,O+"enter",p,r,u),g.target=v,g.relatedTarget=m,b=g),m=b,d&&p)t:{for(g=d,y=p,O=0,v=g;v;v=Ba(v))O++;for(v=0,b=y;b;b=Ba(b))v++;for(;0<O-v;)g=Ba(g),O--;for(;0<v-O;)y=Ba(y),v--;for(;O--;){if(g===y||y!==null&&g===y.alternate)break t;g=Ba(g),y=Ba(y)}g=null}else g=null;d!==null&&Eb(f,h,d,g,!1),p!==null&&m!==null&&Eb(f,m,p,g,!0)}}e:{if(h=c?hl(c):window,d=h.nodeName&&h.nodeName.toLowerCase(),d==="select"||d==="input"&&h.type==="file")var w=xj;else if(Sb(h))if(j$)w=Ej;else{w=$j;var _=_j}else(d=h.nodeName)&&d.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(w=Cj);if(w&&(w=w(t,c))){M$(f,w,r,u);break e}_&&_(t,h,c),t==="focusout"&&(_=h._wrapperState)&&_.controlled&&h.type==="number"&&Sm(h,"number",h.value)}switch(_=c?hl(c):window,t){case"focusin":(Sb(_)||_.contentEditable==="true")&&(cl=_,Am=c,hc=null);break;case"focusout":hc=Am=cl=null;break;case"mousedown":Mm=!0;break;case"contextmenu":case"mouseup":case"dragend":Mm=!1,_b(f,r,u);break;case"selectionchange":if(Rj)break;case"keydown":case"keyup":_b(f,r,u)}var C;if(Hv)e:{switch(t){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else ul?R$(t,r)&&(P="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(T$&&r.locale!=="ko"&&(ul||P!=="onCompositionStart"?P==="onCompositionEnd"&&ul&&(C=Q$()):(is=u,Yv="value"in is?is.value:is.textContent,ul=!0)),_=lp(c,P),0<_.length&&(P=new mb(P,t,null,r,u),f.push({event:P,listeners:_}),C?P.data=C:(C=A$(r),C!==null&&(P.data=C)))),(C=bj?Sj(t,r):wj(t,r))&&(c=lp(c,"onBeforeInput"),0<c.length&&(u=new mb("onBeforeInput","beforeinput",null,r,u),f.push({event:u,listeners:c}),u.data=C))}X$(f,e)})}function Ac(t,e,r){return{instance:t,listener:e,currentTarget:r}}function lp(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=_c(t,r),o!=null&&n.unshift(Ac(t,o,i)),o=_c(t,e),o!=null&&n.push(Ac(t,o,i))),t=t.return}return n}function Ba(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Eb(t,e,r,n,i){for(var o=e._reactName,s=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,i?(l=_c(r,o),l!=null&&s.unshift(Ac(r,l,a))):i||(l=_c(r,o),l!=null&&s.push(Ac(r,l,a)))),r=r.return}s.length!==0&&t.push({event:e,listeners:s})}var Dj=/\r\n?/g,qj=/\u0000|\uFFFD/g;function Qb(t){return(typeof t=="string"?t:""+t).replace(Dj,`
|
|
38
|
+
`).replace(qj,"")}function zf(t,e,r){if(e=Qb(e),Qb(t)!==e&&r)throw Error(Se(425))}function up(){}var jm=null,Dm=null;function qm(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Zm=typeof setTimeout=="function"?setTimeout:void 0,Zj=typeof clearTimeout=="function"?clearTimeout:void 0,Tb=typeof Promise=="function"?Promise:void 0,Nj=typeof queueMicrotask=="function"?queueMicrotask:typeof Tb<"u"?function(t){return Tb.resolve(null).then(t).catch(Ij)}:Zm;function Ij(t){setTimeout(function(){throw t})}function nO(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){t.removeChild(i),Ec(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Ec(e)}function gs(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Rb(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var au=Math.random().toString(36).slice(2),so="__reactFiber$"+au,Mc="__reactProps$"+au,Mo="__reactContainer$"+au,Nm="__reactEvents$"+au,Wj="__reactListeners$"+au,Bj="__reactHandles$"+au;function aa(t){var e=t[so];if(e)return e;for(var r=t.parentNode;r;){if(e=r[Mo]||r[so]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=Rb(t);t!==null;){if(r=t[so])return r;t=Rb(t)}return e}t=r,r=t.parentNode}return null}function pf(t){return t=t[so]||t[Mo],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function hl(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(Se(33))}function fg(t){return t[Mc]||null}var Im=[],dl=-1;function As(t){return{current:t}}function hr(t){0>dl||(t.current=Im[dl],Im[dl]=null,dl--)}function ar(t,e){dl++,Im[dl]=t.current,t.current=e}var Ps={},wn=As(Ps),Xn=As(!1),va=Ps;function Nl(t,e){var r=t.type.contextTypes;if(!r)return Ps;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=e[o];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Fn(t){return t=t.childContextTypes,t!=null}function cp(){hr(Xn),hr(wn)}function Ab(t,e,r){if(wn.current!==Ps)throw Error(Se(168));ar(wn,e),ar(Xn,r)}function U$(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(Se(108,_M(t)||"Unknown",i));return Cr({},r,n)}function fp(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ps,va=wn.current,ar(wn,t),ar(Xn,Xn.current),!0}function Mb(t,e,r){var n=t.stateNode;if(!n)throw Error(Se(169));r?(t=U$(t,e,va),n.__reactInternalMemoizedMergedChildContext=t,hr(Xn),hr(wn),ar(wn,t)):hr(Xn),ar(Xn,r)}var ko=null,hg=!1,iO=!1;function Y$(t){ko===null?ko=[t]:ko.push(t)}function Lj(t){hg=!0,Y$(t)}function Ms(){if(!iO&&ko!==null){iO=!0;var t=0,e=Kt;try{var r=ko;for(Kt=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}ko=null,hg=!1}catch(i){throw ko!==null&&(ko=ko.slice(t+1)),v$(Vv,Ms),i}finally{Kt=e,iO=!1}}return null}var pl=[],gl=0,hp=null,dp=0,fi=[],hi=0,ba=null,Co=1,Eo="";function Js(t,e){pl[gl++]=dp,pl[gl++]=hp,hp=t,dp=e}function z$(t,e,r){fi[hi++]=Co,fi[hi++]=Eo,fi[hi++]=ba,ba=t;var n=Co;t=Eo;var i=32-qi(n)-1;n&=~(1<<i),r+=1;var o=32-qi(e)+i;if(30<o){var s=i-i%5;o=(n&(1<<s)-1).toString(32),n>>=s,i-=s,Co=1<<32-qi(e)+i|r<<i|n,Eo=o+t}else Co=1<<o|r<<i|n,Eo=t}function Jv(t){t.return!==null&&(Js(t,1),z$(t,1,0))}function e0(t){for(;t===hp;)hp=pl[--gl],pl[gl]=null,dp=pl[--gl],pl[gl]=null;for(;t===ba;)ba=fi[--hi],fi[hi]=null,Eo=fi[--hi],fi[hi]=null,Co=fi[--hi],fi[hi]=null}var ri=null,ei=null,Sr=!1,Ai=null;function G$(t,e){var r=pi(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function jb(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,ri=t,ei=gs(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,ri=t,ei=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=ba!==null?{id:Co,overflow:Eo}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=pi(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,ri=t,ei=null,!0):!1;default:return!1}}function Wm(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Bm(t){if(Sr){var e=ei;if(e){var r=e;if(!jb(t,e)){if(Wm(t))throw Error(Se(418));e=gs(r.nextSibling);var n=ri;e&&jb(t,e)?G$(n,r):(t.flags=t.flags&-4097|2,Sr=!1,ri=t)}}else{if(Wm(t))throw Error(Se(418));t.flags=t.flags&-4097|2,Sr=!1,ri=t}}}function Db(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;ri=t}function Gf(t){if(t!==ri)return!1;if(!Sr)return Db(t),Sr=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!qm(t.type,t.memoizedProps)),e&&(e=ei)){if(Wm(t))throw H$(),Error(Se(418));for(;e;)G$(t,e),e=gs(e.nextSibling)}if(Db(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Se(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){ei=gs(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}ei=null}}else ei=ri?gs(t.stateNode.nextSibling):null;return!0}function H$(){for(var t=ei;t;)t=gs(t.nextSibling)}function Il(){ei=ri=null,Sr=!1}function t0(t){Ai===null?Ai=[t]:Ai.push(t)}var Vj=No.ReactCurrentBatchConfig;function _u(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Se(309));var n=r.stateNode}if(!n)throw Error(Se(147,t));var i=n,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(s){var a=i.refs;s===null?delete a[o]:a[o]=s},e._stringRef=o,e)}if(typeof t!="string")throw Error(Se(284));if(!r._owner)throw Error(Se(290,t))}return t}function Hf(t,e){throw t=Object.prototype.toString.call(e),Error(Se(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function qb(t){var e=t._init;return e(t._payload)}function K$(t){function e(y,O){if(t){var v=y.deletions;v===null?(y.deletions=[O],y.flags|=16):v.push(O)}}function r(y,O){if(!t)return null;for(;O!==null;)e(y,O),O=O.sibling;return null}function n(y,O){for(y=new Map;O!==null;)O.key!==null?y.set(O.key,O):y.set(O.index,O),O=O.sibling;return y}function i(y,O){return y=vs(y,O),y.index=0,y.sibling=null,y}function o(y,O,v){return y.index=v,t?(v=y.alternate,v!==null?(v=v.index,v<O?(y.flags|=2,O):v):(y.flags|=2,O)):(y.flags|=1048576,O)}function s(y){return t&&y.alternate===null&&(y.flags|=2),y}function a(y,O,v,b){return O===null||O.tag!==6?(O=fO(v,y.mode,b),O.return=y,O):(O=i(O,v),O.return=y,O)}function l(y,O,v,b){var w=v.type;return w===ll?u(y,O,v.props.children,b,v.key):O!==null&&(O.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Yo&&qb(w)===O.type)?(b=i(O,v.props),b.ref=_u(y,O,v),b.return=y,b):(b=jd(v.type,v.key,v.props,null,y.mode,b),b.ref=_u(y,O,v),b.return=y,b)}function c(y,O,v,b){return O===null||O.tag!==4||O.stateNode.containerInfo!==v.containerInfo||O.stateNode.implementation!==v.implementation?(O=hO(v,y.mode,b),O.return=y,O):(O=i(O,v.children||[]),O.return=y,O)}function u(y,O,v,b,w){return O===null||O.tag!==7?(O=Oa(v,y.mode,b,w),O.return=y,O):(O=i(O,v),O.return=y,O)}function f(y,O,v){if(typeof O=="string"&&O!==""||typeof O=="number")return O=fO(""+O,y.mode,v),O.return=y,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case If:return v=jd(O.type,O.key,O.props,null,y.mode,v),v.ref=_u(y,null,O),v.return=y,v;case al:return O=hO(O,y.mode,v),O.return=y,O;case Yo:var b=O._init;return f(y,b(O._payload),v)}if(Gu(O)||Su(O))return O=Oa(O,y.mode,v,null),O.return=y,O;Hf(y,O)}return null}function h(y,O,v,b){var w=O!==null?O.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return w!==null?null:a(y,O,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case If:return v.key===w?l(y,O,v,b):null;case al:return v.key===w?c(y,O,v,b):null;case Yo:return w=v._init,h(y,O,w(v._payload),b)}if(Gu(v)||Su(v))return w!==null?null:u(y,O,v,b,null);Hf(y,v)}return null}function d(y,O,v,b,w){if(typeof b=="string"&&b!==""||typeof b=="number")return y=y.get(v)||null,a(O,y,""+b,w);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case If:return y=y.get(b.key===null?v:b.key)||null,l(O,y,b,w);case al:return y=y.get(b.key===null?v:b.key)||null,c(O,y,b,w);case Yo:var _=b._init;return d(y,O,v,_(b._payload),w)}if(Gu(b)||Su(b))return y=y.get(v)||null,u(O,y,b,w,null);Hf(O,b)}return null}function p(y,O,v,b){for(var w=null,_=null,C=O,P=O=0,k=null;C!==null&&P<v.length;P++){C.index>P?(k=C,C=null):k=C.sibling;var x=h(y,C,v[P],b);if(x===null){C===null&&(C=k);break}t&&C&&x.alternate===null&&e(y,C),O=o(x,O,P),_===null?w=x:_.sibling=x,_=x,C=k}if(P===v.length)return r(y,C),Sr&&Js(y,P),w;if(C===null){for(;P<v.length;P++)C=f(y,v[P],b),C!==null&&(O=o(C,O,P),_===null?w=C:_.sibling=C,_=C);return Sr&&Js(y,P),w}for(C=n(y,C);P<v.length;P++)k=d(C,y,P,v[P],b),k!==null&&(t&&k.alternate!==null&&C.delete(k.key===null?P:k.key),O=o(k,O,P),_===null?w=k:_.sibling=k,_=k);return t&&C.forEach(function(E){return e(y,E)}),Sr&&Js(y,P),w}function g(y,O,v,b){var w=Su(v);if(typeof w!="function")throw Error(Se(150));if(v=w.call(v),v==null)throw Error(Se(151));for(var _=w=null,C=O,P=O=0,k=null,x=v.next();C!==null&&!x.done;P++,x=v.next()){C.index>P?(k=C,C=null):k=C.sibling;var E=h(y,C,x.value,b);if(E===null){C===null&&(C=k);break}t&&C&&E.alternate===null&&e(y,C),O=o(E,O,P),_===null?w=E:_.sibling=E,_=E,C=k}if(x.done)return r(y,C),Sr&&Js(y,P),w;if(C===null){for(;!x.done;P++,x=v.next())x=f(y,x.value,b),x!==null&&(O=o(x,O,P),_===null?w=x:_.sibling=x,_=x);return Sr&&Js(y,P),w}for(C=n(y,C);!x.done;P++,x=v.next())x=d(C,y,P,x.value,b),x!==null&&(t&&x.alternate!==null&&C.delete(x.key===null?P:x.key),O=o(x,O,P),_===null?w=x:_.sibling=x,_=x);return t&&C.forEach(function(R){return e(y,R)}),Sr&&Js(y,P),w}function m(y,O,v,b){if(typeof v=="object"&&v!==null&&v.type===ll&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case If:e:{for(var w=v.key,_=O;_!==null;){if(_.key===w){if(w=v.type,w===ll){if(_.tag===7){r(y,_.sibling),O=i(_,v.props.children),O.return=y,y=O;break e}}else if(_.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Yo&&qb(w)===_.type){r(y,_.sibling),O=i(_,v.props),O.ref=_u(y,_,v),O.return=y,y=O;break e}r(y,_);break}else e(y,_);_=_.sibling}v.type===ll?(O=Oa(v.props.children,y.mode,b,v.key),O.return=y,y=O):(b=jd(v.type,v.key,v.props,null,y.mode,b),b.ref=_u(y,O,v),b.return=y,y=b)}return s(y);case al:e:{for(_=v.key;O!==null;){if(O.key===_)if(O.tag===4&&O.stateNode.containerInfo===v.containerInfo&&O.stateNode.implementation===v.implementation){r(y,O.sibling),O=i(O,v.children||[]),O.return=y,y=O;break e}else{r(y,O);break}else e(y,O);O=O.sibling}O=hO(v,y.mode,b),O.return=y,y=O}return s(y);case Yo:return _=v._init,m(y,O,_(v._payload),b)}if(Gu(v))return p(y,O,v,b);if(Su(v))return g(y,O,v,b);Hf(y,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,O!==null&&O.tag===6?(r(y,O.sibling),O=i(O,v),O.return=y,y=O):(r(y,O),O=fO(v,y.mode,b),O.return=y,y=O),s(y)):r(y,O)}return m}var Wl=K$(!0),J$=K$(!1),pp=As(null),gp=null,Ol=null,r0=null;function n0(){r0=Ol=gp=null}function i0(t){var e=pp.current;hr(pp),t._currentValue=e}function Lm(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function _l(t,e){gp=t,r0=Ol=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Ln=!0),t.firstContext=null)}function bi(t){var e=t._currentValue;if(r0!==t)if(t={context:t,memoizedValue:e,next:null},Ol===null){if(gp===null)throw Error(Se(308));Ol=t,gp.dependencies={lanes:0,firstContext:t}}else Ol=Ol.next=t;return e}var la=null;function o0(t){la===null?la=[t]:la.push(t)}function eC(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,o0(e)):(r.next=i.next,i.next=r),e.interleaved=r,jo(t,n)}function jo(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var zo=!1;function s0(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tC(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Qo(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Os(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,Nt&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,jo(t,r)}return i=n.interleaved,i===null?(e.next=e,o0(n)):(e.next=i.next,i.next=e),n.interleaved=e,jo(t,r)}function Ed(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Xv(t,r)}}function Zb(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=s:o=o.next=s,r=r.next}while(r!==null);o===null?i=o=e:o=o.next=e}else i=o=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Op(t,e,r,n){var i=t.updateQueue;zo=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;s=0,u=c=l=null,a=o;do{var h=a.lane,d=a.eventTime;if((n&h)===h){u!==null&&(u=u.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=t,g=a;switch(h=e,d=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){f=p.call(d,f,h);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(d,f,h):p,h==null)break e;f=Cr({},f,h);break e;case 2:zo=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else d={eventTime:d,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=d,l=f):u=u.next=d,s|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);wa|=s,t.lanes=s,t.memoizedState=f}}function Nb(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(Se(191,i));i.call(n)}}}var gf={},ho=As(gf),jc=As(gf),Dc=As(gf);function ua(t){if(t===gf)throw Error(Se(174));return t}function a0(t,e){switch(ar(Dc,e),ar(jc,t),ar(ho,gf),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Pm(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Pm(e,t)}hr(ho),ar(ho,e)}function Bl(){hr(ho),hr(jc),hr(Dc)}function rC(t){ua(Dc.current);var e=ua(ho.current),r=Pm(e,t.type);e!==r&&(ar(jc,t),ar(ho,r))}function l0(t){jc.current===t&&(hr(ho),hr(jc))}var _r=As(0);function mp(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var oO=[];function u0(){for(var t=0;t<oO.length;t++)oO[t]._workInProgressVersionPrimary=null;oO.length=0}var Qd=No.ReactCurrentDispatcher,sO=No.ReactCurrentBatchConfig,Sa=0,$r=null,Fr=null,nn=null,yp=!1,dc=!1,qc=0,Xj=0;function gn(){throw Error(Se(321))}function c0(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!Ii(t[r],e[r]))return!1;return!0}function f0(t,e,r,n,i,o){if(Sa=o,$r=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Qd.current=t===null||t.memoizedState===null?zj:Gj,t=r(n,i),dc){o=0;do{if(dc=!1,qc=0,25<=o)throw Error(Se(301));o+=1,nn=Fr=null,e.updateQueue=null,Qd.current=Hj,t=r(n,i)}while(dc)}if(Qd.current=vp,e=Fr!==null&&Fr.next!==null,Sa=0,nn=Fr=$r=null,yp=!1,e)throw Error(Se(300));return t}function h0(){var t=qc!==0;return qc=0,t}function oo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nn===null?$r.memoizedState=nn=t:nn=nn.next=t,nn}function Si(){if(Fr===null){var t=$r.alternate;t=t!==null?t.memoizedState:null}else t=Fr.next;var e=nn===null?$r.memoizedState:nn.next;if(e!==null)nn=e,Fr=t;else{if(t===null)throw Error(Se(310));Fr=t,t={memoizedState:Fr.memoizedState,baseState:Fr.baseState,baseQueue:Fr.baseQueue,queue:Fr.queue,next:null},nn===null?$r.memoizedState=nn=t:nn=nn.next=t}return nn}function Zc(t,e){return typeof e=="function"?e(t):e}function aO(t){var e=Si(),r=e.queue;if(r===null)throw Error(Se(311));r.lastRenderedReducer=t;var n=Fr,i=n.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}n.baseQueue=i=o,r.pending=null}if(i!==null){o=i.next,n=n.baseState;var a=s=null,l=null,c=o;do{var u=c.lane;if((Sa&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:t(n,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,s=n):l=l.next=f,$r.lanes|=u,wa|=u}c=c.next}while(c!==null&&c!==o);l===null?s=n:l.next=a,Ii(n,e.memoizedState)||(Ln=!0),e.memoizedState=n,e.baseState=s,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){i=t;do o=i.lane,$r.lanes|=o,wa|=o,i=i.next;while(i!==t)}else i===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function lO(t){var e=Si(),r=e.queue;if(r===null)throw Error(Se(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,o=e.memoizedState;if(i!==null){r.pending=null;var s=i=i.next;do o=t(o,s.action),s=s.next;while(s!==i);Ii(o,e.memoizedState)||(Ln=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),r.lastRenderedState=o}return[o,n]}function nC(){}function iC(t,e){var r=$r,n=Si(),i=e(),o=!Ii(n.memoizedState,i);if(o&&(n.memoizedState=i,Ln=!0),n=n.queue,d0(aC.bind(null,r,n,t),[t]),n.getSnapshot!==e||o||nn!==null&&nn.memoizedState.tag&1){if(r.flags|=2048,Nc(9,sC.bind(null,r,n,i,e),void 0,null),on===null)throw Error(Se(349));Sa&30||oC(r,e,i)}return i}function oC(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=$r.updateQueue,e===null?(e={lastEffect:null,stores:null},$r.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function sC(t,e,r,n){e.value=r,e.getSnapshot=n,lC(e)&&uC(t)}function aC(t,e,r){return r(function(){lC(e)&&uC(t)})}function lC(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Ii(t,r)}catch{return!0}}function uC(t){var e=jo(t,1);e!==null&&Zi(e,t,1,-1)}function Ib(t){var e=oo();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zc,lastRenderedState:t},e.queue=t,t=t.dispatch=Yj.bind(null,$r,t),[e.memoizedState,t]}function Nc(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=$r.updateQueue,e===null?(e={lastEffect:null,stores:null},$r.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function cC(){return Si().memoizedState}function Td(t,e,r,n){var i=oo();$r.flags|=t,i.memoizedState=Nc(1|e,r,void 0,n===void 0?null:n)}function dg(t,e,r,n){var i=Si();n=n===void 0?null:n;var o=void 0;if(Fr!==null){var s=Fr.memoizedState;if(o=s.destroy,n!==null&&c0(n,s.deps)){i.memoizedState=Nc(e,r,o,n);return}}$r.flags|=t,i.memoizedState=Nc(1|e,r,o,n)}function Wb(t,e){return Td(8390656,8,t,e)}function d0(t,e){return dg(2048,8,t,e)}function fC(t,e){return dg(4,2,t,e)}function hC(t,e){return dg(4,4,t,e)}function dC(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function pC(t,e,r){return r=r!=null?r.concat([t]):null,dg(4,4,dC.bind(null,e,t),r)}function p0(){}function gC(t,e){var r=Si();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&c0(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function OC(t,e){var r=Si();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&c0(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function mC(t,e,r){return Sa&21?(Ii(r,e)||(r=w$(),$r.lanes|=r,wa|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Ln=!0),t.memoizedState=r)}function Fj(t,e){var r=Kt;Kt=r!==0&&4>r?r:4,t(!0);var n=sO.transition;sO.transition={};try{t(!1),e()}finally{Kt=r,sO.transition=n}}function yC(){return Si().memoizedState}function Uj(t,e,r){var n=ys(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},vC(t))bC(e,r);else if(r=eC(t,e,r,n),r!==null){var i=Rn();Zi(r,t,n,i),SC(r,e,n)}}function Yj(t,e,r){var n=ys(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(vC(t))bC(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,r);if(i.hasEagerState=!0,i.eagerState=a,Ii(a,s)){var l=e.interleaved;l===null?(i.next=i,o0(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=eC(t,e,i,n),r!==null&&(i=Rn(),Zi(r,t,n,i),SC(r,e,n))}}function vC(t){var e=t.alternate;return t===$r||e!==null&&e===$r}function bC(t,e){dc=yp=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function SC(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Xv(t,r)}}var vp={readContext:bi,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useInsertionEffect:gn,useLayoutEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useMutableSource:gn,useSyncExternalStore:gn,useId:gn,unstable_isNewReconciler:!1},zj={readContext:bi,useCallback:function(t,e){return oo().memoizedState=[t,e===void 0?null:e],t},useContext:bi,useEffect:Wb,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Td(4194308,4,dC.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Td(4194308,4,t,e)},useInsertionEffect:function(t,e){return Td(4,2,t,e)},useMemo:function(t,e){var r=oo();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=oo();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=Uj.bind(null,$r,t),[n.memoizedState,t]},useRef:function(t){var e=oo();return t={current:t},e.memoizedState=t},useState:Ib,useDebugValue:p0,useDeferredValue:function(t){return oo().memoizedState=t},useTransition:function(){var t=Ib(!1),e=t[0];return t=Fj.bind(null,t[1]),oo().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=$r,i=oo();if(Sr){if(r===void 0)throw Error(Se(407));r=r()}else{if(r=e(),on===null)throw Error(Se(349));Sa&30||oC(n,e,r)}i.memoizedState=r;var o={value:r,getSnapshot:e};return i.queue=o,Wb(aC.bind(null,n,o,t),[t]),n.flags|=2048,Nc(9,sC.bind(null,n,o,r,e),void 0,null),r},useId:function(){var t=oo(),e=on.identifierPrefix;if(Sr){var r=Eo,n=Co;r=(n&~(1<<32-qi(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=qc++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=Xj++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},Gj={readContext:bi,useCallback:gC,useContext:bi,useEffect:d0,useImperativeHandle:pC,useInsertionEffect:fC,useLayoutEffect:hC,useMemo:OC,useReducer:aO,useRef:cC,useState:function(){return aO(Zc)},useDebugValue:p0,useDeferredValue:function(t){var e=Si();return mC(e,Fr.memoizedState,t)},useTransition:function(){var t=aO(Zc)[0],e=Si().memoizedState;return[t,e]},useMutableSource:nC,useSyncExternalStore:iC,useId:yC,unstable_isNewReconciler:!1},Hj={readContext:bi,useCallback:gC,useContext:bi,useEffect:d0,useImperativeHandle:pC,useInsertionEffect:fC,useLayoutEffect:hC,useMemo:OC,useReducer:lO,useRef:cC,useState:function(){return lO(Zc)},useDebugValue:p0,useDeferredValue:function(t){var e=Si();return Fr===null?e.memoizedState=t:mC(e,Fr.memoizedState,t)},useTransition:function(){var t=lO(Zc)[0],e=Si().memoizedState;return[t,e]},useMutableSource:nC,useSyncExternalStore:iC,useId:yC,unstable_isNewReconciler:!1};function Ti(t,e){if(t&&t.defaultProps){e=Cr({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function Vm(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Cr({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var pg={isMounted:function(t){return(t=t._reactInternals)?Qa(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=Rn(),i=ys(t),o=Qo(n,i);o.payload=e,r!=null&&(o.callback=r),e=Os(t,o,i),e!==null&&(Zi(e,t,i,n),Ed(e,t,i))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=Rn(),i=ys(t),o=Qo(n,i);o.tag=1,o.payload=e,r!=null&&(o.callback=r),e=Os(t,o,i),e!==null&&(Zi(e,t,i,n),Ed(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=Rn(),n=ys(t),i=Qo(r,n);i.tag=2,e!=null&&(i.callback=e),e=Os(t,i,n),e!==null&&(Zi(e,t,n,r),Ed(e,t,n))}};function Bb(t,e,r,n,i,o,s){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,o,s):e.prototype&&e.prototype.isPureReactComponent?!Tc(r,n)||!Tc(i,o):!0}function wC(t,e,r){var n=!1,i=Ps,o=e.contextType;return typeof o=="object"&&o!==null?o=bi(o):(i=Fn(e)?va:wn.current,n=e.contextTypes,o=(n=n!=null)?Nl(t,i):Ps),e=new e(r,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=pg,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function Lb(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&pg.enqueueReplaceState(e,e.state,null)}function Xm(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs={},s0(t);var o=e.contextType;typeof o=="object"&&o!==null?i.context=bi(o):(o=Fn(e)?va:wn.current,i.context=Nl(t,o)),i.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(Vm(t,e,o,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&pg.enqueueReplaceState(i,i.state,null),Op(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Ll(t,e){try{var r="",n=e;do r+=xM(n),n=n.return;while(n);var i=r}catch(o){i=`
|
|
39
|
+
Error generating stack: `+o.message+`
|
|
40
|
+
`+o.stack}return{value:t,source:e,stack:i,digest:null}}function uO(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Fm(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var Kj=typeof WeakMap=="function"?WeakMap:Map;function PC(t,e,r){r=Qo(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Sp||(Sp=!0,ry=n),Fm(t,e)},r}function kC(t,e,r){r=Qo(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){Fm(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){Fm(t,e),typeof n!="function"&&(ms===null?ms=new Set([this]):ms.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),r}function Vb(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new Kj;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=h5.bind(null,t,e,r),e.then(t,t))}function Xb(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Fb(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Qo(-1,1),e.tag=2,Os(r,e,1))),r.lanes|=1),t)}var Jj=No.ReactCurrentOwner,Ln=!1;function En(t,e,r,n){e.child=t===null?J$(e,null,r,n):Wl(e,t.child,r,n)}function Ub(t,e,r,n,i){r=r.render;var o=e.ref;return _l(e,i),n=f0(t,e,r,n,o,i),r=h0(),t!==null&&!Ln?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Do(t,e,i)):(Sr&&r&&Jv(e),e.flags|=1,En(t,e,n,i),e.child)}function Yb(t,e,r,n,i){if(t===null){var o=r.type;return typeof o=="function"&&!w0(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,xC(t,e,o,n,i)):(t=jd(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(r=r.compare,r=r!==null?r:Tc,r(s,n)&&t.ref===e.ref)return Do(t,e,i)}return e.flags|=1,t=vs(o,n),t.ref=e.ref,t.return=e,e.child=t}function xC(t,e,r,n,i){if(t!==null){var o=t.memoizedProps;if(Tc(o,n)&&t.ref===e.ref)if(Ln=!1,e.pendingProps=n=o,(t.lanes&i)!==0)t.flags&131072&&(Ln=!0);else return e.lanes=t.lanes,Do(t,e,i)}return Um(t,e,r,n,i)}function _C(t,e,r){var n=e.pendingProps,i=n.children,o=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ar(yl,Kn),Kn|=r;else{if(!(r&1073741824))return t=o!==null?o.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ar(yl,Kn),Kn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,ar(yl,Kn),Kn|=n}else o!==null?(n=o.baseLanes|r,e.memoizedState=null):n=r,ar(yl,Kn),Kn|=n;return En(t,e,i,r),e.child}function $C(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Um(t,e,r,n,i){var o=Fn(r)?va:wn.current;return o=Nl(e,o),_l(e,i),r=f0(t,e,r,n,o,i),n=h0(),t!==null&&!Ln?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Do(t,e,i)):(Sr&&n&&Jv(e),e.flags|=1,En(t,e,r,i),e.child)}function zb(t,e,r,n,i){if(Fn(r)){var o=!0;fp(e)}else o=!1;if(_l(e,i),e.stateNode===null)Rd(t,e),wC(e,r,n),Xm(e,r,n,i),n=!0;else if(t===null){var s=e.stateNode,a=e.memoizedProps;s.props=a;var l=s.context,c=r.contextType;typeof c=="object"&&c!==null?c=bi(c):(c=Fn(r)?va:wn.current,c=Nl(e,c));var u=r.getDerivedStateFromProps,f=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==n||l!==c)&&Lb(e,s,n,c),zo=!1;var h=e.memoizedState;s.state=h,Op(e,n,s,i),l=e.memoizedState,a!==n||h!==l||Xn.current||zo?(typeof u=="function"&&(Vm(e,r,u,n),l=e.memoizedState),(a=zo||Bb(e,r,a,n,h,l,c))?(f||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"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),s.props=n,s.state=l,s.context=c,n=a):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{s=e.stateNode,tC(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Ti(e.type,a),s.props=c,f=e.pendingProps,h=s.context,l=r.contextType,typeof l=="object"&&l!==null?l=bi(l):(l=Fn(r)?va:wn.current,l=Nl(e,l));var d=r.getDerivedStateFromProps;(u=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||h!==l)&&Lb(e,s,n,l),zo=!1,h=e.memoizedState,s.state=h,Op(e,n,s,i);var p=e.memoizedState;a!==f||h!==p||Xn.current||zo?(typeof d=="function"&&(Vm(e,r,d,n),p=e.memoizedState),(c=zo||Bb(e,r,c,n,h,p,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,p,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,p,l)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=p),s.props=n,s.state=p,s.context=l,n=c):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),n=!1)}return Ym(t,e,r,n,o,i)}function Ym(t,e,r,n,i,o){$C(t,e);var s=(e.flags&128)!==0;if(!n&&!s)return i&&Mb(e,r,!1),Do(t,e,o);n=e.stateNode,Jj.current=e;var a=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&s?(e.child=Wl(e,t.child,null,o),e.child=Wl(e,null,a,o)):En(t,e,a,o),e.memoizedState=n.state,i&&Mb(e,r,!0),e.child}function CC(t){var e=t.stateNode;e.pendingContext?Ab(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Ab(t,e.context,!1),a0(t,e.containerInfo)}function Gb(t,e,r,n,i){return Il(),t0(i),e.flags|=256,En(t,e,r,n),e.child}var zm={dehydrated:null,treeContext:null,retryLane:0};function Gm(t){return{baseLanes:t,cachePool:null,transitions:null}}function EC(t,e,r){var n=e.pendingProps,i=_r.current,o=!1,s=(e.flags&128)!==0,a;if((a=s)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),ar(_r,i&1),t===null)return Bm(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=n.children,t=n.fallback,o?(n=e.mode,o=e.child,s={mode:"hidden",children:s},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=mg(s,n,0,null),t=Oa(t,n,r,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=Gm(r),e.memoizedState=zm,t):g0(e,s));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return e5(t,e,s,n,a,i,r);if(o){o=n.fallback,s=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:n.children};return!(s&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=vs(i,l),n.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=vs(a,o):(o=Oa(o,s,r,null),o.flags|=2),o.return=e,n.return=e,n.sibling=o,e.child=n,n=o,o=e.child,s=t.child.memoizedState,s=s===null?Gm(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~r,e.memoizedState=zm,n}return o=t.child,t=o.sibling,n=vs(o,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function g0(t,e){return e=mg({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Kf(t,e,r,n){return n!==null&&t0(n),Wl(e,t.child,null,r),t=g0(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function e5(t,e,r,n,i,o,s){if(r)return e.flags&256?(e.flags&=-257,n=uO(Error(Se(422))),Kf(t,e,s,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=n.fallback,i=e.mode,n=mg({mode:"visible",children:n.children},i,0,null),o=Oa(o,i,s,null),o.flags|=2,n.return=e,o.return=e,n.sibling=o,e.child=n,e.mode&1&&Wl(e,t.child,null,s),e.child.memoizedState=Gm(s),e.memoizedState=zm,o);if(!(e.mode&1))return Kf(t,e,s,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var a=n.dgst;return n=a,o=Error(Se(419)),n=uO(o,n,void 0),Kf(t,e,s,n)}if(a=(s&t.childLanes)!==0,Ln||a){if(n=on,n!==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&(n.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,jo(t,i),Zi(n,t,i,-1))}return S0(),n=uO(Error(Se(421))),Kf(t,e,s,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=d5.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,ei=gs(i.nextSibling),ri=e,Sr=!0,Ai=null,t!==null&&(fi[hi++]=Co,fi[hi++]=Eo,fi[hi++]=ba,Co=t.id,Eo=t.overflow,ba=e),e=g0(e,n.children),e.flags|=4096,e)}function Hb(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Lm(t.return,e,r)}function cO(t,e,r,n,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function QC(t,e,r){var n=e.pendingProps,i=n.revealOrder,o=n.tail;if(En(t,e,n.children,r),n=_r.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Hb(t,r,e);else if(t.tag===19)Hb(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(ar(_r,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&mp(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),cO(e,!1,i,r,o);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&mp(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}cO(e,!0,r,null,o);break;case"together":cO(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Rd(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Do(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),wa|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(Se(153));if(e.child!==null){for(t=e.child,r=vs(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=vs(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function t5(t,e,r){switch(e.tag){case 3:CC(e),Il();break;case 5:rC(e);break;case 1:Fn(e.type)&&fp(e);break;case 4:a0(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;ar(pp,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(ar(_r,_r.current&1),e.flags|=128,null):r&e.child.childLanes?EC(t,e,r):(ar(_r,_r.current&1),t=Do(t,e,r),t!==null?t.sibling:null);ar(_r,_r.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return QC(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ar(_r,_r.current),n)break;return null;case 22:case 23:return e.lanes=0,_C(t,e,r)}return Do(t,e,r)}var TC,Hm,RC,AC;TC=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Hm=function(){};RC=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,ua(ho.current);var o=null;switch(r){case"input":i=vm(t,i),n=vm(t,n),o=[];break;case"select":i=Cr({},i,{value:void 0}),n=Cr({},n,{value:void 0}),o=[];break;case"textarea":i=wm(t,i),n=wm(t,n),o=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=up)}km(r,n);var s;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(s in a)a.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(kc.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in n){var l=n[c];if(a=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(r||(r={}),r[s]=l[s])}else r||(o||(o=[]),o.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(kc.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ur("scroll",t),o||a===l||(o=[])):(o=o||[]).push(c,l))}r&&(o=o||[]).push("style",r);var c=o;(e.updateQueue=c)&&(e.flags|=4)}};AC=function(t,e,r,n){r!==n&&(e.flags|=4)};function $u(t,e){if(!Sr)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function On(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function r5(t,e,r){var n=e.pendingProps;switch(e0(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return On(e),null;case 1:return Fn(e.type)&&cp(),On(e),null;case 3:return n=e.stateNode,Bl(),hr(Xn),hr(wn),u0(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Gf(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ai!==null&&(oy(Ai),Ai=null))),Hm(t,e),On(e),null;case 5:l0(e);var i=ua(Dc.current);if(r=e.type,t!==null&&e.stateNode!=null)RC(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(Se(166));return On(e),null}if(t=ua(ho.current),Gf(e)){n=e.stateNode,r=e.type;var o=e.memoizedProps;switch(n[so]=e,n[Mc]=o,t=(e.mode&1)!==0,r){case"dialog":ur("cancel",n),ur("close",n);break;case"iframe":case"object":case"embed":ur("load",n);break;case"video":case"audio":for(i=0;i<Ku.length;i++)ur(Ku[i],n);break;case"source":ur("error",n);break;case"img":case"image":case"link":ur("error",n),ur("load",n);break;case"details":ur("toggle",n);break;case"input":sb(n,o),ur("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},ur("invalid",n);break;case"textarea":lb(n,o),ur("invalid",n)}km(r,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?n.textContent!==a&&(o.suppressHydrationWarning!==!0&&zf(n.textContent,a,t),i=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&zf(n.textContent,a,t),i=["children",""+a]):kc.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&ur("scroll",n)}switch(r){case"input":Wf(n),ab(n,o,!0);break;case"textarea":Wf(n),ub(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=up)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=a$(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=s.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=s.createElement(r,{is:n.is}):(t=s.createElement(r),r==="select"&&(s=t,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):t=s.createElementNS(t,r),t[so]=e,t[Mc]=n,TC(t,e,!1,!1),e.stateNode=t;e:{switch(s=xm(r,n),r){case"dialog":ur("cancel",t),ur("close",t),i=n;break;case"iframe":case"object":case"embed":ur("load",t),i=n;break;case"video":case"audio":for(i=0;i<Ku.length;i++)ur(Ku[i],t);i=n;break;case"source":ur("error",t),i=n;break;case"img":case"image":case"link":ur("error",t),ur("load",t),i=n;break;case"details":ur("toggle",t),i=n;break;case"input":sb(t,n),i=vm(t,n),ur("invalid",t);break;case"option":i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=Cr({},n,{value:void 0}),ur("invalid",t);break;case"textarea":lb(t,n),i=wm(t,n),ur("invalid",t);break;default:i=n}km(r,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?c$(t,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&l$(t,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&xc(t,l):typeof l=="number"&&xc(t,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(kc.hasOwnProperty(o)?l!=null&&o==="onScroll"&&ur("scroll",t):l!=null&&Nv(t,o,l,s))}switch(r){case"input":Wf(t),ab(t,n,!1);break;case"textarea":Wf(t),ub(t);break;case"option":n.value!=null&&t.setAttribute("value",""+ws(n.value));break;case"select":t.multiple=!!n.multiple,o=n.value,o!=null?wl(t,!!n.multiple,o,!1):n.defaultValue!=null&&wl(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=up)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return On(e),null;case 6:if(t&&e.stateNode!=null)AC(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(Se(166));if(r=ua(Dc.current),ua(ho.current),Gf(e)){if(n=e.stateNode,r=e.memoizedProps,n[so]=e,(o=n.nodeValue!==r)&&(t=ri,t!==null))switch(t.tag){case 3:zf(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&zf(n.nodeValue,r,(t.mode&1)!==0)}o&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[so]=e,e.stateNode=n}return On(e),null;case 13:if(hr(_r),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Sr&&ei!==null&&e.mode&1&&!(e.flags&128))H$(),Il(),e.flags|=98560,o=!1;else if(o=Gf(e),n!==null&&n.dehydrated!==null){if(t===null){if(!o)throw Error(Se(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Se(317));o[so]=e}else Il(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;On(e),o=!1}else Ai!==null&&(oy(Ai),Ai=null),o=!0;if(!o)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||_r.current&1?zr===0&&(zr=3):S0())),e.updateQueue!==null&&(e.flags|=4),On(e),null);case 4:return Bl(),Hm(t,e),t===null&&Rc(e.stateNode.containerInfo),On(e),null;case 10:return i0(e.type._context),On(e),null;case 17:return Fn(e.type)&&cp(),On(e),null;case 19:if(hr(_r),o=e.memoizedState,o===null)return On(e),null;if(n=(e.flags&128)!==0,s=o.rendering,s===null)if(n)$u(o,!1);else{if(zr!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(s=mp(t),s!==null){for(e.flags|=128,$u(o,!1),n=s.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)o=r,t=n,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=t,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,t=s.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return ar(_r,_r.current&1|2),e.child}t=t.sibling}o.tail!==null&&jr()>Vl&&(e.flags|=128,n=!0,$u(o,!1),e.lanes=4194304)}else{if(!n)if(t=mp(s),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),$u(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Sr)return On(e),null}else 2*jr()-o.renderingStartTime>Vl&&r!==1073741824&&(e.flags|=128,n=!0,$u(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(r=o.last,r!==null?r.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=jr(),e.sibling=null,r=_r.current,ar(_r,n?r&1|2:r&1),e):(On(e),null);case 22:case 23:return b0(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Kn&1073741824&&(On(e),e.subtreeFlags&6&&(e.flags|=8192)):On(e),null;case 24:return null;case 25:return null}throw Error(Se(156,e.tag))}function n5(t,e){switch(e0(e),e.tag){case 1:return Fn(e.type)&&cp(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Bl(),hr(Xn),hr(wn),u0(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return l0(e),null;case 13:if(hr(_r),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Se(340));Il()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return hr(_r),null;case 4:return Bl(),null;case 10:return i0(e.type._context),null;case 22:case 23:return b0(),null;case 24:return null;default:return null}}var Jf=!1,vn=!1,i5=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function ml(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Qr(t,e,n)}else r.current=null}function Km(t,e,r){try{r()}catch(n){Qr(t,e,n)}}var Kb=!1;function o5(t,e){if(jm=sp,t=Z$(),Kv(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,a=-1,l=-1,c=0,u=0,f=t,h=null;t:for(;;){for(var d;f!==r||i!==0&&f.nodeType!==3||(a=s+i),f!==o||n!==0&&f.nodeType!==3||(l=s+n),f.nodeType===3&&(s+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===t)break t;if(h===r&&++c===i&&(a=s),h===o&&++u===n&&(l=s),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Dm={focusedElem:t,selectionRange:r},sp=!1,Ve=e;Ve!==null;)if(e=Ve,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Ve=t;else for(;Ve!==null;){e=Ve;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,y=e.stateNode,O=y.getSnapshotBeforeUpdate(e.elementType===e.type?g:Ti(e.type,g),m);y.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var v=e.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Se(163))}}catch(b){Qr(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,Ve=t;break}Ve=e.return}return p=Kb,Kb=!1,p}function pc(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&Km(e,r,o)}i=i.next}while(i!==n)}}function gg(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Jm(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function MC(t){var e=t.alternate;e!==null&&(t.alternate=null,MC(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[so],delete e[Mc],delete e[Nm],delete e[Wj],delete e[Bj])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function jC(t){return t.tag===5||t.tag===3||t.tag===4}function Jb(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||jC(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function ey(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=up));else if(n!==4&&(t=t.child,t!==null))for(ey(t,e,r),t=t.sibling;t!==null;)ey(t,e,r),t=t.sibling}function ty(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(ty(t,e,r),t=t.sibling;t!==null;)ty(t,e,r),t=t.sibling}var sn=null,Ri=!1;function Lo(t,e,r){for(r=r.child;r!==null;)DC(t,e,r),r=r.sibling}function DC(t,e,r){if(fo&&typeof fo.onCommitFiberUnmount=="function")try{fo.onCommitFiberUnmount(ag,r)}catch{}switch(r.tag){case 5:vn||ml(r,e);case 6:var n=sn,i=Ri;sn=null,Lo(t,e,r),sn=n,Ri=i,sn!==null&&(Ri?(t=sn,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):sn.removeChild(r.stateNode));break;case 18:sn!==null&&(Ri?(t=sn,r=r.stateNode,t.nodeType===8?nO(t.parentNode,r):t.nodeType===1&&nO(t,r),Ec(t)):nO(sn,r.stateNode));break;case 4:n=sn,i=Ri,sn=r.stateNode.containerInfo,Ri=!0,Lo(t,e,r),sn=n,Ri=i;break;case 0:case 11:case 14:case 15:if(!vn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Km(r,e,s),i=i.next}while(i!==n)}Lo(t,e,r);break;case 1:if(!vn&&(ml(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Qr(r,e,a)}Lo(t,e,r);break;case 21:Lo(t,e,r);break;case 22:r.mode&1?(vn=(n=vn)||r.memoizedState!==null,Lo(t,e,r),vn=n):Lo(t,e,r);break;default:Lo(t,e,r)}}function eS(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new i5),e.forEach(function(n){var i=p5.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function $i(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var o=t,s=e,a=s;e:for(;a!==null;){switch(a.tag){case 5:sn=a.stateNode,Ri=!1;break e;case 3:sn=a.stateNode.containerInfo,Ri=!0;break e;case 4:sn=a.stateNode.containerInfo,Ri=!0;break e}a=a.return}if(sn===null)throw Error(Se(160));DC(o,s,i),sn=null,Ri=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Qr(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)qC(e,t),e=e.sibling}function qC(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if($i(e,t),Fi(t),n&4){try{pc(3,t,t.return),gg(3,t)}catch(g){Qr(t,t.return,g)}try{pc(5,t,t.return)}catch(g){Qr(t,t.return,g)}}break;case 1:$i(e,t),Fi(t),n&512&&r!==null&&ml(r,r.return);break;case 5:if($i(e,t),Fi(t),n&512&&r!==null&&ml(r,r.return),t.flags&32){var i=t.stateNode;try{xc(i,"")}catch(g){Qr(t,t.return,g)}}if(n&4&&(i=t.stateNode,i!=null)){var o=t.memoizedProps,s=r!==null?r.memoizedProps:o,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&o$(i,o),xm(a,s);var c=xm(a,o);for(s=0;s<l.length;s+=2){var u=l[s],f=l[s+1];u==="style"?c$(i,f):u==="dangerouslySetInnerHTML"?l$(i,f):u==="children"?xc(i,f):Nv(i,u,f,c)}switch(a){case"input":bm(i,o);break;case"textarea":s$(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var d=o.value;d!=null?wl(i,!!o.multiple,d,!1):h!==!!o.multiple&&(o.defaultValue!=null?wl(i,!!o.multiple,o.defaultValue,!0):wl(i,!!o.multiple,o.multiple?[]:"",!1))}i[Mc]=o}catch(g){Qr(t,t.return,g)}}break;case 6:if($i(e,t),Fi(t),n&4){if(t.stateNode===null)throw Error(Se(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(g){Qr(t,t.return,g)}}break;case 3:if($i(e,t),Fi(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ec(e.containerInfo)}catch(g){Qr(t,t.return,g)}break;case 4:$i(e,t),Fi(t);break;case 13:$i(e,t),Fi(t),i=t.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(y0=jr())),n&4&&eS(t);break;case 22:if(u=r!==null&&r.memoizedState!==null,t.mode&1?(vn=(c=vn)||u,$i(e,t),vn=c):$i(e,t),Fi(t),n&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(Ve=t,u=t.child;u!==null;){for(f=Ve=u;Ve!==null;){switch(h=Ve,d=h.child,h.tag){case 0:case 11:case 14:case 15:pc(4,h,h.return);break;case 1:ml(h,h.return);var p=h.stateNode;if(typeof p.componentWillUnmount=="function"){n=h,r=h.return;try{e=n,p.props=e.memoizedProps,p.state=e.memoizedState,p.componentWillUnmount()}catch(g){Qr(n,r,g)}}break;case 5:ml(h,h.return);break;case 22:if(h.memoizedState!==null){rS(f);continue}}d!==null?(d.return=h,Ve=d):rS(f)}u=u.sibling}e:for(u=null,f=t;;){if(f.tag===5){if(u===null){u=f;try{i=f.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=u$("display",s))}catch(g){Qr(t,t.return,g)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(g){Qr(t,t.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:$i(e,t),Fi(t),n&4&&eS(t);break;case 21:break;default:$i(e,t),Fi(t)}}function Fi(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(jC(r)){var n=r;break e}r=r.return}throw Error(Se(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(xc(i,""),n.flags&=-33);var o=Jb(t);ty(t,o,i);break;case 3:case 4:var s=n.stateNode.containerInfo,a=Jb(t);ey(t,a,s);break;default:throw Error(Se(161))}}catch(l){Qr(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function s5(t,e,r){Ve=t,ZC(t)}function ZC(t,e,r){for(var n=(t.mode&1)!==0;Ve!==null;){var i=Ve,o=i.child;if(i.tag===22&&n){var s=i.memoizedState!==null||Jf;if(!s){var a=i.alternate,l=a!==null&&a.memoizedState!==null||vn;a=Jf;var c=vn;if(Jf=s,(vn=l)&&!c)for(Ve=i;Ve!==null;)s=Ve,l=s.child,s.tag===22&&s.memoizedState!==null?nS(i):l!==null?(l.return=s,Ve=l):nS(i);for(;o!==null;)Ve=o,ZC(o),o=o.sibling;Ve=i,Jf=a,vn=c}tS(t)}else i.subtreeFlags&8772&&o!==null?(o.return=i,Ve=o):tS(t)}}function tS(t){for(;Ve!==null;){var e=Ve;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:vn||gg(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!vn)if(r===null)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:Ti(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&Nb(e,o,n);break;case 3:var s=e.updateQueue;if(s!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}Nb(e,s,r)}break;case 5:var a=e.stateNode;if(r===null&&e.flags&4){r=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&Ec(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Se(163))}vn||e.flags&512&&Jm(e)}catch(h){Qr(e,e.return,h)}}if(e===t){Ve=null;break}if(r=e.sibling,r!==null){r.return=e.return,Ve=r;break}Ve=e.return}}function rS(t){for(;Ve!==null;){var e=Ve;if(e===t){Ve=null;break}var r=e.sibling;if(r!==null){r.return=e.return,Ve=r;break}Ve=e.return}}function nS(t){for(;Ve!==null;){var e=Ve;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{gg(4,e)}catch(l){Qr(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(l){Qr(e,i,l)}}var o=e.return;try{Jm(e)}catch(l){Qr(e,o,l)}break;case 5:var s=e.return;try{Jm(e)}catch(l){Qr(e,s,l)}}}catch(l){Qr(e,e.return,l)}if(e===t){Ve=null;break}var a=e.sibling;if(a!==null){a.return=e.return,Ve=a;break}Ve=e.return}}var a5=Math.ceil,bp=No.ReactCurrentDispatcher,O0=No.ReactCurrentOwner,yi=No.ReactCurrentBatchConfig,Nt=0,on=null,Zr=null,hn=0,Kn=0,yl=As(0),zr=0,Ic=null,wa=0,Og=0,m0=0,gc=null,In=null,y0=0,Vl=1/0,Po=null,Sp=!1,ry=null,ms=null,eh=!1,os=null,wp=0,Oc=0,ny=null,Ad=-1,Md=0;function Rn(){return Nt&6?jr():Ad!==-1?Ad:Ad=jr()}function ys(t){return t.mode&1?Nt&2&&hn!==0?hn&-hn:Vj.transition!==null?(Md===0&&(Md=w$()),Md):(t=Kt,t!==0||(t=window.event,t=t===void 0?16:E$(t.type)),t):1}function Zi(t,e,r,n){if(50<Oc)throw Oc=0,ny=null,Error(Se(185));hf(t,r,n),(!(Nt&2)||t!==on)&&(t===on&&(!(Nt&2)&&(Og|=r),zr===4&&ts(t,hn)),Un(t,n),r===1&&Nt===0&&!(e.mode&1)&&(Vl=jr()+500,hg&&Ms()))}function Un(t,e){var r=t.callbackNode;VM(t,e);var n=op(t,t===on?hn:0);if(n===0)r!==null&&hb(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&hb(r),e===1)t.tag===0?Lj(iS.bind(null,t)):Y$(iS.bind(null,t)),Nj(function(){!(Nt&6)&&Ms()}),r=null;else{switch(P$(n)){case 1:r=Vv;break;case 4:r=b$;break;case 16:r=ip;break;case 536870912:r=S$;break;default:r=ip}r=FC(r,NC.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function NC(t,e){if(Ad=-1,Md=0,Nt&6)throw Error(Se(327));var r=t.callbackNode;if($l()&&t.callbackNode!==r)return null;var n=op(t,t===on?hn:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=Pp(t,n);else{e=n;var i=Nt;Nt|=2;var o=WC();(on!==t||hn!==e)&&(Po=null,Vl=jr()+500,ga(t,e));do try{c5();break}catch(a){IC(t,a)}while(!0);n0(),bp.current=o,Nt=i,Zr!==null?e=0:(on=null,hn=0,e=zr)}if(e!==0){if(e===2&&(i=Qm(t),i!==0&&(n=i,e=iy(t,i))),e===1)throw r=Ic,ga(t,0),ts(t,n),Un(t,jr()),r;if(e===6)ts(t,n);else{if(i=t.current.alternate,!(n&30)&&!l5(i)&&(e=Pp(t,n),e===2&&(o=Qm(t),o!==0&&(n=o,e=iy(t,o))),e===1))throw r=Ic,ga(t,0),ts(t,n),Un(t,jr()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error(Se(345));case 2:ea(t,In,Po);break;case 3:if(ts(t,n),(n&130023424)===n&&(e=y0+500-jr(),10<e)){if(op(t,0)!==0)break;if(i=t.suspendedLanes,(i&n)!==n){Rn(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Zm(ea.bind(null,t,In,Po),e);break}ea(t,In,Po);break;case 4:if(ts(t,n),(n&4194240)===n)break;for(e=t.eventTimes,i=-1;0<n;){var s=31-qi(n);o=1<<s,s=e[s],s>i&&(i=s),n&=~o}if(n=i,n=jr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*a5(n/1960))-n,10<n){t.timeoutHandle=Zm(ea.bind(null,t,In,Po),n);break}ea(t,In,Po);break;case 5:ea(t,In,Po);break;default:throw Error(Se(329))}}}return Un(t,jr()),t.callbackNode===r?NC.bind(null,t):null}function iy(t,e){var r=gc;return t.current.memoizedState.isDehydrated&&(ga(t,e).flags|=256),t=Pp(t,e),t!==2&&(e=In,In=r,e!==null&&oy(e)),t}function oy(t){In===null?In=t:In.push.apply(In,t)}function l5(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],o=i.getSnapshot;i=i.value;try{if(!Ii(o(),i))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ts(t,e){for(e&=~m0,e&=~Og,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-qi(e),n=1<<r;t[r]=-1,e&=~n}}function iS(t){if(Nt&6)throw Error(Se(327));$l();var e=op(t,0);if(!(e&1))return Un(t,jr()),null;var r=Pp(t,e);if(t.tag!==0&&r===2){var n=Qm(t);n!==0&&(e=n,r=iy(t,n))}if(r===1)throw r=Ic,ga(t,0),ts(t,e),Un(t,jr()),r;if(r===6)throw Error(Se(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,ea(t,In,Po),Un(t,jr()),null}function v0(t,e){var r=Nt;Nt|=1;try{return t(e)}finally{Nt=r,Nt===0&&(Vl=jr()+500,hg&&Ms())}}function Pa(t){os!==null&&os.tag===0&&!(Nt&6)&&$l();var e=Nt;Nt|=1;var r=yi.transition,n=Kt;try{if(yi.transition=null,Kt=1,t)return t()}finally{Kt=n,yi.transition=r,Nt=e,!(Nt&6)&&Ms()}}function b0(){Kn=yl.current,hr(yl)}function ga(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,Zj(r)),Zr!==null)for(r=Zr.return;r!==null;){var n=r;switch(e0(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&cp();break;case 3:Bl(),hr(Xn),hr(wn),u0();break;case 5:l0(n);break;case 4:Bl();break;case 13:hr(_r);break;case 19:hr(_r);break;case 10:i0(n.type._context);break;case 22:case 23:b0()}r=r.return}if(on=t,Zr=t=vs(t.current,null),hn=Kn=e,zr=0,Ic=null,m0=Og=wa=0,In=gc=null,la!==null){for(e=0;e<la.length;e++)if(r=la[e],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,o=r.pending;if(o!==null){var s=o.next;o.next=i,n.next=s}r.pending=n}la=null}return t}function IC(t,e){do{var r=Zr;try{if(n0(),Qd.current=vp,yp){for(var n=$r.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}yp=!1}if(Sa=0,nn=Fr=$r=null,dc=!1,qc=0,O0.current=null,r===null||r.return===null){zr=1,Ic=e,Zr=null;break}e:{var o=t,s=r.return,a=r,l=e;if(e=hn,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var d=Xb(s);if(d!==null){d.flags&=-257,Fb(d,s,a,o,e),d.mode&1&&Vb(o,c,e),e=d,l=c;var p=e.updateQueue;if(p===null){var g=new Set;g.add(l),e.updateQueue=g}else p.add(l);break e}else{if(!(e&1)){Vb(o,c,e),S0();break e}l=Error(Se(426))}}else if(Sr&&a.mode&1){var m=Xb(s);if(m!==null){!(m.flags&65536)&&(m.flags|=256),Fb(m,s,a,o,e),t0(Ll(l,a));break e}}o=l=Ll(l,a),zr!==4&&(zr=2),gc===null?gc=[o]:gc.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var y=PC(o,l,e);Zb(o,y);break e;case 1:a=l;var O=o.type,v=o.stateNode;if(!(o.flags&128)&&(typeof O.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ms===null||!ms.has(v)))){o.flags|=65536,e&=-e,o.lanes|=e;var b=kC(o,a,e);Zb(o,b);break e}}o=o.return}while(o!==null)}LC(r)}catch(w){e=w,Zr===r&&r!==null&&(Zr=r=r.return);continue}break}while(!0)}function WC(){var t=bp.current;return bp.current=vp,t===null?vp:t}function S0(){(zr===0||zr===3||zr===2)&&(zr=4),on===null||!(wa&268435455)&&!(Og&268435455)||ts(on,hn)}function Pp(t,e){var r=Nt;Nt|=2;var n=WC();(on!==t||hn!==e)&&(Po=null,ga(t,e));do try{u5();break}catch(i){IC(t,i)}while(!0);if(n0(),Nt=r,bp.current=n,Zr!==null)throw Error(Se(261));return on=null,hn=0,zr}function u5(){for(;Zr!==null;)BC(Zr)}function c5(){for(;Zr!==null&&!jM();)BC(Zr)}function BC(t){var e=XC(t.alternate,t,Kn);t.memoizedProps=t.pendingProps,e===null?LC(t):Zr=e,O0.current=null}function LC(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=n5(r,e),r!==null){r.flags&=32767,Zr=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{zr=6,Zr=null;return}}else if(r=r5(r,e,Kn),r!==null){Zr=r;return}if(e=e.sibling,e!==null){Zr=e;return}Zr=e=t}while(e!==null);zr===0&&(zr=5)}function ea(t,e,r){var n=Kt,i=yi.transition;try{yi.transition=null,Kt=1,f5(t,e,r,n)}finally{yi.transition=i,Kt=n}return null}function f5(t,e,r,n){do $l();while(os!==null);if(Nt&6)throw Error(Se(327));r=t.finishedWork;var i=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(Se(177));t.callbackNode=null,t.callbackPriority=0;var o=r.lanes|r.childLanes;if(XM(t,o),t===on&&(Zr=on=null,hn=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||eh||(eh=!0,FC(ip,function(){return $l(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=yi.transition,yi.transition=null;var s=Kt;Kt=1;var a=Nt;Nt|=4,O0.current=null,o5(t,r),qC(r,t),Tj(Dm),sp=!!jm,Dm=jm=null,t.current=r,s5(r),DM(),Nt=a,Kt=s,yi.transition=o}else t.current=r;if(eh&&(eh=!1,os=t,wp=i),o=t.pendingLanes,o===0&&(ms=null),NM(r.stateNode),Un(t,jr()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(Sp)throw Sp=!1,t=ry,ry=null,t;return wp&1&&t.tag!==0&&$l(),o=t.pendingLanes,o&1?t===ny?Oc++:(Oc=0,ny=t):Oc=0,Ms(),null}function $l(){if(os!==null){var t=P$(wp),e=yi.transition,r=Kt;try{if(yi.transition=null,Kt=16>t?16:t,os===null)var n=!1;else{if(t=os,os=null,wp=0,Nt&6)throw Error(Se(331));var i=Nt;for(Nt|=4,Ve=t.current;Ve!==null;){var o=Ve,s=o.child;if(Ve.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Ve=c;Ve!==null;){var u=Ve;switch(u.tag){case 0:case 11:case 15:pc(8,u,o)}var f=u.child;if(f!==null)f.return=u,Ve=f;else for(;Ve!==null;){u=Ve;var h=u.sibling,d=u.return;if(MC(u),u===c){Ve=null;break}if(h!==null){h.return=d,Ve=h;break}Ve=d}}}var p=o.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var m=g.sibling;g.sibling=null,g=m}while(g!==null)}}Ve=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Ve=s;else e:for(;Ve!==null;){if(o=Ve,o.flags&2048)switch(o.tag){case 0:case 11:case 15:pc(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,Ve=y;break e}Ve=o.return}}var O=t.current;for(Ve=O;Ve!==null;){s=Ve;var v=s.child;if(s.subtreeFlags&2064&&v!==null)v.return=s,Ve=v;else e:for(s=O;Ve!==null;){if(a=Ve,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:gg(9,a)}}catch(w){Qr(a,a.return,w)}if(a===s){Ve=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,Ve=b;break e}Ve=a.return}}if(Nt=i,Ms(),fo&&typeof fo.onPostCommitFiberRoot=="function")try{fo.onPostCommitFiberRoot(ag,t)}catch{}n=!0}return n}finally{Kt=r,yi.transition=e}}return!1}function oS(t,e,r){e=Ll(r,e),e=PC(t,e,1),t=Os(t,e,1),e=Rn(),t!==null&&(hf(t,1,e),Un(t,e))}function Qr(t,e,r){if(t.tag===3)oS(t,t,r);else for(;e!==null;){if(e.tag===3){oS(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ms===null||!ms.has(n))){t=Ll(r,t),t=kC(e,t,1),e=Os(e,t,1),t=Rn(),e!==null&&(hf(e,1,t),Un(e,t));break}}e=e.return}}function h5(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=Rn(),t.pingedLanes|=t.suspendedLanes&r,on===t&&(hn&r)===r&&(zr===4||zr===3&&(hn&130023424)===hn&&500>jr()-y0?ga(t,0):m0|=r),Un(t,e)}function VC(t,e){e===0&&(t.mode&1?(e=Vf,Vf<<=1,!(Vf&130023424)&&(Vf=4194304)):e=1);var r=Rn();t=jo(t,e),t!==null&&(hf(t,e,r),Un(t,r))}function d5(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),VC(t,r)}function p5(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(Se(314))}n!==null&&n.delete(e),VC(t,r)}var XC;XC=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Xn.current)Ln=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Ln=!1,t5(t,e,r);Ln=!!(t.flags&131072)}else Ln=!1,Sr&&e.flags&1048576&&z$(e,dp,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Rd(t,e),t=e.pendingProps;var i=Nl(e,wn.current);_l(e,r),i=f0(null,e,n,t,i,r);var o=h0();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Fn(n)?(o=!0,fp(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,s0(e),i.updater=pg,e.stateNode=i,i._reactInternals=e,Xm(e,n,t,r),e=Ym(null,e,n,!0,o,r)):(e.tag=0,Sr&&o&&Jv(e),En(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Rd(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=O5(n),t=Ti(n,t),i){case 0:e=Um(null,e,n,t,r);break e;case 1:e=zb(null,e,n,t,r);break e;case 11:e=Ub(null,e,n,t,r);break e;case 14:e=Yb(null,e,n,Ti(n.type,t),r);break e}throw Error(Se(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),Um(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),zb(t,e,n,i,r);case 3:e:{if(CC(e),t===null)throw Error(Se(387));n=e.pendingProps,o=e.memoizedState,i=o.element,tC(t,e),Op(e,n,null,r);var s=e.memoizedState;if(n=s.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Ll(Error(Se(423)),e),e=Gb(t,e,n,r,i);break e}else if(n!==i){i=Ll(Error(Se(424)),e),e=Gb(t,e,n,r,i);break e}else for(ei=gs(e.stateNode.containerInfo.firstChild),ri=e,Sr=!0,Ai=null,r=J$(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Il(),n===i){e=Do(t,e,r);break e}En(t,e,n,r)}e=e.child}return e;case 5:return rC(e),t===null&&Bm(e),n=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,qm(n,i)?s=null:o!==null&&qm(n,o)&&(e.flags|=32),$C(t,e),En(t,e,s,r),e.child;case 6:return t===null&&Bm(e),null;case 13:return EC(t,e,r);case 4:return a0(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Wl(e,null,n,r):En(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),Ub(t,e,n,i,r);case 7:return En(t,e,e.pendingProps,r),e.child;case 8:return En(t,e,e.pendingProps.children,r),e.child;case 12:return En(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,ar(pp,n._currentValue),n._currentValue=s,o!==null)if(Ii(o.value,s)){if(o.children===i.children&&!Xn.current){e=Do(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=Qo(-1,r&-r),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Lm(o.return,r,e),a.lanes|=r;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Se(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),Lm(s,r,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}En(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,_l(e,r),i=bi(i),n=n(i),e.flags|=1,En(t,e,n,r),e.child;case 14:return n=e.type,i=Ti(n,e.pendingProps),i=Ti(n.type,i),Yb(t,e,n,i,r);case 15:return xC(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),Rd(t,e),e.tag=1,Fn(n)?(t=!0,fp(e)):t=!1,_l(e,r),wC(e,n,i),Xm(e,n,i,r),Ym(null,e,n,!0,t,r);case 19:return QC(t,e,r);case 22:return _C(t,e,r)}throw Error(Se(156,e.tag))};function FC(t,e){return v$(t,e)}function g5(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pi(t,e,r,n){return new g5(t,e,r,n)}function w0(t){return t=t.prototype,!(!t||!t.isReactComponent)}function O5(t){if(typeof t=="function")return w0(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Wv)return 11;if(t===Bv)return 14}return 2}function vs(t,e){var r=t.alternate;return r===null?(r=pi(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function jd(t,e,r,n,i,o){var s=2;if(n=t,typeof t=="function")w0(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case ll:return Oa(r.children,i,o,e);case Iv:s=8,i|=8;break;case gm:return t=pi(12,r,e,i|2),t.elementType=gm,t.lanes=o,t;case Om:return t=pi(13,r,e,i),t.elementType=Om,t.lanes=o,t;case mm:return t=pi(19,r,e,i),t.elementType=mm,t.lanes=o,t;case r$:return mg(r,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case e$:s=10;break e;case t$:s=9;break e;case Wv:s=11;break e;case Bv:s=14;break e;case Yo:s=16,n=null;break e}throw Error(Se(130,t==null?t:typeof t,""))}return e=pi(s,r,e,i),e.elementType=t,e.type=n,e.lanes=o,e}function Oa(t,e,r,n){return t=pi(7,t,n,e),t.lanes=r,t}function mg(t,e,r,n){return t=pi(22,t,n,e),t.elementType=r$,t.lanes=r,t.stateNode={isHidden:!1},t}function fO(t,e,r){return t=pi(6,t,null,e),t.lanes=r,t}function hO(t,e,r){return e=pi(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function m5(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fg(0),this.expirationTimes=Fg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fg(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function P0(t,e,r,n,i,o,s,a,l){return t=new m5(t,e,r,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=pi(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},s0(o),t}function y5(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:al,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function UC(t){if(!t)return Ps;t=t._reactInternals;e:{if(Qa(t)!==t||t.tag!==1)throw Error(Se(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Fn(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Se(171))}if(t.tag===1){var r=t.type;if(Fn(r))return U$(t,r,e)}return e}function YC(t,e,r,n,i,o,s,a,l){return t=P0(r,n,!0,t,i,o,s,a,l),t.context=UC(null),r=t.current,n=Rn(),i=ys(r),o=Qo(n,i),o.callback=e??null,Os(r,o,i),t.current.lanes=i,hf(t,i,n),Un(t,n),t}function yg(t,e,r,n){var i=e.current,o=Rn(),s=ys(i);return r=UC(r),e.context===null?e.context=r:e.pendingContext=r,e=Qo(o,s),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=Os(i,e,s),t!==null&&(Zi(t,i,s,o),Ed(t,i,s)),s}function kp(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function sS(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function k0(t,e){sS(t,e),(t=t.alternate)&&sS(t,e)}function v5(){return null}var zC=typeof reportError=="function"?reportError:function(t){console.error(t)};function x0(t){this._internalRoot=t}vg.prototype.render=x0.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(Se(409));yg(t,e,null,null)};vg.prototype.unmount=x0.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Pa(function(){yg(null,t,null,null)}),e[Mo]=null}};function vg(t){this._internalRoot=t}vg.prototype.unstable_scheduleHydration=function(t){if(t){var e=_$();t={blockedOn:null,target:t,priority:e};for(var r=0;r<es.length&&e!==0&&e<es[r].priority;r++);es.splice(r,0,t),r===0&&C$(t)}};function _0(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function bg(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function aS(){}function b5(t,e,r,n,i){if(i){if(typeof n=="function"){var o=n;n=function(){var c=kp(s);o.call(c)}}var s=YC(e,n,t,0,null,!1,!1,"",aS);return t._reactRootContainer=s,t[Mo]=s.current,Rc(t.nodeType===8?t.parentNode:t),Pa(),s}for(;i=t.lastChild;)t.removeChild(i);if(typeof n=="function"){var a=n;n=function(){var c=kp(l);a.call(c)}}var l=P0(t,0,!1,null,null,!1,!1,"",aS);return t._reactRootContainer=l,t[Mo]=l.current,Rc(t.nodeType===8?t.parentNode:t),Pa(function(){yg(e,l,r,n)}),l}function Sg(t,e,r,n,i){var o=r._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var l=kp(s);a.call(l)}}yg(e,s,t,i)}else s=b5(r,e,t,i,n);return kp(s)}k$=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=Hu(e.pendingLanes);r!==0&&(Xv(e,r|1),Un(e,jr()),!(Nt&6)&&(Vl=jr()+500,Ms()))}break;case 13:Pa(function(){var n=jo(t,1);if(n!==null){var i=Rn();Zi(n,t,1,i)}}),k0(t,1)}};Fv=function(t){if(t.tag===13){var e=jo(t,134217728);if(e!==null){var r=Rn();Zi(e,t,134217728,r)}k0(t,134217728)}};x$=function(t){if(t.tag===13){var e=ys(t),r=jo(t,e);if(r!==null){var n=Rn();Zi(r,t,e,n)}k0(t,e)}};_$=function(){return Kt};$$=function(t,e){var r=Kt;try{return Kt=t,e()}finally{Kt=r}};$m=function(t,e,r){switch(e){case"input":if(bm(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=fg(n);if(!i)throw Error(Se(90));i$(n),bm(n,i)}}}break;case"textarea":s$(t,r);break;case"select":e=r.value,e!=null&&wl(t,!!r.multiple,e,!1)}};d$=v0;p$=Pa;var S5={usingClientEntryPoint:!1,Events:[pf,hl,fg,f$,h$,v0]},Cu={findFiberByHostInstance:aa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},w5={bundleType:Cu.bundleType,version:Cu.version,rendererPackageName:Cu.rendererPackageName,rendererConfig:Cu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:No.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=m$(t),t===null?null:t.stateNode},findFiberByHostInstance:Cu.findFiberByHostInstance||v5,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 th=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!th.isDisabled&&th.supportsFiber)try{ag=th.inject(w5),fo=th}catch{}}ii.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=S5;ii.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_0(e))throw Error(Se(200));return y5(t,e,null,r)};ii.createRoot=function(t,e){if(!_0(t))throw Error(Se(299));var r=!1,n="",i=zC;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=P0(t,1,!1,null,null,r,!1,n,i),t[Mo]=e.current,Rc(t.nodeType===8?t.parentNode:t),new x0(e)};ii.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(Se(188)):(t=Object.keys(t).join(","),Error(Se(268,t)));return t=m$(e),t=t===null?null:t.stateNode,t};ii.flushSync=function(t){return Pa(t)};ii.hydrate=function(t,e,r){if(!bg(e))throw Error(Se(200));return Sg(null,t,e,!0,r)};ii.hydrateRoot=function(t,e,r){if(!_0(t))throw Error(Se(405));var n=r!=null&&r.hydratedSources||null,i=!1,o="",s=zC;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),e=YC(e,null,t,1,r??null,i,!1,o,s),t[Mo]=e.current,Rc(t),n)for(t=0;t<n.length;t++)r=n[t],i=r._getVersion,i=i(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new vg(e)};ii.render=function(t,e,r){if(!bg(e))throw Error(Se(200));return Sg(null,t,e,!1,r)};ii.unmountComponentAtNode=function(t){if(!bg(t))throw Error(Se(40));return t._reactRootContainer?(Pa(function(){Sg(null,null,t,!1,function(){t._reactRootContainer=null,t[Mo]=null})}),!0):!1};ii.unstable_batchedUpdates=v0;ii.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!bg(r))throw Error(Se(200));if(t==null||t._reactInternals===void 0)throw Error(Se(38));return Sg(t,e,r,!1,n)};ii.version="18.3.1-next-f1338f8080-20240426";function GC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(GC)}catch(t){console.error(t)}}GC(),G_.exports=ii;var Of=G_.exports;const rh=Pi(Of);var HC,lS=Of;HC=lS.createRoot,lS.hydrateRoot;function ss(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var KC={exports:{}};(function(t,e){(function(r){t.exports=r()})(function(){return function(){function r(n,i,o){function s(c,u){if(!i[c]){if(!n[c]){var f=typeof ss=="function"&&ss;if(!u&&f)return f(c,!0);if(a)return a(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var d=i[c]={exports:{}};n[c][0].call(d.exports,function(p){var g=n[c][1][p];return s(g||p)},d,d.exports,r,n,i,o)}return i[c].exports}for(var a=typeof ss=="function"&&ss,l=0;l<o.length;l++)s(o[l]);return s}return r}()({1:[function(r,n,i){(function(o,s){(function(){(function(a,l){l(typeof i=="object"&&typeof n<"u"?i:a.async={})})(this,function(a){function l(A,...Q){return(...j)=>A(...Q,...j)}function c(A){return function(...Q){var j=Q.pop();return A.call(this,Q,j)}}var u=typeof queueMicrotask=="function"&&queueMicrotask,f=typeof s=="function"&&s,h=typeof o=="object"&&typeof o.nextTick=="function";function d(A){setTimeout(A,0)}function p(A){return(Q,...j)=>A(()=>Q(...j))}var g;u?g=queueMicrotask:f?g=s:h?g=o.nextTick:g=d;var m=p(g);function y(A){return b(A)?function(...Q){const j=Q.pop(),Y=A.apply(this,Q);return O(Y,j)}:c(function(Q,j){var Y;try{Y=A.apply(this,Q)}catch(ee){return j(ee)}if(Y&&typeof Y.then=="function")return O(Y,j);j(null,Y)})}function O(A,Q){return A.then(j=>{v(Q,null,j)},j=>{v(Q,j&&j.message?j:new Error(j))})}function v(A,Q,j){try{A(Q,j)}catch(Y){m(ee=>{throw ee},Y)}}function b(A){return A[Symbol.toStringTag]==="AsyncFunction"}function w(A){return A[Symbol.toStringTag]==="AsyncGenerator"}function _(A){return typeof A[Symbol.asyncIterator]=="function"}function C(A){if(typeof A!="function")throw new Error("expected a function");return b(A)?y(A):A}function P(A,Q=A.length){if(!Q)throw new Error("arity is undefined");function j(...Y){return typeof Y[Q-1]=="function"?A.apply(this,Y):new Promise((ee,re)=>{Y[Q-1]=(ie,...ae)=>{if(ie)return re(ie);ee(ae.length>1?ae:ae[0])},A.apply(this,Y)})}return j}function k(A){return function(j,...Y){return P(function(re){var ie=this;return A(j,(ae,Oe)=>{C(ae).apply(ie,Y.concat(Oe))},re)})}}function x(A,Q,j,Y){Q=Q||[];var ee=[],re=0,ie=C(j);return A(Q,(ae,Oe,Ke)=>{var Tt=re++;ie(ae,(Wt,At)=>{ee[Tt]=At,Ke(Wt)})},ae=>{Y(ae,ee)})}function E(A){return A&&typeof A.length=="number"&&A.length>=0&&A.length%1===0}const R={};function I(A){function Q(...j){if(A!==null){var Y=A;A=null,Y.apply(this,j)}}return Object.assign(Q,A),Q}function F(A){return A[Symbol.iterator]&&A[Symbol.iterator]()}function H(A){var Q=-1,j=A.length;return function(){return++Q<j?{value:A[Q],key:Q}:null}}function M(A){var Q=-1;return function(){var Y=A.next();return Y.done?null:(Q++,{value:Y.value,key:Q})}}function B(A){var Q=A?Object.keys(A):[],j=-1,Y=Q.length;return function ee(){var re=Q[++j];return re==="__proto__"?ee():j<Y?{value:A[re],key:re}:null}}function D(A){if(E(A))return H(A);var Q=F(A);return Q?M(Q):B(A)}function X(A){return function(...Q){if(A===null)throw new Error("Callback was already called.");var j=A;A=null,j.apply(this,Q)}}function G(A,Q,j,Y){let ee=!1,re=!1,ie=!1,ae=0,Oe=0;function Ke(){ae>=Q||ie||ee||(ie=!0,A.next().then(({value:At,done:ui})=>{if(!(re||ee)){if(ie=!1,ui){ee=!0,ae<=0&&Y(null);return}ae++,j(At,Oe,Tt),Oe++,Ke()}}).catch(Wt))}function Tt(At,ui){if(ae-=1,!re){if(At)return Wt(At);if(At===!1){ee=!0,re=!0;return}if(ui===R||ee&&ae<=0)return ee=!0,Y(null);Ke()}}function Wt(At){re||(ie=!1,ee=!0,Y(At))}Ke()}var se=A=>(Q,j,Y)=>{if(Y=I(Y),A<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!Q)return Y(null);if(w(Q))return G(Q,A,j,Y);if(_(Q))return G(Q[Symbol.asyncIterator](),A,j,Y);var ee=D(Q),re=!1,ie=!1,ae=0,Oe=!1;function Ke(Wt,At){if(!ie)if(ae-=1,Wt)re=!0,Y(Wt);else if(Wt===!1)re=!0,ie=!0;else{if(At===R||re&&ae<=0)return re=!0,Y(null);Oe||Tt()}}function Tt(){for(Oe=!0;ae<A&&!re;){var Wt=ee();if(Wt===null){re=!0,ae<=0&&Y(null);return}ae+=1,j(Wt.value,Wt.key,X(Ke))}Oe=!1}Tt()};function ce(A,Q,j,Y){return se(Q)(A,C(j),Y)}var U=P(ce,4);function K(A,Q,j){j=I(j);var Y=0,ee=0,{length:re}=A,ie=!1;re===0&&j(null);function ae(Oe,Ke){Oe===!1&&(ie=!0),ie!==!0&&(Oe?j(Oe):(++ee===re||Ke===R)&&j(null))}for(;Y<re;Y++)Q(A[Y],Y,X(ae))}function oe(A,Q,j){return U(A,1/0,Q,j)}function Re(A,Q,j){var Y=E(A)?K:oe;return Y(A,C(Q),j)}var T=P(Re,3);function Z(A,Q,j){return x(T,A,Q,j)}var V=P(Z,3),ne=k(V);function fe(A,Q,j){return U(A,1,Q,j)}var ge=P(fe,3);function he(A,Q,j){return x(ge,A,Q,j)}var we=P(he,3),Ae=k(we);const it=Symbol("promiseCallback");function kt(){let A,Q;function j(Y,...ee){if(Y)return Q(Y);A(ee.length>1?ee:ee[0])}return j[it]=new Promise((Y,ee)=>{A=Y,Q=ee}),j}function gr(A,Q,j){typeof Q!="number"&&(j=Q,Q=null),j=I(j||kt());var Y=Object.keys(A).length;if(!Y)return j(null);Q||(Q=Y);var ee={},re=0,ie=!1,ae=!1,Oe=Object.create(null),Ke=[],Tt=[],Wt={};Object.keys(A).forEach(He=>{var at=A[He];if(!Array.isArray(at)){At(He,[at]),Tt.push(He);return}var Mt=at.slice(0,at.length-1),vr=Mt.length;if(vr===0){At(He,at),Tt.push(He);return}Wt[He]=vr,Mt.forEach(en=>{if(!A[en])throw new Error("async.auto task `"+He+"` has a non-existent dependency `"+en+"` in "+Mt.join(", "));Ia(en,()=>{vr--,vr===0&&At(He,at)})})}),Bt(),ui();function At(He,at){Ke.push(()=>vu(He,at))}function ui(){if(!ie){if(Ke.length===0&&re===0)return j(null,ee);for(;Ke.length&&re<Q;){var He=Ke.shift();He()}}}function Ia(He,at){var Mt=Oe[He];Mt||(Mt=Oe[He]=[]),Mt.push(at)}function Fs(He){var at=Oe[He]||[];at.forEach(Mt=>Mt()),ui()}function vu(He,at){if(!ae){var Mt=X((en,...ci)=>{if(re--,en===!1){ie=!0;return}if(ci.length<2&&([ci]=ci),en){var Wa={};if(Object.keys(ee).forEach(Us=>{Wa[Us]=ee[Us]}),Wa[He]=ci,ae=!0,Oe=Object.create(null),ie)return;j(en,Wa)}else ee[He]=ci,Fs(He)});re++;var vr=C(at[at.length-1]);at.length>1?vr(ee,Mt):vr(Mt)}}function Bt(){for(var He,at=0;Tt.length;)He=Tt.pop(),at++,st(He).forEach(Mt=>{--Wt[Mt]===0&&Tt.push(Mt)});if(at!==Y)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function st(He){var at=[];return Object.keys(A).forEach(Mt=>{const vr=A[Mt];Array.isArray(vr)&&vr.indexOf(He)>=0&&at.push(Mt)}),at}return j[it]}var Ft=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,er=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,xn=/,/,Pr=/(=.+)?(\s*)$/;function $(A){let Q="",j=0,Y=A.indexOf("*/");for(;j<A.length;)if(A[j]==="/"&&A[j+1]==="/"){let ee=A.indexOf(`
|
|
41
|
+
`,j);j=ee===-1?A.length:ee}else if(Y!==-1&&A[j]==="/"&&A[j+1]==="*"){let ee=A.indexOf("*/",j);ee!==-1?(j=ee+2,Y=A.indexOf("*/",j)):(Q+=A[j],j++)}else Q+=A[j],j++;return Q}function te(A){const Q=$(A.toString());let j=Q.match(Ft);if(j||(j=Q.match(er)),!j)throw new Error(`could not parse args in autoInject
|
|
42
|
+
Source:
|
|
43
|
+
`+Q);let[,Y]=j;return Y.replace(/\s/g,"").split(xn).map(ee=>ee.replace(Pr,"").trim())}function pe(A,Q){var j={};return Object.keys(A).forEach(Y=>{var ee=A[Y],re,ie=b(ee),ae=!ie&&ee.length===1||ie&&ee.length===0;if(Array.isArray(ee))re=[...ee],ee=re.pop(),j[Y]=re.concat(re.length>0?Oe:ee);else if(ae)j[Y]=ee;else{if(re=te(ee),ee.length===0&&!ie&&re.length===0)throw new Error("autoInject task functions require explicit parameters.");ie||re.pop(),j[Y]=re.concat(Oe)}function Oe(Ke,Tt){var Wt=re.map(At=>Ke[At]);Wt.push(Tt),C(ee)(...Wt)}}),gr(j,Q)}class $e{constructor(){this.head=this.tail=null,this.length=0}removeLink(Q){return Q.prev?Q.prev.next=Q.next:this.head=Q.next,Q.next?Q.next.prev=Q.prev:this.tail=Q.prev,Q.prev=Q.next=null,this.length-=1,Q}empty(){for(;this.head;)this.shift();return this}insertAfter(Q,j){j.prev=Q,j.next=Q.next,Q.next?Q.next.prev=j:this.tail=j,Q.next=j,this.length+=1}insertBefore(Q,j){j.prev=Q.prev,j.next=Q,Q.prev?Q.prev.next=j:this.head=j,Q.prev=j,this.length+=1}unshift(Q){this.head?this.insertBefore(this.head,Q):ke(this,Q)}push(Q){this.tail?this.insertAfter(this.tail,Q):ke(this,Q)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var Q=this.head;Q;)yield Q.data,Q=Q.next}remove(Q){for(var j=this.head;j;){var{next:Y}=j;Q(j)&&this.removeLink(j),j=Y}return this}}function ke(A,Q){A.length=1,A.head=A.tail=Q}function Te(A,Q,j){if(Q==null)Q=1;else if(Q===0)throw new RangeError("Concurrency must not be zero");var Y=C(A),ee=0,re=[];const ie={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function ae(st,He){ie[st].push(He)}function Oe(st,He){const at=(...Mt)=>{Ke(st,at),He(...Mt)};ie[st].push(at)}function Ke(st,He){if(!st)return Object.keys(ie).forEach(at=>ie[at]=[]);if(!He)return ie[st]=[];ie[st]=ie[st].filter(at=>at!==He)}function Tt(st,...He){ie[st].forEach(at=>at(...He))}var Wt=!1;function At(st,He,at,Mt){if(Mt!=null&&typeof Mt!="function")throw new Error("task callback must be a function");Bt.started=!0;var vr,en;function ci(Us,...bu){if(Us)return at?en(Us):vr();if(bu.length<=1)return vr(bu[0]);vr(bu)}var Wa=Bt._createTaskItem(st,at?ci:Mt||ci);if(He?Bt._tasks.unshift(Wa):Bt._tasks.push(Wa),Wt||(Wt=!0,m(()=>{Wt=!1,Bt.process()})),at||!Mt)return new Promise((Us,bu)=>{vr=Us,en=bu})}function ui(st){return function(He,...at){ee-=1;for(var Mt=0,vr=st.length;Mt<vr;Mt++){var en=st[Mt],ci=re.indexOf(en);ci===0?re.shift():ci>0&&re.splice(ci,1),en.callback(He,...at),He!=null&&Tt("error",He,en.data)}ee<=Bt.concurrency-Bt.buffer&&Tt("unsaturated"),Bt.idle()&&Tt("drain"),Bt.process()}}function Ia(st){return st.length===0&&Bt.idle()?(m(()=>Tt("drain")),!0):!1}const Fs=st=>He=>{if(!He)return new Promise((at,Mt)=>{Oe(st,(vr,en)=>{if(vr)return Mt(vr);at(en)})});Ke(st),ae(st,He)};var vu=!1,Bt={_tasks:new $e,_createTaskItem(st,He){return{data:st,callback:He}},*[Symbol.iterator](){yield*Bt._tasks[Symbol.iterator]()},concurrency:Q,payload:j,buffer:Q/4,started:!1,paused:!1,push(st,He){return Array.isArray(st)?Ia(st)?void 0:st.map(at=>At(at,!1,!1,He)):At(st,!1,!1,He)},pushAsync(st,He){return Array.isArray(st)?Ia(st)?void 0:st.map(at=>At(at,!1,!0,He)):At(st,!1,!0,He)},kill(){Ke(),Bt._tasks.empty()},unshift(st,He){return Array.isArray(st)?Ia(st)?void 0:st.map(at=>At(at,!0,!1,He)):At(st,!0,!1,He)},unshiftAsync(st,He){return Array.isArray(st)?Ia(st)?void 0:st.map(at=>At(at,!0,!0,He)):At(st,!0,!0,He)},remove(st){Bt._tasks.remove(st)},process(){if(!vu){for(vu=!0;!Bt.paused&&ee<Bt.concurrency&&Bt._tasks.length;){var st=[],He=[],at=Bt._tasks.length;Bt.payload&&(at=Math.min(at,Bt.payload));for(var Mt=0;Mt<at;Mt++){var vr=Bt._tasks.shift();st.push(vr),re.push(vr),He.push(vr.data)}ee+=1,Bt._tasks.length===0&&Tt("empty"),ee===Bt.concurrency&&Tt("saturated");var en=X(ui(st));Y(He,en)}vu=!1}},length(){return Bt._tasks.length},running(){return ee},workersList(){return re},idle(){return Bt._tasks.length+ee===0},pause(){Bt.paused=!0},resume(){Bt.paused!==!1&&(Bt.paused=!1,m(Bt.process))}};return Object.defineProperties(Bt,{saturated:{writable:!1,value:Fs("saturated")},unsaturated:{writable:!1,value:Fs("unsaturated")},empty:{writable:!1,value:Fs("empty")},drain:{writable:!1,value:Fs("drain")},error:{writable:!1,value:Fs("error")}}),Bt}function tt(A,Q){return Te(A,1,Q)}function nt(A,Q,j){return Te(A,Q,j)}function de(A,Q,j,Y){Y=I(Y);var ee=C(j);return ge(A,(re,ie,ae)=>{ee(Q,re,(Oe,Ke)=>{Q=Ke,ae(Oe)})},re=>Y(re,Q))}var Qe=P(de,4);function xe(...A){var Q=A.map(C);return function(...j){var Y=this,ee=j[j.length-1];return typeof ee=="function"?j.pop():ee=kt(),Qe(Q,j,(re,ie,ae)=>{ie.apply(Y,re.concat((Oe,...Ke)=>{ae(Oe,Ke)}))},(re,ie)=>ee(re,...ie)),ee[it]}}function Ce(...A){return xe(...A.reverse())}function Ze(A,Q,j,Y){return x(se(Q),A,j,Y)}var Be=P(Ze,4);function lt(A,Q,j,Y){var ee=C(j);return Be(A,Q,(re,ie)=>{ee(re,(ae,...Oe)=>ae?ie(ae):ie(ae,Oe))},(re,ie)=>{for(var ae=[],Oe=0;Oe<ie.length;Oe++)ie[Oe]&&(ae=ae.concat(...ie[Oe]));return Y(re,ae)})}var ve=P(lt,4);function Xe(A,Q,j){return ve(A,1/0,Q,j)}var Ot=P(Xe,3);function ze(A,Q,j){return ve(A,1,Q,j)}var ut=P(ze,3);function Rt(...A){return function(...Q){var j=Q.pop();return j(null,...A)}}function Gt(A,Q){return(j,Y,ee,re)=>{var ie=!1,ae;const Oe=C(ee);j(Y,(Ke,Tt,Wt)=>{Oe(Ke,(At,ui)=>{if(At||At===!1)return Wt(At);if(A(ui)&&!ae)return ie=!0,ae=Q(!0,Ke),Wt(null,R);Wt()})},Ke=>{if(Ke)return re(Ke);re(null,ie?ae:Q(!1))})}}function Lt(A,Q,j){return Gt(Y=>Y,(Y,ee)=>ee)(T,A,Q,j)}var Ut=P(Lt,3);function Tr(A,Q,j,Y){return Gt(ee=>ee,(ee,re)=>re)(se(Q),A,j,Y)}var kr=P(Tr,4);function qn(A,Q,j){return Gt(Y=>Y,(Y,ee)=>ee)(se(1),A,Q,j)}var Dr=P(qn,3);function Ir(A){return(Q,...j)=>C(Q)(...j,(Y,...ee)=>{typeof console=="object"&&(Y?console.error&&console.error(Y):console[A]&&ee.forEach(re=>console[A](re)))})}var Wr=Ir("dir");function bt(A,Q,j){j=X(j);var Y=C(A),ee=C(Q),re;function ie(Oe,...Ke){if(Oe)return j(Oe);Oe!==!1&&(re=Ke,ee(...Ke,ae))}function ae(Oe,Ke){if(Oe)return j(Oe);if(Oe!==!1){if(!Ke)return j(null,...re);Y(ie)}}return ae(null,!0)}var Le=P(bt,3);function Ge(A,Q,j){const Y=C(Q);return Le(A,(...ee)=>{const re=ee.pop();Y(...ee,(ie,ae)=>re(ie,!ae))},j)}function Je(A){return(Q,j,Y)=>A(Q,Y)}function De(A,Q,j){return T(A,Je(C(Q)),j)}var be=P(De,3);function ft(A,Q,j,Y){return se(Q)(A,Je(C(j)),Y)}var dt=P(ft,4);function xt(A,Q,j){return dt(A,1,Q,j)}var Ht=P(xt,3);function ir(A){return b(A)?A:function(...Q){var j=Q.pop(),Y=!0;Q.push((...ee)=>{Y?m(()=>j(...ee)):j(...ee)}),A.apply(this,Q),Y=!1}}function Yt(A,Q,j){return Gt(Y=>!Y,Y=>!Y)(T,A,Q,j)}var Or=P(Yt,3);function mt(A,Q,j,Y){return Gt(ee=>!ee,ee=>!ee)(se(Q),A,j,Y)}var ct=P(mt,4);function Ue(A,Q,j){return Gt(Y=>!Y,Y=>!Y)(ge,A,Q,j)}var _t=P(Ue,3);function Rr(A,Q,j,Y){var ee=new Array(Q.length);A(Q,(re,ie,ae)=>{j(re,(Oe,Ke)=>{ee[ie]=!!Ke,ae(Oe)})},re=>{if(re)return Y(re);for(var ie=[],ae=0;ae<Q.length;ae++)ee[ae]&&ie.push(Q[ae]);Y(null,ie)})}function Zn(A,Q,j,Y){var ee=[];A(Q,(re,ie,ae)=>{j(re,(Oe,Ke)=>{if(Oe)return ae(Oe);Ke&&ee.push({index:ie,value:re}),ae(Oe)})},re=>{if(re)return Y(re);Y(null,ee.sort((ie,ae)=>ie.index-ae.index).map(ie=>ie.value))})}function _n(A,Q,j,Y){var ee=E(Q)?Rr:Zn;return ee(A,Q,C(j),Y)}function $n(A,Q,j){return _n(T,A,Q,j)}var W=P($n,3);function L(A,Q,j,Y){return _n(se(Q),A,j,Y)}var z=P(L,4);function ue(A,Q,j){return _n(ge,A,Q,j)}var J=P(ue,3);function me(A,Q){var j=X(Q),Y=C(ir(A));function ee(re){if(re)return j(re);re!==!1&&Y(ee)}return ee()}var Me=P(me,2);function ye(A,Q,j,Y){var ee=C(j);return Be(A,Q,(re,ie)=>{ee(re,(ae,Oe)=>ae?ie(ae):ie(ae,{key:Oe,val:re}))},(re,ie)=>{for(var ae={},{hasOwnProperty:Oe}=Object.prototype,Ke=0;Ke<ie.length;Ke++)if(ie[Ke]){var{key:Tt}=ie[Ke],{val:Wt}=ie[Ke];Oe.call(ae,Tt)?ae[Tt].push(Wt):ae[Tt]=[Wt]}return Y(re,ae)})}var Pe=P(ye,4);function rt(A,Q,j){return Pe(A,1/0,Q,j)}function qe(A,Q,j){return Pe(A,1,Q,j)}var $t=Ir("log");function Vt(A,Q,j,Y){Y=I(Y);var ee={},re=C(j);return se(Q)(A,(ie,ae,Oe)=>{re(ie,ae,(Ke,Tt)=>{if(Ke)return Oe(Ke);ee[ae]=Tt,Oe(Ke)})},ie=>Y(ie,ee))}var ot=P(Vt,4);function St(A,Q,j){return ot(A,1/0,Q,j)}function vt(A,Q,j){return ot(A,1,Q,j)}function yt(A,Q=j=>j){var j=Object.create(null),Y=Object.create(null),ee=C(A),re=c((ie,ae)=>{var Oe=Q(...ie);Oe in j?m(()=>ae(null,...j[Oe])):Oe in Y?Y[Oe].push(ae):(Y[Oe]=[ae],ee(...ie,(Ke,...Tt)=>{Ke||(j[Oe]=Tt);var Wt=Y[Oe];delete Y[Oe];for(var At=0,ui=Wt.length;At<ui;At++)Wt[At](Ke,...Tt)}))});return re.memo=j,re.unmemoized=A,re}var Pt;h?Pt=o.nextTick:f?Pt=s:Pt=d;var mr=p(Pt),lr=P((A,Q,j)=>{var Y=E(Q)?[]:{};A(Q,(ee,re,ie)=>{C(ee)((ae,...Oe)=>{Oe.length<2&&([Oe]=Oe),Y[re]=Oe,ie(ae)})},ee=>j(ee,Y))},3);function wt(A,Q){return lr(T,A,Q)}function Xt(A,Q,j){return lr(se(Q),A,j)}function It(A,Q){var j=C(A);return Te((Y,ee)=>{j(Y[0],ee)},Q,1)}class yr{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(Q){let j;for(;Q>0&&xr(this.heap[Q],this.heap[j=Ar(Q)]);){let Y=this.heap[Q];this.heap[Q]=this.heap[j],this.heap[j]=Y,Q=j}}percDown(Q){let j;for(;(j=Br(Q))<this.heap.length&&(j+1<this.heap.length&&xr(this.heap[j+1],this.heap[j])&&(j=j+1),!xr(this.heap[Q],this.heap[j]));){let Y=this.heap[Q];this.heap[Q]=this.heap[j],this.heap[j]=Y,Q=j}}push(Q){Q.pushCount=++this.pushCount,this.heap.push(Q),this.percUp(this.heap.length-1)}unshift(Q){return this.heap.push(Q)}shift(){let[Q]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),Q}toArray(){return[...this]}*[Symbol.iterator](){for(let Q=0;Q<this.heap.length;Q++)yield this.heap[Q].data}remove(Q){let j=0;for(let Y=0;Y<this.heap.length;Y++)Q(this.heap[Y])||(this.heap[j]=this.heap[Y],j++);this.heap.splice(j);for(let Y=Ar(this.heap.length-1);Y>=0;Y--)this.percDown(Y);return this}}function Br(A){return(A<<1)+1}function Ar(A){return(A+1>>1)-1}function xr(A,Q){return A.priority!==Q.priority?A.priority<Q.priority:A.pushCount<Q.pushCount}function Lr(A,Q){var j=It(A,Q),{push:Y,pushAsync:ee}=j;j._tasks=new yr,j._createTaskItem=({data:ie,priority:ae},Oe)=>({data:ie,priority:ae,callback:Oe});function re(ie,ae){return Array.isArray(ie)?ie.map(Oe=>({data:Oe,priority:ae})):{data:ie,priority:ae}}return j.push=function(ie,ae=0,Oe){return Y(re(ie,ae),Oe)},j.pushAsync=function(ie,ae=0,Oe){return ee(re(ie,ae),Oe)},delete j.unshift,delete j.unshiftAsync,j}function Yn(A,Q){if(Q=I(Q),!Array.isArray(A))return Q(new TypeError("First argument to race must be an array of functions"));if(!A.length)return Q();for(var j=0,Y=A.length;j<Y;j++)C(A[j])(Q)}var Jr=P(Yn,2);function si(A,Q,j,Y){var ee=[...A].reverse();return Qe(ee,Q,j,Y)}function ai(A){var Q=C(A);return c(function(Y,ee){return Y.push((re,...ie)=>{let ae={};if(re&&(ae.error=re),ie.length>0){var Oe=ie;ie.length<=1&&([Oe]=ie),ae.value=Oe}ee(null,ae)}),Q.apply(this,Y)})}function pn(A){var Q;return Array.isArray(A)?Q=A.map(ai):(Q={},Object.keys(A).forEach(j=>{Q[j]=ai.call(this,A[j])})),Q}function Cn(A,Q,j,Y){const ee=C(j);return _n(A,Q,(re,ie)=>{ee(re,(ae,Oe)=>{ie(ae,!Oe)})},Y)}function Aa(A,Q,j){return Cn(T,A,Q,j)}var Xi=P(Aa,3);function Ma(A,Q,j,Y){return Cn(se(Q),A,j,Y)}var ja=P(Ma,4);function Ls(A,Q,j){return Cn(ge,A,Q,j)}var Vs=P(Ls,3);function mo(A){return function(){return A}}const li=5,Bo=0;function yo(A,Q,j){var Y={times:li,intervalFunc:mo(Bo)};if(arguments.length<3&&typeof A=="function"?(j=Q||kt(),Q=A):(vo(Y,A),j=j||kt()),typeof Q!="function")throw new Error("Invalid arguments for async.retry");var ee=C(Q),re=1;function ie(){ee((ae,...Oe)=>{ae!==!1&&(ae&&re++<Y.times&&(typeof Y.errorFilter!="function"||Y.errorFilter(ae))?setTimeout(ie,Y.intervalFunc(re-1)):j(ae,...Oe))})}return ie(),j[it]}function vo(A,Q){if(typeof Q=="object")A.times=+Q.times||li,A.intervalFunc=typeof Q.interval=="function"?Q.interval:mo(+Q.interval||Bo),A.errorFilter=Q.errorFilter;else if(typeof Q=="number"||typeof Q=="string")A.times=+Q||li;else throw new Error("Invalid arguments for async.retry")}function Da(A,Q){Q||(Q=A,A=null);let j=A&&A.arity||Q.length;b(Q)&&(j+=1);var Y=C(Q);return c((ee,re)=>{(ee.length<j-1||re==null)&&(ee.push(re),re=kt());function ie(ae){Y(...ee,ae)}return A?yo(A,ie,re):yo(ie,re),re[it]})}function Rf(A,Q){return lr(ge,A,Q)}function du(A,Q,j){return Gt(Boolean,Y=>Y)(T,A,Q,j)}var qa=P(du,3);function Af(A,Q,j,Y){return Gt(Boolean,ee=>ee)(se(Q),A,j,Y)}var Za=P(Af,4);function Ig(A,Q,j){return Gt(Boolean,Y=>Y)(ge,A,Q,j)}var Xs=P(Ig,3);function Mf(A,Q,j){var Y=C(Q);return V(A,(re,ie)=>{Y(re,(ae,Oe)=>{if(ae)return ie(ae);ie(ae,{value:re,criteria:Oe})})},(re,ie)=>{if(re)return j(re);j(null,ie.sort(ee).map(ae=>ae.value))});function ee(re,ie){var ae=re.criteria,Oe=ie.criteria;return ae<Oe?-1:ae>Oe?1:0}}var jf=P(Mf,3);function Df(A,Q,j){var Y=C(A);return c((ee,re)=>{var ie=!1,ae;function Oe(){var Ke=A.name||"anonymous",Tt=new Error('Callback function "'+Ke+'" timed out.');Tt.code="ETIMEDOUT",j&&(Tt.info=j),ie=!0,re(Tt)}ee.push((...Ke)=>{ie||(re(...Ke),clearTimeout(ae))}),ae=setTimeout(Oe,Q),Y(...ee)})}function bo(A){for(var Q=Array(A);A--;)Q[A]=A;return Q}function So(A,Q,j,Y){var ee=C(j);return Be(bo(A),Q,ee,Y)}function pu(A,Q,j){return So(A,1/0,Q,j)}function gu(A,Q,j){return So(A,1,Q,j)}function Na(A,Q,j,Y){arguments.length<=3&&typeof Q=="function"&&(Y=j,j=Q,Q=Array.isArray(A)?[]:{}),Y=I(Y||kt());var ee=C(j);return T(A,(re,ie,ae)=>{ee(Q,re,ie,ae)},re=>Y(re,Q)),Y[it]}function qf(A,Q){var j=null,Y;return Ht(A,(ee,re)=>{C(ee)((ie,...ae)=>{if(ie===!1)return re(ie);ae.length<2?[Y]=ae:Y=ae,j=ie,re(ie?null:{})})},()=>Q(j,Y))}var Ou=P(qf);function mu(A){return(...Q)=>(A.unmemoized||A)(...Q)}function Zf(A,Q,j){j=X(j);var Y=C(Q),ee=C(A),re=[];function ie(Oe,...Ke){if(Oe)return j(Oe);re=Ke,Oe!==!1&&ee(ae)}function ae(Oe,Ke){if(Oe)return j(Oe);if(Oe!==!1){if(!Ke)return j(null,...re);Y(ie)}}return ee(ae)}var yu=P(Zf,3);function K1(A,Q,j){const Y=C(A);return yu(ee=>Y((re,ie)=>ee(re,!ie)),Q,j)}function Y2(A,Q){if(Q=I(Q),!Array.isArray(A))return Q(new Error("First argument to waterfall must be an array of functions"));if(!A.length)return Q();var j=0;function Y(re){var ie=C(A[j++]);ie(...re,X(ee))}function ee(re,...ie){if(re!==!1){if(re||j===A.length)return Q(re,...ie);Y(ie)}}Y([])}var J1=P(Y2),z2={apply:l,applyEach:ne,applyEachSeries:Ae,asyncify:y,auto:gr,autoInject:pe,cargo:tt,cargoQueue:nt,compose:Ce,concat:Ot,concatLimit:ve,concatSeries:ut,constant:Rt,detect:Ut,detectLimit:kr,detectSeries:Dr,dir:Wr,doUntil:Ge,doWhilst:Le,each:be,eachLimit:dt,eachOf:T,eachOfLimit:U,eachOfSeries:ge,eachSeries:Ht,ensureAsync:ir,every:Or,everyLimit:ct,everySeries:_t,filter:W,filterLimit:z,filterSeries:J,forever:Me,groupBy:rt,groupByLimit:Pe,groupBySeries:qe,log:$t,map:V,mapLimit:Be,mapSeries:we,mapValues:St,mapValuesLimit:ot,mapValuesSeries:vt,memoize:yt,nextTick:mr,parallel:wt,parallelLimit:Xt,priorityQueue:Lr,queue:It,race:Jr,reduce:Qe,reduceRight:si,reflect:ai,reflectAll:pn,reject:Xi,rejectLimit:ja,rejectSeries:Vs,retry:yo,retryable:Da,seq:xe,series:Rf,setImmediate:m,some:qa,someLimit:Za,someSeries:Xs,sortBy:jf,timeout:Df,times:pu,timesLimit:So,timesSeries:gu,transform:Na,tryEach:Ou,unmemoize:mu,until:K1,waterfall:J1,whilst:yu,all:Or,allLimit:ct,allSeries:_t,any:qa,anyLimit:Za,anySeries:Xs,find:Ut,findLimit:kr,findSeries:Dr,flatMap:Ot,flatMapLimit:ve,flatMapSeries:ut,forEach:be,forEachSeries:Ht,forEachLimit:dt,forEachOf:T,forEachOfSeries:ge,forEachOfLimit:U,inject:Qe,foldl:Qe,foldr:si,select:W,selectLimit:z,selectSeries:J,wrapSync:y,during:yu,doDuring:Le};a.default=z2,a.apply=l,a.applyEach=ne,a.applyEachSeries=Ae,a.asyncify=y,a.auto=gr,a.autoInject=pe,a.cargo=tt,a.cargoQueue=nt,a.compose=Ce,a.concat=Ot,a.concatLimit=ve,a.concatSeries=ut,a.constant=Rt,a.detect=Ut,a.detectLimit=kr,a.detectSeries=Dr,a.dir=Wr,a.doUntil=Ge,a.doWhilst=Le,a.each=be,a.eachLimit=dt,a.eachOf=T,a.eachOfLimit=U,a.eachOfSeries=ge,a.eachSeries=Ht,a.ensureAsync=ir,a.every=Or,a.everyLimit=ct,a.everySeries=_t,a.filter=W,a.filterLimit=z,a.filterSeries=J,a.forever=Me,a.groupBy=rt,a.groupByLimit=Pe,a.groupBySeries=qe,a.log=$t,a.map=V,a.mapLimit=Be,a.mapSeries=we,a.mapValues=St,a.mapValuesLimit=ot,a.mapValuesSeries=vt,a.memoize=yt,a.nextTick=mr,a.parallel=wt,a.parallelLimit=Xt,a.priorityQueue=Lr,a.queue=It,a.race=Jr,a.reduce=Qe,a.reduceRight=si,a.reflect=ai,a.reflectAll=pn,a.reject=Xi,a.rejectLimit=ja,a.rejectSeries=Vs,a.retry=yo,a.retryable=Da,a.seq=xe,a.series=Rf,a.setImmediate=m,a.some=qa,a.someLimit=Za,a.someSeries=Xs,a.sortBy=jf,a.timeout=Df,a.times=pu,a.timesLimit=So,a.timesSeries=gu,a.transform=Na,a.tryEach=Ou,a.unmemoize=mu,a.until=K1,a.waterfall=J1,a.whilst=yu,a.all=Or,a.allLimit=ct,a.allSeries=_t,a.any=qa,a.anyLimit=Za,a.anySeries=Xs,a.find=Ut,a.findLimit=kr,a.findSeries=Dr,a.flatMap=Ot,a.flatMapLimit=ve,a.flatMapSeries=ut,a.forEach=be,a.forEachSeries=Ht,a.forEachLimit=dt,a.forEachOf=T,a.forEachOfSeries=ge,a.forEachOfLimit=U,a.inject=Qe,a.foldl=Qe,a.foldr=si,a.select=W,a.selectLimit=z,a.selectSeries=J,a.wrapSync=y,a.during=yu,a.doDuring=Le,Object.defineProperty(a,"__esModule",{value:!0})})}).call(this)}).call(this,r("_process"),r("timers").setImmediate)},{_process:26,timers:51}],2:[function(r,n,i){(function(o){(function(){var s=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],a=typeof globalThis>"u"?o:globalThis;n.exports=function(){for(var c=[],u=0;u<s.length;u++)typeof a[s[u]]=="function"&&(c[c.length]=s[u]);return c}}).call(this)}).call(this,typeof Vr<"u"?Vr:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(r,n,i){var o=r("get-intrinsic"),s=r("./"),a=s(o("String.prototype.indexOf"));n.exports=function(c,u){var f=o(c,!!u);return typeof f=="function"&&a(c,".prototype.")>-1?s(f):f}},{"./":4,"get-intrinsic":10}],4:[function(r,n,i){var o=r("function-bind"),s=r("get-intrinsic"),a=s("%Function.prototype.apply%"),l=s("%Function.prototype.call%"),c=s("%Reflect.apply%",!0)||o.call(l,a),u=s("%Object.getOwnPropertyDescriptor%",!0),f=s("%Object.defineProperty%",!0),h=s("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}n.exports=function(g){var m=c(o,l,arguments);if(u&&f){var y=u(m,"length");y.configurable&&f(m,"length",{value:1+h(0,g.length-(arguments.length-1))})}return m};var d=function(){return c(o,a,arguments)};f?f(n.exports,"apply",{value:d}):n.exports.apply=d},{"function-bind":9,"get-intrinsic":10}],5:[function(r,n,i){var o=typeof Reflect=="object"?Reflect:null,s=o&&typeof o.apply=="function"?o.apply:function(x,E,R){return Function.prototype.apply.call(x,E,R)},a;o&&typeof o.ownKeys=="function"?a=o.ownKeys:Object.getOwnPropertySymbols?a=function(x){return Object.getOwnPropertyNames(x).concat(Object.getOwnPropertySymbols(x))}:a=function(x){return Object.getOwnPropertyNames(x)};function l(k){console&&console.warn&&console.warn(k)}var c=Number.isNaN||function(x){return x!==x};function u(){u.init.call(this)}n.exports=u,n.exports.once=_,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var f=10;function h(k){if(typeof k!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof k)}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(k){if(typeof k!="number"||k<0||c(k))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+k+".");f=k}}),u.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(x){if(typeof x!="number"||x<0||c(x))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+x+".");return this._maxListeners=x,this};function d(k){return k._maxListeners===void 0?u.defaultMaxListeners:k._maxListeners}u.prototype.getMaxListeners=function(){return d(this)},u.prototype.emit=function(x){for(var E=[],R=1;R<arguments.length;R++)E.push(arguments[R]);var I=x==="error",F=this._events;if(F!==void 0)I=I&&F.error===void 0;else if(!I)return!1;if(I){var H;if(E.length>0&&(H=E[0]),H instanceof Error)throw H;var M=new Error("Unhandled error."+(H?" ("+H.message+")":""));throw M.context=H,M}var B=F[x];if(B===void 0)return!1;if(typeof B=="function")s(B,this,E);else for(var D=B.length,X=v(B,D),R=0;R<D;++R)s(X[R],this,E);return!0};function p(k,x,E,R){var I,F,H;if(h(E),F=k._events,F===void 0?(F=k._events=Object.create(null),k._eventsCount=0):(F.newListener!==void 0&&(k.emit("newListener",x,E.listener?E.listener:E),F=k._events),H=F[x]),H===void 0)H=F[x]=E,++k._eventsCount;else if(typeof H=="function"?H=F[x]=R?[E,H]:[H,E]:R?H.unshift(E):H.push(E),I=d(k),I>0&&H.length>I&&!H.warned){H.warned=!0;var M=new Error("Possible EventEmitter memory leak detected. "+H.length+" "+String(x)+" listeners added. Use emitter.setMaxListeners() to increase limit");M.name="MaxListenersExceededWarning",M.emitter=k,M.type=x,M.count=H.length,l(M)}return k}u.prototype.addListener=function(x,E){return p(this,x,E,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(x,E){return p(this,x,E,!0)};function g(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(k,x,E){var R={fired:!1,wrapFn:void 0,target:k,type:x,listener:E},I=g.bind(R);return I.listener=E,R.wrapFn=I,I}u.prototype.once=function(x,E){return h(E),this.on(x,m(this,x,E)),this},u.prototype.prependOnceListener=function(x,E){return h(E),this.prependListener(x,m(this,x,E)),this},u.prototype.removeListener=function(x,E){var R,I,F,H,M;if(h(E),I=this._events,I===void 0)return this;if(R=I[x],R===void 0)return this;if(R===E||R.listener===E)--this._eventsCount===0?this._events=Object.create(null):(delete I[x],I.removeListener&&this.emit("removeListener",x,R.listener||E));else if(typeof R!="function"){for(F=-1,H=R.length-1;H>=0;H--)if(R[H]===E||R[H].listener===E){M=R[H].listener,F=H;break}if(F<0)return this;F===0?R.shift():b(R,F),R.length===1&&(I[x]=R[0]),I.removeListener!==void 0&&this.emit("removeListener",x,M||E)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(x){var E,R,I;if(R=this._events,R===void 0)return this;if(R.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):R[x]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete R[x]),this;if(arguments.length===0){var F=Object.keys(R),H;for(I=0;I<F.length;++I)H=F[I],H!=="removeListener"&&this.removeAllListeners(H);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(E=R[x],typeof E=="function")this.removeListener(x,E);else if(E!==void 0)for(I=E.length-1;I>=0;I--)this.removeListener(x,E[I]);return this};function y(k,x,E){var R=k._events;if(R===void 0)return[];var I=R[x];return I===void 0?[]:typeof I=="function"?E?[I.listener||I]:[I]:E?w(I):v(I,I.length)}u.prototype.listeners=function(x){return y(this,x,!0)},u.prototype.rawListeners=function(x){return y(this,x,!1)},u.listenerCount=function(k,x){return typeof k.listenerCount=="function"?k.listenerCount(x):O.call(k,x)},u.prototype.listenerCount=O;function O(k){var x=this._events;if(x!==void 0){var E=x[k];if(typeof E=="function")return 1;if(E!==void 0)return E.length}return 0}u.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]};function v(k,x){for(var E=new Array(x),R=0;R<x;++R)E[R]=k[R];return E}function b(k,x){for(;x+1<k.length;x++)k[x]=k[x+1];k.pop()}function w(k){for(var x=new Array(k.length),E=0;E<x.length;++E)x[E]=k[E].listener||k[E];return x}function _(k,x){return new Promise(function(E,R){function I(H){k.removeListener(x,F),R(H)}function F(){typeof k.removeListener=="function"&&k.removeListener("error",I),E([].slice.call(arguments))}P(k,x,F,{once:!0}),x!=="error"&&C(k,I,{once:!0})})}function C(k,x,E){typeof k.on=="function"&&P(k,"error",x,E)}function P(k,x,E,R){if(typeof k.on=="function")R.once?k.once(x,E):k.on(x,E);else if(typeof k.addEventListener=="function")k.addEventListener(x,function I(F){R.once&&k.removeEventListener(x,I),E(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof k)}},{}],6:[function(r,n,i){n.exports=function o(s,a){if(s===a)return!0;if(s&&a&&typeof s=="object"&&typeof a=="object"){if(s.constructor!==a.constructor)return!1;var l,c,u;if(Array.isArray(s)){if(l=s.length,l!=a.length)return!1;for(c=l;c--!==0;)if(!o(s[c],a[c]))return!1;return!0}if(s.constructor===RegExp)return s.source===a.source&&s.flags===a.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===a.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===a.toString();if(u=Object.keys(s),l=u.length,l!==Object.keys(a).length)return!1;for(c=l;c--!==0;)if(!Object.prototype.hasOwnProperty.call(a,u[c]))return!1;for(c=l;c--!==0;){var f=u[c];if(!o(s[f],a[f]))return!1}return!0}return s!==s&&a!==a}},{}],7:[function(r,n,i){var o=r("is-callable"),s=Object.prototype.toString,a=Object.prototype.hasOwnProperty,l=function(d,p,g){for(var m=0,y=d.length;m<y;m++)a.call(d,m)&&(g==null?p(d[m],m,d):p.call(g,d[m],m,d))},c=function(d,p,g){for(var m=0,y=d.length;m<y;m++)g==null?p(d.charAt(m),m,d):p.call(g,d.charAt(m),m,d)},u=function(d,p,g){for(var m in d)a.call(d,m)&&(g==null?p(d[m],m,d):p.call(g,d[m],m,d))},f=function(d,p,g){if(!o(p))throw new TypeError("iterator must be a function");var m;arguments.length>=3&&(m=g),s.call(d)==="[object Array]"?l(d,p,m):typeof d=="string"?c(d,p,m):u(d,p,m)};n.exports=f},{"is-callable":19}],8:[function(r,n,i){var o="Function.prototype.bind called on incompatible ",s=Array.prototype.slice,a=Object.prototype.toString,l="[object Function]";n.exports=function(u){var f=this;if(typeof f!="function"||a.call(f)!==l)throw new TypeError(o+f);for(var h=s.call(arguments,1),d,p=function(){if(this instanceof d){var v=f.apply(this,h.concat(s.call(arguments)));return Object(v)===v?v:this}else return f.apply(u,h.concat(s.call(arguments)))},g=Math.max(0,f.length-h.length),m=[],y=0;y<g;y++)m.push("$"+y);if(d=Function("binder","return function ("+m.join(",")+"){ return binder.apply(this,arguments); }")(p),f.prototype){var O=function(){};O.prototype=f.prototype,d.prototype=new O,O.prototype=null}return d}},{}],9:[function(r,n,i){var o=r("./implementation");n.exports=Function.prototype.bind||o},{"./implementation":8}],10:[function(r,n,i){var o,s=SyntaxError,a=Function,l=TypeError,c=function(M){try{return a('"use strict"; return ('+M+").constructor;")()}catch{}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch{u=null}var f=function(){throw new l},h=u?function(){try{return arguments.callee,f}catch{try{return u(arguments,"callee").get}catch{return f}}}():f,d=r("has-symbols")(),p=Object.getPrototypeOf||function(M){return M.__proto__},g={},m=typeof Uint8Array>"u"?o:p(Uint8Array),y={"%AggregateError%":typeof AggregateError>"u"?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?o:ArrayBuffer,"%ArrayIteratorPrototype%":d?p([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":g,"%AsyncGenerator%":g,"%AsyncGeneratorFunction%":g,"%AsyncIteratorPrototype%":g,"%Atomics%":typeof Atomics>"u"?o:Atomics,"%BigInt%":typeof BigInt>"u"?o:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?o:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?o:Float32Array,"%Float64Array%":typeof Float64Array>"u"?o:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?o:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":g,"%Int8Array%":typeof Int8Array>"u"?o:Int8Array,"%Int16Array%":typeof Int16Array>"u"?o:Int16Array,"%Int32Array%":typeof Int32Array>"u"?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?p(p([][Symbol.iterator]())):o,"%JSON%":typeof JSON=="object"?JSON:o,"%Map%":typeof Map>"u"?o:Map,"%MapIteratorPrototype%":typeof Map>"u"||!d?o:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?o:Promise,"%Proxy%":typeof Proxy>"u"?o:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?o:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?o:Set,"%SetIteratorPrototype%":typeof Set>"u"||!d?o:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d?p(""[Symbol.iterator]()):o,"%Symbol%":d?Symbol:o,"%SyntaxError%":s,"%ThrowTypeError%":h,"%TypedArray%":m,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?o:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?o:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?o:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?o:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?o:WeakMap,"%WeakRef%":typeof WeakRef>"u"?o:WeakRef,"%WeakSet%":typeof WeakSet>"u"?o:WeakSet};try{null.error}catch(M){var O=p(p(M));y["%Error.prototype%"]=O}var v=function M(B){var D;if(B==="%AsyncFunction%")D=c("async function () {}");else if(B==="%GeneratorFunction%")D=c("function* () {}");else if(B==="%AsyncGeneratorFunction%")D=c("async function* () {}");else if(B==="%AsyncGenerator%"){var X=M("%AsyncGeneratorFunction%");X&&(D=X.prototype)}else if(B==="%AsyncIteratorPrototype%"){var G=M("%AsyncGenerator%");G&&(D=p(G.prototype))}return y[B]=D,D},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=r("function-bind"),_=r("has"),C=w.call(Function.call,Array.prototype.concat),P=w.call(Function.apply,Array.prototype.splice),k=w.call(Function.call,String.prototype.replace),x=w.call(Function.call,String.prototype.slice),E=w.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,F=function(B){var D=x(B,0,1),X=x(B,-1);if(D==="%"&&X!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(X==="%"&&D!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var G=[];return k(B,R,function(se,ce,U,K){G[G.length]=U?k(K,I,"$1"):ce||se}),G},H=function(B,D){var X=B,G;if(_(b,X)&&(G=b[X],X="%"+G[0]+"%"),_(y,X)){var se=y[X];if(se===g&&(se=v(X)),typeof se>"u"&&!D)throw new l("intrinsic "+B+" exists, but is not available. Please file an issue!");return{alias:G,name:X,value:se}}throw new s("intrinsic "+B+" does not exist!")};n.exports=function(B,D){if(typeof B!="string"||B.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof D!="boolean")throw new l('"allowMissing" argument must be a boolean');if(E(/^%?[^%]*%?$/,B)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var X=F(B),G=X.length>0?X[0]:"",se=H("%"+G+"%",D),ce=se.name,U=se.value,K=!1,oe=se.alias;oe&&(G=oe[0],P(X,C([0,1],oe)));for(var Re=1,T=!0;Re<X.length;Re+=1){var Z=X[Re],V=x(Z,0,1),ne=x(Z,-1);if((V==='"'||V==="'"||V==="`"||ne==='"'||ne==="'"||ne==="`")&&V!==ne)throw new s("property names with quotes must have matching quotes");if((Z==="constructor"||!T)&&(K=!0),G+="."+Z,ce="%"+G+"%",_(y,ce))U=y[ce];else if(U!=null){if(!(Z in U)){if(!D)throw new l("base intrinsic for "+B+" exists, but the property is not available.");return}if(u&&Re+1>=X.length){var fe=u(U,Z);T=!!fe,T&&"get"in fe&&!("originalValue"in fe.get)?U=fe.get:U=U[Z]}else T=_(U,Z),U=U[Z];T&&!K&&(y[ce]=U)}}return U}},{"function-bind":9,has:15,"has-symbols":12}],11:[function(r,n,i){var o=r("get-intrinsic"),s=o("%Object.getOwnPropertyDescriptor%",!0);if(s)try{s([],"length")}catch{s=null}n.exports=s},{"get-intrinsic":10}],12:[function(r,n,i){var o=typeof Symbol<"u"&&Symbol,s=r("./shams");n.exports=function(){return typeof o!="function"||typeof Symbol!="function"||typeof o("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()}},{"./shams":13}],13:[function(r,n,i){n.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},a=Symbol("test"),l=Object(a);if(typeof a=="string"||Object.prototype.toString.call(a)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var c=42;s[a]=c;for(a in s)return!1;if(typeof Object.keys=="function"&&Object.keys(s).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(s).length!==0)return!1;var u=Object.getOwnPropertySymbols(s);if(u.length!==1||u[0]!==a||!Object.prototype.propertyIsEnumerable.call(s,a))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(s,a);if(f.value!==c||f.enumerable!==!0)return!1}return!0}},{}],14:[function(r,n,i){var o=r("has-symbols/shams");n.exports=function(){return o()&&!!Symbol.toStringTag}},{"has-symbols/shams":13}],15:[function(r,n,i){var o=r("function-bind");n.exports=o.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":9}],16:[function(r,n,i){var o=n.exports=function(s,a){if(a||(a=16),s===void 0&&(s=128),s<=0)return"0";for(var l=Math.log(Math.pow(2,s))/Math.log(a),c=2;l===1/0;c*=2)l=Math.log(Math.pow(2,s/c))/Math.log(a)*c;for(var u=l-Math.floor(l),f="",c=0;c<Math.floor(l);c++){var h=Math.floor(Math.random()*a).toString(a);f=h+f}if(u){var d=Math.pow(a,u),h=Math.floor(Math.random()*d).toString(a);f=h+f}var p=parseInt(f,a);return p!==1/0&&p>=Math.pow(2,s)?o(s,a):f};o.rack=function(s,a,l){var c=function(f){var h=0;do{if(h++>10)if(l)s+=l;else throw new Error("too many ID collisions, use more bits");var d=o(s,a)}while(Object.hasOwnProperty.call(u,d));return u[d]=f,d},u=c.hats={};return c.get=function(f){return c.hats[f]},c.set=function(f,h){return c.hats[f]=h,c},c.bits=s||128,c.base=a||16,c}},{}],17:[function(r,n,i){typeof Object.create=="function"?n.exports=function(s,a){a&&(s.super_=a,s.prototype=Object.create(a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:n.exports=function(s,a){if(a){s.super_=a;var l=function(){};l.prototype=a.prototype,s.prototype=new l,s.prototype.constructor=s}}},{}],18:[function(r,n,i){var o=r("has-tostringtag/shams")(),s=r("call-bind/callBound"),a=s("Object.prototype.toString"),l=function(h){return o&&h&&typeof h=="object"&&Symbol.toStringTag in h?!1:a(h)==="[object Arguments]"},c=function(h){return l(h)?!0:h!==null&&typeof h=="object"&&typeof h.length=="number"&&h.length>=0&&a(h)!=="[object Array]"&&a(h.callee)==="[object Function]"},u=function(){return l(arguments)}();l.isLegacyArguments=c,n.exports=u?l:c},{"call-bind/callBound":3,"has-tostringtag/shams":14}],19:[function(r,n,i){var o=Function.prototype.toString,s=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,a,l;if(typeof s=="function"&&typeof Object.defineProperty=="function")try{a=Object.defineProperty({},"length",{get:function(){throw l}}),l={},s(function(){throw 42},null,a)}catch(C){C!==l&&(s=null)}else s=null;var c=/^\s*class\b/,u=function(P){try{var k=o.call(P);return c.test(k)}catch{return!1}},f=function(P){try{return u(P)?!1:(o.call(P),!0)}catch{return!1}},h=Object.prototype.toString,d="[object Object]",p="[object Function]",g="[object GeneratorFunction]",m="[object HTMLAllCollection]",y="[object HTML document.all class]",O="[object HTMLCollection]",v=typeof Symbol=="function"&&!!Symbol.toStringTag,b=!(0 in[,]),w=function(){return!1};if(typeof document=="object"){var _=document.all;h.call(_)===h.call(document.all)&&(w=function(P){if((b||!P)&&(typeof P>"u"||typeof P=="object"))try{var k=h.call(P);return(k===m||k===y||k===O||k===d)&&P("")==null}catch{}return!1})}n.exports=s?function(P){if(w(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;try{s(P,null,a)}catch(k){if(k!==l)return!1}return!u(P)&&f(P)}:function(P){if(w(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;if(v)return f(P);if(u(P))return!1;var k=h.call(P);return k!==p&&k!==g&&!/^\[object HTML/.test(k)?!1:f(P)}},{}],20:[function(r,n,i){var o=Object.prototype.toString,s=Function.prototype.toString,a=/^\s*(?:function)?\*/,l=r("has-tostringtag/shams")(),c=Object.getPrototypeOf,u=function(){if(!l)return!1;try{return Function("return function*() {}")()}catch{}},f;n.exports=function(d){if(typeof d!="function")return!1;if(a.test(s.call(d)))return!0;if(!l){var p=o.call(d);return p==="[object GeneratorFunction]"}if(!c)return!1;if(typeof f>"u"){var g=u();f=g?c(g):!1}return c(d)===f}},{"has-tostringtag/shams":14}],21:[function(r,n,i){(function(o){(function(){var s=r("for-each"),a=r("available-typed-arrays"),l=r("call-bind/callBound"),c=l("Object.prototype.toString"),u=r("has-tostringtag/shams")(),f=r("gopd"),h=typeof globalThis>"u"?o:globalThis,d=a(),p=l("Array.prototype.indexOf",!0)||function(b,w){for(var _=0;_<b.length;_+=1)if(b[_]===w)return _;return-1},g=l("String.prototype.slice"),m={},y=Object.getPrototypeOf;u&&f&&y&&s(d,function(v){var b=new h[v];if(Symbol.toStringTag in b){var w=y(b),_=f(w,Symbol.toStringTag);if(!_){var C=y(w);_=f(C,Symbol.toStringTag)}m[v]=_.get}});var O=function(b){var w=!1;return s(m,function(_,C){if(!w)try{w=_.call(b)===C}catch{}}),w};n.exports=function(b){if(!b||typeof b!="object")return!1;if(!u||!(Symbol.toStringTag in b)){var w=g(c(b),8,-1);return p(d,w)>-1}return f?O(b):!1}}).call(this)}).call(this,typeof Vr<"u"?Vr:typeof self<"u"?self:typeof window<"u"?window:{})},{"available-typed-arrays":2,"call-bind/callBound":3,"for-each":7,gopd:11,"has-tostringtag/shams":14}],22:[function(r,n,i){n.exports=o;function o(s,a,l,c){var u=function(h,d,p,g){a(p,h,d,"left"),a(g,d,h,"right")},f=s.transformX=function(h,d){l(h),l(d);for(var p=[],g=0;g<d.length;g++){for(var m=d[g],y=[],O=0;O<h.length;){var v=[];if(u(h[O],m,y,v),O++,v.length===1)m=v[0];else if(v.length===0){for(var b=O;b<h.length;b++)c(y,h[b]);m=null;break}else{for(var w=f(h.slice(O),v),_=0;_<w[0].length;_++)c(y,w[0][_]);for(var C=0;C<w[1].length;C++)c(p,w[1][C]);m=null;break}}m!=null&&c(p,m),h=y}return[h,p]};s.transform=function(h,d,p){if(!(p==="left"||p==="right"))throw new Error("type must be 'left' or 'right'");return d.length===0?h:h.length===1&&d.length===1?a([],h[0],d[0],p):p==="left"?f(h,d)[0]:f(d,h)[1]}}},{}],23:[function(r,n,i){n.exports={type:r("./json0")}},{"./json0":24}],24:[function(r,n,i){var o=function(p){return Object.prototype.toString.call(p)=="[object Array]"},s=function(p){return!!p&&p.constructor===Object},a=function(p){return JSON.parse(JSON.stringify(p))},l={name:"json0",uri:"http://sharejs.org/types/JSONv0"},c={};l.registerSubtype=function(p){c[p.name]=p},l.create=function(p){return p===void 0?null:a(p)},l.invertComponent=function(p){var g={p:p.p};return p.t&&c[p.t]&&(g.t=p.t,g.o=c[p.t].invert(p.o)),p.si!==void 0&&(g.sd=p.si),p.sd!==void 0&&(g.si=p.sd),p.oi!==void 0&&(g.od=p.oi),p.od!==void 0&&(g.oi=p.od),p.li!==void 0&&(g.ld=p.li),p.ld!==void 0&&(g.li=p.ld),p.na!==void 0&&(g.na=-p.na),p.lm!==void 0&&(g.lm=p.p[p.p.length-1],g.p=p.p.slice(0,p.p.length-1).concat([p.lm])),g},l.invert=function(p){for(var g=p.slice().reverse(),m=[],y=0;y<g.length;y++)m.push(l.invertComponent(g[y]));return m},l.checkValidOp=function(p){for(var g=0;g<p.length;g++)if(!o(p[g].p))throw new Error("Missing path")},l.checkList=function(p){if(!o(p))throw new Error("Referenced element not a list")},l.checkObj=function(p){if(!s(p))throw new Error("Referenced element not an object (it was "+JSON.stringify(p)+")")};function u(p){p.t="text0";var g={p:p.p.pop()};p.si!=null&&(g.i=p.si),p.sd!=null&&(g.d=p.sd),p.o=[g]}function f(p){p.p.push(p.o[0].p),p.o[0].i!=null&&(p.si=p.o[0].i),p.o[0].d!=null&&(p.sd=p.o[0].d),delete p.t,delete p.o}l.apply=function(p,g){l.checkValidOp(g),g=a(g);for(var m={data:p},y=0;y<g.length;y++){var O=g[y];(O.si!=null||O.sd!=null)&&u(O);for(var v=null,b=m,w="data",_=0;_<O.p.length;_++){var C=O.p[_];if(v=b,b=b[w],w=C,v==null)throw new Error("Path invalid")}if(O.t&&O.o!==void 0&&c[O.t])b[w]=c[O.t].apply(b[w],O.o);else if(O.na!==void 0){if(typeof b[w]!="number")throw new Error("Referenced element not a number");b[w]+=O.na}else if(O.li!==void 0&&O.ld!==void 0)l.checkList(b),b[w]=O.li;else if(O.li!==void 0)l.checkList(b),b.splice(w,0,O.li);else if(O.ld!==void 0)l.checkList(b),b.splice(w,1);else if(O.lm!==void 0){if(l.checkList(b),O.lm!=w){var P=b[w];b.splice(w,1),b.splice(O.lm,0,P)}}else if(O.oi!==void 0)l.checkObj(b),b[w]=O.oi;else if(O.od!==void 0)l.checkObj(b),delete b[w];else throw new Error("invalid / missing instruction in op")}return m.data},l.shatter=function(p){for(var g=[],m=0;m<p.length;m++)g.push([p[m]]);return g},l.incrementalApply=function(p,g,m){for(var y=0;y<g.length;y++){var O=[g[y]];p=l.apply(p,O),m(O,p)}return p};var h=l.pathMatches=function(p,g,m){if(p.length!=g.length)return!1;for(var y=0;y<p.length;y++)if(p[y]!==g[y]&&(!m||y!==p.length-1))return!1;return!0};l.append=function(p,g){if(g=a(g),p.length===0){p.push(g);return}var m=p[p.length-1];if((g.si!=null||g.sd!=null)&&(m.si!=null||m.sd!=null)&&(u(g),u(m)),h(g.p,m.p))if(g.t&&m.t&&g.t===m.t&&c[g.t]){if(m.o=c[g.t].compose(m.o,g.o),g.si!=null||g.sd!=null){for(var y=g.p,O=0;O<m.o.length-1;O++)g.o=[m.o.pop()],g.p=y.slice(),f(g),p.push(g);f(m)}}else m.na!=null&&g.na!=null?p[p.length-1]={p:m.p,na:m.na+g.na}:m.li!==void 0&&g.li===void 0&&g.ld===m.li?m.ld!==void 0?delete m.li:p.pop():m.od!==void 0&&m.oi===void 0&&g.oi!==void 0&&g.od===void 0?m.oi=g.oi:m.oi!==void 0&&g.od!==void 0?g.oi!==void 0?m.oi=g.oi:m.od!==void 0?delete m.oi:p.pop():g.lm!==void 0&&g.p[g.p.length-1]===g.lm||p.push(g);else(g.si!=null||g.sd!=null)&&(m.si!=null||m.sd!=null)&&(f(g),f(m)),p.push(g)},l.compose=function(p,g){l.checkValidOp(p),l.checkValidOp(g);for(var m=a(p),y=0;y<g.length;y++)l.append(m,g[y]);return m},l.normalize=function(p){var g=[];p=o(p)?p:[p];for(var m=0;m<p.length;m++){var y=p[m];y.p==null&&(y.p=[]),l.append(g,y)}return g},l.commonLengthForOps=function(p,g){var m=p.p.length,y=g.p.length;if((p.na!=null||p.t)&&m++,(g.na!=null||g.t)&&y++,m===0)return-1;if(y===0)return null;m--,y--;for(var O=0;O<m;O++){var v=p.p[O];if(O>=y||v!==g.p[O])return null}return m},l.canOpAffectPath=function(p,g){return l.commonLengthForOps({p:g},p)!=null},l.transformComponent=function(p,g,m,y){g=a(g);var O=l.commonLengthForOps(m,g),v=l.commonLengthForOps(g,m),b=g.p.length,w=m.p.length;if((g.na!=null||g.t)&&b++,(m.na!=null||m.t)&&w++,v!=null&&w>b&&g.p[v]==m.p[v]){if(g.ld!==void 0){var _=a(m);_.p=_.p.slice(b),g.ld=l.apply(a(g.ld),[_])}else if(g.od!==void 0){var _=a(m);_.p=_.p.slice(b),g.od=l.apply(a(g.od),[_])}}if(O!=null){var C=b==w,_=m;if((g.si!=null||g.sd!=null)&&(m.si!=null||m.sd!=null)&&(u(g),_=a(m),u(_)),_.t&&c[_.t]){if(g.t&&g.t===_.t){var P=c[g.t].transform(g.o,_.o,y);if(g.si!=null||g.sd!=null)for(var k=g.p,x=0;x<P.length;x++)g.o=[P[x]],g.p=k.slice(),f(g),l.append(p,g);else(!o(P)||P.length>0)&&(g.o=P,l.append(p,g));return p}}else if(m.na===void 0){if(m.li!==void 0&&m.ld!==void 0){if(m.p[O]===g.p[O])if(C){if(g.ld!==void 0)if(g.li!==void 0&&y==="left")g.ld=a(m.li);else return p}else return p}else if(m.li!==void 0)g.li!==void 0&&g.ld===void 0&&C&&g.p[O]===m.p[O]?y==="right"&&g.p[O]++:m.p[O]<=g.p[O]&&g.p[O]++,g.lm!==void 0&&C&&m.p[O]<=g.lm&&g.lm++;else if(m.ld!==void 0){if(g.lm!==void 0&&C){if(m.p[O]===g.p[O])return p;var k=m.p[O],E=g.p[O],R=g.lm;(k<R||k===R&&E<R)&&g.lm--}if(m.p[O]<g.p[O])g.p[O]--;else if(m.p[O]===g.p[O]){if(w<b)return p;if(g.ld!==void 0)if(g.li!==void 0)delete g.ld;else return p}}else if(m.lm!==void 0)if(g.lm!==void 0&&b===w){var E=g.p[O],R=g.lm,I=m.p[O],F=m.lm;if(I!==F)if(E===I)if(y==="left")g.p[O]=F,E===R&&(g.lm=F);else return p;else E>I&&g.p[O]--,E>F?g.p[O]++:E===F&&I>F&&(g.p[O]++,E===R&&g.lm++),(R>I||R===I&&R>E)&&g.lm--,R>F?g.lm++:R===F&&(F>I&&R>E||F<I&&R<E?y==="right"&&g.lm++:R>E?g.lm++:R===I&&g.lm--)}else if(g.li!==void 0&&g.ld===void 0&&C){var E=m.p[O],R=m.lm;k=g.p[O],k>E&&g.p[O]--,k>R&&g.p[O]++}else{var E=m.p[O],R=m.lm;k=g.p[O],k===E?g.p[O]=R:(k>E&&g.p[O]--,(k>R||k===R&&E>R)&&g.p[O]++)}else if(m.oi!==void 0&&m.od!==void 0){if(g.p[O]===m.p[O])if(g.oi!==void 0&&C){if(y==="right")return p;g.od=m.oi}else return p}else if(m.oi!==void 0){if(g.oi!==void 0&&g.p[O]===m.p[O])if(y==="left")l.append(p,{p:g.p,od:m.oi});else return p}else if(m.od!==void 0&&g.p[O]==m.p[O]){if(!C)return p;if(g.oi!==void 0)delete g.od;else return p}}}return l.append(p,g),p},r("./bootstrapTransform")(l,l.transformComponent,l.checkValidOp,l.append);var d=r("./text0");l.registerSubtype(d),n.exports=l},{"./bootstrapTransform":22,"./text0":25}],25:[function(r,n,i){var o=n.exports={name:"text0",uri:"http://sharejs.org/types/textv0",create:function(d){if(d!=null&&typeof d!="string")throw new Error("Initial data must be a string");return d||""}},s=function(d,p,g){return d.slice(0,p)+g+d.slice(p)},a=function(d){if(typeof d.p!="number")throw new Error("component missing position field");if(typeof d.i=="string"==(typeof d.d=="string"))throw new Error("component needs an i or d field");if(d.p<0)throw new Error("position cannot be negative")},l=function(d){for(var p=0;p<d.length;p++)a(d[p])};o.apply=function(d,p){var g;l(p);for(var m=0;m<p.length;m++){var y=p[m];if(y.i!=null)d=s(d,y.p,y.i);else{if(g=d.slice(y.p,y.p+y.d.length),y.d!==g)throw new Error("Delete component '"+y.d+"' does not match deleted text '"+g+"'");d=d.slice(0,y.p)+d.slice(y.p+y.d.length)}}return d};var c=o._append=function(d,p){if(!(p.i===""||p.d===""))if(d.length===0)d.push(p);else{var g=d[d.length-1];g.i!=null&&p.i!=null&&g.p<=p.p&&p.p<=g.p+g.i.length?d[d.length-1]={i:s(g.i,p.p-g.p,p.i),p:g.p}:g.d!=null&&p.d!=null&&p.p<=g.p&&g.p<=p.p+p.d.length?d[d.length-1]={d:s(p.d,g.p-p.p,g.d),p:p.p}:d.push(p)}};o.compose=function(d,p){l(d),l(p);for(var g=d.slice(),m=0;m<p.length;m++)c(g,p[m]);return g},o.normalize=function(d){var p=[];(d.i!=null||d.p!=null)&&(d=[d]);for(var g=0;g<d.length;g++){var m=d[g];m.p==null&&(m.p=0),c(p,m)}return p};var u=function(d,p,g){return p.i!=null?p.p<d||p.p===d&&g?d+p.i.length:d:d<=p.p?d:d<=p.p+p.d.length?p.p:d-p.d.length};o.transformCursor=function(d,p,g){for(var m=g==="right",y=0;y<p.length;y++)d=u(d,p[y],m);return d};var f=o._tc=function(d,p,g,m){if(a(p),a(g),p.i!=null)c(d,{i:p.i,p:u(p.p,g,m==="right")});else if(g.i!=null){var y=p.d;p.p<g.p&&(c(d,{d:y.slice(0,g.p-p.p),p:p.p}),y=y.slice(g.p-p.p)),y!==""&&c(d,{d:y,p:p.p+g.i.length})}else if(p.p>=g.p+g.d.length)c(d,{d:p.d,p:p.p-g.d.length});else if(p.p+p.d.length<=g.p)c(d,p);else{var O={d:"",p:p.p};p.p<g.p&&(O.d=p.d.slice(0,g.p-p.p)),p.p+p.d.length>g.p+g.d.length&&(O.d+=p.d.slice(g.p+g.d.length-p.p));var v=Math.max(p.p,g.p),b=Math.min(p.p+p.d.length,g.p+g.d.length),w=p.d.slice(v-p.p,b-p.p),_=g.d.slice(v-g.p,b-g.p);if(w!==_)throw new Error("Delete ops delete different text in the same region of the document");O.d!==""&&(O.p=u(O.p,g),c(d,O))}return d},h=function(d){return d.i!=null?{d:d.i,p:d.p}:{i:d.d,p:d.p}};o.invert=function(d){d=d.slice().reverse();for(var p=0;p<d.length;p++)d[p]=h(d[p]);return d},r("./bootstrapTransform")(o,f,l,c)},{"./bootstrapTransform":22}],26:[function(r,n,i){var o=n.exports={},s,a;function l(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=l}catch{s=l}try{typeof clearTimeout=="function"?a=clearTimeout:a=c}catch{a=c}})();function u(b){if(s===setTimeout)return setTimeout(b,0);if((s===l||!s)&&setTimeout)return s=setTimeout,setTimeout(b,0);try{return s(b,0)}catch{try{return s.call(null,b,0)}catch{return s.call(this,b,0)}}}function f(b){if(a===clearTimeout)return clearTimeout(b);if((a===c||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(b);try{return a(b)}catch{try{return a.call(null,b)}catch{return a.call(this,b)}}}var h=[],d=!1,p,g=-1;function m(){!d||!p||(d=!1,p.length?h=p.concat(h):g=-1,h.length&&y())}function y(){if(!d){var b=u(m);d=!0;for(var w=h.length;w;){for(p=h,h=[];++g<w;)p&&p[g].run();g=-1,w=h.length}p=null,d=!1,f(b)}}o.nextTick=function(b){var w=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)w[_-1]=arguments[_];h.push(new O(b,w)),h.length===1&&!d&&u(y)};function O(b,w){this.fun=b,this.array=w}O.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function v(){}o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(b){return[]},o.binding=function(b){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(b){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],27:[function(r,n,i){var o=r("./doc"),s=r("./query"),a=r("./presence/presence"),l=r("./presence/doc-presence"),c=r("./snapshot-request/snapshot-version-request"),u=r("./snapshot-request/snapshot-timestamp-request"),f=r("../emitter"),h=r("../error"),d=r("../message-actions").ACTIONS,p=r("../types"),g=r("../util"),m=r("../logger"),y=r("./presence/doc-presence-emitter"),O=h.CODES;function v(P){return P.readyState===0||P.readyState===1?"connecting":"disconnected"}n.exports=b;function b(P){f.EventEmitter.call(this),this.collections=Object.create(null),this.nextQueryId=1,this.nextSnapshotRequestId=1,this.queries=Object.create(null),this._presences=Object.create(null),this._docPresenceEmitter=new y,this._snapshotRequests=Object.create(null),this.seq=1,this._presenceSeq=1,this.id=null,this.agent=null,this.debug=!1,this.state=v(P),this.bindToSocket(P)}f.mixin(b),b.prototype.bindToSocket=function(P){this.socket&&(this.socket.close(),this.socket.onmessage=null,this.socket.onopen=null,this.socket.onerror=null,this.socket.onclose=null),this.socket=P;var k=v(P);this._setState(k),this.canSend=!1;var x=this;P.onmessage=function(E){try{var R=typeof E.data=="string"?JSON.parse(E.data):E.data}catch{m.warn("Failed to parse message",E);return}x.debug&&m.info("RECV",JSON.stringify(R));var I={data:R};if(x.emit("receive",I),!!I.data)try{x.handleMessage(I.data)}catch(F){g.nextTick(function(){x.emit("error",F)})}},P.readyState===1&&x._initializeHandshake(),P.onopen=function(){x._setState("connecting"),x._initializeHandshake()},P.onerror=function(E){x.emit("connection error",E)},P.onclose=function(E){E==="closed"||E==="Closed"?x._setState("closed",E):E==="stopped"||E==="Stopped by server"?x._setState("stopped",E):x._setState("disconnected",E)}},b.prototype.handleMessage=function(P){var k=null;switch(P.error&&(k=w(P.error,P),delete P.error),P.a){case d.initLegacy:return this._handleLegacyInit(P);case d.handshake:return this._handleHandshake(k,P);case d.queryFetch:var x=this.queries[P.id];x&&x._handleFetch(k,P.data,P.extra);return;case d.querySubscribe:var x=this.queries[P.id];x&&x._handleSubscribe(k,P.data,P.extra);return;case d.queryUnsubscribe:return;case d.queryUpdate:var x=this.queries[P.id];if(!x)return;if(k)return x._handleError(k);P.diff&&x._handleDiff(P.diff),g.hasOwn(P,"extra")&&x._handleExtra(P.extra);return;case d.bulkFetch:return this._handleBulkMessage(k,P,"_handleFetch");case d.bulkSubscribe:case d.bulkUnsubscribe:return this._handleBulkMessage(k,P,"_handleSubscribe");case d.snapshotFetch:case d.snapshotFetchByTimestamp:return this._handleSnapshotFetch(k,P);case d.fetch:var E=this.getExisting(P.c,P.d);E&&E._handleFetch(k,P.data);return;case d.subscribe:case d.unsubscribe:var E=this.getExisting(P.c,P.d);E&&E._handleSubscribe(k,P.data);return;case d.op:var E=this.getExisting(P.c,P.d);E&&E._handleOp(k,P);return;case d.presence:return this._handlePresence(k,P);case d.presenceSubscribe:return this._handlePresenceSubscribe(k,P);case d.presenceUnsubscribe:return this._handlePresenceUnsubscribe(k,P);case d.presenceRequest:return this._handlePresenceRequest(k,P);case d.pingPong:return this._handlePingPong(k);default:m.warn("Ignoring unrecognized message",P)}};function w(P,k){var x=new Error(P.message);return x.code=P.code,k&&(x.data=k),x}b.prototype._handleBulkMessage=function(P,k,x){if(k.data)for(var E in k.data){var R=k.data[E],I=this.getExisting(k.c,E);I&&(P?I[x](P):R.error?I[x](w(R.error)):I[x](null,R))}else if(Array.isArray(k.b))for(var F=0;F<k.b.length;F++){var E=k.b[F],I=this.getExisting(k.c,E);I&&I[x](P)}else if(k.b)for(var E in k.b){var I=this.getExisting(k.c,E);I&&I[x](P)}else m.error("Invalid bulk message",k)},b.prototype._reset=function(){this.agent=null},b.prototype._setState=function(P,k){if(this.state!==P){if(P==="connecting"&&this.state!=="disconnected"&&this.state!=="stopped"&&this.state!=="closed"||P==="connected"&&this.state!=="connecting"){var x=new h(O.ERR_CONNECTION_STATE_TRANSITION_INVALID,"Cannot transition directly from "+this.state+" to "+P);return this.emit("error",x)}this.state=P,this.canSend=P==="connected",(P==="disconnected"||P==="stopped"||P==="closed")&&this._reset(),this.startBulk();for(var E in this.queries){var R=this.queries[E];R._onConnectionStateChanged()}for(var I in this.collections){var F=this.collections[I];for(var E in F)F[E]._onConnectionStateChanged()}for(var H in this._presences)this._presences[H]._onConnectionStateChanged();for(var E in this._snapshotRequests){var M=this._snapshotRequests[E];M._onConnectionStateChanged()}this.endBulk(),this.emit(P,k),this.emit("state",P,k)}},b.prototype.startBulk=function(){this.bulk||(this.bulk=Object.create(null))},b.prototype.endBulk=function(){if(this.bulk)for(var P in this.bulk){var k=this.bulk[P];this._sendBulk("f",P,k.f),this._sendBulk("s",P,k.s),this._sendBulk("u",P,k.u)}this.bulk=null},b.prototype._sendBulk=function(P,k,x){if(x){var E=[],R=Object.create(null),I=0,F;for(var H in x){var M=x[H];M==null?E.push(H):(R[H]=M,F=H,I++)}if(E.length===1){var H=E[0];this.send({a:P,c:k,d:H})}else E.length&&this.send({a:"b"+P,c:k,b:E});if(I===1){var B=R[F];this.send({a:P,c:k,d:F,v:B})}else I&&this.send({a:"b"+P,c:k,b:R})}},b.prototype._sendActions=function(P,k,x){if(this._addDoc(k),this.bulk){var E=this.bulk[k.collection]||(this.bulk[k.collection]=Object.create(null)),R=E[P]||(E[P]=Object.create(null)),I=g.hasOwn(R,k.id);return R[k.id]=x,I}else{var F={a:P,c:k.collection,d:k.id,v:x};this.send(F)}},b.prototype.sendFetch=function(P){return this._sendActions(d.fetch,P,P.version)},b.prototype.sendSubscribe=function(P){return this._sendActions(d.subscribe,P,P.version)},b.prototype.sendUnsubscribe=function(P){return this._sendActions(d.unsubscribe,P)},b.prototype.sendOp=function(P,k){this._addDoc(P);var x={a:d.op,c:P.collection,d:P.id,v:P.version,src:k.src,seq:k.seq,x:{}};"op"in k&&(x.op=k.op),k.create&&(x.create=k.create),k.del&&(x.del=k.del),P.submitSource&&(x.x.source=k.source),this.send(x)},b.prototype.send=function(P){this.debug&&m.info("SEND",JSON.stringify(P)),this.emit("send",P),this.socket.send(JSON.stringify(P))},b.prototype.ping=function(){if(!this.canSend)throw new h(O.ERR_CANNOT_PING_OFFLINE,"Socket must be CONNECTED to ping");var P={a:d.pingPong};this.send(P)},b.prototype.close=function(){this.socket.close()},b.prototype.getExisting=function(P,k){if(this.collections[P])return this.collections[P][k]},b.prototype.get=function(P,k){var x=this.collections[P]||(this.collections[P]=Object.create(null)),E=x[k];return E||(E=x[k]=new o(this,P,k),this.emit("doc",E)),E._wantsDestroy=!1,E},b.prototype._destroyDoc=function(P){P._wantsDestroy&&(g.digAndRemove(this.collections,P.collection,P.id),P.emit("destroy"))},b.prototype._addDoc=function(P){var k=this.collections[P.collection];k||(k=this.collections[P.collection]=Object.create(null)),k[P.id]!==P&&(k[P.id]=P)},b.prototype._createQuery=function(P,k,x,E,R){var I=this.nextQueryId++,F=new s(P,this,I,k,x,E,R);return this.queries[I]=F,F.send(),F},b.prototype._destroyQuery=function(P){delete this.queries[P.id]},b.prototype.createFetchQuery=function(P,k,x,E){return this._createQuery(d.queryFetch,P,k,x,E)},b.prototype.createSubscribeQuery=function(P,k,x,E){return this._createQuery(d.querySubscribe,P,k,x,E)},b.prototype.hasPending=function(){return!!(this._firstDoc(_)||this._firstQuery(_)||this._firstSnapshotRequest())};function _(P){return P.hasPending()}b.prototype.hasWritePending=function(){return!!this._firstDoc(C)};function C(P){return P.hasWritePending()}b.prototype.whenNothingPending=function(P){var k=this._firstDoc(_);if(k){k.once("nothing pending",this._nothingPendingRetry(P));return}var x=this._firstQuery(_);if(x){x.once("ready",this._nothingPendingRetry(P));return}var E=this._firstSnapshotRequest();if(E){E.once("ready",this._nothingPendingRetry(P));return}g.nextTick(P)},b.prototype._nothingPendingRetry=function(P){var k=this;return function(){g.nextTick(function(){k.whenNothingPending(P)})}},b.prototype._firstDoc=function(P){for(var k in this.collections){var x=this.collections[k];for(var E in x){var R=x[E];if(P(R))return R}}},b.prototype._firstQuery=function(P){for(var k in this.queries){var x=this.queries[k];if(P(x))return x}},b.prototype._firstSnapshotRequest=function(){for(var P in this._snapshotRequests)return this._snapshotRequests[P]},b.prototype.fetchSnapshot=function(P,k,x,E){typeof x=="function"&&(E=x,x=null);var R=this.nextSnapshotRequestId++,I=new c(this,R,P,k,x,E);this._snapshotRequests[I.requestId]=I,I.send()},b.prototype.fetchSnapshotByTimestamp=function(P,k,x,E){typeof x=="function"&&(E=x,x=null);var R=this.nextSnapshotRequestId++,I=new u(this,R,P,k,x,E);this._snapshotRequests[I.requestId]=I,I.send()},b.prototype._handleSnapshotFetch=function(P,k){var x=this._snapshotRequests[k.id];x&&(delete this._snapshotRequests[k.id],x._handleResponse(P,k))},b.prototype._handleLegacyInit=function(P){if(P.protocolMinor)return this._initializeHandshake();this._initialize(P)},b.prototype._initializeHandshake=function(){this.send({a:d.handshake,id:this.id})},b.prototype._handleHandshake=function(P,k){if(P)return this.emit("error",P);this._initialize(k)},b.prototype._handlePingPong=function(P){if(P)return this.emit("error",P);this.emit("pong")},b.prototype._initialize=function(P){if(this.state==="connecting"){if(P.protocol!==1)return this.emit("error",new h(O.ERR_PROTOCOL_VERSION_NOT_SUPPORTED,"Unsupported protocol version: "+P.protocol));if(p.map[P.type]!==p.defaultType)return this.emit("error",new h(O.ERR_DEFAULT_TYPE_MISMATCH,P.type+" does not match the server default type"));if(typeof P.id!="string")return this.emit("error",new h(O.ERR_CLIENT_ID_BADLY_FORMED,"Client id must be a string"));this.id=P.id,this._setState("connected")}},b.prototype.getPresence=function(P){var k=this,x=g.digOrCreate(this._presences,P,function(){return new a(k,P)});return x._wantsDestroy=!1,x},b.prototype.getDocPresence=function(P,k){var x=l.channel(P,k),E=this,R=g.digOrCreate(this._presences,x,function(){return new l(E,P,k)});return R._wantsDestroy=!1,R},b.prototype._sendPresenceAction=function(P,k,x){this._addPresence(x);var E={a:P,ch:x.channel,seq:k};return this.send(E),E.seq},b.prototype._addPresence=function(P){g.digOrCreate(this._presences,P.channel,function(){return P})},b.prototype._requestRemotePresence=function(P){this.send({a:d.presenceRequest,ch:P})},b.prototype._handlePresenceSubscribe=function(P,k){var x=g.dig(this._presences,k.ch);x&&x._handleSubscribe(P,k.seq)},b.prototype._handlePresenceUnsubscribe=function(P,k){var x=g.dig(this._presences,k.ch);x&&x._handleUnsubscribe(P,k.seq)},b.prototype._handlePresence=function(P,k){var x=g.dig(this._presences,k.ch);x&&x._receiveUpdate(P,k)},b.prototype._handlePresenceRequest=function(P,k){var x=g.dig(this._presences,k.ch);x&&x._broadcastAllLocalPresence(P,k)}},{"../emitter":41,"../error":42,"../logger":43,"../message-actions":45,"../types":49,"../util":50,"./doc":28,"./presence/doc-presence":31,"./presence/doc-presence-emitter":30,"./presence/presence":34,"./query":37,"./snapshot-request/snapshot-timestamp-request":39,"./snapshot-request/snapshot-version-request":40}],28:[function(r,n,i){var o=r("../emitter"),s=r("../logger"),a=r("../error"),l=r("../types"),c=r("../util"),u=c.clone,f=r("fast-deep-equal"),h=r("../message-actions").ACTIONS,d=a.CODES;n.exports=p;function p(O,v,b){o.EventEmitter.call(this),this.connection=O,this.collection=v,this.id=b,this.version=null,this.type=null,this.data=void 0,this.inflightFetch=[],this.inflightSubscribe=null,this.pendingFetch=[],this.pendingSubscribe=[],this.subscribed=!1,this.wantSubscribe=!1,this._wantsDestroy=!1,this.inflightOp=null,this.pendingOps=[],this.type=null,this.applyStack=null,this.preventCompose=!1,this.submitSource=!1,this.paused=!1,this._dataStateVersion=0}o.mixin(p),p.prototype.destroy=function(O){this._wantsDestroy=!0;var v=this;v.whenNothingPending(function(){v.wantSubscribe?v.unsubscribe(function(b){if(b)return O?O(b):v.emit("error",b);v.connection._destroyDoc(v),O&&O()}):(v.connection._destroyDoc(v),O&&O())})},p.prototype._setType=function(O){if(typeof O=="string"&&(O=l.map[O]),O)this.type=O;else if(O===null)this.type=O,this._setData(void 0);else{var v=new a(d.ERR_DOC_TYPE_NOT_RECOGNIZED,"Missing type "+O);return this.emit("error",v)}},p.prototype._setData=function(O){this.data=O,this._dataStateVersion++},p.prototype.ingestSnapshot=function(O,v){if(!O)return v&&v();if(typeof O.v!="number"){var b=new a(d.ERR_INGESTED_SNAPSHOT_HAS_NO_VERSION,"Missing version in ingested snapshot. "+this.collection+"."+this.id);return v?v(b):this.emit("error",b)}if(this.type||this.hasWritePending()){if(this.version==null){if(this.hasWritePending())return v&&this.once("no write pending",v);var b=new a(d.ERR_DOC_MISSING_VERSION,"Cannot ingest snapshot in doc with null version. "+this.collection+"."+this.id);return v?v(b):this.emit("error",b)}return O.v>this.version?this.fetch(v):v&&v()}if(this.version>O.v)return v&&v();this.version=O.v;var w=O.type===void 0?l.defaultType:O.type;this._setType(w),this._setData(this.type&&this.type.deserialize?this.type.deserialize(O.data):O.data),this.emit("load"),v&&v()},p.prototype.whenNothingPending=function(O){var v=this;c.nextTick(function(){if(v.hasPending()){v.once("nothing pending",O);return}O()})},p.prototype.hasPending=function(){return!!(this.inflightOp||this.pendingOps.length||this.inflightFetch.length||this.inflightSubscribe||this.pendingFetch.length||this.pendingSubscribe.length)},p.prototype.hasWritePending=function(){return!!(this.inflightOp||this.pendingOps.length)},p.prototype._emitNothingPending=function(){this.hasWritePending()||(this.emit("no write pending"),!this.hasPending()&&this.emit("nothing pending"))},p.prototype._emitResponseError=function(O,v){if(O&&O.code===d.ERR_SNAPSHOT_READ_SILENT_REJECTION){this.wantSubscribe=!1,v&&v(),this._emitNothingPending();return}if(v){v(O),this._emitNothingPending();return}this._emitNothingPending(),this.emit("error",O)},p.prototype._handleFetch=function(O,v){var b=this.pendingFetch;this.pendingFetch=[];var w=this.inflightFetch.shift();if(w&&b.push(w),b.length&&(w=function(_){c.callEach(b,_)}),O)return this._emitResponseError(O,w);this.ingestSnapshot(v,w),this._emitNothingPending()},p.prototype._handleSubscribe=function(O,v){var b=this.inflightSubscribe;this.inflightSubscribe=null;var w=this.pendingFetch;this.pendingFetch=[],b.callback&&w.push(b.callback);var _;if(w.length&&(_=function(C){c.callEach(w,C)}),O)return this._emitResponseError(O,_);this.subscribed=b.wantSubscribe,this.subscribed?this.ingestSnapshot(v,_):_&&_(),this._emitNothingPending(),this._flushSubscribe()},p.prototype._handleOp=function(O,v){if(O)return this.inflightOp?this._rollback(O):this.emit("error",O);if(this.inflightOp&&v.src===this.inflightOp.src&&v.seq===this.inflightOp.seq){this._opAcknowledged(v);return}if(this.version==null||v.v>this.version){this.fetch();return}if(!(v.v<this.version)){if(this.inflightOp){var b=y(this.inflightOp,v);if(b)return this._hardRollback(b)}for(var w=0;w<this.pendingOps.length;w++){var b=y(this.pendingOps[w],v);if(b)return this._hardRollback(b)}this.version++;try{this._otApply(v,!1)}catch(_){return this._hardRollback(_)}}},p.prototype._onConnectionStateChanged=function(){this.connection.canSend?(this.flush(),this._resubscribe()):(this.inflightOp&&(this.pendingOps.unshift(this.inflightOp),this.inflightOp=null),this.subscribed=!1,this.inflightSubscribe&&(this.inflightSubscribe.wantSubscribe?(this.pendingSubscribe.unshift(this.inflightSubscribe),this.inflightSubscribe=null):this._handleSubscribe()),this.inflightFetch.length&&(this.pendingFetch=this.pendingFetch.concat(this.inflightFetch),this.inflightFetch.length=0))},p.prototype._resubscribe=function(){if(!this.pendingSubscribe.length&&this.wantSubscribe)return this.subscribe();var O=this.pendingSubscribe.some(function(v){return v.wantSubscribe});!O&&this.pendingFetch.length&&this.fetch(),this._flushSubscribe()},p.prototype.fetch=function(O){this._fetch({},O)},p.prototype._fetch=function(O,v){this.pendingFetch.push(v);var b=this.connection.canSend&&(O.force||!this.inflightFetch.length);b&&(this.inflightFetch.push(this.pendingFetch.shift()),this.connection.sendFetch(this))},p.prototype.subscribe=function(O){var v=!0;this._queueSubscribe(v,O)},p.prototype.unsubscribe=function(O){var v=!1;this._queueSubscribe(v,O)},p.prototype._queueSubscribe=function(O,v){var b=this.pendingSubscribe[this.pendingSubscribe.length-1]||this.inflightSubscribe,w=b&&b.wantSubscribe===O;if(w){b.callback=g([b.callback,v]);return}this.pendingSubscribe.push({wantSubscribe:!!O,callback:v}),this._flushSubscribe()},p.prototype._flushSubscribe=function(){if(!(this.inflightSubscribe||!this.pendingSubscribe.length)){if(this.connection.canSend){this.inflightSubscribe=this.pendingSubscribe.shift(),this.wantSubscribe=this.inflightSubscribe.wantSubscribe,this.wantSubscribe?this.connection.sendSubscribe(this):(this.subscribed=!1,this.connection.sendUnsubscribe(this));return}if(!this.pendingSubscribe[0].wantSubscribe){this.inflightSubscribe=this.pendingSubscribe.shift();var O=this;c.nextTick(function(){O._handleSubscribe()})}}};function g(O){return O=O.filter(c.truthy),O.length?function(v){c.callEach(O,v)}:null}p.prototype.flush=function(){!this.connection.canSend||this.inflightOp||!this.paused&&this.pendingOps.length&&this._sendOp()};function m(O){delete O.op,delete O.create,delete O.del}function y(O,v){if(O.del)return m(v);if(v.del)return new a(d.ERR_DOC_WAS_DELETED,"Document was deleted");if(v.create)return new a(d.ERR_DOC_ALREADY_CREATED,"Document already created");if("op"in v){if(O.create)return new a(d.ERR_DOC_ALREADY_CREATED,"Document already created");if(O.type.transformX){var b=O.type.transformX(O.op,v.op);O.op=b[0],v.op=b[1]}else{var w=O.type.transform(O.op,v.op,"left"),_=O.type.transform(v.op,O.op,"right");O.op=w,v.op=_}}}p.prototype._otApply=function(O,v){if("op"in O){if(!this.type)throw new a(d.ERR_DOC_DOES_NOT_EXIST,"Cannot apply op to uncreated document. "+this.collection+"."+this.id);if(this.emit("before op batch",O.op,v),!v&&this.type===l.defaultType&&O.op.length>1){this.applyStack||(this.applyStack=[]);for(var b=this.applyStack.length,w=0;w<O.op.length;w++){var _=O.op[w],C={op:[_]};this.emit("before op",C.op,v,O.src);for(var P=b;P<this.applyStack.length;P++){var k=y(this.applyStack[P],C);if(k)return this._hardRollback(k)}this._setData(this.type.apply(this.data,C.op)),this.emit("op",C.op,v,O.src)}this.emit("op batch",O.op,v),this._popApplyStack(b);return}this.emit("before op",O.op,v,O.src),this._setData(this.type.apply(this.data,O.op)),this.emit("op",O.op,v,O.src),this.emit("op batch",O.op,v);return}if(O.create){this._setType(O.create.type),this.type.deserialize?this.type.createDeserialized?this._setData(this.type.createDeserialized(O.create.data)):this._setData(this.type.deserialize(this.type.create(O.create.data))):this._setData(this.type.create(O.create.data)),this.emit("create",v);return}if(O.del){var x=this.data;this._setType(null),this.emit("del",x,v);return}},p.prototype._sendOp=function(){if(this.connection.canSend){var O=this.connection.id;this.inflightOp||(this.inflightOp=this.pendingOps.shift());var v=this.inflightOp;if(!v){var b=new a(d.ERR_INFLIGHT_OP_MISSING,"No op to send on call to _sendOp");return this.emit("error",b)}if(v.sentAt=Date.now(),v.retries=v.retries==null?0:v.retries+1,v.seq==null){if(this.connection.seq>=c.MAX_SAFE_INTEGER)return this.emit("error",new a(d.ERR_CONNECTION_SEQ_INTEGER_OVERFLOW,"Connection seq has exceeded the max safe integer, maybe from being open for too long"));v.seq=this.connection.seq++}this.connection.sendOp(this,v),v.src==null&&(v.src=O)}},p.prototype._submit=function(O,v,b){if(v||(v=!0),"op"in O){if(!this.type){var w=new a(d.ERR_DOC_DOES_NOT_EXIST,"Cannot submit op. Document has not been created. "+this.collection+"."+this.id);return b?b(w):this.emit("error",w)}this.type.normalize&&(O.op=this.type.normalize(O.op))}try{this._pushOp(O,v,b),this._otApply(O,v)}catch(C){return this._hardRollback(C)}var _=this;c.nextTick(function(){_.flush()})},p.prototype._pushOp=function(O,v,b){if(O.source=v,this.applyStack)this.applyStack.push(O);else{var w=this._tryCompose(O);if(w){w.callbacks.push(b);return}}O.type=this.type,O.callbacks=[b],this.pendingOps.push(O)},p.prototype._popApplyStack=function(O){if(O>0){this.applyStack.length=O;return}var v=this.applyStack[0];if(this.applyStack=null,!!v){var b=this.pendingOps.indexOf(v);if(b!==-1)for(var w=this.pendingOps.splice(b),b=0;b<w.length;b++){var v=w[b],_=this._tryCompose(v);_?_.callbacks=_.callbacks.concat(v.callbacks):this.pendingOps.push(v)}}},p.prototype._tryCompose=function(O){if(!this.preventCompose){var v=this.pendingOps[this.pendingOps.length-1];if(!(!v||v.sentAt)&&!(this.submitSource&&!f(O.source,v.source))){if(v.create&&"op"in O)return v.create.data=this.type.apply(v.create.data,O.op),v;if("op"in v&&"op"in O&&this.type.compose)return v.op=this.type.compose(v.op,O.op),v}}},p.prototype.submitOp=function(O,v,b){typeof v=="function"&&(b=v,v=null);var w={op:O},_=v&&v.source;this._submit(w,_,b)},p.prototype.create=function(O,v,b,w){if(typeof v=="function"?(w=v,b=null,v=null):typeof b=="function"&&(w=b,b=null),v||(v=l.defaultType.uri),this.type){var _=new a(d.ERR_DOC_ALREADY_CREATED,"Document already exists");return w?w(_):this.emit("error",_)}var C={create:{type:v,data:O}},P=b&&b.source;this._submit(C,P,w)},p.prototype.del=function(O,v){if(typeof O=="function"&&(v=O,O=null),!this.type){var b=new a(d.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");return v?v(b):this.emit("error",b)}var w={del:!0},_=O&&O.source;this._submit(w,_,v)},p.prototype.pause=function(){this.paused=!0},p.prototype.resume=function(){this.paused=!1,this.flush()},p.prototype.toSnapshot=function(){return{v:this.version,data:u(this.data),type:this.type.uri}},p.prototype._opAcknowledged=function(O){if(this.inflightOp.create)this.version=O.v;else if(O.v!==this.version)return s.warn("Invalid version from server. Expected: "+this.version+" Received: "+O.v,O),this.fetch();if(O[h.fixup])for(var v=0;v<O[h.fixup].length;v++){for(var b=O[h.fixup][v],w=0;w<this.pendingOps.length;w++){var _=y(this.pendingOps[v],b);if(_)return this._hardRollback(_)}try{this._otApply(b,!1)}catch(C){return this._hardRollback(C)}}this.version++,this._clearInflightOp()},p.prototype._rollback=function(O){var v=this.inflightOp;if(!("op"in v&&v.type.invert))return this._hardRollback(O);try{v.op=v.type.invert(v.op)}catch{return this._hardRollback(O)}for(var b=0;b<this.pendingOps.length;b++){var w=y(this.pendingOps[b],v);if(w)return this._hardRollback(w)}try{this._otApply(v,!1)}catch(_){return this._hardRollback(_)}if(O.code===d.ERR_OP_SUBMIT_REJECTED)return this._clearInflightOp(null);this._clearInflightOp(O)},p.prototype._hardRollback=function(O){var v=this.pendingOps,b=this.inflightOp;this._setType(null),this.version=null,this.inflightOp=null,this.pendingOps=[];var w=this;this._fetch({force:!0},function(_){if(_&&(s.error("Hard rollback doc fetch failed.",_,b),w.emit("error",new a(d.ERR_HARD_ROLLBACK_FETCH_FAILED,"Hard rollback fetch failed: "+_.message))),O.code===d.ERR_OP_SUBMIT_REJECTED){if(b&&(c.callEach(b.callbacks),b=null),!v.length)return;O=new a(d.ERR_PENDING_OP_REMOVED_BY_OP_SUBMIT_REJECTED,"Discarding pending op because of hard rollback during ERR_OP_SUBMIT_REJECTED")}b&&v.unshift(b);for(var C=!!v.length,P=0;P<v.length;P++)C=c.callEach(v[P].callbacks,O)&&C;O&&!C&&w.emit("error",O)})},p.prototype._clearInflightOp=function(O){var v=this.inflightOp;this.inflightOp=null;var b=c.callEach(v.callbacks,O);if(this.flush(),this._emitNothingPending(),O&&!b)return this.emit("error",O)}},{"../emitter":41,"../error":42,"../logger":43,"../message-actions":45,"../types":49,"../util":50,"fast-deep-equal":6}],29:[function(r,n,i){i.Connection=r("./connection"),i.Doc=r("./doc"),i.Error=r("../error"),i.Query=r("./query"),i.types=r("../types"),i.logger=r("../logger")},{"../error":42,"../logger":43,"../types":49,"./connection":27,"./doc":28,"./query":37}],30:[function(r,n,i){var o=r("../../util"),s=r("events").EventEmitter,a=["create","del","destroy","load","op"];n.exports=l;function l(){this._docs=Object.create(null),this._forwarders=Object.create(null),this._emitters=Object.create(null)}l.prototype.addEventListener=function(c,u,f){this._registerDoc(c);var h=o.dig(this._emitters,c.collection,c.id);h.on(u,f)},l.prototype.removeEventListener=function(c,u,f){var h=o.dig(this._emitters,c.collection,c.id);h&&(h.off(u,f),h._eventsCount===1&&this._unregisterDoc(c))},l.prototype._registerDoc=function(c){var u=!0;if(o.digOrCreate(this._docs,c.collection,c.id,function(){return u=!1,c}),!u){var f=o.digOrCreate(this._emitters,c.collection,c.id,function(){var d=new s;return d.setMaxListeners(1e3),d}),h=this;a.forEach(function(d){var p=o.digOrCreate(h._forwarders,c.collection,c.id,d,function(){return f.emit.bind(f,d)});c.on(d,p)}),this.addEventListener(c,"destroy",this._unregisterDoc.bind(this,c))}},l.prototype._unregisterDoc=function(c){var u=o.dig(this._forwarders,c.collection,c.id);for(var f in u)c.off(f,u[f]);var h=o.dig(this._emitters,c.collection,c.id);h.removeAllListeners(),o.digAndRemove(this._forwarders,c.collection,c.id),o.digAndRemove(this._emitters,c.collection,c.id),o.digAndRemove(this._docs,c.collection,c.id)}},{"../../util":50,events:5}],31:[function(r,n,i){var o=r("./presence"),s=r("./local-doc-presence"),a=r("./remote-doc-presence");function l(c,u,f){var h=l.channel(u,f);o.call(this,c,h),this.collection=u,this.id=f}n.exports=l,l.prototype=Object.create(o.prototype),l.channel=function(c,u){return c+"."+u},l.prototype._createLocalPresence=function(c){return new s(this,c)},l.prototype._createRemotePresence=function(c){return new a(this,c)}},{"./local-doc-presence":32,"./presence":34,"./remote-doc-presence":35}],32:[function(r,n,i){var o=r("./local-presence"),s=r("../../error"),a=r("../../util"),l=s.CODES;n.exports=c;function c(u,f){o.call(this,u,f),this.collection=this.presence.collection,this.id=this.presence.id,this._doc=this.connection.get(this.collection,this.id),this._emitter=this.connection._docPresenceEmitter,this._isSending=!1,this._docDataVersionByPresenceVersion=Object.create(null),this._opHandler=this._transformAgainstOp.bind(this),this._createOrDelHandler=this._handleCreateOrDel.bind(this),this._loadHandler=this._handleLoad.bind(this),this._destroyHandler=this.destroy.bind(this),this._registerWithDoc()}c.prototype=Object.create(o.prototype),c.prototype.submit=function(u,f){if(!this._doc.type){if(u===null)return this._callbackOrEmit(null,f);var h={code:l.ERR_DOC_DOES_NOT_EXIST,message:"Cannot submit presence. Document has not been created"};return this._callbackOrEmit(h,f)}this._docDataVersionByPresenceVersion[this.presenceVersion]=this._doc._dataStateVersion,o.prototype.submit.call(this,u,f)},c.prototype.destroy=function(u){this._emitter.removeEventListener(this._doc,"op",this._opHandler),this._emitter.removeEventListener(this._doc,"create",this._createOrDelHandler),this._emitter.removeEventListener(this._doc,"del",this._createOrDelHandler),this._emitter.removeEventListener(this._doc,"load",this._loadHandler),this._emitter.removeEventListener(this._doc,"destroy",this._destroyHandler),o.prototype.destroy.call(this,u)},c.prototype._sendPending=function(){if(!this._isSending){this._isSending=!0;var u=this;this._doc.whenNothingPending(function(){u._isSending=!1,u.connection.canSend&&(u._pendingMessages.forEach(function(f){f.t=u._doc.type.uri,f.v=u._doc.version,u.connection.send(f)}),u._pendingMessages=[],u._docDataVersionByPresenceVersion=Object.create(null))})}},c.prototype._registerWithDoc=function(){this._emitter.addEventListener(this._doc,"op",this._opHandler),this._emitter.addEventListener(this._doc,"create",this._createOrDelHandler),this._emitter.addEventListener(this._doc,"del",this._createOrDelHandler),this._emitter.addEventListener(this._doc,"load",this._loadHandler),this._emitter.addEventListener(this._doc,"destroy",this._destroyHandler)},c.prototype._transformAgainstOp=function(u,f){var h=this,d=this._doc._dataStateVersion;this._pendingMessages.forEach(function(p){var g=h._docDataVersionByPresenceVersion[p.pv];if(!(g>=d))try{p.p=h._transformPresence(p.p,u,f),h._docDataVersionByPresenceVersion[p.pv]=d}catch(y){var m=h._getCallback(p.pv);h._callbackOrEmit(y,m)}});try{this.value=this._transformPresence(this.value,u,f)}catch(p){this.emit("error",p)}},c.prototype._handleCreateOrDel=function(){this._pendingMessages.forEach(function(u){u.p=null}),this.value=null},c.prototype._handleLoad=function(){this.value=null,this._pendingMessages=[],this._docDataVersionByPresenceVersion=Object.create(null)},c.prototype._message=function(){var u=o.prototype._message.call(this);return u.c=this.collection,u.d=this.id,u.v=null,u.t=null,u},c.prototype._transformPresence=function(u,f,h){var d=this._doc.type;if(!a.supportsPresence(d))throw new s(l.ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE,"Type does not support presence: "+d.name);return d.transformPresence(u,f,h)}},{"../../error":42,"../../util":50,"./local-presence":33}],33:[function(r,n,i){var o=r("../../emitter"),s=r("../../message-actions").ACTIONS,a=r("../../util");n.exports=l;function l(c,u){if(o.EventEmitter.call(this),!u||typeof u!="string")throw new Error("LocalPresence presenceId must be a string");this.presence=c,this.presenceId=u,this.connection=c.connection,this.presenceVersion=0,this.value=null,this._pendingMessages=[],this._callbacksByPresenceVersion=Object.create(null)}o.mixin(l),l.prototype.submit=function(c,u){this.value=c,this.send(u)},l.prototype.send=function(c){var u=this._message();this._pendingMessages.push(u),this._callbacksByPresenceVersion[u.pv]=c,this._sendPending()},l.prototype.destroy=function(c){var u=this;this.submit(null,function(f){if(f)return u._callbackOrEmit(f,c);delete u.presence.localPresences[u.presenceId],c&&c()})},l.prototype._sendPending=function(){if(this.connection.canSend){var c=this;this._pendingMessages.forEach(function(u){c.connection.send(u)}),this._pendingMessages=[]}},l.prototype._ack=function(c,u){var f=this._getCallback(u);this._callbackOrEmit(c,f)},l.prototype._message=function(){return{a:s.presence,ch:this.presence.channel,id:this.presenceId,p:this.value,pv:this.presenceVersion++}},l.prototype._getCallback=function(c){var u=this._callbacksByPresenceVersion[c];return delete this._callbacksByPresenceVersion[c],u},l.prototype._callbackOrEmit=function(c,u){if(u)return a.nextTick(u,c);c&&this.emit("error",c)}},{"../../emitter":41,"../../message-actions":45,"../../util":50}],34:[function(r,n,i){var o=r("../../emitter"),s=r("./local-presence"),a=r("./remote-presence"),l=r("../../util"),c=r("async"),u=r("hat"),f=r("../../message-actions").ACTIONS;n.exports=h;function h(d,p){if(o.EventEmitter.call(this),!p||typeof p!="string")throw new Error("Presence channel must be provided");this.connection=d,this.channel=p,this.wantSubscribe=!1,this.subscribed=!1,this.remotePresences=Object.create(null),this.localPresences=Object.create(null),this._remotePresenceInstances=Object.create(null),this._subscriptionCallbacksBySeq=Object.create(null),this._wantsDestroy=!1}o.mixin(h),h.prototype.subscribe=function(d){this._sendSubscriptionAction(!0,d)},h.prototype.unsubscribe=function(d){this._sendSubscriptionAction(!1,d)},h.prototype.create=function(d){if(this._wantsDestroy)throw new Error("Presence is being destroyed");d=d||u();var p=this._createLocalPresence(d);return this.localPresences[d]=p,p},h.prototype.destroy=function(d){this._wantsDestroy=!0;var p=this,g=Object.keys(p.localPresences);this.unsubscribe(function(m){if(m)return p._callbackOrEmit(m,d);var y=Object.keys(p._remotePresenceInstances);c.parallel([function(O){c.each(g,function(v,b){var w=p.localPresences[v];if(!w)return b();w.destroy(b)},O)},function(O){if(!p._wantsDestroy)return O();c.each(y,function(v,b){p._remotePresenceInstances[v].destroy(b)},O)}],function(O){p._wantsDestroy&&delete p.connection._presences[p.channel],p._callbackOrEmit(O,d)})})},h.prototype._sendSubscriptionAction=function(d,p){if(d=!!d,d===this.wantSubscribe){if(!p)return;if(d===this.subscribed)return l.nextTick(p);if(Object.keys(this._subscriptionCallbacksBySeq).length)return this._combineSubscribeCallbackWithLastAdded(p)}this.wantSubscribe=d;var g=this.wantSubscribe?f.presenceSubscribe:f.presenceUnsubscribe,m=this.connection._presenceSeq++;this._subscriptionCallbacksBySeq[m]=p,this.connection.canSend&&this.connection._sendPresenceAction(g,m,this)},h.prototype._requestRemotePresence=function(){this.connection._requestRemotePresence(this.channel)},h.prototype._handleSubscribe=function(d,p){this.wantSubscribe&&(this.subscribed=!0);var g=this._subscriptionCallback(p);this._callbackOrEmit(d,g)},h.prototype._handleUnsubscribe=function(d,p){this.subscribed=!1;var g=this._subscriptionCallback(p);this._callbackOrEmit(d,g)},h.prototype._receiveUpdate=function(d,p){var g=l.dig(this.localPresences,p.id);if(g)return g._ack(d,p.pv);if(d)return this.emit("error",d);var m=this,y=l.digOrCreate(this._remotePresenceInstances,p.id,function(){return m._createRemotePresence(p.id)});y.receiveUpdate(p)},h.prototype._updateRemotePresence=function(d){this.remotePresences[d.presenceId]=d.value,d.value===null&&this._removeRemotePresence(d.presenceId),this.emit("receive",d.presenceId,d.value)},h.prototype._broadcastAllLocalPresence=function(d){if(d)return this.emit("error",d);for(var p in this.localPresences){var g=this.localPresences[p];g.value!==null&&g.send()}},h.prototype._removeRemotePresence=function(d){this._remotePresenceInstances[d].destroy(),delete this._remotePresenceInstances[d],delete this.remotePresences[d]},h.prototype._onConnectionStateChanged=function(){if(!this.connection.canSend){this.subscribed=!1;return}this._resubscribe();for(var d in this.localPresences)this.localPresences[d]._sendPending()},h.prototype._resubscribe=function(){var d=[];for(var p in this._subscriptionCallbacksBySeq){var g=this._subscriptionCallback(p);d.push(g)}if(!this.wantSubscribe)return this._callEachOrEmit(d);var m=this;this.subscribe(function(y){m._callEachOrEmit(d,y)})},h.prototype._subscriptionCallback=function(d){var p=this._subscriptionCallbacksBySeq[d];return delete this._subscriptionCallbacksBySeq[d],p},h.prototype._callbackOrEmit=function(d,p){if(p)return l.nextTick(p,d);d&&this.emit("error",d)},h.prototype._createLocalPresence=function(d){return new s(this,d)},h.prototype._createRemotePresence=function(d){return new a(this,d)},h.prototype._callEachOrEmit=function(d,p){var g=l.callEach(d,p);!g&&p&&this.emit("error",p)},h.prototype._combineSubscribeCallbackWithLastAdded=function(d){var p=Object.keys(this._subscriptionCallbacksBySeq),g=p[p.length-1],m=this._subscriptionCallbacksBySeq[g];if(!m)return this._subscriptionCallbacksBySeq[g]=d;this._subscriptionCallbacksBySeq[g]=function(y){m(y),d(y)}}},{"../../emitter":41,"../../message-actions":45,"../../util":50,"./local-presence":33,"./remote-presence":36,async:1,hat:16}],35:[function(r,n,i){var o=r("./remote-presence"),s=r("../../ot");n.exports=a;function a(l,c){o.call(this,l,c),this.collection=this.presence.collection,this.id=this.presence.id,this.src=null,this.presenceVersion=null,this._doc=this.connection.get(this.collection,this.id),this._emitter=this.connection._docPresenceEmitter,this._pending=null,this._opCache=null,this._pendingSetPending=!1,this._opHandler=this._handleOp.bind(this),this._createDelHandler=this._handleCreateDel.bind(this),this._loadHandler=this._handleLoad.bind(this),this._registerWithDoc()}a.prototype=Object.create(o.prototype),a.prototype.receiveUpdate=function(l){this._pending&&l.pv<this._pending.pv||(this.src=l.src,this._pending=l,this._setPendingPresence())},a.prototype.destroy=function(l){this._emitter.removeEventListener(this._doc,"op",this._opHandler),this._emitter.removeEventListener(this._doc,"create",this._createDelHandler),this._emitter.removeEventListener(this._doc,"del",this._createDelHandler),this._emitter.removeEventListener(this._doc,"load",this._loadHandler),o.prototype.destroy.call(this,l)},a.prototype._registerWithDoc=function(){this._emitter.addEventListener(this._doc,"op",this._opHandler),this._emitter.addEventListener(this._doc,"create",this._createDelHandler),this._emitter.addEventListener(this._doc,"del",this._createDelHandler),this._emitter.addEventListener(this._doc,"load",this._loadHandler)},a.prototype._setPendingPresence=function(){if(!this._pendingSetPending){this._pendingSetPending=!0;var l=this;this._doc.whenNothingPending(function(){if(l._pendingSetPending=!1,!!l._pending){if(l._pending.pv<l.presenceVersion)return l._pending=null;if(l._pending.v>l._doc.version)return l._doc.fetch();l._catchUpStalePresence()&&(l.value=l._pending.p,l.presenceVersion=l._pending.pv,l._pending=null,l.presence._updateRemotePresence(l))}})}},a.prototype._handleOp=function(l,c,u){var f=u===this.src;this._transformAgainstOp(l,f),this._cacheOp(l,f),this._setPendingPresence()},o.prototype._handleCreateDel=function(){this._cacheOp(null),this._setPendingPresence()},o.prototype._handleLoad=function(){this.value=null,this._pending=null,this._opCache=null,this.presence._updateRemotePresence(this)},a.prototype._transformAgainstOp=function(l,c){if(this.value){try{this.value=this._doc.type.transformPresence(this.value,l,c)}catch(u){return this.presence.emit("error",u)}this.presence._updateRemotePresence(this)}},a.prototype._catchUpStalePresence=function(){if(this._pending.v>=this._doc.version)return!0;if(!this._opCache)return this._startCachingOps(),this._doc.fetch(),this.presence._requestRemotePresence(),!1;for(;this._opCache[this._pending.v];){var l=this._opCache[this._pending.v],c=l.op,u=l.isOwnOp;c===null?(this._pending.p=null,this._pending.v++):s.transformPresence(this._pending,c,u)}var f=this._pending.v>=this._doc.version;return f&&this._stopCachingOps(),f},a.prototype._startCachingOps=function(){this._opCache=[]},a.prototype._stopCachingOps=function(){this._opCache=null},a.prototype._cacheOp=function(l,c){this._opCache&&(l=l?{op:l}:null,this._opCache[this._doc.version-1]={op:l,isOwnOp:c})}},{"../../ot":47,"./remote-presence":36}],36:[function(r,n,i){var o=r("../../util");n.exports=s;function s(a,l){this.presence=a,this.presenceId=l,this.connection=this.presence.connection,this.value=null,this.presenceVersion=0}s.prototype.receiveUpdate=function(a){a.pv<this.presenceVersion||(this.value=a.p,this.presenceVersion=a.pv,this.presence._updateRemotePresence(this))},s.prototype.destroy=function(a){delete this.presence._remotePresenceInstances[this.presenceId],delete this.presence.remotePresences[this.presenceId],a&&o.nextTick(a)}},{"../../util":50}],37:[function(r,n,i){var o=r("../emitter"),s=r("../message-actions").ACTIONS,a=r("../util");n.exports=l;function l(c,u,f,h,d,p,g){o.EventEmitter.call(this),this.action=c,this.connection=u,this.id=f,this.collection=h,this.query=d,this.results=null,p&&p.results&&(this.results=p.results,delete p.results),this.extra=void 0,this.options=p,this.callback=g,this.ready=!1,this.sent=!1}o.mixin(l),l.prototype.hasPending=function(){return!this.ready},l.prototype.send=function(){if(this.connection.canSend){var c={a:this.action,id:this.id,c:this.collection,q:this.query};if(this.options&&(c.o=this.options),this.results){for(var u=[],f=0;f<this.results.length;f++){var h=this.results[f];u.push([h.id,h.version])}c.r=u}this.connection.send(c),this.sent=!0}},l.prototype.destroy=function(c){this.connection.canSend&&this.action===s.querySubscribe&&this.connection.send({a:s.queryUnsubscribe,id:this.id}),this.connection._destroyQuery(this),c&&a.nextTick(c)},l.prototype._onConnectionStateChanged=function(){this.connection.canSend&&!this.sent?this.send():this.sent=!1},l.prototype._handleFetch=function(c,u,f){this.connection._destroyQuery(this),this._handleResponse(c,u,f)},l.prototype._handleSubscribe=function(c,u,f){this._handleResponse(c,u,f)},l.prototype._handleResponse=function(c,u,f){var h=this.callback;if(this.callback=null,c)return this._finishResponse(c,h);if(!u)return this._finishResponse(null,h);var d=this,p=1,g=function(v){if(v)return d._finishResponse(v,h);--p||d._finishResponse(null,h)};if(Array.isArray(u))p+=u.length,this.results=this._ingestSnapshots(u,g),this.extra=f;else for(var m in u){p++;var y=u[m],O=this.connection.get(y.c||this.collection,m);O.ingestSnapshot(y,g)}g()},l.prototype._ingestSnapshots=function(c,u){for(var f=[],h=0;h<c.length;h++){var d=c[h],p=this.connection.get(d.c||this.collection,d.d);p.ingestSnapshot(d,u),f.push(p)}return f},l.prototype._finishResponse=function(c,u){if(this.emit("ready"),this.ready=!0,c)return this.connection._destroyQuery(this),u?u(c):this.emit("error",c);u&&u(null,this.results,this.extra)},l.prototype._handleError=function(c){this.emit("error",c)},l.prototype._handleDiff=function(c){for(var u=0;u<c.length;u++){var f=c[u];f.type==="insert"&&(f.values=this._ingestSnapshots(f.values))}for(var u=0;u<c.length;u++){var f=c[u];switch(f.type){case"insert":var h=f.values;Array.prototype.splice.apply(this.results,[f.index,0].concat(h)),this.emit("insert",h,f.index);break;case"remove":var p=f.howMany||1,d=this.results.splice(f.index,p);this.emit("remove",d,f.index);break;case"move":var p=f.howMany||1,g=this.results.splice(f.from,p);Array.prototype.splice.apply(this.results,[f.to,0].concat(g)),this.emit("move",g,f.from,f.to);break}}this.emit("changed",this.results)},l.prototype._handleExtra=function(c){this.extra=c,this.emit("extra",c)}},{"../emitter":41,"../message-actions":45,"../util":50}],38:[function(r,n,i){var o=r("../../snapshot"),s=r("../../emitter");n.exports=a;function a(l,c,u,f,h){if(s.EventEmitter.call(this),typeof h!="function")throw new Error("Callback is required for SnapshotRequest");this.requestId=c,this.connection=l,this.id=f,this.collection=u,this.callback=h,this.sent=!1}s.mixin(a),a.prototype.send=function(){this.connection.canSend&&(this.connection.send(this._message()),this.sent=!0)},a.prototype._onConnectionStateChanged=function(){this.connection.canSend?this.sent||this.send():this.sent=!1},a.prototype._handleResponse=function(l,c){if(this.emit("ready"),l)return this.callback(l);var u=c.meta?c.meta:null,f=new o(this.id,c.v,c.type,c.data,u);this.callback(null,f)}},{"../../emitter":41,"../../snapshot":48}],39:[function(r,n,i){var o=r("./snapshot-request"),s=r("../../util"),a=r("../../message-actions").ACTIONS;n.exports=l;function l(c,u,f,h,d,p){if(o.call(this,c,u,f,h,p),!s.isValidTimestamp(d))throw new Error("Snapshot timestamp must be a positive integer or null");this.timestamp=d}l.prototype=Object.create(o.prototype),l.prototype._message=function(){return{a:a.snapshotFetchByTimestamp,id:this.requestId,c:this.collection,d:this.id,ts:this.timestamp}}},{"../../message-actions":45,"../../util":50,"./snapshot-request":38}],40:[function(r,n,i){var o=r("./snapshot-request"),s=r("../../util"),a=r("../../message-actions").ACTIONS;n.exports=l;function l(c,u,f,h,d,p){if(o.call(this,c,u,f,h,p),!s.isValidVersion(d))throw new Error("Snapshot version must be a positive integer or null");this.version=d}l.prototype=Object.create(o.prototype),l.prototype._message=function(){return{a:a.snapshotFetch,id:this.requestId,c:this.collection,d:this.id,v:this.version}}},{"../../message-actions":45,"../../util":50,"./snapshot-request":38}],41:[function(r,n,i){var o=r("events").EventEmitter;i.EventEmitter=o,i.mixin=s;function s(a){for(var l in o.prototype)a.prototype[l]=o.prototype[l]}},{events:5}],42:[function(r,n,i){function o(s,a){this.code=s,this.message=a||"",Error.captureStackTrace?Error.captureStackTrace(this,o):this.stack=new Error().stack}o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o.prototype.name="ShareDBError",o.CODES={ERR_APPLY_OP_VERSION_DOES_NOT_MATCH_SNAPSHOT:"ERR_APPLY_OP_VERSION_DOES_NOT_MATCH_SNAPSHOT",ERR_APPLY_SNAPSHOT_NOT_PROVIDED:"ERR_APPLY_SNAPSHOT_NOT_PROVIDED",ERR_FIXUP_IS_ONLY_VALID_ON_APPLY:"ERR_FIXUP_IS_ONLY_VALID_ON_APPLY",ERR_CANNOT_FIXUP_DELETION:"ERR_CANNOT_FIXUP_DELETION",ERR_CLIENT_ID_BADLY_FORMED:"ERR_CLIENT_ID_BADLY_FORMED",ERR_CANNOT_PING_OFFLINE:"ERR_CANNOT_PING_OFFLINE",ERR_CONNECTION_SEQ_INTEGER_OVERFLOW:"ERR_CONNECTION_SEQ_INTEGER_OVERFLOW",ERR_CONNECTION_STATE_TRANSITION_INVALID:"ERR_CONNECTION_STATE_TRANSITION_INVALID",ERR_DATABASE_ADAPTER_NOT_FOUND:"ERR_DATABASE_ADAPTER_NOT_FOUND",ERR_DATABASE_DOES_NOT_SUPPORT_SUBSCRIBE:"ERR_DATABASE_DOES_NOT_SUPPORT_SUBSCRIBE",ERR_DATABASE_METHOD_NOT_IMPLEMENTED:"ERR_DATABASE_METHOD_NOT_IMPLEMENTED",ERR_DEFAULT_TYPE_MISMATCH:"ERR_DEFAULT_TYPE_MISMATCH",ERR_DOC_MISSING_VERSION:"ERR_DOC_MISSING_VERSION",ERR_DOC_ALREADY_CREATED:"ERR_DOC_ALREADY_CREATED",ERR_DOC_DOES_NOT_EXIST:"ERR_DOC_DOES_NOT_EXIST",ERR_DOC_TYPE_NOT_RECOGNIZED:"ERR_DOC_TYPE_NOT_RECOGNIZED",ERR_DOC_WAS_DELETED:"ERR_DOC_WAS_DELETED",ERR_INFLIGHT_OP_MISSING:"ERR_INFLIGHT_OP_MISSING",ERR_INGESTED_SNAPSHOT_HAS_NO_VERSION:"ERR_INGESTED_SNAPSHOT_HAS_NO_VERSION",ERR_MAX_SUBMIT_RETRIES_EXCEEDED:"ERR_MAX_SUBMIT_RETRIES_EXCEEDED",ERR_MESSAGE_BADLY_FORMED:"ERR_MESSAGE_BADLY_FORMED",ERR_MILESTONE_ARGUMENT_INVALID:"ERR_MILESTONE_ARGUMENT_INVALID",ERR_OP_ALREADY_SUBMITTED:"ERR_OP_ALREADY_SUBMITTED",ERR_OP_NOT_ALLOWED_IN_PROJECTION:"ERR_OP_NOT_ALLOWED_IN_PROJECTION",ERR_OP_SUBMIT_REJECTED:"ERR_OP_SUBMIT_REJECTED",ERR_PENDING_OP_REMOVED_BY_OP_SUBMIT_REJECTED:"ERR_PENDING_OP_REMOVED_BY_OP_SUBMIT_REJECTED",ERR_HARD_ROLLBACK_FETCH_FAILED:"ERR_HARD_ROLLBACK_FETCH_FAILED",ERR_OP_VERSION_MISMATCH_AFTER_TRANSFORM:"ERR_OP_VERSION_MISMATCH_AFTER_TRANSFORM",ERR_OP_VERSION_MISMATCH_DURING_TRANSFORM:"ERR_OP_VERSION_MISMATCH_DURING_TRANSFORM",ERR_OP_VERSION_NEWER_THAN_CURRENT_SNAPSHOT:"ERR_OP_VERSION_NEWER_THAN_CURRENT_SNAPSHOT",ERR_OT_LEGACY_JSON0_OP_CANNOT_BE_NORMALIZED:"ERR_OT_LEGACY_JSON0_OP_CANNOT_BE_NORMALIZED",ERR_OT_OP_BADLY_FORMED:"ERR_OT_OP_BADLY_FORMED",ERR_OT_OP_NOT_APPLIED:"ERR_OT_OP_NOT_APPLIED",ERR_OT_OP_NOT_PROVIDED:"ERR_OT_OP_NOT_PROVIDED",ERR_PRESENCE_TRANSFORM_FAILED:"ERR_PRESENCE_TRANSFORM_FAILED",ERR_PROTOCOL_VERSION_NOT_SUPPORTED:"ERR_PROTOCOL_VERSION_NOT_SUPPORTED",ERR_QUERY_CHANNEL_MISSING:"ERR_QUERY_CHANNEL_MISSING",ERR_QUERY_EMITTER_LISTENER_NOT_ASSIGNED:"ERR_QUERY_EMITTER_LISTENER_NOT_ASSIGNED",ERR_SNAPSHOT_READ_SILENT_REJECTION:"ERR_SNAPSHOT_READ_SILENT_REJECTION",ERR_SNAPSHOT_READS_REJECTED:"ERR_SNAPSHOT_READS_REJECTED",ERR_SUBMIT_TRANSFORM_OPS_NOT_FOUND:"ERR_SUBMIT_TRANSFORM_OPS_NOT_FOUND",ERR_TYPE_CANNOT_BE_PROJECTED:"ERR_TYPE_CANNOT_BE_PROJECTED",ERR_TYPE_DOES_NOT_SUPPORT_COMPOSE:"ERR_TYPE_DOES_NOT_SUPPORT_COMPOSE",ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE:"ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE",ERR_UNKNOWN_ERROR:"ERR_UNKNOWN_ERROR"},n.exports=o},{}],43:[function(r,n,i){var o=r("./logger"),s=new o;n.exports=s},{"./logger":44}],44:[function(r,n,i){var o=["info","warn","error"];function s(){var a=Object.create(null);o.forEach(function(l){a[l]=console[l].bind(console)}),this.setMethods(a)}n.exports=s,s.prototype.setMethods=function(a){a=a||{};var l=this;o.forEach(function(c){typeof a[c]=="function"&&(l[c]=a[c])})}},{}],45:[function(r,n,i){i.ACTIONS={initLegacy:"init",handshake:"hs",queryFetch:"qf",querySubscribe:"qs",queryUnsubscribe:"qu",queryUpdate:"q",bulkFetch:"bf",bulkSubscribe:"bs",bulkUnsubscribe:"bu",fetch:"f",fixup:"fixup",subscribe:"s",unsubscribe:"u",op:"op",snapshotFetch:"nf",snapshotFetchByTimestamp:"nt",pingPong:"pp",presence:"p",presenceSubscribe:"ps",presenceUnsubscribe:"pu",presenceRequest:"pr"}},{}],46:[function(r,n,i){i.messageChannel=function(){var s=o(arguments),a=new MessageChannel;a.port1.onmessage=function(){s(),a.port1.close()},a.port2.postMessage("")},i.setTimeout=function(){var s=o(arguments);setTimeout(s)};function o(s){for(var a=s[0],l=[],c=1;c<s.length;c++)l[c-1]=s[c];return function(){a.apply(null,l)}}},{}],47:[function(r,n,i){var o=r("./types"),s=r("./error"),a=r("./util"),l=s.CODES;i.checkOp=function(f){if(f==null||typeof f!="object")return new s(l.ERR_OT_OP_BADLY_FORMED,"Op must be an object");if(f.create!=null){if(typeof f.create!="object")return new s(l.ERR_OT_OP_BADLY_FORMED,"Create data must be an object");var h=f.create.type;if(typeof h!="string")return new s(l.ERR_OT_OP_BADLY_FORMED,"Missing create type");var d=o.map[h];if(d==null||typeof d!="object")return new s(l.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type")}else if(f.del!=null){if(f.del!==!0)return new s(l.ERR_OT_OP_BADLY_FORMED,"del value must be true")}else if(!("op"in f))return new s(l.ERR_OT_OP_BADLY_FORMED,"Missing op, create, or del");if(f.src!=null&&typeof f.src!="string")return new s(l.ERR_OT_OP_BADLY_FORMED,"src must be a string");if(f.seq!=null&&typeof f.seq!="number")return new s(l.ERR_OT_OP_BADLY_FORMED,"seq must be a number");if(f.src==null&&f.seq!=null||f.src!=null&&f.seq==null)return new s(l.ERR_OT_OP_BADLY_FORMED,"Both src and seq must be set together");if(f.m!=null&&typeof f.m!="object")return new s(l.ERR_OT_OP_BADLY_FORMED,"op.m must be an object or null")},i.normalizeType=function(f){return o.map[f]&&o.map[f].uri},i.apply=function(f,h){if(typeof f!="object")return new s(l.ERR_APPLY_SNAPSHOT_NOT_PROVIDED,"Missing snapshot");if(f.v!=null&&h.v!=null&&f.v!==h.v)return new s(l.ERR_APPLY_OP_VERSION_DOES_NOT_MATCH_SNAPSHOT,"Version mismatch");if(h.create){if(f.type)return new s(l.ERR_DOC_ALREADY_CREATED,"Document already exists");var d=h.create,p=o.map[d.type];if(!p)return new s(l.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");try{f.data=p.create(d.data),f.type=p.uri,f.v++}catch(m){return m}}else if(h.del)f.data=void 0,f.type=null,f.v++;else if("op"in h){var g=c(f,h.op);if(g)return g;f.v++}else f.v++};function c(f,h){if(!f.type)return new s(l.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");if(h===void 0)return new s(l.ERR_OT_OP_NOT_PROVIDED,"Missing op");var d=o.map[f.type];if(!d)return new s(l.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");if(d.name==="json0"&&Array.isArray(h))for(var p=0;p<h.length;p++){var g=h[p];if(Array.isArray(g.p))for(var m=0;m<g.p.length;m++){var y=g.p[m];if(a.isDangerousProperty(y))return new s(l.ERR_OT_OP_NOT_APPLIED,"Invalid path segment")}}try{f.data=d.apply(f.data,h)}catch(O){return new s(l.ERR_OT_OP_NOT_APPLIED,O.message)}}i.transform=function(f,h,d){if(h.v!=null&&h.v!==d.v)return new s(l.ERR_OP_VERSION_MISMATCH_DURING_TRANSFORM,"Version mismatch");if(d.del){if(h.create||"op"in h)return new s(l.ERR_DOC_WAS_DELETED,"Document was deleted")}else{if(d.create&&("op"in h||h.create||h.del)||"op"in d&&h.create)return new s(l.ERR_DOC_ALREADY_CREATED,"Document was created remotely");if("op"in d&&"op"in h){if(!f)return new s(l.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");if(typeof f=="string"&&(f=o.map[f],!f))return new s(l.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");try{h.op=f.transform(h.op,d.op,"left")}catch(p){return p}}}h.v!=null&&h.v++},i.applyOps=function(f,h,d){d=d||{};for(var p=0;p<h.length;p++){var g=h[p];if(d._normalizeLegacyJson0Ops)try{u(f,g)}catch{return new s(l.ERR_OT_LEGACY_JSON0_OP_CANNOT_BE_NORMALIZED,"Cannot normalize legacy json0 op")}f.v=g.v;var m=i.apply(f,g);if(m)return m}},i.transformPresence=function(f,h,d){var p=this.checkOp(h);if(p)return p;var g=f.t;if(typeof g=="string"&&(g=o.map[g]),!g)return{code:l.ERR_DOC_TYPE_NOT_RECOGNIZED,message:"Unknown type"};if(!a.supportsPresence(g))return{code:l.ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE,message:"Type does not support presence"};if(h.create||h.del){f.p=null,f.v++;return}try{f.p=f.p===null?null:g.transformPresence(f.p,h.op,d)}catch(m){return{code:l.ERR_PRESENCE_TRANSFORM_FAILED,message:m.message||m}}f.v++};function u(f,h){if(f.type===o.defaultType.uri){var d=h.op;if(d){var p=f.data;d.length>1&&(p=a.clone(p));for(var g=0;g<d.length;g++){var m=d[g];typeof m.lm=="string"&&(m.lm=+m.lm);for(var y=m.p,O=p,v=0;v<y.length;v++){var b=y[v];Object.prototype.toString.call(O)=="[object Array]"?y[v]=+b:O.constructor===Object&&(y[v]=b.toString()),O=O[b]}g<d.length-1&&(p=o.defaultType.apply(p,[m]))}}}}},{"./error":42,"./types":49,"./util":50}],48:[function(r,n,i){n.exports=o;function o(s,a,l,c,u){this.id=s,this.v=a,this.type=l,this.data=c,this.m=u}},{}],49:[function(r,n,i){i.defaultType=r("ot-json0").type,i.map=Object.create(null),i.register=function(o){o.name&&(i.map[o.name]=o),o.uri&&(i.map[o.uri]=o)},i.register(i.defaultType)},{"ot-json0":23}],50:[function(r,n,i){(function(o){(function(){var s=r("./next-tick");i.doNothing=a;function a(){}i.hasKeys=function(f){for(var h in f)return!0;return!1};var l;i.hasOwn=l=Object.hasOwn||Object.prototype.hasOwnProperty.call,i.isInteger=Number.isInteger||function(f){return typeof f=="number"&&isFinite(f)&&Math.floor(f)===f},i.isValidVersion=function(f){return f===null?!0:i.isInteger(f)&&f>=0},i.isValidTimestamp=function(f){return i.isValidVersion(f)},i.MAX_SAFE_INTEGER=9007199254740991,i.dig=function(){for(var f=arguments[0],h=1;h<arguments.length;h++){var d=arguments[h];f=l(f,d)?f[d]:h===arguments.length-1?void 0:Object.create(null)}return f},i.digOrCreate=function(){for(var f=arguments[0],h=arguments[arguments.length-1],d=1;d<arguments.length-1;d++){var p=arguments[d];f=l(f,p)?f[p]:f[p]=d===arguments.length-2?h():Object.create(null)}return f},i.digAndRemove=function(){for(var f=arguments[0],h=[f],d=1;d<arguments.length-1;d++){var p=arguments[d];if(!l(f,p))break;f=f[p],h.push(f)}for(var d=h.length-1;d>=0;d--){var g=h[d],p=arguments[d+1],m=g[p];(d===h.length-1||!i.hasKeys(m))&&delete g[p]}},i.supportsPresence=function(f){return f&&typeof f.transformPresence=="function"},i.callEach=function(f,h){var d=!1;return f.forEach(function(p){p&&(p(h),d=!0)}),d},i.truthy=function(f){return!!f},typeof o<"u"&&typeof o.nextTick=="function"?i.nextTick=o.nextTick:typeof MessageChannel<"u"?i.nextTick=s.messageChannel:i.nextTick=s.setTimeout,i.clone=function(f){return f===void 0?void 0:JSON.parse(JSON.stringify(f))};var c=Object.create(null);Object.getOwnPropertyNames(Object.prototype).forEach(function(f){f!=="__proto__"&&(c[f]=!0)}),i.isDangerousProperty=function(f){return f==="__proto__"||c[f]};try{var u=r("util");if(typeof u.inherits!="function")throw new Error("Could not find util.inherits()");i.inherits=u.inherits}catch{try{i.inherits=r("inherits")}catch{throw new Error('If running sharedb in a browser, please install the "inherits" or "util" package')}}}).call(this)}).call(this,r("_process"))},{"./next-tick":46,_process:26,inherits:17,util:54}],51:[function(r,n,i){(function(o,s){(function(){var a=r("process/browser.js").nextTick,l=Function.prototype.apply,c=Array.prototype.slice,u={},f=0;i.setTimeout=function(){return new h(l.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new h(l.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(d){d.close()};function h(d,p){this._id=d,this._clearFn=p}h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(d,p){clearTimeout(d._idleTimeoutId),d._idleTimeout=p},i.unenroll=function(d){clearTimeout(d._idleTimeoutId),d._idleTimeout=-1},i._unrefActive=i.active=function(d){clearTimeout(d._idleTimeoutId);var p=d._idleTimeout;p>=0&&(d._idleTimeoutId=setTimeout(function(){d._onTimeout&&d._onTimeout()},p))},i.setImmediate=typeof o=="function"?o:function(d){var p=f++,g=arguments.length<2?!1:c.call(arguments,1);return u[p]=!0,a(function(){u[p]&&(g?d.apply(null,g):d.call(null),i.clearImmediate(p))}),p},i.clearImmediate=typeof s=="function"?s:function(d){delete u[d]}}).call(this)}).call(this,r("timers").setImmediate,r("timers").clearImmediate)},{"process/browser.js":26,timers:51}],52:[function(r,n,i){n.exports=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}},{}],53:[function(r,n,i){var o=r("is-arguments"),s=r("is-generator-function"),a=r("which-typed-array"),l=r("is-typed-array");function c($){return $.call.bind($)}var u=typeof BigInt<"u",f=typeof Symbol<"u",h=c(Object.prototype.toString),d=c(Number.prototype.valueOf),p=c(String.prototype.valueOf),g=c(Boolean.prototype.valueOf);if(u)var m=c(BigInt.prototype.valueOf);if(f)var y=c(Symbol.prototype.valueOf);function O($,te){if(typeof $!="object")return!1;try{return te($),!0}catch{return!1}}i.isArgumentsObject=o,i.isGeneratorFunction=s,i.isTypedArray=l;function v($){return typeof Promise<"u"&&$ instanceof Promise||$!==null&&typeof $=="object"&&typeof $.then=="function"&&typeof $.catch=="function"}i.isPromise=v;function b($){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView($):l($)||T($)}i.isArrayBufferView=b;function w($){return a($)==="Uint8Array"}i.isUint8Array=w;function _($){return a($)==="Uint8ClampedArray"}i.isUint8ClampedArray=_;function C($){return a($)==="Uint16Array"}i.isUint16Array=C;function P($){return a($)==="Uint32Array"}i.isUint32Array=P;function k($){return a($)==="Int8Array"}i.isInt8Array=k;function x($){return a($)==="Int16Array"}i.isInt16Array=x;function E($){return a($)==="Int32Array"}i.isInt32Array=E;function R($){return a($)==="Float32Array"}i.isFloat32Array=R;function I($){return a($)==="Float64Array"}i.isFloat64Array=I;function F($){return a($)==="BigInt64Array"}i.isBigInt64Array=F;function H($){return a($)==="BigUint64Array"}i.isBigUint64Array=H;function M($){return h($)==="[object Map]"}M.working=typeof Map<"u"&&M(new Map);function B($){return typeof Map>"u"?!1:M.working?M($):$ instanceof Map}i.isMap=B;function D($){return h($)==="[object Set]"}D.working=typeof Set<"u"&&D(new Set);function X($){return typeof Set>"u"?!1:D.working?D($):$ instanceof Set}i.isSet=X;function G($){return h($)==="[object WeakMap]"}G.working=typeof WeakMap<"u"&&G(new WeakMap);function se($){return typeof WeakMap>"u"?!1:G.working?G($):$ instanceof WeakMap}i.isWeakMap=se;function ce($){return h($)==="[object WeakSet]"}ce.working=typeof WeakSet<"u"&&ce(new WeakSet);function U($){return ce($)}i.isWeakSet=U;function K($){return h($)==="[object ArrayBuffer]"}K.working=typeof ArrayBuffer<"u"&&K(new ArrayBuffer);function oe($){return typeof ArrayBuffer>"u"?!1:K.working?K($):$ instanceof ArrayBuffer}i.isArrayBuffer=oe;function Re($){return h($)==="[object DataView]"}Re.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Re(new DataView(new ArrayBuffer(1),0,1));function T($){return typeof DataView>"u"?!1:Re.working?Re($):$ instanceof DataView}i.isDataView=T;var Z=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function V($){return h($)==="[object SharedArrayBuffer]"}function ne($){return typeof Z>"u"?!1:(typeof V.working>"u"&&(V.working=V(new Z)),V.working?V($):$ instanceof Z)}i.isSharedArrayBuffer=ne;function fe($){return h($)==="[object AsyncFunction]"}i.isAsyncFunction=fe;function ge($){return h($)==="[object Map Iterator]"}i.isMapIterator=ge;function he($){return h($)==="[object Set Iterator]"}i.isSetIterator=he;function we($){return h($)==="[object Generator]"}i.isGeneratorObject=we;function Ae($){return h($)==="[object WebAssembly.Module]"}i.isWebAssemblyCompiledModule=Ae;function it($){return O($,d)}i.isNumberObject=it;function kt($){return O($,p)}i.isStringObject=kt;function gr($){return O($,g)}i.isBooleanObject=gr;function Ft($){return u&&O($,m)}i.isBigIntObject=Ft;function er($){return f&&O($,y)}i.isSymbolObject=er;function xn($){return it($)||kt($)||gr($)||Ft($)||er($)}i.isBoxedPrimitive=xn;function Pr($){return typeof Uint8Array<"u"&&(oe($)||ne($))}i.isAnyArrayBuffer=Pr,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function($){Object.defineProperty(i,$,{enumerable:!1,value:function(){throw new Error($+" is not supported in userland")}})})},{"is-arguments":18,"is-generator-function":20,"is-typed-array":21,"which-typed-array":55}],54:[function(r,n,i){(function(o){(function(){var s=Object.getOwnPropertyDescriptors||function(Z){for(var V=Object.keys(Z),ne={},fe=0;fe<V.length;fe++)ne[V[fe]]=Object.getOwnPropertyDescriptor(Z,V[fe]);return ne},a=/%[sdj%]/g;i.format=function(T){if(!x(T)){for(var Z=[],V=0;V<arguments.length;V++)Z.push(f(arguments[V]));return Z.join(" ")}for(var V=1,ne=arguments,fe=ne.length,ge=String(T).replace(a,function(we){if(we==="%%")return"%";if(V>=fe)return we;switch(we){case"%s":return String(ne[V++]);case"%d":return Number(ne[V++]);case"%j":try{return JSON.stringify(ne[V++])}catch{return"[Circular]"}default:return we}}),he=ne[V];V<fe;he=ne[++V])C(he)||!F(he)?ge+=" "+he:ge+=" "+f(he);return ge},i.deprecate=function(T,Z){if(typeof o<"u"&&o.noDeprecation===!0)return T;if(typeof o>"u")return function(){return i.deprecate(T,Z).apply(this,arguments)};var V=!1;function ne(){if(!V){if(o.throwDeprecation)throw new Error(Z);o.traceDeprecation?console.trace(Z):console.error(Z),V=!0}return T.apply(this,arguments)}return ne};var l={},c=/^$/;if(o.env.NODE_DEBUG){var u=o.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),c=new RegExp("^"+u+"$","i")}i.debuglog=function(T){if(T=T.toUpperCase(),!l[T])if(c.test(T)){var Z=o.pid;l[T]=function(){var V=i.format.apply(i,arguments);console.error("%s %d: %s",T,Z,V)}}else l[T]=function(){};return l[T]};function f(T,Z){var V={seen:[],stylize:d};return arguments.length>=3&&(V.depth=arguments[2]),arguments.length>=4&&(V.colors=arguments[3]),_(Z)?V.showHidden=Z:Z&&i._extend(V,Z),R(V.showHidden)&&(V.showHidden=!1),R(V.depth)&&(V.depth=2),R(V.colors)&&(V.colors=!1),R(V.customInspect)&&(V.customInspect=!0),V.colors&&(V.stylize=h),g(V,T,V.depth)}i.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(T,Z){var V=f.styles[Z];return V?"\x1B["+f.colors[V][0]+"m"+T+"\x1B["+f.colors[V][1]+"m":T}function d(T,Z){return T}function p(T){var Z={};return T.forEach(function(V,ne){Z[V]=!0}),Z}function g(T,Z,V){if(T.customInspect&&Z&&B(Z.inspect)&&Z.inspect!==i.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var ne=Z.inspect(V,T);return x(ne)||(ne=g(T,ne,V)),ne}var fe=m(T,Z);if(fe)return fe;var ge=Object.keys(Z),he=p(ge);if(T.showHidden&&(ge=Object.getOwnPropertyNames(Z)),M(Z)&&(ge.indexOf("message")>=0||ge.indexOf("description")>=0))return y(Z);if(ge.length===0){if(B(Z)){var we=Z.name?": "+Z.name:"";return T.stylize("[Function"+we+"]","special")}if(I(Z))return T.stylize(RegExp.prototype.toString.call(Z),"regexp");if(H(Z))return T.stylize(Date.prototype.toString.call(Z),"date");if(M(Z))return y(Z)}var Ae="",it=!1,kt=["{","}"];if(w(Z)&&(it=!0,kt=["[","]"]),B(Z)){var gr=Z.name?": "+Z.name:"";Ae=" [Function"+gr+"]"}if(I(Z)&&(Ae=" "+RegExp.prototype.toString.call(Z)),H(Z)&&(Ae=" "+Date.prototype.toUTCString.call(Z)),M(Z)&&(Ae=" "+y(Z)),ge.length===0&&(!it||Z.length==0))return kt[0]+Ae+kt[1];if(V<0)return I(Z)?T.stylize(RegExp.prototype.toString.call(Z),"regexp"):T.stylize("[Object]","special");T.seen.push(Z);var Ft;return it?Ft=O(T,Z,V,he,ge):Ft=ge.map(function(er){return v(T,Z,V,he,er,it)}),T.seen.pop(),b(Ft,Ae,kt)}function m(T,Z){if(R(Z))return T.stylize("undefined","undefined");if(x(Z)){var V="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return T.stylize(V,"string")}if(k(Z))return T.stylize(""+Z,"number");if(_(Z))return T.stylize(""+Z,"boolean");if(C(Z))return T.stylize("null","null")}function y(T){return"["+Error.prototype.toString.call(T)+"]"}function O(T,Z,V,ne,fe){for(var ge=[],he=0,we=Z.length;he<we;++he)U(Z,String(he))?ge.push(v(T,Z,V,ne,String(he),!0)):ge.push("");return fe.forEach(function(Ae){Ae.match(/^\d+$/)||ge.push(v(T,Z,V,ne,Ae,!0))}),ge}function v(T,Z,V,ne,fe,ge){var he,we,Ae;if(Ae=Object.getOwnPropertyDescriptor(Z,fe)||{value:Z[fe]},Ae.get?Ae.set?we=T.stylize("[Getter/Setter]","special"):we=T.stylize("[Getter]","special"):Ae.set&&(we=T.stylize("[Setter]","special")),U(ne,fe)||(he="["+fe+"]"),we||(T.seen.indexOf(Ae.value)<0?(C(V)?we=g(T,Ae.value,null):we=g(T,Ae.value,V-1),we.indexOf(`
|
|
44
|
+
`)>-1&&(ge?we=we.split(`
|
|
45
|
+
`).map(function(it){return" "+it}).join(`
|
|
46
|
+
`).slice(2):we=`
|
|
47
|
+
`+we.split(`
|
|
48
|
+
`).map(function(it){return" "+it}).join(`
|
|
49
|
+
`))):we=T.stylize("[Circular]","special")),R(he)){if(ge&&fe.match(/^\d+$/))return we;he=JSON.stringify(""+fe),he.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(he=he.slice(1,-1),he=T.stylize(he,"name")):(he=he.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),he=T.stylize(he,"string"))}return he+": "+we}function b(T,Z,V){var ne=T.reduce(function(fe,ge){return ge.indexOf(`
|
|
50
|
+
`)>=0,fe+ge.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?V[0]+(Z===""?"":Z+`
|
|
51
|
+
`)+" "+T.join(`,
|
|
52
|
+
`)+" "+V[1]:V[0]+Z+" "+T.join(", ")+" "+V[1]}i.types=r("./support/types");function w(T){return Array.isArray(T)}i.isArray=w;function _(T){return typeof T=="boolean"}i.isBoolean=_;function C(T){return T===null}i.isNull=C;function P(T){return T==null}i.isNullOrUndefined=P;function k(T){return typeof T=="number"}i.isNumber=k;function x(T){return typeof T=="string"}i.isString=x;function E(T){return typeof T=="symbol"}i.isSymbol=E;function R(T){return T===void 0}i.isUndefined=R;function I(T){return F(T)&&X(T)==="[object RegExp]"}i.isRegExp=I,i.types.isRegExp=I;function F(T){return typeof T=="object"&&T!==null}i.isObject=F;function H(T){return F(T)&&X(T)==="[object Date]"}i.isDate=H,i.types.isDate=H;function M(T){return F(T)&&(X(T)==="[object Error]"||T instanceof Error)}i.isError=M,i.types.isNativeError=M;function B(T){return typeof T=="function"}i.isFunction=B;function D(T){return T===null||typeof T=="boolean"||typeof T=="number"||typeof T=="string"||typeof T=="symbol"||typeof T>"u"}i.isPrimitive=D,i.isBuffer=r("./support/isBuffer");function X(T){return Object.prototype.toString.call(T)}function G(T){return T<10?"0"+T.toString(10):T.toString(10)}var se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ce(){var T=new Date,Z=[G(T.getHours()),G(T.getMinutes()),G(T.getSeconds())].join(":");return[T.getDate(),se[T.getMonth()],Z].join(" ")}i.log=function(){console.log("%s - %s",ce(),i.format.apply(i,arguments))},i.inherits=r("inherits"),i._extend=function(T,Z){if(!Z||!F(Z))return T;for(var V=Object.keys(Z),ne=V.length;ne--;)T[V[ne]]=Z[V[ne]];return T};function U(T,Z){return Object.prototype.hasOwnProperty.call(T,Z)}var K=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;i.promisify=function(Z){if(typeof Z!="function")throw new TypeError('The "original" argument must be of type Function');if(K&&Z[K]){var V=Z[K];if(typeof V!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(V,K,{value:V,enumerable:!1,writable:!1,configurable:!0}),V}function V(){for(var ne,fe,ge=new Promise(function(Ae,it){ne=Ae,fe=it}),he=[],we=0;we<arguments.length;we++)he.push(arguments[we]);he.push(function(Ae,it){Ae?fe(Ae):ne(it)});try{Z.apply(this,he)}catch(Ae){fe(Ae)}return ge}return Object.setPrototypeOf(V,Object.getPrototypeOf(Z)),K&&Object.defineProperty(V,K,{value:V,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(V,s(Z))},i.promisify.custom=K;function oe(T,Z){if(!T){var V=new Error("Promise was rejected with a falsy value");V.reason=T,T=V}return Z(T)}function Re(T){if(typeof T!="function")throw new TypeError('The "original" argument must be of type Function');function Z(){for(var V=[],ne=0;ne<arguments.length;ne++)V.push(arguments[ne]);var fe=V.pop();if(typeof fe!="function")throw new TypeError("The last argument must be of type Function");var ge=this,he=function(){return fe.apply(ge,arguments)};T.apply(this,V).then(function(we){o.nextTick(he.bind(null,null,we))},function(we){o.nextTick(oe.bind(null,we,he))})}return Object.setPrototypeOf(Z,Object.getPrototypeOf(T)),Object.defineProperties(Z,s(T)),Z}i.callbackify=Re}).call(this)}).call(this,r("_process"))},{"./support/isBuffer":52,"./support/types":53,_process:26,inherits:17}],55:[function(r,n,i){(function(o){(function(){var s=r("for-each"),a=r("available-typed-arrays"),l=r("call-bind/callBound"),c=r("gopd"),u=l("Object.prototype.toString"),f=r("has-tostringtag/shams")(),h=typeof globalThis>"u"?o:globalThis,d=a(),p=l("String.prototype.slice"),g={},m=Object.getPrototypeOf;f&&c&&m&&s(d,function(v){if(typeof h[v]=="function"){var b=new h[v];if(Symbol.toStringTag in b){var w=m(b),_=c(w,Symbol.toStringTag);if(!_){var C=m(w);_=c(C,Symbol.toStringTag)}g[v]=_.get}}});var y=function(b){var w=!1;return s(g,function(_,C){if(!w)try{var P=_.call(b);P===C&&(w=P)}catch{}}),w},O=r("is-typed-array");n.exports=function(b){return O(b)?!f||!(Symbol.toStringTag in b)?p(u(b),8,-1):y(b):!1}}).call(this)}).call(this,typeof Vr<"u"?Vr:typeof self<"u"?self:typeof window<"u"?window:{})},{"available-typed-arrays":2,"call-bind/callBound":3,"for-each":7,gopd:11,"has-tostringtag/shams":14,"is-typed-array":21}],56:[function(r,n,i){n.exports=r("sharedb/lib/client")},{"sharedb/lib/client":29}]},{},[56])(56)})})(KC);var P5=KC.exports;const JC=Pi(P5);var eE={exports:{}};(function(t,e){(function(r){t.exports=r()})(function(){return function(){function r(n,i,o){function s(c,u){if(!i[c]){if(!n[c]){var f=typeof ss=="function"&&ss;if(!u&&f)return f(c,!0);if(a)return a(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var d=i[c]={exports:{}};n[c][0].call(d.exports,function(p){var g=n[c][1][p];return s(g||p)},d,d.exports,r,n,i,o)}return i[c].exports}for(var a=typeof ss=="function"&&ss,l=0;l<o.length;l++)s(o[l]);return s}return r}()({1:[function(r,n,i){(function(o){(function(){var s=r("object-assign");/*!
|
|
53
|
+
* The buffer module from node.js, for the browser.
|
|
54
|
+
*
|
|
55
|
+
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
56
|
+
* @license MIT
|
|
57
|
+
*/function a(M,B){if(M===B)return 0;for(var D=M.length,X=B.length,G=0,se=Math.min(D,X);G<se;++G)if(M[G]!==B[G]){D=M[G],X=B[G];break}return D<X?-1:X<D?1:0}function l(M){return o.Buffer&&typeof o.Buffer.isBuffer=="function"?o.Buffer.isBuffer(M):!!(M!=null&&M._isBuffer)}var c=r("util/"),u=Object.prototype.hasOwnProperty,f=Array.prototype.slice,h=function(){return(function(){}).name==="foo"}();function d(M){return Object.prototype.toString.call(M)}function p(M){return l(M)||typeof o.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(M):M?!!(M instanceof DataView||M.buffer&&M.buffer instanceof ArrayBuffer):!1}var g=n.exports=_,m=/\s*function\s+([^\(\s]*)\s*/;function y(M){if(c.isFunction(M)){if(h)return M.name;var B=M.toString(),D=B.match(m);return D&&D[1]}}g.AssertionError=function(B){this.name="AssertionError",this.actual=B.actual,this.expected=B.expected,this.operator=B.operator,B.message?(this.message=B.message,this.generatedMessage=!1):(this.message=b(this),this.generatedMessage=!0);var D=B.stackStartFunction||w;if(Error.captureStackTrace)Error.captureStackTrace(this,D);else{var X=new Error;if(X.stack){var G=X.stack,se=y(D),ce=G.indexOf(`
|
|
58
|
+
`+se);if(ce>=0){var U=G.indexOf(`
|
|
59
|
+
`,ce+1);G=G.substring(U+1)}this.stack=G}}},c.inherits(g.AssertionError,Error);function O(M,B){return typeof M=="string"?M.length<B?M:M.slice(0,B):M}function v(M){if(h||!c.isFunction(M))return c.inspect(M);var B=y(M),D=B?": "+B:"";return"[Function"+D+"]"}function b(M){return O(v(M.actual),128)+" "+M.operator+" "+O(v(M.expected),128)}function w(M,B,D,X,G){throw new g.AssertionError({message:D,actual:M,expected:B,operator:X,stackStartFunction:G})}g.fail=w;function _(M,B){M||w(M,!0,B,"==",g.ok)}g.ok=_,g.equal=function(B,D,X){B!=D&&w(B,D,X,"==",g.equal)},g.notEqual=function(B,D,X){B==D&&w(B,D,X,"!=",g.notEqual)},g.deepEqual=function(B,D,X){C(B,D,!1)||w(B,D,X,"deepEqual",g.deepEqual)},g.deepStrictEqual=function(B,D,X){C(B,D,!0)||w(B,D,X,"deepStrictEqual",g.deepStrictEqual)};function C(M,B,D,X){if(M===B)return!0;if(l(M)&&l(B))return a(M,B)===0;if(c.isDate(M)&&c.isDate(B))return M.getTime()===B.getTime();if(c.isRegExp(M)&&c.isRegExp(B))return M.source===B.source&&M.global===B.global&&M.multiline===B.multiline&&M.lastIndex===B.lastIndex&&M.ignoreCase===B.ignoreCase;if((M===null||typeof M!="object")&&(B===null||typeof B!="object"))return D?M===B:M==B;if(p(M)&&p(B)&&d(M)===d(B)&&!(M instanceof Float32Array||M instanceof Float64Array))return a(new Uint8Array(M.buffer),new Uint8Array(B.buffer))===0;if(l(M)!==l(B))return!1;X=X||{actual:[],expected:[]};var G=X.actual.indexOf(M);return G!==-1&&G===X.expected.indexOf(B)?!0:(X.actual.push(M),X.expected.push(B),k(M,B,D,X))}function P(M){return Object.prototype.toString.call(M)=="[object Arguments]"}function k(M,B,D,X){if(M==null||B===null||B===void 0)return!1;if(c.isPrimitive(M)||c.isPrimitive(B))return M===B;if(D&&Object.getPrototypeOf(M)!==Object.getPrototypeOf(B))return!1;var G=P(M),se=P(B);if(G&&!se||!G&&se)return!1;if(G)return M=f.call(M),B=f.call(B),C(M,B,D);var ce=H(M),U=H(B),K,oe;if(ce.length!==U.length)return!1;for(ce.sort(),U.sort(),oe=ce.length-1;oe>=0;oe--)if(ce[oe]!==U[oe])return!1;for(oe=ce.length-1;oe>=0;oe--)if(K=ce[oe],!C(M[K],B[K],D,X))return!1;return!0}g.notDeepEqual=function(B,D,X){C(B,D,!1)&&w(B,D,X,"notDeepEqual",g.notDeepEqual)},g.notDeepStrictEqual=x;function x(M,B,D){C(M,B,!0)&&w(M,B,D,"notDeepStrictEqual",x)}g.strictEqual=function(B,D,X){B!==D&&w(B,D,X,"===",g.strictEqual)},g.notStrictEqual=function(B,D,X){B===D&&w(B,D,X,"!==",g.notStrictEqual)};function E(M,B){if(!M||!B)return!1;if(Object.prototype.toString.call(B)=="[object RegExp]")return B.test(M);try{if(M instanceof B)return!0}catch{}return Error.isPrototypeOf(B)?!1:B.call({},M)===!0}function R(M){var B;try{M()}catch(D){B=D}return B}function I(M,B,D,X){var G;if(typeof B!="function")throw new TypeError('"block" argument must be a function');typeof D=="string"&&(X=D,D=null),G=R(B),X=(D&&D.name?" ("+D.name+").":".")+(X?" "+X:"."),M&&!G&&w(G,D,"Missing expected exception"+X);var se=typeof X=="string",ce=!M&&c.isError(G),U=!M&&G&&!D;if((ce&&se&&E(G,D)||U)&&w(G,D,"Got unwanted exception"+X),M&&G&&D&&!E(G,D)||!M&&G)throw G}g.throws=function(M,B,D){I(!0,M,B,D)},g.doesNotThrow=function(M,B,D){I(!1,M,B,D)},g.ifError=function(M){if(M)throw M};function F(M,B){M||w(M,!0,B,"==",F)}g.strict=s(F,g,{equal:g.strictEqual,deepEqual:g.deepStrictEqual,notEqual:g.notStrictEqual,notDeepEqual:g.notDeepStrictEqual}),g.strict.strict=g.strict;var H=Object.keys||function(M){var B=[];for(var D in M)u.call(M,D)&&B.push(D);return B}}).call(this)}).call(this,typeof Vr<"u"?Vr:typeof self<"u"?self:typeof window<"u"?window:{})},{"object-assign":22,"util/":4}],2:[function(r,n,i){typeof Object.create=="function"?n.exports=function(s,a){s.super_=a,s.prototype=Object.create(a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:n.exports=function(s,a){s.super_=a;var l=function(){};l.prototype=a.prototype,s.prototype=new l,s.prototype.constructor=s}},{}],3:[function(r,n,i){n.exports=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}},{}],4:[function(r,n,i){(function(o,s){(function(){var a=/%[sdj%]/g;i.format=function(U){if(!k(U)){for(var K=[],oe=0;oe<arguments.length;oe++)K.push(u(arguments[oe]));return K.join(" ")}for(var oe=1,Re=arguments,T=Re.length,Z=String(U).replace(a,function(ne){if(ne==="%%")return"%";if(oe>=T)return ne;switch(ne){case"%s":return String(Re[oe++]);case"%d":return Number(Re[oe++]);case"%j":try{return JSON.stringify(Re[oe++])}catch{return"[Circular]"}default:return ne}}),V=Re[oe];oe<T;V=Re[++oe])_(V)||!I(V)?Z+=" "+V:Z+=" "+u(V);return Z},i.deprecate=function(U,K){if(E(s.process))return function(){return i.deprecate(U,K).apply(this,arguments)};if(o.noDeprecation===!0)return U;var oe=!1;function Re(){if(!oe){if(o.throwDeprecation)throw new Error(K);o.traceDeprecation?console.trace(K):console.error(K),oe=!0}return U.apply(this,arguments)}return Re};var l={},c;i.debuglog=function(U){if(E(c)&&(c=o.env.NODE_DEBUG||""),U=U.toUpperCase(),!l[U])if(new RegExp("\\b"+U+"\\b","i").test(c)){var K=o.pid;l[U]=function(){var oe=i.format.apply(i,arguments);console.error("%s %d: %s",U,K,oe)}}else l[U]=function(){};return l[U]};function u(U,K){var oe={seen:[],stylize:h};return arguments.length>=3&&(oe.depth=arguments[2]),arguments.length>=4&&(oe.colors=arguments[3]),w(K)?oe.showHidden=K:K&&i._extend(oe,K),E(oe.showHidden)&&(oe.showHidden=!1),E(oe.depth)&&(oe.depth=2),E(oe.colors)&&(oe.colors=!1),E(oe.customInspect)&&(oe.customInspect=!0),oe.colors&&(oe.stylize=f),p(oe,U,oe.depth)}i.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function f(U,K){var oe=u.styles[K];return oe?"\x1B["+u.colors[oe][0]+"m"+U+"\x1B["+u.colors[oe][1]+"m":U}function h(U,K){return U}function d(U){var K={};return U.forEach(function(oe,Re){K[oe]=!0}),K}function p(U,K,oe){if(U.customInspect&&K&&M(K.inspect)&&K.inspect!==i.inspect&&!(K.constructor&&K.constructor.prototype===K)){var Re=K.inspect(oe,U);return k(Re)||(Re=p(U,Re,oe)),Re}var T=g(U,K);if(T)return T;var Z=Object.keys(K),V=d(Z);if(U.showHidden&&(Z=Object.getOwnPropertyNames(K)),H(K)&&(Z.indexOf("message")>=0||Z.indexOf("description")>=0))return m(K);if(Z.length===0){if(M(K)){var ne=K.name?": "+K.name:"";return U.stylize("[Function"+ne+"]","special")}if(R(K))return U.stylize(RegExp.prototype.toString.call(K),"regexp");if(F(K))return U.stylize(Date.prototype.toString.call(K),"date");if(H(K))return m(K)}var fe="",ge=!1,he=["{","}"];if(b(K)&&(ge=!0,he=["[","]"]),M(K)){var we=K.name?": "+K.name:"";fe=" [Function"+we+"]"}if(R(K)&&(fe=" "+RegExp.prototype.toString.call(K)),F(K)&&(fe=" "+Date.prototype.toUTCString.call(K)),H(K)&&(fe=" "+m(K)),Z.length===0&&(!ge||K.length==0))return he[0]+fe+he[1];if(oe<0)return R(K)?U.stylize(RegExp.prototype.toString.call(K),"regexp"):U.stylize("[Object]","special");U.seen.push(K);var Ae;return ge?Ae=y(U,K,oe,V,Z):Ae=Z.map(function(it){return O(U,K,oe,V,it,ge)}),U.seen.pop(),v(Ae,fe,he)}function g(U,K){if(E(K))return U.stylize("undefined","undefined");if(k(K)){var oe="'"+JSON.stringify(K).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(oe,"string")}if(P(K))return U.stylize(""+K,"number");if(w(K))return U.stylize(""+K,"boolean");if(_(K))return U.stylize("null","null")}function m(U){return"["+Error.prototype.toString.call(U)+"]"}function y(U,K,oe,Re,T){for(var Z=[],V=0,ne=K.length;V<ne;++V)ce(K,String(V))?Z.push(O(U,K,oe,Re,String(V),!0)):Z.push("");return T.forEach(function(fe){fe.match(/^\d+$/)||Z.push(O(U,K,oe,Re,fe,!0))}),Z}function O(U,K,oe,Re,T,Z){var V,ne,fe;if(fe=Object.getOwnPropertyDescriptor(K,T)||{value:K[T]},fe.get?fe.set?ne=U.stylize("[Getter/Setter]","special"):ne=U.stylize("[Getter]","special"):fe.set&&(ne=U.stylize("[Setter]","special")),ce(Re,T)||(V="["+T+"]"),ne||(U.seen.indexOf(fe.value)<0?(_(oe)?ne=p(U,fe.value,null):ne=p(U,fe.value,oe-1),ne.indexOf(`
|
|
60
|
+
`)>-1&&(Z?ne=ne.split(`
|
|
61
|
+
`).map(function(ge){return" "+ge}).join(`
|
|
62
|
+
`).substr(2):ne=`
|
|
63
|
+
`+ne.split(`
|
|
64
|
+
`).map(function(ge){return" "+ge}).join(`
|
|
65
|
+
`))):ne=U.stylize("[Circular]","special")),E(V)){if(Z&&T.match(/^\d+$/))return ne;V=JSON.stringify(""+T),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.substr(1,V.length-2),V=U.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=U.stylize(V,"string"))}return V+": "+ne}function v(U,K,oe){var Re=U.reduce(function(T,Z){return Z.indexOf(`
|
|
66
|
+
`)>=0,T+Z.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Re>60?oe[0]+(K===""?"":K+`
|
|
67
|
+
`)+" "+U.join(`,
|
|
68
|
+
`)+" "+oe[1]:oe[0]+K+" "+U.join(", ")+" "+oe[1]}function b(U){return Array.isArray(U)}i.isArray=b;function w(U){return typeof U=="boolean"}i.isBoolean=w;function _(U){return U===null}i.isNull=_;function C(U){return U==null}i.isNullOrUndefined=C;function P(U){return typeof U=="number"}i.isNumber=P;function k(U){return typeof U=="string"}i.isString=k;function x(U){return typeof U=="symbol"}i.isSymbol=x;function E(U){return U===void 0}i.isUndefined=E;function R(U){return I(U)&&D(U)==="[object RegExp]"}i.isRegExp=R;function I(U){return typeof U=="object"&&U!==null}i.isObject=I;function F(U){return I(U)&&D(U)==="[object Date]"}i.isDate=F;function H(U){return I(U)&&(D(U)==="[object Error]"||U instanceof Error)}i.isError=H;function M(U){return typeof U=="function"}i.isFunction=M;function B(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}i.isPrimitive=B,i.isBuffer=r("./support/isBuffer");function D(U){return Object.prototype.toString.call(U)}function X(U){return U<10?"0"+U.toString(10):U.toString(10)}var G=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function se(){var U=new Date,K=[X(U.getHours()),X(U.getMinutes()),X(U.getSeconds())].join(":");return[U.getDate(),G[U.getMonth()],K].join(" ")}i.log=function(){console.log("%s - %s",se(),i.format.apply(i,arguments))},i.inherits=r("inherits"),i._extend=function(U,K){if(!K||!I(K))return U;for(var oe=Object.keys(K),Re=oe.length;Re--;)U[oe[Re]]=K[oe[Re]];return U};function ce(U,K){return Object.prototype.hasOwnProperty.call(U,K)}}).call(this)}).call(this,r("_process"),typeof Vr<"u"?Vr:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":3,_process:33,inherits:2}],5:[function(r,n,i){(function(o){(function(){var s=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],a=typeof globalThis>"u"?o:globalThis;n.exports=function(){for(var c=[],u=0;u<s.length;u++)typeof a[s[u]]=="function"&&(c[c.length]=s[u]);return c}}).call(this)}).call(this,typeof Vr<"u"?Vr:typeof self<"u"?self:typeof window<"u"?window:{})},{}],6:[function(r,n,i){var o=r("get-intrinsic"),s=r("./"),a=s(o("String.prototype.indexOf"));n.exports=function(c,u){var f=o(c,!!u);return typeof f=="function"&&a(c,".prototype.")>-1?s(f):f}},{"./":7,"get-intrinsic":11}],7:[function(r,n,i){var o=r("function-bind"),s=r("get-intrinsic"),a=s("%Function.prototype.apply%"),l=s("%Function.prototype.call%"),c=s("%Reflect.apply%",!0)||o.call(l,a),u=s("%Object.getOwnPropertyDescriptor%",!0),f=s("%Object.defineProperty%",!0),h=s("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}n.exports=function(g){var m=c(o,l,arguments);if(u&&f){var y=u(m,"length");y.configurable&&f(m,"length",{value:1+h(0,g.length-(arguments.length-1))})}return m};var d=function(){return c(o,a,arguments)};f?f(n.exports,"apply",{value:d}):n.exports.apply=d},{"function-bind":10,"get-intrinsic":11}],8:[function(r,n,i){var o=r("is-callable"),s=Object.prototype.toString,a=Object.prototype.hasOwnProperty,l=function(d,p,g){for(var m=0,y=d.length;m<y;m++)a.call(d,m)&&(g==null?p(d[m],m,d):p.call(g,d[m],m,d))},c=function(d,p,g){for(var m=0,y=d.length;m<y;m++)g==null?p(d.charAt(m),m,d):p.call(g,d.charAt(m),m,d)},u=function(d,p,g){for(var m in d)a.call(d,m)&&(g==null?p(d[m],m,d):p.call(g,d[m],m,d))},f=function(d,p,g){if(!o(p))throw new TypeError("iterator must be a function");var m;arguments.length>=3&&(m=g),s.call(d)==="[object Array]"?l(d,p,m):typeof d=="string"?c(d,p,m):u(d,p,m)};n.exports=f},{"is-callable":19}],9:[function(r,n,i){var o="Function.prototype.bind called on incompatible ",s=Array.prototype.slice,a=Object.prototype.toString,l="[object Function]";n.exports=function(u){var f=this;if(typeof f!="function"||a.call(f)!==l)throw new TypeError(o+f);for(var h=s.call(arguments,1),d,p=function(){if(this instanceof d){var v=f.apply(this,h.concat(s.call(arguments)));return Object(v)===v?v:this}else return f.apply(u,h.concat(s.call(arguments)))},g=Math.max(0,f.length-h.length),m=[],y=0;y<g;y++)m.push("$"+y);if(d=Function("binder","return function ("+m.join(",")+"){ return binder.apply(this,arguments); }")(p),f.prototype){var O=function(){};O.prototype=f.prototype,d.prototype=new O,O.prototype=null}return d}},{}],10:[function(r,n,i){var o=r("./implementation");n.exports=Function.prototype.bind||o},{"./implementation":9}],11:[function(r,n,i){var o,s=SyntaxError,a=Function,l=TypeError,c=function(M){try{return a('"use strict"; return ('+M+").constructor;")()}catch{}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch{u=null}var f=function(){throw new l},h=u?function(){try{return arguments.callee,f}catch{try{return u(arguments,"callee").get}catch{return f}}}():f,d=r("has-symbols")(),p=Object.getPrototypeOf||function(M){return M.__proto__},g={},m=typeof Uint8Array>"u"?o:p(Uint8Array),y={"%AggregateError%":typeof AggregateError>"u"?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?o:ArrayBuffer,"%ArrayIteratorPrototype%":d?p([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":g,"%AsyncGenerator%":g,"%AsyncGeneratorFunction%":g,"%AsyncIteratorPrototype%":g,"%Atomics%":typeof Atomics>"u"?o:Atomics,"%BigInt%":typeof BigInt>"u"?o:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?o:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?o:Float32Array,"%Float64Array%":typeof Float64Array>"u"?o:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?o:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":g,"%Int8Array%":typeof Int8Array>"u"?o:Int8Array,"%Int16Array%":typeof Int16Array>"u"?o:Int16Array,"%Int32Array%":typeof Int32Array>"u"?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?p(p([][Symbol.iterator]())):o,"%JSON%":typeof JSON=="object"?JSON:o,"%Map%":typeof Map>"u"?o:Map,"%MapIteratorPrototype%":typeof Map>"u"||!d?o:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?o:Promise,"%Proxy%":typeof Proxy>"u"?o:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?o:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?o:Set,"%SetIteratorPrototype%":typeof Set>"u"||!d?o:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d?p(""[Symbol.iterator]()):o,"%Symbol%":d?Symbol:o,"%SyntaxError%":s,"%ThrowTypeError%":h,"%TypedArray%":m,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?o:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?o:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?o:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?o:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?o:WeakMap,"%WeakRef%":typeof WeakRef>"u"?o:WeakRef,"%WeakSet%":typeof WeakSet>"u"?o:WeakSet};try{null.error}catch(M){var O=p(p(M));y["%Error.prototype%"]=O}var v=function M(B){var D;if(B==="%AsyncFunction%")D=c("async function () {}");else if(B==="%GeneratorFunction%")D=c("function* () {}");else if(B==="%AsyncGeneratorFunction%")D=c("async function* () {}");else if(B==="%AsyncGenerator%"){var X=M("%AsyncGeneratorFunction%");X&&(D=X.prototype)}else if(B==="%AsyncIteratorPrototype%"){var G=M("%AsyncGenerator%");G&&(D=p(G.prototype))}return y[B]=D,D},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=r("function-bind"),_=r("has"),C=w.call(Function.call,Array.prototype.concat),P=w.call(Function.apply,Array.prototype.splice),k=w.call(Function.call,String.prototype.replace),x=w.call(Function.call,String.prototype.slice),E=w.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,F=function(B){var D=x(B,0,1),X=x(B,-1);if(D==="%"&&X!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(X==="%"&&D!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var G=[];return k(B,R,function(se,ce,U,K){G[G.length]=U?k(K,I,"$1"):ce||se}),G},H=function(B,D){var X=B,G;if(_(b,X)&&(G=b[X],X="%"+G[0]+"%"),_(y,X)){var se=y[X];if(se===g&&(se=v(X)),typeof se>"u"&&!D)throw new l("intrinsic "+B+" exists, but is not available. Please file an issue!");return{alias:G,name:X,value:se}}throw new s("intrinsic "+B+" does not exist!")};n.exports=function(B,D){if(typeof B!="string"||B.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof D!="boolean")throw new l('"allowMissing" argument must be a boolean');if(E(/^%?[^%]*%?$/,B)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var X=F(B),G=X.length>0?X[0]:"",se=H("%"+G+"%",D),ce=se.name,U=se.value,K=!1,oe=se.alias;oe&&(G=oe[0],P(X,C([0,1],oe)));for(var Re=1,T=!0;Re<X.length;Re+=1){var Z=X[Re],V=x(Z,0,1),ne=x(Z,-1);if((V==='"'||V==="'"||V==="`"||ne==='"'||ne==="'"||ne==="`")&&V!==ne)throw new s("property names with quotes must have matching quotes");if((Z==="constructor"||!T)&&(K=!0),G+="."+Z,ce="%"+G+"%",_(y,ce))U=y[ce];else if(U!=null){if(!(Z in U)){if(!D)throw new l("base intrinsic for "+B+" exists, but the property is not available.");return}if(u&&Re+1>=X.length){var fe=u(U,Z);T=!!fe,T&&"get"in fe&&!("originalValue"in fe.get)?U=fe.get:U=U[Z]}else T=_(U,Z),U=U[Z];T&&!K&&(y[ce]=U)}}return U}},{"function-bind":10,has:16,"has-symbols":13}],12:[function(r,n,i){var o=r("get-intrinsic"),s=o("%Object.getOwnPropertyDescriptor%",!0);if(s)try{s([],"length")}catch{s=null}n.exports=s},{"get-intrinsic":11}],13:[function(r,n,i){var o=typeof Symbol<"u"&&Symbol,s=r("./shams");n.exports=function(){return typeof o!="function"||typeof Symbol!="function"||typeof o("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()}},{"./shams":14}],14:[function(r,n,i){n.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},a=Symbol("test"),l=Object(a);if(typeof a=="string"||Object.prototype.toString.call(a)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var c=42;s[a]=c;for(a in s)return!1;if(typeof Object.keys=="function"&&Object.keys(s).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(s).length!==0)return!1;var u=Object.getOwnPropertySymbols(s);if(u.length!==1||u[0]!==a||!Object.prototype.propertyIsEnumerable.call(s,a))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(s,a);if(f.value!==c||f.enumerable!==!0)return!1}return!0}},{}],15:[function(r,n,i){var o=r("has-symbols/shams");n.exports=function(){return o()&&!!Symbol.toStringTag}},{"has-symbols/shams":14}],16:[function(r,n,i){var o=r("function-bind");n.exports=o.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":10}],17:[function(r,n,i){typeof Object.create=="function"?n.exports=function(s,a){a&&(s.super_=a,s.prototype=Object.create(a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:n.exports=function(s,a){if(a){s.super_=a;var l=function(){};l.prototype=a.prototype,s.prototype=new l,s.prototype.constructor=s}}},{}],18:[function(r,n,i){var o=r("has-tostringtag/shams")(),s=r("call-bind/callBound"),a=s("Object.prototype.toString"),l=function(h){return o&&h&&typeof h=="object"&&Symbol.toStringTag in h?!1:a(h)==="[object Arguments]"},c=function(h){return l(h)?!0:h!==null&&typeof h=="object"&&typeof h.length=="number"&&h.length>=0&&a(h)!=="[object Array]"&&a(h.callee)==="[object Function]"},u=function(){return l(arguments)}();l.isLegacyArguments=c,n.exports=u?l:c},{"call-bind/callBound":6,"has-tostringtag/shams":15}],19:[function(r,n,i){var o=Function.prototype.toString,s=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,a,l;if(typeof s=="function"&&typeof Object.defineProperty=="function")try{a=Object.defineProperty({},"length",{get:function(){throw l}}),l={},s(function(){throw 42},null,a)}catch(C){C!==l&&(s=null)}else s=null;var c=/^\s*class\b/,u=function(P){try{var k=o.call(P);return c.test(k)}catch{return!1}},f=function(P){try{return u(P)?!1:(o.call(P),!0)}catch{return!1}},h=Object.prototype.toString,d="[object Object]",p="[object Function]",g="[object GeneratorFunction]",m="[object HTMLAllCollection]",y="[object HTML document.all class]",O="[object HTMLCollection]",v=typeof Symbol=="function"&&!!Symbol.toStringTag,b=!(0 in[,]),w=function(){return!1};if(typeof document=="object"){var _=document.all;h.call(_)===h.call(document.all)&&(w=function(P){if((b||!P)&&(typeof P>"u"||typeof P=="object"))try{var k=h.call(P);return(k===m||k===y||k===O||k===d)&&P("")==null}catch{}return!1})}n.exports=s?function(P){if(w(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;try{s(P,null,a)}catch(k){if(k!==l)return!1}return!u(P)&&f(P)}:function(P){if(w(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;if(v)return f(P);if(u(P))return!1;var k=h.call(P);return k!==p&&k!==g&&!/^\[object HTML/.test(k)?!1:f(P)}},{}],20:[function(r,n,i){var o=Object.prototype.toString,s=Function.prototype.toString,a=/^\s*(?:function)?\*/,l=r("has-tostringtag/shams")(),c=Object.getPrototypeOf,u=function(){if(!l)return!1;try{return Function("return function*() {}")()}catch{}},f;n.exports=function(d){if(typeof d!="function")return!1;if(a.test(s.call(d)))return!0;if(!l){var p=o.call(d);return p==="[object GeneratorFunction]"}if(!c)return!1;if(typeof f>"u"){var g=u();f=g?c(g):!1}return c(d)===f}},{"has-tostringtag/shams":15}],21:[function(r,n,i){(function(o){(function(){var s=r("for-each"),a=r("available-typed-arrays"),l=r("call-bind/callBound"),c=l("Object.prototype.toString"),u=r("has-tostringtag/shams")(),f=r("gopd"),h=typeof globalThis>"u"?o:globalThis,d=a(),p=l("Array.prototype.indexOf",!0)||function(b,w){for(var _=0;_<b.length;_+=1)if(b[_]===w)return _;return-1},g=l("String.prototype.slice"),m={},y=Object.getPrototypeOf;u&&f&&y&&s(d,function(v){var b=new h[v];if(Symbol.toStringTag in b){var w=y(b),_=f(w,Symbol.toStringTag);if(!_){var C=y(w);_=f(C,Symbol.toStringTag)}m[v]=_.get}});var O=function(b){var w=!1;return s(m,function(_,C){if(!w)try{w=_.call(b)===C}catch{}}),w};n.exports=function(b){if(!b||typeof b!="object")return!1;if(!u||!(Symbol.toStringTag in b)){var w=g(c(b),8,-1);return p(d,w)>-1}return f?O(b):!1}}).call(this)}).call(this,typeof Vr<"u"?Vr:typeof self<"u"?self:typeof window<"u"?window:{})},{"available-typed-arrays":5,"call-bind/callBound":6,"for-each":8,gopd:12,"has-tostringtag/shams":15}],22:[function(r,n,i){var o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function l(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}function c(){try{if(!Object.assign)return!1;var u=new String("abc");if(u[5]="de",Object.getOwnPropertyNames(u)[0]==="5")return!1;for(var f={},h=0;h<10;h++)f["_"+String.fromCharCode(h)]=h;var d=Object.getOwnPropertyNames(f).map(function(g){return f[g]});if(d.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(g){p[g]=g}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}n.exports=c()?Object.assign:function(u,f){for(var h,d=l(u),p,g=1;g<arguments.length;g++){h=Object(arguments[g]);for(var m in h)s.call(h,m)&&(d[m]=h[m]);if(o){p=o(h);for(var y=0;y<p.length;y++)a.call(h,p[y])&&(d[p[y]]=h[p[y]])}}return d}},{}],23:[function(r,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.eachChildOf=i.advancer=i.readCursor=i.writeCursor=i.WriteCursor=i.ReadCursor=i.isValidPathItem=void 0;function o(y,O){if(!y)throw new Error(O)}const s=y=>y!=null&&typeof y=="object"&&!Array.isArray(y),a=(y,O)=>typeof y==typeof O?y>O:typeof y=="string"&&typeof O=="number";function l(y,O){for(let v in y){const b=v;O.write(b,y[b])}}const c=y=>typeof y=="number"||typeof y=="string"&&y!=="__proto__";i.isValidPathItem=c;class u{constructor(O=null){this.parents=[],this.indexes=[],this.lcIdx=-1,this.idx=-1,this.container=O}ascend(){o(this.parents.length===this.indexes.length/2),this.idx===0?this.parents.length?(this.lcIdx=this.indexes.pop(),this.container=this.parents.pop(),this.idx=this.indexes.pop()):(this.lcIdx=0,this.idx=-1):(o(this.idx>0),this.idx--,s(this.container[this.idx])&&this.idx--)}getPath(){const O=[];let v=this.container,b=this.parents.length-1,w=this.idx;for(;w>=0;)O.unshift(v[w]),w===0?(w=this.indexes[b*2],v=this.parents[b--]):w-=s(v[w-1])?2:1;return O}}class f extends u{get(){return this.container?this.container.slice(this.idx+1):null}getKey(){return o(this.container!=null,"Invalid call to getKey before cursor descended"),this.container[this.idx]}getComponent(){let O;return this.container&&this.container.length>this.idx+1&&s(O=this.container[this.idx+1])?O:null}descendFirst(){let O=this.idx+1;if(!this.container||O>=this.container.length||s(this.container[O])&&O+1>=this.container.length)return!1;s(this.container[O])&&O++;const v=this.container[O];return Array.isArray(v)?(this.indexes.push(this.idx),this.parents.push(this.container),this.indexes.push(O),this.idx=0,this.container=v):this.idx=O,!0}nextSibling(){if(o(this.parents.length===this.indexes.length/2),this.idx>0||this.parents.length===0)return!1;const O=this.indexes[this.indexes.length-1]+1,v=this.parents[this.parents.length-1];return O>=v.length?!1:(o(!isNaN(O)),this.indexes[this.indexes.length-1]=O,this.container=v[O],!0)}_init(O,v,b,w){this.container=O,this.idx=v,this.parents=b.slice(),this.indexes=w.slice()}clone(){const O=new f;return O._init(this.container,this.idx,this.parents,this.indexes),O}*[Symbol.iterator](){if(this.descendFirst()){do yield this.getKey();while(this.nextSibling());this.ascend()}}traverse(O,v){const b=this.getComponent();b&&v(b,O);for(const w of this)O&&O.descend(w),this.traverse(O,v),O&&O.ascend()}eachPick(O,v){this.traverse(O,(b,w)=>{b.p!=null&&v(b.p,w)})}eachDrop(O,v){this.traverse(O,(b,w)=>{b.d!=null&&v(b.d,w)})}}i.ReadCursor=f;class h extends u{constructor(O=null){super(O),this.pendingDescent=[],this._op=O}flushDescent(){o(this.parents.length===this.indexes.length/2),this.container===null&&(this._op=this.container=[]);for(let O=0;O<this.pendingDescent.length;O++){const v=this.pendingDescent[O];let b=this.idx+1;if(b<this.container.length&&s(this.container[b])&&b++,o(b===this.container.length||!s(this.container[b])),b===this.container.length)this.container.push(v),this.idx=b;else if(this.container[b]===v)this.idx=b;else{if(!Array.isArray(this.container[b])){const w=this.container.splice(b,this.container.length-b);this.container.push(w),this.lcIdx>-1&&(this.lcIdx=b)}for(this.indexes.push(this.idx),this.parents.push(this.container),this.lcIdx!==-1&&(o(a(v,this.container[this.lcIdx][0])),b=this.lcIdx+1,this.lcIdx=-1);b<this.container.length&&a(v,this.container[b][0]);)b++;if(this.indexes.push(b),this.idx=0,b<this.container.length&&this.container[b][0]===v)this.container=this.container[b];else{const w=[v];this.container.splice(b,0,w),this.container=w}}}this.pendingDescent.length=0}reset(){this.lcIdx=-1}getComponent(){this.flushDescent();const O=this.idx+1;if(O<this.container.length&&s(this.container[O]))return this.container[O];{const v={};return this.container.splice(O,0,v),v}}write(O,v){const b=this.getComponent();o(b[O]==null||b[O]===v,"Internal consistency error: Overwritten component. File a bug"),b[O]=v}get(){return this._op}descend(O){if(!(0,i.isValidPathItem)(O))throw Error("Invalid JSON key");this.pendingDescent.push(O)}descendPath(O){return this.pendingDescent.push(...O),this}ascend(){this.pendingDescent.length?this.pendingDescent.pop():super.ascend()}mergeTree(O,v=l){if(O===null)return;if(o(Array.isArray(O)),O===this._op)throw Error("Cannot merge into my own tree");const b=this.lcIdx,w=this.parents.length;let _=0;for(let C=0;C<O.length;C++){const P=O[C];typeof P=="string"||typeof P=="number"?(_++,this.descend(P)):Array.isArray(P)?this.mergeTree(P,v):typeof P=="object"&&v(P,this)}for(;_--;)this.ascend();this.lcIdx=this.parents.length===w?b:-1}at(O,v){this.descendPath(O),v(this);for(let b=0;b<O.length;b++)this.ascend();return this}writeAtPath(O,v,b){return this.at(O,()=>this.write(v,b)),this.reset(),this}writeMove(O,v,b=0){return this.writeAtPath(O,"p",b).writeAtPath(v,"d",b)}getPath(){const O=super.getPath();return O.push(...this.pendingDescent),O}}i.WriteCursor=h;const d=()=>new h;i.writeCursor=d;const p=y=>new f(y);i.readCursor=p;function g(y,O,v){let b,w;w=b=y?y.descendFirst():!1;function _(C){let P;for(;w;){const k=P=y.getKey();if(C!=null){let x=!1;if(O&&typeof k=="number"&&(P=O(k,y.getComponent()),P<0&&(P=~P,x=!0)),a(P,C))return null;if(P===C&&!x)return y}v&&typeof P=="number"&&v(P,y.getComponent()),w=y.nextSibling()}return null}return _.end=()=>{b&&y.ascend()},_}i.advancer=g;function m(y,O,v){let b,w,_,C;for(b=w=y&&y.descendFirst(),_=C=O&&O.descendFirst();b||_;){let P=b?y.getKey():null,k=_?O.getKey():null;P!==null&&k!==null&&(a(k,P)?k=null:P!==k&&(P=null)),v(P??k,P!=null?y:null,k!=null?O:null),P!=null&&b&&(b=y.nextSibling()),k!=null&&_&&(_=O.nextSibling())}w&&y.ascend(),C&&O.ascend()}i.eachChildOf=m},{}],24:[function(r,n,i){Object.defineProperty(i,"__esModule",{value:!0});function o(s){if(s===null)return null;if(Array.isArray(s))return s.map(o);if(typeof s=="object"){const a={};for(let l in s)a[l]=o(s[l]);return a}else return s}i.default=o},{}],25:[function(r,n,i){Object.defineProperty(i,"__esModule",{value:!0});function o(l,c){if(Array.isArray(c))return!1;for(let u in l)if(!a(l[u],c[u]))return!1;for(let u in c)if(l[u]===void 0)return!1;return!0}function s(l,c){if(!Array.isArray(c)||l.length!==c.length)return!1;for(let u=0;u<l.length;u++)if(!a(l[u],c[u]))return!1;return!0}function a(l,c){return l===c?!0:l===null||c===null||typeof l!="object"||typeof c!="object"?!1:Array.isArray(l)?s(l,c):o(l,c)}i.default=a},{}],26:[function(r,n,i){var o=this&&this.__createBinding||(Object.create?function(c,u,f,h){h===void 0&&(h=f);var d=Object.getOwnPropertyDescriptor(u,f);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(c,h,d)}:function(c,u,f,h){h===void 0&&(h=f),c[h]=u[f]}),s=this&&this.__exportStar||function(c,u){for(var f in c)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&o(u,c,f)};Object.defineProperty(i,"__esModule",{value:!0}),i.ConflictType=i.WriteCursor=i.ReadCursor=void 0,s(r("./json1.release.js"),i);var a=r("./cursor.js");Object.defineProperty(i,"ReadCursor",{enumerable:!0,get:function(){return a.ReadCursor}}),Object.defineProperty(i,"WriteCursor",{enumerable:!0,get:function(){return a.WriteCursor}});var l=r("./types");Object.defineProperty(i,"ConflictType",{enumerable:!0,get:function(){return l.ConflictType}})},{"./cursor.js":23,"./json1.release.js":27,"./types":29}],27:[function(r,n,i){var o=this&&this.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(i,"__esModule",{value:!0}),i.editOp=i.replaceOp=i.insertOp=i.moveOp=i.removeOp=i.type=void 0;const s=o(r("./deepEqual.js")),a=o(r("./deepClone.js")),l=r("./cursor.js"),c=r("./types.js"),u=!0,f=()=>{};function h($,te){if(!$)throw new Error(te)}let d=!1;i.type={name:"p",uri:"p",readCursor:l.readCursor,writeCursor:l.writeCursor,create:$=>$,isNoop:$=>$==null,setDebug($){d=$,f.quiet=!$},registerSubtype:F,checkValidOp:ce,normalize:U,apply:K,transformPosition:Re,transformPresence:T,compose:V,tryTransform:kt,transform:Ft,makeInvertible:ge,invert:ne,invertWithDoc:he,RM_UNEXPECTED_CONTENT:c.ConflictType.RM_UNEXPECTED_CONTENT,DROP_COLLISION:c.ConflictType.DROP_COLLISION,BLACKHOLE:c.ConflictType.BLACKHOLE,transformNoConflict:($,te,pe)=>Pr(()=>!0,$,te,pe),typeAllowingConflictsPred:$=>Object.assign(Object.assign({},i.type),{transform:(te,pe,$e)=>Pr($,te,pe,$e)})};const p=$=>$?$.getComponent():null;function g($){return $&&typeof $=="object"&&!Array.isArray($)}const m=$=>Array.isArray($)?$.slice():$!==null&&typeof $=="object"?Object.assign({},$):$,y=$=>$&&($.p!=null||$.r!==void 0),O=$=>$&&($.d!=null||$.i!==void 0),v=($,te=!0)=>(0,l.writeCursor)().writeAtPath($,"r",te).get();i.removeOp=v;const b=($,te)=>(0,l.writeCursor)().writeMove($,te).get();i.moveOp=b;const w=($,te)=>(0,l.writeCursor)().writeAtPath($,"i",te).get();i.insertOp=w;const _=($,te,pe)=>(0,l.writeCursor)().at($,$e=>{$e.write("r",te),$e.write("i",pe)}).get();i.replaceOp=_;const C=($,te,pe,$e=!1)=>(0,l.writeCursor)().at($,ke=>X(ke,te,pe,$e)).get();function P($,te){return h($!=null),typeof te=="number"?(h(Array.isArray($),"Invalid key - child is not an array"),($=$.slice()).splice(te,1)):(h(g($),"Invalid key - child is not an object"),delete($=Object.assign({},$))[te]),$}function k($,te,pe){return typeof te=="number"?(h($!=null,"Container is missing for key"),h(Array.isArray($),"Cannot use numerical key for object container"),h($.length>=te,"Cannot insert into out of bounds index"),$.splice(te,0,pe)):(h(g($),"Cannot insert into missing item"),h($[te]===void 0,"Trying to overwrite value at key. Your op needs to remove it first"),$[te]=pe),pe}i.editOp=C;const x=($,te,pe)=>(($=m($))[te]=pe,$),E=($,te)=>$!=null&&(typeof te=="number"?Array.isArray($):typeof $=="object"),R=($,te)=>E($,te)?$[te]:void 0,I={};function F($){let te=$.type?$.type:$;te.name&&(I[te.name]=te),te.uri&&(I[te.uri]=te)}const H=$=>{const te=I[$];if(te)return te;throw Error("Missing type: "+$)};F(r("ot-text-unicode"));const M=($,te)=>$+te;F({name:"number",apply:M,compose:M,invert:$=>-$,transform:$=>$});const B=$=>$==null?null:$.et?H($.et):$.es?I["text-unicode"]:$.ena!=null?I.number:null,D=$=>$.es?$.es:$.ena!=null?$.ena:$.e,X=($,te,pe,$e=!1)=>{const[ke,Te]=typeof te=="string"?[H(te),te]:[te,te.name];!$e&&ke.isNoop&&ke.isNoop(pe)||(Te==="number"?$.write("ena",pe):Te==="text-unicode"?$.write("es",pe):($.write("et",Te),$.write("e",pe)))};function G($){h(typeof $=="number"),h($>=0),h($===(0|$))}function se($){typeof $=="number"?G($):h(typeof $=="string")}function ce($){if($===null)return;const te=new Set,pe=new Set,$e=Te=>{let tt=!0,nt=!1;for(let de in Te){const Qe=Te[de];if(tt=!1,h(de==="p"||de==="r"||de==="d"||de==="i"||de==="e"||de==="es"||de==="ena"||de==="et","Invalid component item '"+de+"'"),de==="p")G(Qe),h(!te.has(Qe)),te.add(Qe),h(Te.r===void 0);else if(de==="d")G(Qe),h(!pe.has(Qe)),pe.add(Qe),h(Te.i===void 0);else if(de==="e"||de==="es"||de==="ena"){h(!nt),nt=!0;const xe=B(Te);h(xe,"Missing type in edit"),xe.checkValidOp&&xe.checkValidOp(D(Te))}}h(!tt)},ke=(Te,tt,nt)=>{if(!Array.isArray(Te))throw Error("Op must be null or a list");if(Te.length===0)throw Error("Empty descent");tt||se(Te[0]);let de=1,Qe=0,xe=0;for(let Ce=0;Ce<Te.length;Ce++){const Ze=Te[Ce];if(h(Ze!=null),Array.isArray(Ze)){const Be=ke(Ze,!1);if(Qe){const lt=typeof xe,ve=typeof Be;lt===ve?h(xe<Be,"descent keys are not in order"):h(lt==="number"&&ve==="string")}xe=Be,Qe++,de=3}else typeof Ze=="object"?(h(de===1,`Prev not scalar - instead ${de}`),$e(Ze),de=2):(h(de!==3),se(Ze),h((0,l.isValidPathItem)(Ze),"Invalid path key"),de=1)}return h(Qe!==1,"Operation makes multiple descents. Remove some []"),h(de===2||de===3),Te[0]};ke($,!0),h(te.size===pe.size,"Mismatched picks and drops in op");for(let Te=0;Te<te.size;Te++)h(te.has(Te)),h(pe.has(Te))}function U($){let te=0,pe=[];const $e=(0,l.writeCursor)();return $e.mergeTree($,(ke,Te)=>{const tt=B(ke);if(tt){const de=D(ke);X(Te,tt,tt.normalize?tt.normalize(de):de)}for(const de of["r","p","i","d"])if(ke[de]!==void 0){const Qe=de==="p"||de==="d"?(nt=ke[de],pe[nt]==null&&(pe[nt]=te++),pe[nt]):ke[de];Te.write(de,Qe)}var nt}),$e.get()}function K($,te){if(f.quiet=!d,ce(te),te===null)return $;const pe=[];return $=function $e(ke,Te){let tt=ke,nt=0,de={root:ke},Qe=0,xe=de,Ce="root";function Ze(){for(;Qe<nt;Qe++){let Be=Te[Qe];typeof Be!="object"&&(h(E(xe,Ce)),xe=xe[Ce]=m(xe[Ce]),Ce=Be)}}for(;nt<Te.length;nt++){const Be=Te[nt];if(Array.isArray(Be)){const lt=$e(tt,Be);lt!==tt&<!==void 0&&(Ze(),tt=xe[Ce]=lt)}else if(typeof Be=="object"){Be.d!=null?(Ze(),tt=k(xe,Ce,pe[Be.d])):Be.i!==void 0&&(Ze(),tt=k(xe,Ce,Be.i));const lt=B(Be);if(lt)Ze(),tt=xe[Ce]=lt.apply(tt,D(Be));else if(Be.e!==void 0)throw Error("Subtype "+Be.et+" undefined")}else tt=R(tt,Be)}return de.root}($=function $e(ke,Te){const tt=[];let nt=0;for(;nt<Te.length;nt++){const de=Te[nt];if(Array.isArray(de))break;typeof de!="object"&&(tt.push(ke),ke=R(ke,de))}for(let de=Te.length-1;de>=nt;de--)ke=$e(ke,Te[de]);for(--nt;nt>=0;nt--){const de=Te[nt];if(typeof de!="object"){const Qe=tt.pop();ke=ke===R(Qe,de)?Qe:ke===void 0?P(Qe,de):x(Qe,de,ke)}else y(de)&&(h(ke!==void 0,"Cannot pick up or remove undefined"),de.p!=null&&(pe[de.p]=ke),ke=void 0)}return ke}($,te),te)}const oe=()=>{};function Re($,te){$=$.slice(),ce(te);const pe=(0,l.readCursor)(te);let $e,ke,Te=!1;const tt=[];for(let de=0;;de++){const Qe=$[de],xe=pe.getComponent();if(xe&&(xe.r!==void 0?Te=!0:xe.p!=null&&(Te=!1,$e=xe.p,ke=de)),de>=$.length)break;let Ce=0;const Ze=(0,l.advancer)(pe,void 0,(lt,ve)=>{y(ve)&&Ce++});tt.unshift(Ze);const Be=Ze(Qe);if(typeof Qe=="number"&&($[de]-=Ce),!Be)break}if(tt.forEach(de=>de.end()),Te)return null;const nt=()=>{let de=0;if($e!=null){const Qe=pe.getPath();de=Qe.length,$=Qe.concat($.slice(ke))}for(u;de<$.length;de++){const Qe=$[de],xe=p(pe),Ce=B(xe);if(Ce){const ve=D(xe);Ce.transformPosition?$[de]=Ce.transformPosition($[de],ve):Ce.transformCursor&&($[de]=Ce.transformCursor($[de],ve));break}let Ze=0;const Be=(0,l.advancer)(pe,(ve,Xe)=>O(Xe)?~(ve-Ze):ve-Ze,(ve,Xe)=>{O(Xe)&&Ze++}),lt=Be(Qe);if(typeof Qe=="number"&&($[de]+=Ze),!lt)break}};return $e!=null?pe.eachDrop(null,de=>{de===$e&&nt()}):nt(),$}function T($,te){if(!$||!$.start||!$.end)return null;const pe=Re($.start,te),$e=Re($.end,te);return pe&&$e?Object.assign(Object.assign({},$),{start:pe,end:$e}):pe?Object.assign(Object.assign({},$),{start:pe,end:pe}):$e?Object.assign(Object.assign({},$),{start:$e,end:$e}):null}const Z=($,te,pe)=>{typeof te=="number"?(h(Array.isArray($)),h(te<$.length)):(h(!Array.isArray($)),h($[te]!==void 0)),pe===void 0?typeof te=="number"?$.splice(te,1):delete $[te]:$[te]=pe};function V($,te){if(ce($),ce(te),$==null)return te;if(te==null)return $;let pe=0;const $e=(0,l.readCursor)($),ke=(0,l.readCursor)(te),Te=(0,l.writeCursor)(),tt=[],nt=[],de=[],Qe=[],xe=[],Ce=[],Ze=new Set;$e.traverse(null,ve=>{ve.p!=null&&(de[ve.p]=$e.clone())}),ke.traverse(null,ve=>{ve.d!=null&&(Qe[ve.d]=ke.clone())});const Be=(0,l.writeCursor)();return function ve(Xe,Ot,ze,ut,Rt,Gt,Lt,Ut){h(Ot||ze);const Tr=p(Ot),kr=p(ze),qn=!!kr&&kr.r!==void 0,Dr=!!Tr&&Tr.i!==void 0,Ir=Tr?Tr.d:null,Wr=kr?kr.p:null,bt=(Gt||qn)&&Wr==null;if(Wr!=null)ut=Qe[Wr],Lt=nt[Wr]=new l.WriteCursor;else if(kr&&kr.r!==void 0)ut=null;else{const Ue=p(ut);Ue&&Ue.d!=null&&(ut=null)}const Le=p(ut);if(Ir!=null)if(Xe=de[Ir],Ut=tt[Ir]=new l.WriteCursor,bt)Gt&&!qn&&Ut.write("r",!0);else{const Ue=xe[Ir]=pe++;Lt.write("d",Ue)}else if(Tr&&Tr.i!==void 0)Xe=null;else{const Ue=p(Xe);Ue&&Ue.p!=null&&(Xe=null)}let Ge;Dr?(h(Rt===void 0),Ge=Tr.i):Ge=Rt;const Je=(Wr==null?!Dr||Gt||qn:Ge===void 0)?null:Lt.getComponent();if(Wr!=null){if(!(Rt!==void 0||Dr)){const Ue=Ir!=null?xe[Ir]:pe++;Ce[Wr]=Ue,Ut.write("p",Ue)}}else qn&&(Dr||Rt!==void 0||(kr.r,Ut.write("r",kr.r)));const De=bt?null:B(Tr),be=B(Le);if((De||be)&&(De&&De.name,be&&be.name),De&&be){h(De===be);const Ue=D(Tr),_t=D(Le),Rr=De.compose(Ue,_t);X(Lt,De,Rr),Ze.add(Le)}else De?X(Lt,De,D(Tr)):be&&(X(Lt,be,D(Le)),Ze.add(Le));const ft=typeof Ge=="object"&&Ge!=null;let dt=!1,xt=0,Ht=0,ir=0,Yt=0,Or=0;const mt=(0,l.advancer)(ut,(Ue,_t)=>O(_t)?Yt-Ue-1:Ue-Yt,(Ue,_t)=>{O(_t)&&Yt++}),ct=(0,l.advancer)(Xe,(Ue,_t)=>y(_t)?xt-Ue-1:Ue-xt,(Ue,_t)=>{y(_t)&&xt++});if((0,l.eachChildOf)(Ot,ze,(Ue,_t,Rr)=>{let Zn,_n,$n=Ue,W=Ue,L=Ue;if(typeof Ue=="number"){let J=Ue+ir;_n=mt(J),W=J+Yt;let me=Ue+Ht;Zn=ct(me),O(p(_n))&&(Zn=null),$n=me+xt,L=Ue+Or,h($n>=0,"p1PickKey is negative"),h(W>=0,"p2DropKey is negative");const Me=O(p(_t)),ye=y(p(Rr));(Me||ye&&!bt)&&Or--,Me&&Ht--,ye&&ir--}else Zn=ct(Ue),_n=mt(Ue);Ut.descend($n),Lt.descend(W);const z=ft&&!O(p(_t))?Ge[L]:void 0,ue=ve(Zn,_t,Rr,_n,z,bt,Lt,Ut);ft&&!bt?z!==ue&&(dt||(Ge=Array.isArray(Ge)?Ge.slice():Object.assign({},Ge),dt=!0),Z(Ge,L,ue)):h(ue===void 0),Lt.ascend(),Ut.ascend()}),ct.end(),mt.end(),Je!=null)Je.i=Ge;else if(!Gt&&!qn&&Wr==null)return Ge}($e,$e.clone(),ke,ke.clone(),void 0,!1,Te,Be),Te.reset(),Te.mergeTree(Be.get()),Te.reset(),Te.get(),tt.map(ve=>ve.get()),nt.map(ve=>ve.get()),$e.traverse(Te,(ve,Xe)=>{const Ot=ve.p;if(Ot!=null){const ze=xe[Ot];ze!=null&&Xe.write("p",ze);const ut=tt[Ot];ut&&ut.get(),ut&&Xe.mergeTree(ut.get())}else ve.r!==void 0&&Xe.write("r",ve.r)}),Te.reset(),Te.get(),ke.traverse(Te,(ve,Xe)=>{const Ot=ve.d;if(Ot!=null){const ut=Ce[Ot];ut!=null&&Xe.write("d",ut);const Rt=nt[Ot];Rt&&Xe.mergeTree(Rt.get())}else ve.i!==void 0&&Xe.write("i",ve.i);const ze=B(ve);ze&&!Ze.has(ve)&&X(Xe,ze,D(ve))}),Te.get()}function ne($){if($==null)return null;const te=new l.ReadCursor($),pe=new l.WriteCursor;let $e;const ke=[],Te=[];if(function nt(de,Qe,xe){const Ce=de.getComponent();let Ze,Be=!1;if(Ce){Ce.p!=null&&(Qe.write("d",Ce.p),ke[Ce.p]=de.clone()),Ce.r!==void 0&&Qe.write("i",Ce.r),Ce.d!=null&&(Qe.write("p",Ce.d),xe=void 0),Ce.i!==void 0&&(xe=Ze=Ce.i);const ve=B(Ce);ve&&(xe===void 0?($e||($e=new Set),$e.add(Ce)):(D(Ce),xe=ve.apply(xe,D(Ce)),Be=!0))}let lt=0;for(const ve of de){Qe.descend(ve);const Xe=typeof ve=="number"?ve-lt:ve,Ot=R(xe,Xe);O(de.getComponent())&<++;const ze=nt(de,Qe,Ot);if(xe!==void 0&&ze!==void 0){if(Be||(Be=!0,xe=m(xe)),!E(xe,Xe))throw Error("Cannot modify child - invalid operation");xe[Xe]=ze}Qe.ascend()}if(Ze===void 0)return Be?xe:void 0;Qe.write("r",xe)}(te,pe,void 0),$e){let nt=function(de,Qe,xe){const Ce=Qe.getComponent();if(Ce){const ve=Ce.d;if(ve!=null&&(de=ke[ve],xe=Te[ve]=(0,l.writeCursor)()),$e.has(Ce)){const Xe=B(Ce);if(!Xe.invert)throw Error(`Cannot invert subtype ${Xe.name}`);X(xe,Xe,Xe.invert(D(Ce)))}}let Ze=0,Be=0;const lt=(0,l.advancer)(de,(ve,Xe)=>y(Xe)?Ze-ve-1:ve-Ze,(ve,Xe)=>{y(Xe)&&Ze++});for(const ve of Qe)if(typeof ve=="number"){const Xe=ve-Be,Ot=lt(Xe),ze=Xe+Ze;xe.descend(ze),nt(Ot,Qe,xe),O(Qe.getComponent())&&Be++,xe.ascend()}else xe.descend(ve),nt(lt(ve),Qe,xe),xe.ascend();lt.end()};pe.reset(),nt(te.clone(),te,pe),Te.length&&(pe.reset(),te.traverse(pe,(de,Qe)=>{const xe=de.p;if(xe!=null){const Ce=Te[xe];Ce&&Ce.get(),Ce&&Qe.mergeTree(Ce.get())}}))}return pe.get()}const fe=($,te)=>$.some(pe=>typeof pe=="object"&&(Array.isArray(pe)?fe(pe,te):te(pe)));function ge($,te){if($==null||!fe($,Qe=>{var xe;return Qe.r!==void 0||((xe=B(Qe))===null||xe===void 0?void 0:xe.makeInvertible)!=null}))return $;const pe=new l.ReadCursor($),$e=new l.WriteCursor;let ke=!1;const Te=[],tt=[],nt=(Qe,xe,Ce)=>{const Ze=Qe.getComponent();let Be=!1;if(Ze){Ze.d!=null&&xe.write("d",Ze.d),Ze.i!==void 0&&xe.write("i",Ze.i);const ve=Ze.p;if(ve!=null&&(Te[ve]=Qe.clone(),h(Ce!==void 0,"Operation picks up at an invalid key"),tt[ve]=Ce,xe.write("p",Ze.p)),Ze.r!==void 0&&Ce===void 0)throw Error("Invalid doc / op in makeInvertible: removed item missing from doc");const Xe=B(Ze);Xe&&(Xe.makeInvertible?ke=!0:X(xe,Xe,D(Ze),!0))}let lt=0;for(const ve of Qe){xe.descend(ve);const Xe=typeof ve=="number"?ve-lt:ve,Ot=R(Ce,Xe),ze=nt(Qe,xe,Ot);Ot!==ze&&(Be||(Be=!0,Ce=m(Ce)),ze===void 0?(Ce=P(Ce,Xe),typeof ve=="number"&<++):Ce[Xe]=ze),xe.ascend()}return Ze&&(Ze.r!==void 0?(xe.write("r",(0,a.default)(Ce)),Ce=void 0):Ze.p!=null&&(Ce=void 0)),Ce};if(nt(pe,$e,te),$e.get(),ke){let Qe=function(xe,Ce,Ze,Be,lt){const ve=Ce.getComponent();if(ve){ve.i!==void 0?(Be=ve.i,lt=!0):ve.d!=null&&(Be=tt[ve.d],xe=Te[ve.d],lt=!1,ve.d);let ut=B(ve);if(ut&&ut.makeInvertible){const Rt=D(ve);X(Ze,ut,ut.makeInvertible(Rt,Be),!0)}}let Xe=0,Ot=0;const ze=(0,l.advancer)(xe,(ut,Rt)=>y(Rt)?Xe-ut-1:ut-Xe,(ut,Rt)=>{y(Rt)&&Xe++});for(const ut of Ce)if(typeof ut=="number"){const Rt=ut-Ot,Gt=ze(Rt),Lt=R(Be,lt?Rt:Rt+Xe);Ze.descend(ut),Qe(Gt,Ce,Ze,Lt,lt),O(Ce.getComponent())&&Ot++,Ze.ascend()}else{const Rt=R(Be,ut);Ze.descend(ut),Qe(ze(ut),Ce,Ze,Rt,lt),Ze.ascend()}ze.end()};$e.reset(),Qe(pe.clone(),pe,$e,te,!1)}return $e.get()}function he($,te){return ne(ge($,te))}const we=0,Ae=1,it=$=>{if($==null)return null;const te=$.slice();for(let pe=0;pe<$.length;pe++){const $e=te[pe];Array.isArray($e)&&(te[pe]=it($e))}return te};function kt($,te,pe){h(pe==="left"||pe==="right","Direction must be left or right");const $e=pe==="left"?we:Ae;if(f.quiet=!d,f.prefix=0,te==null)return{ok:!0,result:$};ce($),ce(te);let ke=null;const Te=[],tt=[],nt=[],de=[],Qe=[],xe=[],Ce=[],Ze=[],Be=[],lt=[],ve=[],Xe=[],Ot=[],ze=[],ut=[];let Rt=0;const Gt=(0,l.readCursor)($),Lt=(0,l.readCursor)(te),Ut=(0,l.writeCursor)();if(function bt(Le,Ge=null,Je){const De=p(Ge);De&&(De.r!==void 0?Je=Ge.clone():De.p!=null&&(Je=null,xe[De.p]=Le.clone()));const be=Le.getComponent();let ft;be&&(ft=be.p)!=null&&(Qe[ft]=Ge?Ge.clone():null,nt[ft]=Le.clone(),Je&&(lt[ft]=!0,Be[ft]=Je),De&&De.p!=null&&(ze[ft]=De.p));const dt=(0,l.advancer)(Ge);for(const xt of Le)bt(Le,dt(xt),Je);dt.end()}(Lt,Gt,null),function bt(Le,Ge,Je,De,be){const ft=Je.getComponent();let dt,xt=!1;ft&&((dt=ft.d)!=null?(de[dt]=Je.clone(),De!=null&&(ut[De]==null&&(ut[De]=[]),ut[De].push(dt)),Le=Qe[dt]||null,Ge=nt[dt]||null,lt[dt]?(be&&(ve[dt]=!0),be=Be[dt]||null):!be||$e!==Ae&&ze[dt]!=null||ke==null&&(ke={type:c.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.removeOp)(be.getPath()),op2:(0,i.moveOp)(Ge.getPath(),Je.getPath())}),xt=!0):ft.i!==void 0&&(Le=Ge=null,xt=!0,be&&ke==null&&(ke={type:c.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.removeOp)(be.getPath()),op2:(0,i.insertOp)(Je.getPath(),ft.i)})));const Ht=p(Le);Ht&&(Ht.r!==void 0?be=Le.clone():Ht.p!=null&&(Ht.p,De=Ht.p,be=null));const ir=B(ft);ir&&be&&ke==null&&(ke={type:c.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.removeOp)(be.getPath()),op2:(0,i.editOp)(Je.getPath(),ir,D(ft),!0)});let Yt=0,Or=0;const mt=(0,l.advancer)(Ge,(Ue,_t)=>y(_t)?Yt-Ue-1:Ue-Yt,(Ue,_t)=>{y(_t)&&Yt++}),ct=(0,l.advancer)(Le);for(const Ue of Je)if(typeof Ue=="number"){const _t=Ue-Or,Rr=mt(_t);Or+=+bt(ct(_t+Yt),Rr,Je,De,be)}else{const _t=mt(Ue);bt(ct(Ue),_t,Je,De,be)}return mt.end(),ct.end(),xt}(Gt,Lt,Lt.clone(),null,null),de.map(bt=>bt&&bt.get()),ke)return{ok:!1,conflict:ke};ve.map(bt=>!!bt);const Tr=[];let kr=null;(function bt(Le,Ge,Je,De,be){let ft=!1;const dt=p(Ge);if(y(dt)){const mt=dt.p;mt!=null?(Je=de[mt],De=Xe[mt]=(0,l.writeCursor)(),ft=!0,be=null):(Je=null,be=Ge.clone())}else O(p(Je))&&(Je=null);const xt=Le.getComponent();if(xt){const mt=xt.p;mt!=null?(be&&(Ze[mt]=be),Tr[mt]=be||$e===Ae&&ft?null:De.getComponent(),Te[mt]=Le.clone(),Je&&(Ce[mt]=Je.clone())):xt.r!==void 0&&(be||De.write("r",!0),(be||ft)&&(kr==null&&(kr=new Set),kr.add(xt)))}let Ht=0,ir=0;const Yt=(0,l.advancer)(Ge,void 0,(mt,ct)=>{y(ct)&&Ht++}),Or=(0,l.advancer)(Je,(mt,ct)=>O(ct)?~(mt-ir):mt-ir,(mt,ct)=>{O(ct)&&ir++});if(Le)for(const mt of Le)if(typeof mt=="string"){const ct=Yt(mt),Ue=Or(mt);De.descend(mt),bt(Le,ct,Ue,De,be),De.ascend()}else{const ct=Yt(mt),Ue=mt-Ht,_t=y(p(ct))?null:Or(Ue),Rr=Ue+ir;h(Rr>=0),De.descend(Rr),bt(Le,ct,_t,De,be),De.ascend()}Yt.end(),Or.end()})(Gt,Lt,Lt.clone(),Ut,null),Ut.reset();let qn=[];if(function bt(Le,Ge,Je,De,be,ft){h(Ge);const dt=Ge.getComponent();let xt=p(De),Ht=!1;const ir=(J,me,Me)=>J?(0,i.moveOp)(J.getPath(),me.getPath()):(0,i.insertOp)(me.getPath(),Me.i);if(O(dt)){const J=dt.d;J!=null&&(tt[J]=Ge.clone());const me=J!=null?Tr[J]:null;let Me=!1;if(dt.i!==void 0||J!=null&&me){let ye;xt&&(xt.i!==void 0||(ye=xt.d)!=null&&!lt[ye])&&(Me=ye!=null?J!=null&&J===ze[ye]:(0,s.default)(xt.i,dt.i),Me||ye!=null&&$e!==Ae&&ze[ye]!=null||ke==null&&(ke={type:c.ConflictType.DROP_COLLISION,op1:ir(J!=null?Te[J]:null,Ge,dt),op2:ir(ye!=null?nt[ye]:null,De,xt)})),Me||(ft?ke==null&&(ke={type:c.ConflictType.RM_UNEXPECTED_CONTENT,op1:ir(J!=null?Te[J]:null,Ge,dt),op2:(0,i.removeOp)(ft.getPath())}):(J!=null?(qn[Rt]=J,be.write("d",me.p=Rt++)):be.write("i",(0,a.default)(dt.i)),Ht=!0))}else if(J!=null&&!me){const ye=Ze[J];ye&&(ft=ye.clone())}J!=null?(Le=Te[J],Je=xe[J],De=Ce[J]):dt.i!==void 0&&(Le=Je=null,Me||(De=null))}else y(p(Le))&&(Le=Je=De=null);const Yt=p(Le),Or=p(Je);if(y(Or)){const J=Or.p;Or.r!==void 0&&(!Yt||Yt.r===void 0)||lt[J]?(De=null,ft=Je.clone()):J!=null&&(De=de[J],$e!==Ae&&ze[J]!=null||((be=Ot[J])||(be=Ot[J]=(0,l.writeCursor)()),be.reset(),ft=null))}else!O(dt)&&O(xt)&&(De=null);xt=De!=null?De.getComponent():null;const mt=B(dt);if(mt){const J=D(dt);if(ft)ke==null&&(ke={type:c.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.editOp)(Ge.getPath(),mt,J,!0),op2:(0,i.removeOp)(ft.getPath())});else{const me=B(xt);let Me;if(me){if(mt!==me)throw Error("Transforming incompatible types");const ye=D(xt);Me=mt.transform(J,ye,pe)}else Me=(0,a.default)(J);X(be,mt,Me)}}let ct=0,Ue=0,_t=0,Rr=0,Zn=0,_n=0,$n=Le!=null&&Le.descendFirst(),W=$n;const L=(0,l.advancer)(Je,void 0,(J,me)=>{y(me)&&_t++});let z=De!=null&&De.descendFirst(),ue=z;for(const J of Ge)if(typeof J=="number"){let me;const Me=O(Ge.getComponent()),ye=J-Ue;{let ot;for(oe();$n&&typeof(ot=Le.getKey())=="number";){ot+=ct;const St=Le.getComponent(),vt=y(St);if(ot>ye||ot===ye&&(!vt||$e===we&&Me))break;if(vt){ct--;const yt=St.p;ze.includes(yt),St.d,p(Ot[St.d]),y(p(Ot[St.d])),(St.r===void 0||kr&&kr.has(St))&&(yt==null||!Tr[yt]||$e!==Ae&&ze.includes(yt))||Zn--}$n=Le.nextSibling()}me=$n&&ot===ye?Le:null}const Pe=ye-ct;let rt=L(Pe);const qe=Pe-_t;let $t=null;{let ot,St;for(oe();z&&typeof(ot=De.getKey())=="number";){St=ot-Rr;const vt=De.getComponent(),yt=O(vt);if(St>qe)break;if(St===qe){if(!yt){$t=De;break}{if($e===we&&Me){$t=De;break}const Pt=rt&&y(rt.getComponent());if($e===we&&Pt)break}}if(yt){const Pt=vt.d;ze[Pt],vt.i===void 0&&(lt[Pt]||ze[Pt]!=null&&$e!==Ae)?(lt[Pt]||ze[Pt]!=null&&$e===we)&&(Rr++,_n--):Rr++}z=De.nextSibling()}}const Vt=qe+Rr+Zn+_n;h(Vt>=0,"trying to descend to a negative index"),be.descend(Vt),Me&&(me=rt=$t=null,Ue++),bt(me,Ge,rt,$t,be,ft)&&_n++,be.ascend()}else{let me;for(;$n&&(me=Le.getKey(),typeof me!="string"||!(me>J||me===J));)$n=Le.nextSibling();const Me=$n&&me===J?Le:null,ye=L(J);let Pe;for(;z&&(Pe=De.getKey(),typeof Pe!="string"||!(Pe>J||Pe===J));)z=De.nextSibling();const rt=z&&Pe===J?De:null;be.descend(J),bt(Me,Ge,ye,rt,be,ft),be.ascend()}return L.end(),W&&Le.ascend(),ue&&De.ascend(),Ht}(Gt,Gt.clone(),Lt,Lt.clone(),Ut,null),ke)return{ok:!1,conflict:ke};Ut.reset();const Dr=(bt,Le,Ge)=>bt.traverse(Le,(Je,De)=>{Je.d!=null&&Ge(Je.d,bt,De)});(lt.length||Xe.length)&&(Dr(Lt,Ut,(bt,Le,Ge)=>{lt[bt]&&!ve[bt]&&Ge.write("r",!0),Xe[bt]&&Ge.mergeTree(Xe[bt].get())}),Ut.reset());const Ir=[],Wr=[];if((Ot.length||lt.length)&&!ke){const bt=(0,l.readCursor)(it(Ut.get()));if(Dr(bt,null,(Le,Ge)=>{Ir[Le]=Ge.clone()}),Ot.forEach(Le=>{Le&&Dr((0,l.readCursor)(Le.get()),null,(Ge,Je)=>{Ir[Ge]=Je.clone()})}),function Le(Ge,Je,De,be,ft,dt){f.prefix++;const xt=p(Je);if(xt&&y(xt))if(xt.p!=null){const ct=xt.p;Ir[ct].getPath(),De=Ir[ct],be=Wr[ct]=(0,l.writeCursor)()}else xt.r!==void 0&&(De=null);else O(p(De))&&(De=null);const Ht=Ge.getComponent();if(Ht){let ct;if((ct=Ht.d)!=null){const Ue=Ot[ct];Ue&&(Ue.get(),be.mergeTree(Ue.get()),De=(0,l.readCursor)(Ue.get()))}}let ir=0,Yt=0;const Or=(0,l.advancer)(Je,void 0,(ct,Ue)=>{y(Ue)&&ir--}),mt=(0,l.advancer)(De,(ct,Ue)=>O(Ue)?-(ct-Yt)-1:ct-Yt,(ct,Ue)=>{O(Ue)&&Yt++});for(const ct of Ge)if(typeof ct=="number"){const Ue=Or(ct),_t=ct+ir,Rr=mt(_t),Zn=_t+Yt;be.descend(Zn),Le(Ge,Ue,Rr,be),be.ascend()}else be.descend(ct),Le(Ge,Or(ct),mt(ct),be),be.ascend();Or.end(),mt.end()}(Lt,bt,bt.clone(),Ut),Ut.reset(),ke)return{ok:!1,conflict:ke};if(Ut.get(),Wr.length){const Le=Wr.map(Je=>Je?Je.get():null),Ge=(0,l.readCursor)(it(Ut.get()));if(Dr(Ge,Ut,(Je,De,be)=>{const ft=Le[Je];ft&&(be.mergeTree(ft),Le[Je]=null)}),Le.find(Je=>Je)){const Je=(0,l.writeCursor)(),De=(0,l.writeCursor)();let be=0,ft=0;Le.forEach(dt=>{dt!=null&&Dr((0,l.readCursor)(dt),null,xt=>{const Ht=qn[xt];Je.writeMove(Te[Ht].getPath(),tt[Ht].getPath(),be++);const ir=ut[Ht];ir&&ir.forEach(Yt=>{lt[Yt]||$e!==Ae&&ze[Yt]!=null||De.writeMove(nt[Yt].getPath(),de[Yt].getPath(),ft++)})})}),ke={type:c.ConflictType.BLACKHOLE,op1:Je.get(),op2:De.get()}}}}return ke?{ok:!1,conflict:ke}:{ok:!0,result:Ut.get()}}const gr=$=>{const te=new Error("Transform detected write conflict");throw te.conflict=$,te.type=te.name="writeConflict",te};function Ft($,te,pe){const $e=kt($,te,pe);if($e.ok)return $e.result;gr($e.conflict)}const er=$=>{const te=(0,l.writeCursor)();return(0,l.readCursor)($).traverse(te,(pe,$e)=>{(O(pe)||B(pe))&&$e.write("r",!0)}),te.get()},xn=($,te)=>{const{type:pe,op1:$e,op2:ke}=$;switch(pe){case c.ConflictType.DROP_COLLISION:return te==="left"?[null,er(ke)]:[er($e),null];case c.ConflictType.RM_UNEXPECTED_CONTENT:let Te=!1;return(0,l.readCursor)($e).traverse(null,tt=>{tt.r!==void 0&&(Te=!0)}),Te?[null,er(ke)]:[er($e),null];case c.ConflictType.BLACKHOLE:return[er($e),er(ke)];default:throw Error("Unrecognised conflict: "+pe)}};function Pr($,te,pe,$e){let ke=null;for(;;){const Te=kt(te,pe,$e);if(Te.ok)return V(ke,Te.result);{const{conflict:tt}=Te;$(tt)||gr(tt);const[nt,de]=xn(tt,$e);te=V(U(te),nt),pe=V(U(pe),de),ke=V(ke,de)}}}},{"./cursor.js":23,"./deepClone.js":24,"./deepEqual.js":25,"./log":28,"./types.js":29,assert:1,"ot-text-unicode":31}],28:[function(r,n,i){Object.defineProperty(i,"__esModule",{value:!0});function o(...s){if(o.quiet)return;const{inspect:a}=r("util"),l=u=>typeof u=="string"?u:a(u,{depth:10,colors:!0}),c=Array(o.prefix).fill(" ").join("");console.log(c+s.map(l).join(" "))}i.default=o,o.quiet=!0,o.prefix=0},{util:37}],29:[function(r,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.ConflictType=void 0;var o;(function(s){s[s.RM_UNEXPECTED_CONTENT=1]="RM_UNEXPECTED_CONTENT",s[s.DROP_COLLISION=2]="DROP_COLLISION",s[s.BLACKHOLE=3]="BLACKHOLE"})(o||(i.ConflictType=o={}))},{}],30:[function(r,n,i){Object.defineProperty(i,"__esModule",{value:!0});const o=r("./type"),s=r("unicount");function a(l,c){return{get:l,getLength(){return l().length},insert(u,f,h){const d=s.strPosToUni(l(),u);return c([d,f],h)},remove(u,f,h){const d=s.strPosToUni(l(),u);return c([d,{d:f}],h)},_onOp(u){o.eachOp(u,(f,h,d)=>{switch(typeof f){case"string":this.onInsert&&this.onInsert(d,f);break;case"object":const p=o.dlen(f.d);this.onRemove&&this.onRemove(d,p)}})},onInsert:null,onRemove:null}}i.default=a,a.provides={text:!0}},{"./type":32,unicount:34}],31:[function(r,n,i){var o=this&&this.__createBinding||(Object.create?function(m,y,O,v){v===void 0&&(v=O),Object.defineProperty(m,v,{enumerable:!0,get:function(){return y[O]}})}:function(m,y,O,v){v===void 0&&(v=O),m[v]=y[O]}),s=this&&this.__setModuleDefault||(Object.create?function(m,y){Object.defineProperty(m,"default",{enumerable:!0,value:y})}:function(m,y){m.default=y}),a=this&&this.__importStar||function(m){if(m&&m.__esModule)return m;var y={};if(m!=null)for(var O in m)Object.hasOwnProperty.call(m,O)&&o(y,m,O);return s(y,m),y},l=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(i,"__esModule",{value:!0}),i.type=i.remove=i.insert=void 0;const c=r("unicount"),u=a(r("./type")),f=l(r("./api")),h={create(m){return m},toString(m){return m},builder(m){if(typeof m!="string")throw Error("Invalid document snapshot: "+m);const y=[];return{skip(O){let v=c.uniToStrPos(m,O);if(v>m.length)throw Error("The op is too long for this document");y.push(m.slice(0,v)),m=m.slice(v)},append(O){y.push(O)},del(O){m=m.slice(c.uniToStrPos(m,O))},build(){return y.join("")+m}}},slice:u.uniSlice},d=u.default(h),p=Object.assign(Object.assign({},d),{api:f.default});i.type=p,i.insert=(m,y)=>y.length===0?[]:m===0?[y]:[m,y],i.remove=(m,y)=>u.dlen(y)===0?[]:m===0?[{d:y}]:[m,{d:y}];var g=r("./type");Object.defineProperty(i,"makeType",{enumerable:!0,get:function(){return g.default}})},{"./api":30,"./type":32,unicount:34}],32:[function(r,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.uniSlice=i.dlen=i.eachOp=void 0;const o=r("unicount"),s=k=>{if(!Array.isArray(k))throw Error("Op must be an array of components");let x=null;for(let E=0;E<k.length;E++){const R=k[E];switch(typeof R){case"object":if(typeof R.d!="number"&&typeof R.d!="string")throw Error("Delete must be number or string");if(i.dlen(R.d)<=0)throw Error("Deletes must not be empty");break;case"string":if(!(R.length>0))throw Error("Inserts cannot be empty");break;case"number":if(!(R>0))throw Error("Skip components must be >0");if(typeof x=="number")throw Error("Adjacent skip components should be combined");break}x=R}if(typeof x=="number")throw Error("Op has a trailing skip")};function a(k,x){let E=0,R=0;for(let I=0;I<k.length;I++){const F=k[I];switch(x(F,E,R),typeof F){case"object":E+=i.dlen(F.d);break;case"string":R+=o.strPosToUni(F);break;case"number":E+=F,R+=F;break}}}i.eachOp=a;function l(k,x){const E=[],R=f(E);return a(k,(I,F,H)=>{R(x(I,F,H))}),g(E)}const c=k=>k,u=k=>l(k,c);i.dlen=k=>typeof k=="number"?k:o.strPosToUni(k);const f=k=>x=>{if(!(!x||x.d===0||x.d===""))if(k.length===0)k.push(x);else if(typeof x==typeof k[k.length-1])if(typeof x=="object"){const E=k[k.length-1];E.d=typeof E.d=="string"&&typeof x.d=="string"?E.d+x.d:i.dlen(E.d)+i.dlen(x.d)}else k[k.length-1]+=x;else k.push(x)},h=k=>typeof k=="number"?k:typeof k=="string"?o.strPosToUni(k):typeof k.d=="number"?k.d:o.strPosToUni(k.d);i.uniSlice=(k,x,E)=>{const R=o.uniToStrPos(k,x),I=E==null?1/0:o.uniToStrPos(k,E);return k.slice(R,I)};const d=(k,x,E)=>typeof k=="number"?E==null?k-x:Math.min(k,E)-x:i.uniSlice(k,x,E),p=k=>{let x=0,E=0;return{take:(F,H)=>{if(x===k.length)return F===-1?null:F;const M=k[x];let B;if(typeof M=="number")return F===-1||M-E<=F?(B=M-E,++x,E=0,B):(E+=F,F);if(typeof M=="string"){if(F===-1||H==="i"||o.strPosToUni(M.slice(E))<=F)return B=M.slice(E),++x,E=0,B;{const D=E+o.uniToStrPos(M.slice(E),F);return B=M.slice(E,D),E=D,B}}else{if(F===-1||H==="d"||i.dlen(M.d)-E<=F)return B={d:d(M.d,E)},++x,E=0,B;{let D=d(M.d,E,E+F);return E+=F,{d:D}}}},peek:()=>k[x]}},g=k=>(k.length>0&&typeof k[k.length-1]=="number"&&k.pop(),k);function m(k,x,E){if(E!=="left"&&E!=="right")throw Error("side ("+E+") must be 'left' or 'right'");s(k),s(x);const R=[],I=f(R),{take:F,peek:H}=p(k);for(let B=0;B<x.length;B++){const D=x[B];let X,G;switch(typeof D){case"number":for(X=D;X>0;)G=F(X,"i"),I(G),typeof G!="string"&&(X-=h(G));break;case"string":E==="left"&&typeof H()=="string"&&I(F(-1)),I(o.strPosToUni(D));break;case"object":for(X=i.dlen(D.d);X>0;)switch(G=F(X,"i"),typeof G){case"number":X-=G;break;case"string":I(G);break;case"object":X-=i.dlen(G.d)}break}}let M;for(;M=F(-1);)I(M);return g(R)}function y(k,x){s(k),s(x);const E=[],R=f(E),{take:I}=p(k);for(let H=0;H<x.length;H++){const M=x[H];let B,D;switch(typeof M){case"number":for(B=M;B>0;)D=I(B,"d"),R(D),typeof D!="object"&&(B-=h(D));break;case"string":R(M);break;case"object":B=i.dlen(M.d);let X=0;for(;X<B;)switch(D=I(B-X,"d"),typeof D){case"number":R({d:d(M.d,X,X+D)}),X+=D;break;case"string":X+=o.strPosToUni(D);break;case"object":R(D)}break}}let F;for(;F=I(-1);)R(F);return g(E)}const O=(k,x)=>{let E=0;for(let R=0;R<x.length&&k>E;R++){const I=x[R];switch(typeof I){case"number":{E+=I;break}case"string":const F=o.strPosToUni(I);E+=F,k+=F;break;case"object":k-=Math.min(i.dlen(I.d),k-E);break}}return k},v=(k,x)=>typeof k=="number"?O(k,x):k.map(E=>O(E,x));function b(k,x,E){return l(k,(R,I)=>typeof R=="object"&&typeof R.d=="number"?{d:E.slice(x,I,I+R.d)}:R)}function w(k){return l(k,x=>{switch(typeof x){case"object":if(typeof x.d=="number")throw Error("Cannot invert text op: Deleted characters missing from operation. makeInvertible must be called first.");return x.d;case"string":return{d:x};case"number":return x}})}function _(k){return l(k,x=>typeof x=="object"&&typeof x.d=="string"?{d:o.strPosToUni(x.d)}:x)}function C(k){let x=!0;return a(k,E=>{typeof E=="object"&&typeof E.d=="number"&&(x=!1)}),x}function P(k){return{name:"text-unicode",uri:"http://sharejs.org/types/text-unicode",trim:g,normalize:u,checkOp:s,create(x=""){if(typeof x!="string")throw Error("Initial data must be a string");return k.create(x)},apply(x,E){s(E);const R=k.builder(x);for(let I=0;I<E.length;I++){const F=E[I];switch(typeof F){case"number":R.skip(F);break;case"string":R.append(F);break;case"object":R.del(i.dlen(F.d));break}}return R.build()},transform:m,compose:y,transformPosition:O,transformSelection:v,isInvertible:C,makeInvertible(x,E){return b(x,E,k)},stripInvertible:_,invert:w,invertWithDoc(x,E){return w(b(x,E,k))},isNoop:x=>x.length===0}}i.default=P},{unicount:34}],33:[function(r,n,i){var o=n.exports={},s,a;function l(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=l}catch{s=l}try{typeof clearTimeout=="function"?a=clearTimeout:a=c}catch{a=c}})();function u(b){if(s===setTimeout)return setTimeout(b,0);if((s===l||!s)&&setTimeout)return s=setTimeout,setTimeout(b,0);try{return s(b,0)}catch{try{return s.call(null,b,0)}catch{return s.call(this,b,0)}}}function f(b){if(a===clearTimeout)return clearTimeout(b);if((a===c||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(b);try{return a(b)}catch{try{return a.call(null,b)}catch{return a.call(this,b)}}}var h=[],d=!1,p,g=-1;function m(){!d||!p||(d=!1,p.length?h=p.concat(h):g=-1,h.length&&y())}function y(){if(!d){var b=u(m);d=!0;for(var w=h.length;w;){for(p=h,h=[];++g<w;)p&&p[g].run();g=-1,w=h.length}p=null,d=!1,f(b)}}o.nextTick=function(b){var w=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)w[_-1]=arguments[_];h.push(new O(b,w)),h.length===1&&!d&&u(y)};function O(b,w){this.fun=b,this.array=w}O.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function v(){}o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(b){return[]},o.binding=function(b){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(b){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],34:[function(r,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.uniToStrPos=i.strPosToUni=void 0,i.strPosToUni=(o,s=o.length)=>{let a=0,l=0;for(;l<s;l++){const c=o.charCodeAt(l);c>=55296&&c<=57343&&(a++,l++)}if(l!==s)throw Error("Invalid offset - splits unicode bytes");return l-a},i.uniToStrPos=(o,s)=>{let a=0;for(;s>0;s--){const l=o.charCodeAt(a);a+=l>=55296&&l<=57343?2:1}return a}},{}],35:[function(r,n,i){arguments[4][3][0].apply(i,arguments)},{dup:3}],36:[function(r,n,i){var o=r("is-arguments"),s=r("is-generator-function"),a=r("which-typed-array"),l=r("is-typed-array");function c($){return $.call.bind($)}var u=typeof BigInt<"u",f=typeof Symbol<"u",h=c(Object.prototype.toString),d=c(Number.prototype.valueOf),p=c(String.prototype.valueOf),g=c(Boolean.prototype.valueOf);if(u)var m=c(BigInt.prototype.valueOf);if(f)var y=c(Symbol.prototype.valueOf);function O($,te){if(typeof $!="object")return!1;try{return te($),!0}catch{return!1}}i.isArgumentsObject=o,i.isGeneratorFunction=s,i.isTypedArray=l;function v($){return typeof Promise<"u"&&$ instanceof Promise||$!==null&&typeof $=="object"&&typeof $.then=="function"&&typeof $.catch=="function"}i.isPromise=v;function b($){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView($):l($)||T($)}i.isArrayBufferView=b;function w($){return a($)==="Uint8Array"}i.isUint8Array=w;function _($){return a($)==="Uint8ClampedArray"}i.isUint8ClampedArray=_;function C($){return a($)==="Uint16Array"}i.isUint16Array=C;function P($){return a($)==="Uint32Array"}i.isUint32Array=P;function k($){return a($)==="Int8Array"}i.isInt8Array=k;function x($){return a($)==="Int16Array"}i.isInt16Array=x;function E($){return a($)==="Int32Array"}i.isInt32Array=E;function R($){return a($)==="Float32Array"}i.isFloat32Array=R;function I($){return a($)==="Float64Array"}i.isFloat64Array=I;function F($){return a($)==="BigInt64Array"}i.isBigInt64Array=F;function H($){return a($)==="BigUint64Array"}i.isBigUint64Array=H;function M($){return h($)==="[object Map]"}M.working=typeof Map<"u"&&M(new Map);function B($){return typeof Map>"u"?!1:M.working?M($):$ instanceof Map}i.isMap=B;function D($){return h($)==="[object Set]"}D.working=typeof Set<"u"&&D(new Set);function X($){return typeof Set>"u"?!1:D.working?D($):$ instanceof Set}i.isSet=X;function G($){return h($)==="[object WeakMap]"}G.working=typeof WeakMap<"u"&&G(new WeakMap);function se($){return typeof WeakMap>"u"?!1:G.working?G($):$ instanceof WeakMap}i.isWeakMap=se;function ce($){return h($)==="[object WeakSet]"}ce.working=typeof WeakSet<"u"&&ce(new WeakSet);function U($){return ce($)}i.isWeakSet=U;function K($){return h($)==="[object ArrayBuffer]"}K.working=typeof ArrayBuffer<"u"&&K(new ArrayBuffer);function oe($){return typeof ArrayBuffer>"u"?!1:K.working?K($):$ instanceof ArrayBuffer}i.isArrayBuffer=oe;function Re($){return h($)==="[object DataView]"}Re.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Re(new DataView(new ArrayBuffer(1),0,1));function T($){return typeof DataView>"u"?!1:Re.working?Re($):$ instanceof DataView}i.isDataView=T;var Z=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function V($){return h($)==="[object SharedArrayBuffer]"}function ne($){return typeof Z>"u"?!1:(typeof V.working>"u"&&(V.working=V(new Z)),V.working?V($):$ instanceof Z)}i.isSharedArrayBuffer=ne;function fe($){return h($)==="[object AsyncFunction]"}i.isAsyncFunction=fe;function ge($){return h($)==="[object Map Iterator]"}i.isMapIterator=ge;function he($){return h($)==="[object Set Iterator]"}i.isSetIterator=he;function we($){return h($)==="[object Generator]"}i.isGeneratorObject=we;function Ae($){return h($)==="[object WebAssembly.Module]"}i.isWebAssemblyCompiledModule=Ae;function it($){return O($,d)}i.isNumberObject=it;function kt($){return O($,p)}i.isStringObject=kt;function gr($){return O($,g)}i.isBooleanObject=gr;function Ft($){return u&&O($,m)}i.isBigIntObject=Ft;function er($){return f&&O($,y)}i.isSymbolObject=er;function xn($){return it($)||kt($)||gr($)||Ft($)||er($)}i.isBoxedPrimitive=xn;function Pr($){return typeof Uint8Array<"u"&&(oe($)||ne($))}i.isAnyArrayBuffer=Pr,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function($){Object.defineProperty(i,$,{enumerable:!1,value:function(){throw new Error($+" is not supported in userland")}})})},{"is-arguments":18,"is-generator-function":20,"is-typed-array":21,"which-typed-array":38}],37:[function(r,n,i){(function(o){(function(){var s=Object.getOwnPropertyDescriptors||function(Z){for(var V=Object.keys(Z),ne={},fe=0;fe<V.length;fe++)ne[V[fe]]=Object.getOwnPropertyDescriptor(Z,V[fe]);return ne},a=/%[sdj%]/g;i.format=function(T){if(!x(T)){for(var Z=[],V=0;V<arguments.length;V++)Z.push(f(arguments[V]));return Z.join(" ")}for(var V=1,ne=arguments,fe=ne.length,ge=String(T).replace(a,function(we){if(we==="%%")return"%";if(V>=fe)return we;switch(we){case"%s":return String(ne[V++]);case"%d":return Number(ne[V++]);case"%j":try{return JSON.stringify(ne[V++])}catch{return"[Circular]"}default:return we}}),he=ne[V];V<fe;he=ne[++V])C(he)||!F(he)?ge+=" "+he:ge+=" "+f(he);return ge},i.deprecate=function(T,Z){if(typeof o<"u"&&o.noDeprecation===!0)return T;if(typeof o>"u")return function(){return i.deprecate(T,Z).apply(this,arguments)};var V=!1;function ne(){if(!V){if(o.throwDeprecation)throw new Error(Z);o.traceDeprecation?console.trace(Z):console.error(Z),V=!0}return T.apply(this,arguments)}return ne};var l={},c=/^$/;if(o.env.NODE_DEBUG){var u=o.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),c=new RegExp("^"+u+"$","i")}i.debuglog=function(T){if(T=T.toUpperCase(),!l[T])if(c.test(T)){var Z=o.pid;l[T]=function(){var V=i.format.apply(i,arguments);console.error("%s %d: %s",T,Z,V)}}else l[T]=function(){};return l[T]};function f(T,Z){var V={seen:[],stylize:d};return arguments.length>=3&&(V.depth=arguments[2]),arguments.length>=4&&(V.colors=arguments[3]),_(Z)?V.showHidden=Z:Z&&i._extend(V,Z),R(V.showHidden)&&(V.showHidden=!1),R(V.depth)&&(V.depth=2),R(V.colors)&&(V.colors=!1),R(V.customInspect)&&(V.customInspect=!0),V.colors&&(V.stylize=h),g(V,T,V.depth)}i.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(T,Z){var V=f.styles[Z];return V?"\x1B["+f.colors[V][0]+"m"+T+"\x1B["+f.colors[V][1]+"m":T}function d(T,Z){return T}function p(T){var Z={};return T.forEach(function(V,ne){Z[V]=!0}),Z}function g(T,Z,V){if(T.customInspect&&Z&&B(Z.inspect)&&Z.inspect!==i.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var ne=Z.inspect(V,T);return x(ne)||(ne=g(T,ne,V)),ne}var fe=m(T,Z);if(fe)return fe;var ge=Object.keys(Z),he=p(ge);if(T.showHidden&&(ge=Object.getOwnPropertyNames(Z)),M(Z)&&(ge.indexOf("message")>=0||ge.indexOf("description")>=0))return y(Z);if(ge.length===0){if(B(Z)){var we=Z.name?": "+Z.name:"";return T.stylize("[Function"+we+"]","special")}if(I(Z))return T.stylize(RegExp.prototype.toString.call(Z),"regexp");if(H(Z))return T.stylize(Date.prototype.toString.call(Z),"date");if(M(Z))return y(Z)}var Ae="",it=!1,kt=["{","}"];if(w(Z)&&(it=!0,kt=["[","]"]),B(Z)){var gr=Z.name?": "+Z.name:"";Ae=" [Function"+gr+"]"}if(I(Z)&&(Ae=" "+RegExp.prototype.toString.call(Z)),H(Z)&&(Ae=" "+Date.prototype.toUTCString.call(Z)),M(Z)&&(Ae=" "+y(Z)),ge.length===0&&(!it||Z.length==0))return kt[0]+Ae+kt[1];if(V<0)return I(Z)?T.stylize(RegExp.prototype.toString.call(Z),"regexp"):T.stylize("[Object]","special");T.seen.push(Z);var Ft;return it?Ft=O(T,Z,V,he,ge):Ft=ge.map(function(er){return v(T,Z,V,he,er,it)}),T.seen.pop(),b(Ft,Ae,kt)}function m(T,Z){if(R(Z))return T.stylize("undefined","undefined");if(x(Z)){var V="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return T.stylize(V,"string")}if(k(Z))return T.stylize(""+Z,"number");if(_(Z))return T.stylize(""+Z,"boolean");if(C(Z))return T.stylize("null","null")}function y(T){return"["+Error.prototype.toString.call(T)+"]"}function O(T,Z,V,ne,fe){for(var ge=[],he=0,we=Z.length;he<we;++he)U(Z,String(he))?ge.push(v(T,Z,V,ne,String(he),!0)):ge.push("");return fe.forEach(function(Ae){Ae.match(/^\d+$/)||ge.push(v(T,Z,V,ne,Ae,!0))}),ge}function v(T,Z,V,ne,fe,ge){var he,we,Ae;if(Ae=Object.getOwnPropertyDescriptor(Z,fe)||{value:Z[fe]},Ae.get?Ae.set?we=T.stylize("[Getter/Setter]","special"):we=T.stylize("[Getter]","special"):Ae.set&&(we=T.stylize("[Setter]","special")),U(ne,fe)||(he="["+fe+"]"),we||(T.seen.indexOf(Ae.value)<0?(C(V)?we=g(T,Ae.value,null):we=g(T,Ae.value,V-1),we.indexOf(`
|
|
69
|
+
`)>-1&&(ge?we=we.split(`
|
|
70
|
+
`).map(function(it){return" "+it}).join(`
|
|
71
|
+
`).slice(2):we=`
|
|
72
|
+
`+we.split(`
|
|
73
|
+
`).map(function(it){return" "+it}).join(`
|
|
74
|
+
`))):we=T.stylize("[Circular]","special")),R(he)){if(ge&&fe.match(/^\d+$/))return we;he=JSON.stringify(""+fe),he.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(he=he.slice(1,-1),he=T.stylize(he,"name")):(he=he.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),he=T.stylize(he,"string"))}return he+": "+we}function b(T,Z,V){var ne=T.reduce(function(fe,ge){return ge.indexOf(`
|
|
75
|
+
`)>=0,fe+ge.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?V[0]+(Z===""?"":Z+`
|
|
76
|
+
`)+" "+T.join(`,
|
|
77
|
+
`)+" "+V[1]:V[0]+Z+" "+T.join(", ")+" "+V[1]}i.types=r("./support/types");function w(T){return Array.isArray(T)}i.isArray=w;function _(T){return typeof T=="boolean"}i.isBoolean=_;function C(T){return T===null}i.isNull=C;function P(T){return T==null}i.isNullOrUndefined=P;function k(T){return typeof T=="number"}i.isNumber=k;function x(T){return typeof T=="string"}i.isString=x;function E(T){return typeof T=="symbol"}i.isSymbol=E;function R(T){return T===void 0}i.isUndefined=R;function I(T){return F(T)&&X(T)==="[object RegExp]"}i.isRegExp=I,i.types.isRegExp=I;function F(T){return typeof T=="object"&&T!==null}i.isObject=F;function H(T){return F(T)&&X(T)==="[object Date]"}i.isDate=H,i.types.isDate=H;function M(T){return F(T)&&(X(T)==="[object Error]"||T instanceof Error)}i.isError=M,i.types.isNativeError=M;function B(T){return typeof T=="function"}i.isFunction=B;function D(T){return T===null||typeof T=="boolean"||typeof T=="number"||typeof T=="string"||typeof T=="symbol"||typeof T>"u"}i.isPrimitive=D,i.isBuffer=r("./support/isBuffer");function X(T){return Object.prototype.toString.call(T)}function G(T){return T<10?"0"+T.toString(10):T.toString(10)}var se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ce(){var T=new Date,Z=[G(T.getHours()),G(T.getMinutes()),G(T.getSeconds())].join(":");return[T.getDate(),se[T.getMonth()],Z].join(" ")}i.log=function(){console.log("%s - %s",ce(),i.format.apply(i,arguments))},i.inherits=r("inherits"),i._extend=function(T,Z){if(!Z||!F(Z))return T;for(var V=Object.keys(Z),ne=V.length;ne--;)T[V[ne]]=Z[V[ne]];return T};function U(T,Z){return Object.prototype.hasOwnProperty.call(T,Z)}var K=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;i.promisify=function(Z){if(typeof Z!="function")throw new TypeError('The "original" argument must be of type Function');if(K&&Z[K]){var V=Z[K];if(typeof V!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(V,K,{value:V,enumerable:!1,writable:!1,configurable:!0}),V}function V(){for(var ne,fe,ge=new Promise(function(Ae,it){ne=Ae,fe=it}),he=[],we=0;we<arguments.length;we++)he.push(arguments[we]);he.push(function(Ae,it){Ae?fe(Ae):ne(it)});try{Z.apply(this,he)}catch(Ae){fe(Ae)}return ge}return Object.setPrototypeOf(V,Object.getPrototypeOf(Z)),K&&Object.defineProperty(V,K,{value:V,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(V,s(Z))},i.promisify.custom=K;function oe(T,Z){if(!T){var V=new Error("Promise was rejected with a falsy value");V.reason=T,T=V}return Z(T)}function Re(T){if(typeof T!="function")throw new TypeError('The "original" argument must be of type Function');function Z(){for(var V=[],ne=0;ne<arguments.length;ne++)V.push(arguments[ne]);var fe=V.pop();if(typeof fe!="function")throw new TypeError("The last argument must be of type Function");var ge=this,he=function(){return fe.apply(ge,arguments)};T.apply(this,V).then(function(we){o.nextTick(he.bind(null,null,we))},function(we){o.nextTick(oe.bind(null,we,he))})}return Object.setPrototypeOf(Z,Object.getPrototypeOf(T)),Object.defineProperties(Z,s(T)),Z}i.callbackify=Re}).call(this)}).call(this,r("_process"))},{"./support/isBuffer":35,"./support/types":36,_process:33,inherits:17}],38:[function(r,n,i){(function(o){(function(){var s=r("for-each"),a=r("available-typed-arrays"),l=r("call-bind/callBound"),c=r("gopd"),u=l("Object.prototype.toString"),f=r("has-tostringtag/shams")(),h=typeof globalThis>"u"?o:globalThis,d=a(),p=l("String.prototype.slice"),g={},m=Object.getPrototypeOf;f&&c&&m&&s(d,function(v){if(typeof h[v]=="function"){var b=new h[v];if(Symbol.toStringTag in b){var w=m(b),_=c(w,Symbol.toStringTag);if(!_){var C=m(w);_=c(C,Symbol.toStringTag)}g[v]=_.get}}});var y=function(b){var w=!1;return s(g,function(_,C){if(!w)try{var P=_.call(b);P===C&&(w=P)}catch{}}),w},O=r("is-typed-array");n.exports=function(b){return O(b)?!f||!(Symbol.toStringTag in b)?p(u(b),8,-1):y(b):!1}}).call(this)}).call(this,typeof Vr<"u"?Vr:typeof self<"u"?self:typeof window<"u"?window:{})},{"available-typed-arrays":5,"call-bind/callBound":6,"for-each":8,gopd:12,"has-tostringtag/shams":15,"is-typed-array":21}],39:[function(r,n,i){const o=r("ot-json1-presence"),s=r("ot-text-unicode");n.exports={json1Presence:o,textUnicode:s}},{"ot-json1-presence":26,"ot-text-unicode":31}]},{},[39])(39)})})(eE);var k5=eE.exports;const x5=Pi(k5),{json1Presence:$0,textUnicode:tE}=x5;function _5(t){return new Worker("/assets/worker-DqNV0IYq.js",{name:t==null?void 0:t.name})}function $5(t){return new Worker("/assets/index-Bx5B6Xgl.js",{name:t==null?void 0:t.name})}const C5=!0,uS=800,rE="vzCodeSidebarWidth",nE="vzCodeCodeEditorWidth",iE=250;let wg=iE;const oE=800;let Pg=oE,sy=!1;if(typeof window<"u"&&C5){const t=window.localStorage.getItem(rE),e=window.localStorage.getItem(nE);t!==null&&(wg=+t,sy=!0),e!==null&&(Pg=+e,sy=!0)}const E5={codeEditorWidth:Pg,sidebarWidth:wg,moveSplitPane:()=>{},isDraggingRight:!1,isDraggingLeft:!1,setIsDragging:()=>{}},kg=N.createContext(E5),Q5={sidebarWidth:iE,codeEditorWidth:oE,isDraggingLeft:!1,isDraggingRight:!1,isInitialized:!1},T5=(t,e)=>{switch(e.type){case"initialize":return{...t,sidebarWidth:wg,codeEditorWidth:Pg,isInitialized:!0};case"move":return e.side==="left"?{...t,sidebarWidth:t.sidebarWidth+e.movementX}:{...t,codeEditorWidth:t.codeEditorWidth+e.movementX};case"setIsDragging":return e.side==="left"?{...t,isDraggingLeft:e.isDragging}:{...t,isDraggingRight:e.isDragging};default:return t}},R5=({children:t})=>{const[e,r]=N.useReducer(T5,Q5),n=N.useCallback((f,h)=>{r({type:"setIsDragging",isDragging:f,side:h})},[r]),i=N.useCallback((f,h)=>{r({type:"move",movementX:f,side:h})},[r]),{sidebarWidth:o,codeEditorWidth:s,isDraggingLeft:a,isDraggingRight:l,isInitialized:c}=e;typeof window<"u"&&N.useLayoutEffect(()=>{sy&&!c&&r({type:"initialize"})},[c]),N.useEffect(()=>{o!==wg&&setTimeout(()=>{window.localStorage.setItem(rE,""+o)},uS),s!==Pg&&setTimeout(()=>{window.localStorage.setItem(nE,""+s)},uS)},[s,o]);const u={codeEditorWidth:s,sidebarWidth:o,moveSplitPane:i,isDraggingLeft:a,isDraggingRight:l,setIsDragging:n};return q.jsx(kg.Provider,{value:u,children:t})},A5=1200,M5=t=>{const e=t.match(/\.([^.]+)$/);return e?e[1]:""},j5=({shareDBDoc:t,submitOperation:e,prettierWorker:r})=>{const n=N.useRef(new Set),[i,o]=N.useState(null),s=N.useRef(!1),a=N.useRef(null);return N.useEffect(()=>{if(!t)return;const l=f=>{const{fileId:h,error:d,fileTextPrettified:p}=f.data;if(d){o(d);return}else o(null);s.current=!0,e(g=>({...g,files:{...g.files,[h]:{...g.files[h],text:p}}})),s.current=!1};r.addEventListener("message",l);const c=async()=>{const h=t.data.files,d=n.current,p=Array.from(d);d.clear();for(const g of p){const m=h[g],y={fileText:m.text,fileExtension:M5(m.name),fileId:g};r.postMessage(y)}};a.current=c;const u=f=>{if(!s.current&&f&&f.length===4&&f[0]==="files"&&typeof f[1]=="string"&&f[2]==="text"){const h=f[1];n.current.add(h)}};return t.on("op batch",u),()=>{r.removeEventListener("message",l),t.removeListener("op batch",u)}},[t]),{prettierError:i,runPrettierRef:a}},D5=500,q5=A5+D5,Z5=({content:t,typeScriptWorker:e})=>{const r=N.useRef(null),n=N.useCallback(i=>{i!==null&&(clearTimeout(r.current),r.current=window.setTimeout(()=>{e.postMessage({event:"update-content",details:i})},q5))},[e]);N.useEffect(()=>{n(t)},[t])},N5=(t,e)=>{if(e.type!=="close_tabs")return t;const r=t.tabList.filter(o=>!e.fileIdsToClose.includes(o.fileId));if(!e.fileIdsToClose.includes(t.activeFileId))return{...t,tabList:r};const n=t.tabList.findIndex(o=>o.fileId===t.activeFileId);let i=null;for(let o=n-1;o>=0;o--)if(!e.fileIdsToClose.includes(t.tabList[o].fileId)){i=t.tabList[o].fileId;break}if(!i){for(let o=n+1;o<t.tabList.length;o++)if(!e.fileIdsToClose.includes(t.tabList[o].fileId)){i=t.tabList[o].fileId;break}}return{...t,tabList:r,activeFileId:i}},I5=(t,e)=>{if(e.type!=="open_tab")return t;const r=t.tabList.findIndex(l=>l.fileId===e.fileId),n=r!==-1,i=n&&t.tabList[r].isTransient,o=t.tabList.findIndex(l=>l.isTransient&&l.fileId!==e.fileId),s={fileId:e.fileId,isTransient:e.isTransient};let a;return n?i?a=t.tabList.map(l=>l.fileId===e.fileId?s:l):a=[...t.tabList]:o!==-1?(a=[...t.tabList],a[o]=s):a=[...t.tabList,s],{...t,activeFileId:e.fileId,tabList:a,editorWantsFocus:!e.isTransient}},W5=(t,e)=>e.type==="set_active_file_id"?{...t,activeFileId:e.activeFileId}:t,B5=(t,e)=>{if(e.type!=="set_active_file_left")return t;let r=t.tabList.findIndex(n=>n.fileId===t.activeFileId);return r-=1,r<0&&(r=t.tabList.length-1),{...t,activeFileId:t.tabList[r].fileId}},L5=(t,e)=>{if(e.type!=="set_active_file_right")return t;let r=t.tabList.findIndex(n=>n.fileId===t.activeFileId);return r+=1,r>t.tabList.length-1&&(r=0),{...t,activeFileId:t.tabList[r].fileId}},V5=(t,e)=>e.type==="set_is_settings_open"?{...t,isSettingsOpen:e.value}:t,X5=(t,e)=>e.type==="set_is_doc_open"?{...t,isDocOpen:e.value}:t,F5=(t,e)=>e.type==="set_theme"?{...t,theme:e.themeLabel}:t,U5=(t,e)=>e.type==="editor_no_longer_wants_focus"?{...t,editorWantsFocus:!1}:t,Y5=(t,e)=>e.type==="set_username"?{...t,username:e.username}:t,z5=({defaultTheme:t,initialUsername:e="Anonymous"})=>({tabList:[],activeFileId:null,theme:t,isSettingsOpen:!1,isDocOpen:!1,editorWantsFocus:!1,username:e}),G5=[W5,B5,L5,I5,N5,F5,V5,X5,U5,Y5],H5=(t,e)=>G5.reduce((r,n)=>n(r,e),t);class Zt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,r,n){[e,r]=Xl(this,e,r);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(r,this.length,i,1),ao.from(i,this.length-(r-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,r=this.length){[e,r]=Xl(this,e,r);let n=[];return this.decompose(e,r,n,0),ao.from(n,r-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let r=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new mc(this),o=new mc(e);for(let s=r,a=r;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(a+=i.value.length,i.done||a>=n)return!0}}iter(e=1){return new mc(this,e)}iterRange(e,r=this.length){return new sE(this,e,r)}iterLines(e,r){let n;if(e==null)n=this.iter();else{r==null&&(r=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,r==this.lines+1?this.length:r<=1?0:this.line(r-1).to))}return new aE(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Zt.empty:e.length<=32?new Mr(e):ao.from(Mr.split(e,[]))}}class Mr extends Zt{constructor(e,r=K5(e)){super(),this.text=e,this.length=r}get lines(){return this.text.length}get children(){return null}lineInner(e,r,n,i){for(let o=0;;o++){let s=this.text[o],a=i+s.length;if((r?n:a)>=e)return new J5(i,a,n,s);i=a+1,n++}}decompose(e,r,n,i){let o=e<=0&&r>=this.length?this:new Mr(cS(this.text,e,r),Math.min(r,this.length)-Math.max(0,e));if(i&1){let s=n.pop(),a=Dd(o.text,s.text.slice(),0,o.length);if(a.length<=32)n.push(new Mr(a,s.length+o.length));else{let l=a.length>>1;n.push(new Mr(a.slice(0,l)),new Mr(a.slice(l)))}}else n.push(o)}replace(e,r,n){if(!(n instanceof Mr))return super.replace(e,r,n);[e,r]=Xl(this,e,r);let i=Dd(this.text,Dd(n.text,cS(this.text,0,e)),r),o=this.length+n.length-(r-e);return i.length<=32?new Mr(i,o):ao.from(Mr.split(i,[]),o)}sliceString(e,r=this.length,n=`
|
|
78
|
+
`){[e,r]=Xl(this,e,r);let i="";for(let o=0,s=0;o<=r&&s<this.text.length;s++){let a=this.text[s],l=o+a.length;o>e&&s&&(i+=n),e<l&&r>o&&(i+=a.slice(Math.max(0,e-o),r-o)),o=l+1}return i}flatten(e){for(let r of this.text)e.push(r)}scanIdentical(){return 0}static split(e,r){let n=[],i=-1;for(let o of e)n.push(o),i+=o.length+1,n.length==32&&(r.push(new Mr(n,i)),n=[],i=-1);return i>-1&&r.push(new Mr(n,i)),r}}class ao extends Zt{constructor(e,r){super(),this.children=e,this.length=r,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,r,n,i){for(let o=0;;o++){let s=this.children[o],a=i+s.length,l=n+s.lines-1;if((r?l:a)>=e)return s.lineInner(e,r,n,i);i=a+1,n=l+1}}decompose(e,r,n,i){for(let o=0,s=0;s<=r&&o<this.children.length;o++){let a=this.children[o],l=s+a.length;if(e<=l&&r>=s){let c=i&((s<=e?1:0)|(l>=r?2:0));s>=e&&l<=r&&!c?n.push(a):a.decompose(e-s,r-s,n,c)}s=l+1}}replace(e,r,n){if([e,r]=Xl(this,e,r),n.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e>=o&&r<=a){let l=s.replace(e-o,r-o,n),c=this.lines-s.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new ao(u,this.length-(r-e)+n.length)}return super.replace(o,a,l)}o=a+1}return super.replace(e,r,n)}sliceString(e,r=this.length,n=`
|
|
79
|
+
`){[e,r]=Xl(this,e,r);let i="";for(let o=0,s=0;o<this.children.length&&s<=r;o++){let a=this.children[o],l=s+a.length;s>e&&o&&(i+=n),e<l&&r>s&&(i+=a.sliceString(e-s,r-s,n)),s=l+1}return i}flatten(e){for(let r of this.children)r.flatten(e)}scanIdentical(e,r){if(!(e instanceof ao))return 0;let n=0,[i,o,s,a]=r>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=r,o+=r){if(i==s||o==a)return n;let l=this.children[i],c=e.children[o];if(l!=c)return n+l.scanIdentical(c,r);n+=l.length+1}}static from(e,r=e.reduce((n,i)=>n+i.length+1,-1)){let n=0;for(let d of e)n+=d.lines;if(n<32){let d=[];for(let p of e)p.flatten(d);return new Mr(d,r)}let i=Math.max(32,n>>5),o=i<<1,s=i>>1,a=[],l=0,c=-1,u=[];function f(d){let p;if(d.lines>o&&d instanceof ao)for(let g of d.children)f(g);else d.lines>s&&(l>s||!l)?(h(),a.push(d)):d instanceof Mr&&l&&(p=u[u.length-1])instanceof Mr&&d.lines+p.lines<=32?(l+=d.lines,c+=d.length+1,u[u.length-1]=new Mr(p.text.concat(d.text),p.length+1+d.length)):(l+d.lines>i&&h(),l+=d.lines,c+=d.length+1,u.push(d))}function h(){l!=0&&(a.push(u.length==1?u[0]:ao.from(u,c)),c=-1,l=u.length=0)}for(let d of e)f(d);return h(),a.length==1?a[0]:new ao(a,r)}}Zt.empty=new Mr([""],0);function K5(t){let e=-1;for(let r of t)e+=r.length+1;return e}function Dd(t,e,r=0,n=1e9){for(let i=0,o=0,s=!0;o<t.length&&i<=n;o++){let a=t[o],l=i+a.length;l>=r&&(l>n&&(a=a.slice(0,n-i)),i<r&&(a=a.slice(r-i)),s?(e[e.length-1]+=a,s=!1):e.push(a)),i=l+1}return e}function cS(t,e,r){return Dd(t,[""],e,r)}class mc{constructor(e,r=1){this.dir=r,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[r>0?1:(e instanceof Mr?e.text.length:e.children.length)<<1]}nextInner(e,r){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],o=this.offsets[n],s=o>>1,a=i instanceof Mr?i.text.length:i.children.length;if(s==(r>0?a:0)){if(n==0)return this.done=!0,this.value="",this;r>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(r>0?0:1)){if(this.offsets[n]+=r,e==0)return this.lineBreak=!0,this.value=`
|
|
80
|
+
`,this;e--}else if(i instanceof Mr){let l=i.text[s+(r<0?-1:0)];if(this.offsets[n]+=r,l.length>Math.max(0,e))return this.value=e==0?l:r>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[s+(r<0?-1:0)];e>l.length?(e-=l.length,this.offsets[n]+=r):(r<0&&this.offsets[n]--,this.nodes.push(l),this.offsets.push(r>0?1:(l instanceof Mr?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class sE{constructor(e,r,n){this.value="",this.done=!1,this.cursor=new mc(e,r>n?-1:1),this.pos=r>n?e.length:0,this.from=Math.min(r,n),this.to=Math.max(r,n)}nextInner(e,r){if(r<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,r<0?this.pos-this.to:this.from-this.pos);let n=r<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*r,this.value=i.length<=n?i:r<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class aE{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:r,lineBreak:n,value:i}=this.inner.next(e);return r&&this.afterBreak?(this.value="",this.afterBreak=!1):r?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Zt.prototype[Symbol.iterator]=function(){return this.iter()},mc.prototype[Symbol.iterator]=sE.prototype[Symbol.iterator]=aE.prototype[Symbol.iterator]=function(){return this});let J5=class{constructor(e,r,n,i){this.from=e,this.to=r,this.number=n,this.text=i}get length(){return this.to-this.from}};function Xl(t,e,r){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,r))]}let Cl="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,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){for(let e=1;e<Cl.length;e+=2)if(Cl[e]>t)return Cl[e-1]<=t;return!1}function fS(t){return t>=127462&&t<=127487}const hS=8205;function fn(t,e,r=!0,n=!0){return(r?lE:tD)(t,e,n)}function lE(t,e,r){if(e==t.length)return e;e&&uE(t.charCodeAt(e))&&cE(t.charCodeAt(e-1))&&e--;let n=ln(t,e);for(e+=di(n);e<t.length;){let i=ln(t,e);if(n==hS||i==hS||r&&eD(i))e+=di(i),n=i;else if(fS(i)){let o=0,s=e-2;for(;s>=0&&fS(ln(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function tD(t,e,r){for(;e>0;){let n=lE(t,e-2,r);if(n<e)return n;e--}return 0}function uE(t){return t>=56320&&t<57344}function cE(t){return t>=55296&&t<56320}function ln(t,e){let r=t.charCodeAt(e);if(!cE(r)||e+1==t.length)return r;let n=t.charCodeAt(e+1);return uE(n)?(r-55296<<10)+(n-56320)+65536:r}function C0(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function di(t){return t<65536?1:2}const ay=/\r\n?|\n/;var Yr=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Yr||(Yr={}));class po{constructor(e){this.sections=e}get length(){let e=0;for(let r=0;r<this.sections.length;r+=2)e+=this.sections[r];return e}get newLength(){let e=0;for(let r=0;r<this.sections.length;r+=2){let n=this.sections[r+1];e+=n<0?this.sections[r]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let r=0,n=0,i=0;r<this.sections.length;){let o=this.sections[r++],s=this.sections[r++];s<0?(e(n,i,o),i+=o):i+=s,n+=o}}iterChangedRanges(e,r=!1){ly(this,e,r)}get invertedDesc(){let e=[];for(let r=0;r<this.sections.length;){let n=this.sections[r++],i=this.sections[r++];i<0?e.push(n,i):e.push(i,n)}return new po(e)}composeDesc(e){return this.empty?e:e.empty?this:fE(this,e)}mapDesc(e,r=!1){return e.empty?this:uy(this,e,r)}mapPos(e,r=-1,n=Yr.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],l=this.sections[s++],c=i+a;if(l<0){if(c>e)return o+(e-i);o+=a}else{if(n!=Yr.Simple&&c>=e&&(n==Yr.TrackDel&&i<e&&c>e||n==Yr.TrackBefore&&i<e||n==Yr.TrackAfter&&c>e))return null;if(c>e||c==e&&r<0&&!a)return e==i||r<0?o:o+l;o+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,r=e){for(let n=0,i=0;n<this.sections.length&&i<=r;){let o=this.sections[n++],s=this.sections[n++],a=i+o;if(s>=0&&i<=r&&a>=e)return i<e&&a>r?"cover":!0;i=a}return!1}toString(){let e="";for(let r=0;r<this.sections.length;){let n=this.sections[r++],i=this.sections[r++];e+=(e?" ":"")+n+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(r=>typeof r!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new po(e)}static create(e){return new po(e)}}class Ur extends po{constructor(e,r){super(e),this.inserted=r}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return ly(this,(r,n,i,o,s)=>e=e.replace(i,i+(n-r),s),!1),e}mapDesc(e,r=!1){return uy(this,e,r,!0)}invert(e){let r=this.sections.slice(),n=[];for(let i=0,o=0;i<r.length;i+=2){let s=r[i],a=r[i+1];if(a>=0){r[i]=a,r[i+1]=s;let l=i>>1;for(;n.length<l;)n.push(Zt.empty);n.push(s?e.slice(o,o+s):Zt.empty)}o+=s}return new Ur(r,n)}compose(e){return this.empty?e:e.empty?this:fE(this,e,!0)}map(e,r=!1){return e.empty?this:uy(this,e,r,!0)}iterChanges(e,r=!1){ly(this,e,r)}get desc(){return po.create(this.sections)}filter(e){let r=[],n=[],i=[],o=new Wc(this);e:for(let s=0,a=0;;){let l=s==e.length?1e9:e[s++];for(;a<l||a==l&&o.len==0;){if(o.done)break e;let u=Math.min(o.len,l-a);yn(i,u,-1);let f=o.ins==-1?-1:o.off==0?o.ins:0;yn(r,u,f),f>0&&as(n,r,o.text),o.forward(u),a+=u}let c=e[s++];for(;a<c;){if(o.done)break e;let u=Math.min(o.len,c-a);yn(r,u,-1),yn(i,u,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(u),a+=u}}return{changes:new Ur(r,n),filtered:po.create(i)}}toJSON(){let e=[];for(let r=0;r<this.sections.length;r+=2){let n=this.sections[r],i=this.sections[r+1];i<0?e.push(n):i==0?e.push([n]):e.push([n].concat(this.inserted[r>>1].toJSON()))}return e}static of(e,r,n){let i=[],o=[],s=0,a=null;function l(u=!1){if(!u&&!i.length)return;s<r&&yn(i,r-s,-1);let f=new Ur(i,o);a=a?a.compose(f.map(a)):f,i=[],o=[],s=0}function c(u){if(Array.isArray(u))for(let f of u)c(f);else if(u instanceof Ur){if(u.length!=r)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${r})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:h=f,insert:d}=u;if(f>h||f<0||h>r)throw new RangeError(`Invalid change range ${f} to ${h} (in doc of length ${r})`);let p=d?typeof d=="string"?Zt.of(d.split(n||ay)):d:Zt.empty,g=p.length;if(f==h&&g==0)return;f<s&&l(),f>s&&yn(i,f-s,-1),yn(i,h-f,g),as(o,i,p),s=h}}return c(e),l(!a),a}static empty(e){return new Ur(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let r=[],n=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")r.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)r.push(o[0],0);else{for(;n.length<i;)n.push(Zt.empty);n[i]=Zt.of(o.slice(1)),r.push(o[0],n[i].length)}}}return new Ur(r,n)}static createSet(e,r){return new Ur(e,r)}}function yn(t,e,r,n=!1){if(e==0&&r<=0)return;let i=t.length-2;i>=0&&r<=0&&r==t[i+1]?t[i]+=e:e==0&&t[i]==0?t[i+1]+=r:n?(t[i]+=e,t[i+1]+=r):t.push(e,r)}function as(t,e,r){if(r.length==0)return;let n=e.length-2>>1;if(n<t.length)t[t.length-1]=t[t.length-1].append(r);else{for(;t.length<n;)t.push(Zt.empty);t.push(r)}}function ly(t,e,r){let n=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],l=t.sections[s++];if(l<0)i+=a,o+=a;else{let c=i,u=o,f=Zt.empty;for(;c+=a,u+=l,l&&n&&(f=f.append(n[s-2>>1])),!(r||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(i,c,o,u,f),i=c,o=u}}}function uy(t,e,r,n=!1){let i=[],o=n?[]:null,s=new Wc(t),a=new Wc(e);for(let l=-1;;)if(s.ins==-1&&a.ins==-1){let c=Math.min(s.len,a.len);yn(i,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!r))){let c=a.len;for(yn(i,a.ins,-1);c;){let u=Math.min(s.len,c);s.ins>=0&&l<s.i&&s.len<=u&&(yn(i,0,s.ins),o&&as(o,i,s.text),l=s.i),s.forward(u),c-=u}a.next()}else if(s.ins>=0){let c=0,u=s.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);c+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;yn(i,c,l<s.i?s.ins:0),o&&l<s.i&&as(o,i,s.text),l=s.i,s.forward(s.len-u)}else{if(s.done&&a.done)return o?Ur.createSet(i,o):po.create(i);throw new Error("Mismatched change set lengths")}}function fE(t,e,r=!1){let n=[],i=r?[]:null,o=new Wc(t),s=new Wc(e);for(let a=!1;;){if(o.done&&s.done)return i?Ur.createSet(n,i):po.create(n);if(o.ins==0)yn(n,o.len,0,a),o.next();else if(s.len==0&&!s.done)yn(n,0,s.ins,a),i&&as(i,n,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let l=Math.min(o.len2,s.len),c=n.length;if(o.ins==-1){let u=s.ins==-1?-1:s.off?0:s.ins;yn(n,l,u,a),i&&u&&as(i,n,s.text)}else s.ins==-1?(yn(n,o.off?0:o.len,l,a),i&&as(i,n,o.textBit(l))):(yn(n,o.off?0:o.len,s.off?0:s.ins,a),i&&!s.off&&as(i,n,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||n.length>c),o.forward2(l),s.forward(l)}}}}class Wc{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,r=this.i-2>>1;return r>=e.length?Zt.empty:e[r]}textBit(e){let{inserted:r}=this.set,n=this.i-2>>1;return n>=r.length&&!e?Zt.empty:r[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ca{constructor(e,r,n){this.from=e,this.to=r,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,r=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,r):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new ca(n,i,this.flags)}extend(e,r=e){if(e<=this.anchor&&r>=this.anchor)return le.range(e,r);let n=Math.abs(e-this.anchor)>Math.abs(r-this.anchor)?e:r;return le.range(this.anchor,n)}eq(e,r=!1){return this.anchor==e.anchor&&this.head==e.head&&(!r||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return le.range(e.anchor,e.head)}static create(e,r,n){return new ca(e,r,n)}}class le{constructor(e,r){this.ranges=e,this.mainIndex=r}map(e,r=-1){return e.empty?this:le.create(this.ranges.map(n=>n.map(e,r)),this.mainIndex)}eq(e,r=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],r))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new le([this.main],0)}addRange(e,r=!0){return le.create([e].concat(this.ranges),r?0:this.mainIndex+1)}replaceRange(e,r=this.mainIndex){let n=this.ranges.slice();return n[r]=e,le.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new le(e.ranges.map(r=>ca.fromJSON(r)),e.main)}static single(e,r=e){return new le([le.range(e,r)],0)}static create(e,r=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=n:o.from<n)return le.normalized(e.slice(),r);n=o.to}return new le(e,r)}static cursor(e,r=0,n,i){return ca.create(e,e,(r==0?0:r<0?8:16)|(n==null?7:Math.min(6,n))|(i??16777215)<<6)}static range(e,r,n,i){let o=(n??16777215)<<6|(i==null?7:Math.min(6,i));return r<e?ca.create(r,e,48|o):ca.create(e,r,(r>e?8:0)|o)}static normalized(e,r=0){let n=e[r];e.sort((i,o)=>i.from-o.from),r=e.indexOf(n);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let a=s.from,l=Math.max(o.to,s.to);i<=r&&r--,e.splice(--i,2,o.anchor>o.head?le.range(l,a):le.range(a,l))}}return new le(e,r)}}function hE(t,e){for(let r of t.ranges)if(r.to>e)throw new RangeError("Selection points outside of document")}let E0=0;class Ie{constructor(e,r,n,i,o){this.combine=e,this.compareInput=r,this.compare=n,this.isStatic=i,this.id=E0++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new Ie(e.combine||(r=>r),e.compareInput||((r,n)=>r===n),e.compare||(e.combine?(r,n)=>r===n:Q0),!!e.static,e.enables)}of(e){return new qd([],this,0,e)}compute(e,r){if(this.isStatic)throw new Error("Can't compute a static facet");return new qd(e,this,1,r)}computeN(e,r){if(this.isStatic)throw new Error("Can't compute a static facet");return new qd(e,this,2,r)}from(e,r){return r||(r=n=>n),this.compute([e],n=>r(n.field(e)))}}function Q0(t,e){return t==e||t.length==e.length&&t.every((r,n)=>r===e[n])}class qd{constructor(e,r,n,i){this.dependencies=e,this.facet=r,this.type=n,this.value=i,this.id=E0++}dynamicSlot(e){var r;let n=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:((r=e[f.id])!==null&&r!==void 0?r:1)&1||u.push(e[f.id]);return{create(f){return f.values[s]=n(f),1},update(f,h){if(l&&h.docChanged||c&&(h.docChanged||h.selection)||cy(f,u)){let d=n(f);if(a?!dS(d,f.values[s],i):!i(d,f.values[s]))return f.values[s]=d,1}return 0},reconfigure:(f,h)=>{let d,p=h.config.address[o];if(p!=null){let g=_p(h,p);if(this.dependencies.every(m=>m instanceof Ie?h.facet(m)===f.facet(m):m instanceof Kr?h.field(m,!1)==f.field(m,!1):!0)||(a?dS(d=n(f),g,i):i(d=n(f),g)))return f.values[s]=g,0}else d=n(f);return f.values[s]=d,1}}}}function dS(t,e,r){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!r(t[n],e[n]))return!1;return!0}function cy(t,e){let r=!1;for(let n of e)yc(t,n)&1&&(r=!0);return r}function rD(t,e,r){let n=r.map(l=>t[l.id]),i=r.map(l=>l.type),o=n.filter(l=>!(l&1)),s=t[e.id]>>1;function a(l){let c=[];for(let u=0;u<n.length;u++){let f=_p(l,n[u]);if(i[u]==2)for(let h of f)c.push(h);else c.push(f)}return e.combine(c)}return{create(l){for(let c of n)yc(l,c);return l.values[s]=a(l),1},update(l,c){if(!cy(l,o))return 0;let u=a(l);return e.compare(u,l.values[s])?0:(l.values[s]=u,1)},reconfigure(l,c){let u=cy(l,n),f=c.config.facets[e.id],h=c.facet(e);if(f&&!u&&Q0(r,f))return l.values[s]=h,0;let d=a(l);return e.compare(d,h)?(l.values[s]=h,0):(l.values[s]=d,1)}}}const pS=Ie.define({static:!0});class Kr{constructor(e,r,n,i,o){this.id=e,this.createF=r,this.updateF=n,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let r=new Kr(E0++,e.create,e.update,e.compare||((n,i)=>n===i),e);return e.provide&&(r.provides=e.provide(r)),r}create(e){let r=e.facet(pS).find(n=>n.field==this);return((r==null?void 0:r.create)||this.createF)(e)}slot(e){let r=e[this.id]>>1;return{create:n=>(n.values[r]=this.create(n),1),update:(n,i)=>{let o=n.values[r],s=this.updateF(o,i);return this.compareF(o,s)?0:(n.values[r]=s,1)},reconfigure:(n,i)=>i.config.address[this.id]!=null?(n.values[r]=i.field(this),0):(n.values[r]=this.create(n),1)}}init(e){return[this,pS.of({field:this,create:e})]}get extension(){return this}}const na={lowest:4,low:3,default:2,high:1,highest:0};function Eu(t){return e=>new dE(e,t)}const Io={highest:Eu(na.highest),high:Eu(na.high),default:Eu(na.default),low:Eu(na.low),lowest:Eu(na.lowest)};class dE{constructor(e,r){this.inner=e,this.prec=r}}class Fl{of(e){return new fy(this,e)}reconfigure(e){return Fl.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class fy{constructor(e,r){this.compartment=e,this.inner=r}}class xp{constructor(e,r,n,i,o,s){for(this.base=e,this.compartments=r,this.dynamicSlots=n,this.address=i,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let r=this.address[e.id];return r==null?e.default:this.staticValues[r>>1]}static resolve(e,r,n){let i=[],o=Object.create(null),s=new Map;for(let h of nD(e,r,s))h instanceof Kr?i.push(h):(o[h.facet.id]||(o[h.facet.id]=[])).push(h);let a=Object.create(null),l=[],c=[];for(let h of i)a[h.id]=c.length<<1,c.push(d=>h.slot(d));let u=n==null?void 0:n.config.facets;for(let h in o){let d=o[h],p=d[0].facet,g=u&&u[h]||[];if(d.every(m=>m.type==0))if(a[p.id]=l.length<<1|1,Q0(g,d))l.push(n.facet(p));else{let m=p.combine(d.map(y=>y.value));l.push(n&&p.compare(m,n.facet(p))?n.facet(p):m)}else{for(let m of d)m.type==0?(a[m.id]=l.length<<1|1,l.push(m.value)):(a[m.id]=c.length<<1,c.push(y=>m.dynamicSlot(y)));a[p.id]=c.length<<1,c.push(m=>rD(m,p,d))}}let f=c.map(h=>h(a));return new xp(e,s,f,a,l,o)}}function nD(t,e,r){let n=[[],[],[],[],[]],i=new Map;function o(s,a){let l=i.get(s);if(l!=null){if(l<=a)return;let c=n[l].indexOf(s);c>-1&&n[l].splice(c,1),s instanceof fy&&r.delete(s.compartment)}if(i.set(s,a),Array.isArray(s))for(let c of s)o(c,a);else if(s instanceof fy){if(r.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(s.compartment)||s.inner;r.set(s.compartment,c),o(c,a)}else if(s instanceof dE)o(s.inner,s.prec);else if(s instanceof Kr)n[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof qd)n[a].push(s),s.facet.extensions&&o(s.facet.extensions,na.default);else{let c=s.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(c,a)}}return o(t,na.default),n.reduce((s,a)=>s.concat(a))}function yc(t,e){if(e&1)return 2;let r=e>>1,n=t.status[r];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;t.status[r]=4;let i=t.computeSlot(t,t.config.dynamicSlots[r]);return t.status[r]=2|i}function _p(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const pE=Ie.define(),hy=Ie.define({combine:t=>t.some(e=>e),static:!0}),gE=Ie.define({combine:t=>t.length?t[0]:void 0,static:!0}),OE=Ie.define(),mE=Ie.define(),yE=Ie.define(),vE=Ie.define({combine:t=>t.length?t[0]:!1});class Oo{constructor(e,r){this.type=e,this.value=r}static define(){return new iD}}class iD{of(e){return new Oo(this,e)}}class oD{constructor(e){this.map=e}of(e){return new pt(this,e)}}class pt{constructor(e,r){this.type=e,this.value=r}map(e){let r=this.type.map(this.value,e);return r===void 0?void 0:r==this.value?this:new pt(this.type,r)}is(e){return this.type==e}static define(e={}){return new oD(e.map||(r=>r))}static mapEffects(e,r){if(!e.length)return e;let n=[];for(let i of e){let o=i.map(r);o&&n.push(o)}return n}}pt.reconfigure=pt.define();pt.appendConfig=pt.define();class Nr{constructor(e,r,n,i,o,s){this.startState=e,this.changes=r,this.selection=n,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,n&&hE(n,r.newLength),o.some(a=>a.type==Nr.time)||(this.annotations=o.concat(Nr.time.of(Date.now())))}static create(e,r,n,i,o,s){return new Nr(e,r,n,i,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let r of this.annotations)if(r.type==e)return r.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let r=this.annotation(Nr.userEvent);return!!(r&&(r==e||r.length>e.length&&r.slice(0,e.length)==e&&r[e.length]=="."))}}Nr.time=Oo.define();Nr.userEvent=Oo.define();Nr.addToHistory=Oo.define();Nr.remote=Oo.define();function sD(t,e){let r=[];for(let n=0,i=0;;){let o,s;if(n<t.length&&(i==e.length||e[i]>=t[n]))o=t[n++],s=t[n++];else if(i<e.length)o=e[i++],s=e[i++];else return r;!r.length||r[r.length-1]<o?r.push(o,s):r[r.length-1]<s&&(r[r.length-1]=s)}}function bE(t,e,r){var n;let i,o,s;return r?(i=e.changes,o=Ur.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(n=t.selection)===null||n===void 0?void 0:n.map(i),effects:pt.mapEffects(t.effects,i).concat(pt.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function dy(t,e,r){let n=e.selection,i=El(e.annotations);return e.userEvent&&(i=i.concat(Nr.userEvent.of(e.userEvent))),{changes:e.changes instanceof Ur?e.changes:Ur.of(e.changes||[],r,t.facet(gE)),selection:n&&(n instanceof le?n:le.single(n.anchor,n.head)),effects:El(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function SE(t,e,r){let n=dy(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(r=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(r=!1);let s=!!e[o].sequential;n=bE(n,dy(t,e[o],s?n.changes.newLength:t.doc.length),s)}let i=Nr.create(t,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return lD(r?aD(i):i)}function aD(t){let e=t.startState,r=!0;for(let i of e.facet(OE)){let o=i(t);if(o===!1){r=!1;break}Array.isArray(o)&&(r=r===!0?o:sD(r,o))}if(r!==!0){let i,o;if(r===!1)o=t.changes.invertedDesc,i=Ur.empty(e.doc.length);else{let s=t.changes.filter(r);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=Nr.create(e,i,t.selection&&t.selection.map(o),pt.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let n=e.facet(mE);for(let i=n.length-1;i>=0;i--){let o=n[i](t);o instanceof Nr?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Nr?t=o[0]:t=SE(e,El(o),!1)}return t}function lD(t){let e=t.startState,r=e.facet(yE),n=t;for(let i=r.length-1;i>=0;i--){let o=r[i](t);o&&Object.keys(o).length&&(n=bE(n,dy(e,o,t.changes.newLength),!0))}return n==t?t:Nr.create(e,t.changes,t.selection,n.effects,n.annotations,n.scrollIntoView)}const uD=[];function El(t){return t==null?uD:Array.isArray(t)?t:[t]}var wr=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(wr||(wr={}));const cD=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let py;try{py=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function fD(t){if(py)return py.test(t);for(let e=0;e<t.length;e++){let r=t[e];if(/\w/.test(r)||r>""&&(r.toUpperCase()!=r.toLowerCase()||cD.test(r)))return!0}return!1}function hD(t){return e=>{if(!/\S/.test(e))return wr.Space;if(fD(e))return wr.Word;for(let r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return wr.Word;return wr.Other}}class Dt{constructor(e,r,n,i,o,s){this.config=e,this.doc=r,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)yc(this,a<<1);this.computeSlot=null}field(e,r=!0){let n=this.config.address[e.id];if(n==null){if(r)throw new RangeError("Field is not present in this state");return}return yc(this,n),_p(this,n)}update(...e){return SE(this,e,!0)}applyTransaction(e){let r=this.config,{base:n,compartments:i}=r;for(let a of e.effects)a.is(Fl.reconfigure)?(r&&(i=new Map,r.compartments.forEach((l,c)=>i.set(c,l)),r=null),i.set(a.value.compartment,a.value.extension)):a.is(pt.reconfigure)?(r=null,n=a.value):a.is(pt.appendConfig)&&(r=null,n=El(n).concat(a.value));let o;r?o=e.startState.values.slice():(r=xp.resolve(n,i,this),o=new Dt(r,this.doc,this.selection,r.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let s=e.startState.facet(hy)?e.newSelection:e.newSelection.asSingle();new Dt(r,e.newDoc,s,o,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:e},range:le.cursor(r.from+e.length)}))}changeByRange(e){let r=this.selection,n=e(r.ranges[0]),i=this.changes(n.changes),o=[n.range],s=El(n.effects);for(let a=1;a<r.ranges.length;a++){let l=e(r.ranges[a]),c=this.changes(l.changes),u=c.map(i);for(let h=0;h<a;h++)o[h]=o[h].map(u);let f=i.mapDesc(c,!0);o.push(l.range.map(f)),i=i.compose(u),s=pt.mapEffects(s,u).concat(pt.mapEffects(El(l.effects),f))}return{changes:i,selection:le.create(o,r.mainIndex),effects:s}}changes(e=[]){return e instanceof Ur?e:Ur.of(e,this.doc.length,this.facet(Dt.lineSeparator))}toText(e){return Zt.of(e.split(this.facet(Dt.lineSeparator)||ay))}sliceDoc(e=0,r=this.doc.length){return this.doc.sliceString(e,r,this.lineBreak)}facet(e){let r=this.config.address[e.id];return r==null?e.default:(yc(this,r),_p(this,r))}toJSON(e){let r={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let i=e[n];i instanceof Kr&&this.config.address[i.id]!=null&&(r[n]=i.spec.toJSON(this.field(e[n]),this))}return r}static fromJSON(e,r={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n){for(let o in n)if(Object.prototype.hasOwnProperty.call(e,o)){let s=n[o],a=e[o];i.push(s.init(l=>s.spec.fromJSON(a,l)))}}return Dt.create({doc:e.doc,selection:le.fromJSON(e.selection),extensions:r.extensions?i.concat([r.extensions]):i})}static create(e={}){let r=xp.resolve(e.extensions||[],new Map),n=e.doc instanceof Zt?e.doc:Zt.of((e.doc||"").split(r.staticFacet(Dt.lineSeparator)||ay)),i=e.selection?e.selection instanceof le?e.selection:le.single(e.selection.anchor,e.selection.head):le.single(0);return hE(i,n.length),r.staticFacet(hy)||(i=i.asSingle()),new Dt(r,n,i,r.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(Dt.tabSize)}get lineBreak(){return this.facet(Dt.lineSeparator)||`
|
|
81
|
+
`}get readOnly(){return this.facet(vE)}phrase(e,...r){for(let n of this.facet(Dt.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return r.length&&(e=e.replace(/\$(\$|\d*)/g,(n,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>r.length?n:r[o-1]})),e}languageDataAt(e,r,n=-1){let i=[];for(let o of this.facet(pE))for(let s of o(this,r,n))Object.prototype.hasOwnProperty.call(s,e)&&i.push(s[e]);return i}charCategorizer(e){return hD(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:r,from:n,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-n,a=e-n;for(;s>0;){let l=fn(r,s,!1);if(o(r.slice(l,s))!=wr.Word)break;s=l}for(;a<i;){let l=fn(r,a);if(o(r.slice(a,l))!=wr.Word)break;a=l}return s==a?null:le.range(s+n,a+n)}}Dt.allowMultipleSelections=hy;Dt.tabSize=Ie.define({combine:t=>t.length?t[0]:4});Dt.lineSeparator=gE;Dt.readOnly=vE;Dt.phrases=Ie.define({compare(t,e){let r=Object.keys(t),n=Object.keys(e);return r.length==n.length&&r.every(i=>t[i]==e[i])}});Dt.languageData=pE;Dt.changeFilter=OE;Dt.transactionFilter=mE;Dt.transactionExtender=yE;Fl.reconfigure=pt.define();function Vi(t,e,r={}){let n={};for(let i of t)for(let o of Object.keys(i)){let s=i[o],a=n[o];if(a===void 0)n[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(r,o))n[o]=r[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let i in e)n[i]===void 0&&(n[i]=e[i]);return n}class ka{eq(e){return this==e}range(e,r=e){return gy.create(e,r,this)}}ka.prototype.startSide=ka.prototype.endSide=0;ka.prototype.point=!1;ka.prototype.mapMode=Yr.TrackDel;let gy=class wE{constructor(e,r,n){this.from=e,this.to=r,this.value=n}static create(e,r,n){return new wE(e,r,n)}};function Oy(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class T0{constructor(e,r,n,i){this.from=e,this.to=r,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,r,n,i=0){let o=n?this.to:this.from;for(let s=i,a=o.length;;){if(s==a)return s;let l=s+a>>1,c=o[l]-e||(n?this.value[l].endSide:this.value[l].startSide)-r;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}between(e,r,n,i){for(let o=this.findIndex(r,-1e9,!0),s=this.findIndex(n,1e9,!1,o);o<s;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,r){let n=[],i=[],o=[],s=-1,a=-1;for(let l=0;l<this.value.length;l++){let c=this.value[l],u=this.from[l]+e,f=this.to[l]+e,h,d;if(u==f){let p=r.mapPos(u,c.startSide,c.mapMode);if(p==null||(h=d=p,c.startSide!=c.endSide&&(d=r.mapPos(u,c.endSide),d<h)))continue}else if(h=r.mapPos(u,c.startSide),d=r.mapPos(f,c.endSide),h>d||h==d&&c.startSide>0&&c.endSide<=0)continue;(d-h||c.endSide-c.startSide)<0||(s<0&&(s=h),c.point&&(a=Math.max(a,d-h)),n.push(c),i.push(h-s),o.push(d-s))}return{mapped:n.length?new T0(i,o,n,a):null,pos:s}}}class qt{constructor(e,r,n,i){this.chunkPos=e,this.chunk=r,this.nextLayer=n,this.maxPoint=i}static create(e,r,n,i){return new qt(e,r,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let r of this.chunk)e+=r.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:r=[],sort:n=!1,filterFrom:i=0,filterTo:o=this.length}=e,s=e.filter;if(r.length==0&&!s)return this;if(n&&(r=r.slice().sort(Oy)),this.isEmpty)return r.length?qt.of(r):this;let a=new PE(this,null,-1).goto(0),l=0,c=[],u=new ks;for(;a.value||l<r.length;)if(l<r.length&&(a.from-r[l].from||a.startSide-r[l].value.startSide)>=0){let f=r[l++];u.addInner(f.from,f.to,f.value)||c.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==r.length||this.chunkEnd(a.chunkIndex)<r[l].from)&&(!s||i>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||i>a.to||o<a.from||s(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||c.push(gy.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?qt.empty:this.nextLayer.update({add:c,filter:s,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let r=[],n=[],i=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],l=this.chunk[s],c=e.touchesRange(a,a+l.length);if(c===!1)i=Math.max(i,l.maxPoint),r.push(l),n.push(e.mapPos(a));else if(c===!0){let{mapped:u,pos:f}=l.map(a,e);u&&(i=Math.max(i,u.maxPoint),r.push(u),n.push(f))}}let o=this.nextLayer.map(e);return r.length==0?o:new qt(n,r,o||qt.empty,i)}between(e,r,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i];if(r>=o&&e<=o+s.length&&s.between(o,e-o,r-o,n)===!1)return}this.nextLayer.between(e,r,n)}}iter(e=0){return Bc.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,r=0){return Bc.from(e).goto(r)}static compare(e,r,n,i,o=-1){let s=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),a=r.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),l=gS(s,a,n),c=new Qu(s,l,o),u=new Qu(a,l,o);n.iterGaps((f,h,d)=>OS(c,f,u,h,d,i)),n.empty&&n.length==0&&OS(c,0,u,0,0,i)}static eq(e,r,n=0,i){i==null&&(i=999999999);let o=e.filter(u=>!u.isEmpty&&r.indexOf(u)<0),s=r.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=gS(o,s),l=new Qu(o,a,0).goto(n),c=new Qu(s,a,0).goto(n);for(;;){if(l.to!=c.to||!my(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,r,n,i,o=-1){let s=new Qu(e,null,o).goto(r),a=r,l=s.openStart;for(;;){let c=Math.min(s.to,n);if(s.point){let u=s.activeForPoint(s.to),f=s.pointFrom<r?u.length+1:s.point.startSide<0?u.length:Math.min(u.length,l);i.point(a,c,s.point,u,f,s.pointRank),l=Math.min(s.openEnd(c),u.length)}else c>a&&(i.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>n)return l+(s.point&&s.to>n?1:0);a=s.to,s.next()}}static of(e,r=!1){let n=new ks;for(let i of e instanceof gy?[e]:r?dD(e):e)n.add(i.from,i.to,i.value);return n.finish()}static join(e){if(!e.length)return qt.empty;let r=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let i=e[n];i!=qt.empty;i=i.nextLayer)r=new qt(i.chunkPos,i.chunk,r,Math.max(i.maxPoint,r.maxPoint));return r}}qt.empty=new qt([],[],null,-1);function dD(t){if(t.length>1)for(let e=t[0],r=1;r<t.length;r++){let n=t[r];if(Oy(e,n)>0)return t.slice().sort(Oy);e=n}return t}qt.empty.nextLayer=qt.empty;class ks{finishChunk(e){this.chunks.push(new T0(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,r,n){this.addInner(e,r,n)||(this.nextLayer||(this.nextLayer=new ks)).add(e,r,n)}addInner(e,r,n){let i=e-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(r-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=r,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,r-e)),!0)}addChunk(e,r){if((e-this.lastTo||r.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,r.maxPoint),this.chunks.push(r),this.chunkPos.push(e);let n=r.value.length-1;return this.last=r.value[n],this.lastFrom=r.from[n]+e,this.lastTo=r.to[n]+e,!0}finish(){return this.finishInner(qt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let r=qt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,r}}function gS(t,e,r){let n=new Map;for(let o of t)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&n.set(o.chunk[s],o.chunkPos[s]);let i=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let a=n.get(o.chunk[s]);a!=null&&(r?r.mapPos(a):a)==o.chunkPos[s]&&!(r!=null&&r.touchesRange(a,a+o.chunk[s].length))&&i.add(o.chunk[s])}return i}class PE{constructor(e,r,n,i=0){this.layer=e,this.skip=r,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,r=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,r,!1),this}gotoInner(e,r,n){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],r,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,r){(this.to-e||this.endSide-r)<0&&this.gotoInner(e,r,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],r=this.layer.chunk[this.chunkIndex],n=e+r.from[this.rangeIndex];if(this.from=n,this.to=e+r.to[this.rangeIndex],this.value=r.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Bc{constructor(e){this.heap=e}static from(e,r=null,n=-1){let i=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=n&&i.push(new PE(s,r,n,o));return i.length==1?i[0]:new Bc(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,r=-1e9){for(let n of this.heap)n.goto(e,r);for(let n=this.heap.length>>1;n>=0;n--)dO(this.heap,n);return this.next(),this}forward(e,r){for(let n of this.heap)n.forward(e,r);for(let n=this.heap.length>>1;n>=0;n--)dO(this.heap,n);(this.to-e||this.value.endSide-r)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),dO(this.heap,0)}}}function dO(t,e){for(let r=t[e];;){let n=(e<<1)+1;if(n>=t.length)break;let i=t[n];if(n+1<t.length&&i.compare(t[n+1])>=0&&(i=t[n+1],n++),r.compare(i)<0)break;t[n]=r,t[e]=i,e=n}}class Qu{constructor(e,r,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Bc.from(e,r,n)}goto(e,r=-1e9){return this.cursor.goto(e,r),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=r,this.openStart=-1,this.next(),this}forward(e,r){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-r)<0;)this.removeActive(this.minActive);this.cursor.forward(e,r)}removeActive(e){nh(this.active,e),nh(this.activeTo,e),nh(this.activeRank,e),this.minActive=mS(this.active,this.activeTo)}addActive(e){let r=0,{value:n,to:i,rank:o}=this.cursor;for(;r<this.activeRank.length&&(o-this.activeRank[r]||i-this.activeTo[r])>0;)r++;ih(this.active,r,n),ih(this.activeTo,r,i),ih(this.activeRank,r,o),e&&ih(e,r,this.cursor.from),this.minActive=mS(this.active,this.activeTo)}next(){let e=this.to,r=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&nh(n,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(n),this.cursor.next();else if(r&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let i=n.length-1;i>=0&&n[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let r=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&r.push(this.active[n]);return r.reverse()}openEnd(e){let r=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)r++;return r}}function OS(t,e,r,n,i,o){t.goto(e),r.goto(n);let s=n+i,a=n,l=n-e;for(;;){let c=t.to+l-r.to||t.endSide-r.endSide,u=c<0?t.to+l:r.to,f=Math.min(u,s);if(t.point||r.point?t.point&&r.point&&(t.point==r.point||t.point.eq(r.point))&&my(t.activeForPoint(t.to),r.activeForPoint(r.to))||o.comparePoint(a,f,t.point,r.point):f>a&&!my(t.active,r.active)&&o.compareRange(a,f,t.active,r.active),u>s)break;a=u,c<=0&&t.next(),c>=0&&r.next()}}function my(t,e){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!=e[r]&&!t[r].eq(e[r]))return!1;return!0}function nh(t,e){for(let r=e,n=t.length-1;r<n;r++)t[r]=t[r+1];t.pop()}function ih(t,e,r){for(let n=t.length-1;n>=e;n--)t[n+1]=t[n];t[e]=r}function mS(t,e){let r=-1,n=1e9;for(let i=0;i<e.length;i++)(e[i]-n||t[i].endSide-t[r].endSide)<0&&(r=i,n=e[i]);return r}function Wi(t,e,r=t.length){let n=0;for(let i=0;i<r;)t.charCodeAt(i)==9?(n+=e-n%e,i++):(n++,i=fn(t,i));return n}function yy(t,e,r,n){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?r-o%r:1,i=fn(t,i)}return n===!0?-1:t.length}const vy="ͼ",yS=typeof Symbol>"u"?"__"+vy:Symbol.for(vy),by=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),vS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class xs{constructor(e,r){this.rules=[];let{finish:n}=r||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,l,c){let u=[],f=/^@(\w+)\b/.exec(s[0]),h=f&&f[1]=="keyframes";if(f&&a==null)return l.push(s[0]+";");for(let d in a){let p=a[d];if(/&/.test(d))o(d.split(/,\s*/).map(g=>s.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");o(i(d),p,u,h)}else p!=null&&u.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(u.length||h)&&l.push((n&&!f&&!c?s.map(n):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in e)o(i(s),e[s],this.rules)}getRules(){return this.rules.join(`
|
|
82
|
+
`)}static newName(){let e=vS[yS]||1;return vS[yS]=e+1,vy+e.toString(36)}static mount(e,r,n){let i=e[by],o=n&&n.nonce;i?o&&i.setNonce(o):i=new pD(e,o),i.mount(Array.isArray(r)?r:[r],e)}}let bS=new Map;class pD{constructor(e,r){let n=e.ownerDocument||e,i=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=bS.get(n);if(o)return e[by]=o;this.sheet=new i.CSSStyleSheet,bS.set(n,this)}else this.styleTag=n.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],e[by]=this}mount(e,r){let n=this.sheet,i=0,o=0;for(let s=0;s<e.length;s++){let a=e[s],l=this.modules.indexOf(a);if(l<o&&l>-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,a),n)for(let c=0;c<a.rules.length;c++)n.insertRule(a.rules[c],i++)}else{for(;o<l;)i+=this.modules[o++].rules.length;i+=a.rules.length,o++}}if(n)r.adoptedStyleSheets.indexOf(this.sheet)<0&&(r.adoptedStyleSheets=[this.sheet,...r.adoptedStyleSheets]);else{let s="";for(let l=0;l<this.modules.length;l++)s+=this.modules[l].getRules()+`
|
|
83
|
+
`;this.styleTag.textContent=s;let a=r.head||r;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var _s={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Lc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},gD=typeof navigator<"u"&&/Mac/.test(navigator.platform),OD=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var un=0;un<10;un++)_s[48+un]=_s[96+un]=String(un);for(var un=1;un<=24;un++)_s[un+111]="F"+un;for(var un=65;un<=90;un++)_s[un]=String.fromCharCode(un+32),Lc[un]=String.fromCharCode(un);for(var pO in _s)Lc.hasOwnProperty(pO)||(Lc[pO]=_s[pO]);function mD(t){var e=gD&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||OD&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",r=!e&&t.key||(t.shiftKey?Lc:_s)[t.keyCode]||t.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}function Vc(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Sy(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function yD(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Zd(t,e){if(!e.anchorNode)return!1;try{return Sy(t,e.anchorNode)}catch{return!1}}function Xc(t){return t.nodeType==3?_a(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function vc(t,e,r,n){return r?SS(t,e,r,n,-1)||SS(t,e,r,n,1):!1}function xa(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function $p(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function SS(t,e,r,n,i){for(;;){if(t==r&&e==n)return!0;if(e==(i<0?0:qo(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=xa(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?qo(t):0}else return!1}}function qo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function R0(t,e){let r=e?t.left:t.right;return{left:r,right:r,top:t.top,bottom:t.bottom}}function vD(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function kE(t,e){let r=e.width/t.offsetWidth,n=e.height/t.offsetHeight;return(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.width-t.offsetWidth)<1)&&(r=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-t.offsetHeight)<1)&&(n=1),{scaleX:r,scaleY:n}}function bD(t,e,r,n,i,o,s,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,f=!1;u&&!f;)if(u.nodeType==1){let h,d=u==l.body,p=1,g=1;if(d)h=vD(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let O=u.getBoundingClientRect();({scaleX:p,scaleY:g}=kE(u,O)),h={left:O.left,right:O.left+u.clientWidth*p,top:O.top,bottom:O.top+u.clientHeight*g}}let m=0,y=0;if(i=="nearest")e.top<h.top?(y=-(h.top-e.top+s),r>0&&e.bottom>h.bottom+y&&(y=e.bottom-h.bottom+y+s)):e.bottom>h.bottom&&(y=e.bottom-h.bottom+s,r<0&&e.top-y<h.top&&(y=-(h.top+y-e.top+s)));else{let O=e.bottom-e.top,v=h.bottom-h.top;y=(i=="center"&&O<=v?e.top+O/2-v/2:i=="start"||i=="center"&&r<0?e.top-s:e.bottom-v+s)-h.top}if(n=="nearest"?e.left<h.left?(m=-(h.left-e.left+o),r>0&&e.right>h.right+m&&(m=e.right-h.right+m+o)):e.right>h.right&&(m=e.right-h.right+o,r<0&&e.left<h.left+m&&(m=-(h.left+m-e.left+o))):m=(n=="center"?e.left+(e.right-e.left)/2-(h.right-h.left)/2:n=="start"==a?e.left-o:e.right-(h.right-h.left)+o)-h.left,m||y)if(d)c.scrollBy(m,y);else{let O=0,v=0;if(y){let b=u.scrollTop;u.scrollTop+=y/g,v=(u.scrollTop-b)*g}if(m){let b=u.scrollLeft;u.scrollLeft+=m/p,O=(u.scrollLeft-b)*p}e={left:e.left-O,top:e.top-v,right:e.right-O,bottom:e.bottom-v},O&&Math.abs(O-m)<1&&(n="nearest"),v&&Math.abs(v-y)<1&&(i="nearest")}if(d)break;u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function SD(t){let e=t.ownerDocument;for(let r=t.parentNode;r&&r!=e.body;)if(r.nodeType==1){if(r.scrollHeight>r.clientHeight||r.scrollWidth>r.clientWidth)return r;r=r.assignedSlot||r.parentNode}else if(r.nodeType==11)r=r.host;else break;return null}class wD{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:r,focusNode:n}=e;this.set(r,Math.min(e.anchorOffset,r?qo(r):0),n,Math.min(e.focusOffset,n?qo(n):0))}set(e,r,n,i){this.anchorNode=e,this.anchorOffset=r,this.focusNode=n,this.focusOffset=i}}let La=null;function xE(t){if(t.setActive)return t.setActive();if(La)return t.focus(La);let e=[];for(let r=t;r&&(e.push(r,r.scrollTop,r.scrollLeft),r!=r.ownerDocument);r=r.parentNode);if(t.focus(La==null?{get preventScroll(){return La={preventScroll:!0},!0}}:void 0),!La){La=!1;for(let r=0;r<e.length;){let n=e[r++],i=e[r++],o=e[r++];n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=o&&(n.scrollLeft=o)}}}let wS;function _a(t,e,r=e){let n=wS||(wS=document.createRange());return n.setEnd(t,r),n.setStart(t,e),n}function Ql(t,e,r,n){let i={key:e,code:e,keyCode:r,which:r,cancelable:!0};n&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=n);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,t.dispatchEvent(o);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,t.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function PD(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function _E(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function kD(t,e){let r=e.focusNode,n=e.focusOffset;if(!r||e.anchorNode!=r||e.anchorOffset!=n)return!1;for(n=Math.min(n,qo(r));;)if(n){if(r.nodeType!=1)return!1;let i=r.childNodes[n-1];i.contentEditable=="false"?n--:(r=i,n=qo(r))}else{if(r==t)return!0;n=xa(r),r=r.parentNode}}function $E(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function CE(t,e){for(let r=t,n=e;;){if(r.nodeType==3&&n>0)return{node:r,offset:n};if(r.nodeType==1&&n>0){if(r.contentEditable=="false")return null;r=r.childNodes[n-1],n=qo(r)}else if(r.parentNode&&!$p(r))n=xa(r),r=r.parentNode;else return null}}function EE(t,e){for(let r=t,n=e;;){if(r.nodeType==3&&n<r.nodeValue.length)return{node:r,offset:n};if(r.nodeType==1&&n<r.childNodes.length){if(r.contentEditable=="false")return null;r=r.childNodes[n],n=0}else if(r.parentNode&&!$p(r))n=xa(r)+1,r=r.parentNode;else return null}}class bn{constructor(e,r,n=!0){this.node=e,this.offset=r,this.precise=n}static before(e,r){return new bn(e.parentNode,xa(e),r)}static after(e,r){return new bn(e.parentNode,xa(e)+1,r)}}const A0=[];class rr{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let r=this.posAtStart;for(let n of this.children){if(n==e)return r;r+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,r){if(this.flags&2){let n=this.dom,i=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=i?i.nextSibling:n.firstChild)){let a=rr.get(o);(!a||!a.parent&&a.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,r),s.flags&=-8}if(o=i?i.nextSibling:n.firstChild,r&&!r.written&&r.node==n&&o!=s.dom&&(r.written=!0),s.dom.parentNode==n)for(;o&&o!=s.dom;)o=PS(o);else n.insertBefore(s.dom,o);i=s.dom}for(o=i?i.nextSibling:n.firstChild,o&&r&&r.node==n&&(r.written=!0);o;)o=PS(o)}else if(this.flags&1)for(let n of this.children)n.flags&7&&(n.sync(e,r),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,r){let n;if(e==this.dom)n=this.dom.childNodes[r];else{let i=qo(e)==0?0:r==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?n=e:n=e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!rr.get(n);)n=n.nextSibling;if(!n)return this.length;for(let i=0,o=0;;i++){let s=this.children[i];if(s.dom==n)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,r,n=0){let i=-1,o=-1,s=-1,a=-1;for(let l=0,c=n,u=n;l<this.children.length;l++){let f=this.children[l],h=c+f.length;if(c<e&&h>r)return f.domBoundsAround(e,r,c);if(h>=e&&i==-1&&(i=l,o=c),c>r&&f.dom.parentNode==this.dom){s=l,a=u;break}u=h,c=h+f.breakAfter}return{from:o,to:a<0?n+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&s>=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let r=this.parent;r;r=r.parent){if(e&&(r.flags|=2),r.flags&1)return;r.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let r=e.parent;if(!r)return e;e=r}}replaceChildren(e,r,n=A0){this.markDirty();for(let i=e;i<r;i++){let o=this.children[i];o.parent==this&&n.indexOf(o)<0&&o.destroy()}this.children.splice(e,r-e,...n);for(let i=0;i<n.length;i++)n[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new QE(this.children,e,this.children.length)}childPos(e,r=1){return this.childCursor().findPos(e,r)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,r,n,i,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}rr.prototype.breakAfter=0;function PS(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class QE{constructor(e,r,n){this.children=e,this.pos=r,this.i=n,this.off=0}findPos(e,r=1){for(;;){if(e>this.pos||e==this.pos&&(r>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function TE(t,e,r,n,i,o,s,a,l){let{children:c}=t,u=c.length?c[e]:null,f=o.length?o[o.length-1]:null,h=f?f.breakAfter:s;if(!(e==n&&u&&!s&&!h&&o.length<2&&u.merge(r,i,o.length?f:null,r==0,a,l))){if(n<c.length){let d=c[n];d&&(i<d.length||d.breakAfter&&(f!=null&&f.breakAfter))?(e==n&&(d=d.split(i),i=0),!h&&f&&d.merge(0,i,f,!0,0,l)?o[o.length-1]=d:((i||d.children.length&&!d.children[0].length)&&d.merge(0,i,null,!1,0,l),o.push(d))):d!=null&&d.breakAfter&&(f?f.breakAfter=1:s=1),n++}for(u&&(u.breakAfter=s,r>0&&(!s&&o.length&&u.merge(r,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(r<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(r,u.length,null,!1,a,0),e++));e<n&&o.length;)if(c[n-1].become(o[o.length-1]))n--,o.pop(),l=o.length?0:a;else if(c[e].become(o[0]))e++,o.shift(),a=o.length?0:l;else break;!o.length&&e&&n<c.length&&!c[e-1].breakAfter&&c[n].merge(0,0,c[e-1],!1,a,l)&&e--,(e<n||o.length)&&t.replaceChildren(e,n,o)}}function RE(t,e,r,n,i,o){let s=t.childCursor(),{i:a,off:l}=s.findPos(r,1),{i:c,off:u}=s.findPos(e,-1),f=e-r;for(let h of n)f+=h.length;t.length+=f,TE(t,c,u,a,l,n,0,i,o)}let Wn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},wy=typeof document<"u"?document:{documentElement:{style:{}}};const Py=/Edge\/(\d+)/.exec(Wn.userAgent),AE=/MSIE \d/.test(Wn.userAgent),ky=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wn.userAgent),xg=!!(AE||ky||Py),kS=!xg&&/gecko\/(\d+)/i.test(Wn.userAgent),gO=!xg&&/Chrome\/(\d+)/.exec(Wn.userAgent),xS="webkitFontSmoothing"in wy.documentElement.style,ME=!xg&&/Apple Computer/.test(Wn.vendor),_S=ME&&(/Mobile\/\w+/.test(Wn.userAgent)||Wn.maxTouchPoints>2);var Fe={mac:_S||/Mac/.test(Wn.platform),windows:/Win/.test(Wn.platform),linux:/Linux|X11/.test(Wn.platform),ie:xg,ie_version:AE?wy.documentMode||6:ky?+ky[1]:Py?+Py[1]:0,gecko:kS,gecko_version:kS?+(/Firefox\/(\d+)/.exec(Wn.userAgent)||[0,0])[1]:0,chrome:!!gO,chrome_version:gO?+gO[1]:0,ios:_S,android:/Android\b/.test(Wn.userAgent),webkit:xS,safari:ME,webkit_version:xS?+(/\bAppleWebKit\/(\d+)/.exec(Wn.userAgent)||[0,0])[1]:0,tabSize:wy.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const xD=256;class Bi extends rr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,r){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(r&&r.node==this.dom&&(r.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,r,n){return this.flags&8||n&&(!(n instanceof Bi)||this.length-(r-e)+n.length>xD||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(r),this.markDirty(),!0)}split(e){let r=new Bi(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),r.flags|=this.flags&8,r}localPosFromDOM(e,r){return e==this.dom?r:r?this.text.length:0}domAtPos(e){return new bn(this.dom,e)}domBoundsAround(e,r,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,r){return _D(this.dom,e,r)}}class Zo extends rr{constructor(e,r=[],n=0){super(),this.mark=e,this.children=r,this.length=n;for(let i of r)i.setParent(this)}setAttrs(e){if(_E(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let r in this.mark.attrs)e.setAttribute(r,this.mark.attrs[r]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,r){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,r)}merge(e,r,n,i,o,s){return n&&(!(n instanceof Zo&&n.mark.eq(this.mark))||e&&o<=0||r<this.length&&s<=0)?!1:(RE(this,e,r,n?n.children.slice():[],o-1,s-1),this.markDirty(),!0)}split(e){let r=[],n=0,i=-1,o=0;for(let a of this.children){let l=n+a.length;l>e&&r.push(n<e?a.split(e-n):a),i<0&&n>=e&&(i=o),n=l,o++}let s=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Zo(this.mark,r,s)}domAtPos(e){return jE(this,e)}coordsAt(e,r){return qE(this,e,r)}}function _D(t,e,r){let n=t.nodeValue.length;e>n&&(e=n);let i=e,o=e,s=0;e==0&&r<0||e==n&&r>=0?Fe.chrome||Fe.gecko||(e?(i--,s=1):o<n&&(o++,s=-1)):r<0?i--:o<n&&o++;let a=_a(t,i,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:r>=0)?0:a.length-1];return Fe.safari&&!s&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),s?R0(l,s<0):l||null}class ls extends rr{static create(e,r,n){return new ls(e,r,n)}constructor(e,r,n){super(),this.widget=e,this.length=r,this.side=n,this.prevWidget=null}split(e){let r=ls.create(this.widget,this.length-e,this.side);return this.length-=e,r}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,r,n,i,o,s){return n&&(!(n instanceof ls)||!this.widget.compare(n.widget)||e>0&&o<=0||r<this.length&&s<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-r),!0)}become(e){return e instanceof ls&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Zt.empty;let e=this;for(;e.parent;)e=e.parent;let{view:r}=e,n=r&&r.state.doc,i=this.posAtStart;return n?n.slice(i,i+this.length):Zt.empty}domAtPos(e){return(this.length?e==0:this.side>0)?bn.before(this.dom):bn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,r){let n=this.widget.coordsAt(this.dom,e,r);if(n)return n;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?i.length-1:0;o=i[a],!(e>0?a==0:a==i.length-1||o.top<o.bottom);a+=s?-1:1);return R0(o,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Ul extends rr{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Ul&&e.side==this.side}split(){return new Ul(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?bn.before(this.dom):bn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Zt.empty}get isHidden(){return!0}}Bi.prototype.children=ls.prototype.children=Ul.prototype.children=A0;function jE(t,e){let r=t.dom,{children:n}=t,i=0;for(let o=0;i<n.length;i++){let s=n[i],a=o+s.length;if(!(a==o&&s.getSide()<=0)){if(e>o&&e<a&&s.dom.parentNode==r)return s.domAtPos(e-o);if(e<=o)break;o=a}}for(let o=i;o>0;o--){let s=n[o-1];if(s.dom.parentNode==r)return s.domAtPos(s.length)}for(let o=i;o<n.length;o++){let s=n[o];if(s.dom.parentNode==r)return s.domAtPos(0)}return new bn(r,0)}function DE(t,e,r){let n,{children:i}=t;r>0&&e instanceof Zo&&i.length&&(n=i[i.length-1])instanceof Zo&&n.mark.eq(e.mark)?DE(n,e.children[0],r-1):(i.push(e),e.setParent(t)),t.length+=e.length}function qE(t,e,r){let n=null,i=-1,o=null,s=-1;function a(c,u){for(let f=0,h=0;f<c.children.length&&h<=u;f++){let d=c.children[f],p=h+d.length;p>=u&&(d.children.length?a(d,u-h):(!o||o.isHidden&&r>0)&&(p>u||h==p&&d.getSide()>0)?(o=d,s=u-h):(h<u||h==p&&d.getSide()<0&&!d.isHidden)&&(n=d,i=u-h)),h=p}}a(t,e);let l=(r<0?n:o)||n||o;return l?l.coordsAt(Math.max(0,l==n?i:s),r):$D(t)}function $D(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let r=Xc(e);return r[r.length-1]||null}function xy(t,e){for(let r in t)r=="class"&&e.class?e.class+=" "+t.class:r=="style"&&e.style?e.style+=";"+t.style:e[r]=t[r];return e}const $S=Object.create(null);function M0(t,e,r){if(t==e)return!0;t||(t=$S),e||(e=$S);let n=Object.keys(t),i=Object.keys(e);if(n.length-(r&&n.indexOf(r)>-1?1:0)!=i.length-(r&&i.indexOf(r)>-1?1:0))return!1;for(let o of n)if(o!=r&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function _y(t,e,r){let n=!1;if(e)for(let i in e)r&&i in r||(n=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(r)for(let i in r)e&&e[i]==r[i]||(n=!0,i=="style"?t.style.cssText=r[i]:t.setAttribute(i,r[i]));return n}function CD(t){let e=Object.create(null);for(let r=0;r<t.attributes.length;r++){let n=t.attributes[r];e[n.name]=n.value}return e}class Xr extends rr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,r,n,i,o,s){if(n){if(!(n instanceof Xr))return!1;this.dom||n.transferDOM(this)}return i&&this.setDeco(n?n.attrs:null),RE(this,e,r,n?n.children.slice():[],o,s),!0}split(e){let r=new Xr;if(r.breakAfter=this.breakAfter,this.length==0)return r;let{i:n,off:i}=this.childPos(e);i&&(r.append(this.children[n].split(i),0),this.children[n].merge(i,this.children[n].length,null,!1,0,0),n++);for(let o=n;o<this.children.length;o++)r.append(this.children[o],0);for(;n>0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,r}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){M0(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,r){DE(this,e,r)}addLineDeco(e){let r=e.spec.attributes,n=e.spec.class;r&&(this.attrs=xy(r,this.attrs||{})),n&&(this.attrs=xy({class:n},this.attrs||{}))}domAtPos(e){return jE(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,r){var n;this.dom?this.flags&4&&(_E(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(_y(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,r);let i=this.dom.lastChild;for(;i&&rr.get(i)instanceof Zo;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((n=rr.get(i))===null||n===void 0?void 0:n.isEditable)==!1&&(!Fe.ios||!this.children.some(o=>o instanceof Bi))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,r;for(let n of this.children){if(!(n instanceof Bi)||/[^ -~]/.test(n.text))return null;let i=Xc(n.dom);if(i.length!=1)return null;e+=i[0].width,r=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:r}:null}coordsAt(e,r){let n=qE(this,e,r);if(!this.children.length&&n&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=n.bottom-n.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let s=(o-i.textHeight)/2;return{top:n.top+s,bottom:n.bottom-s,left:n.left,right:n.left}}}return n}become(e){return!1}covers(){return!0}static find(e,r){for(let n=0,i=0;n<e.children.length;n++){let o=e.children[n],s=i+o.length;if(s>=r){if(o instanceof Xr)return o;if(s>r)break}i=s+o.breakAfter}return null}}class To extends rr{constructor(e,r,n){super(),this.widget=e,this.length=r,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,r,n,i,o,s){return n&&(!(n instanceof To)||!this.widget.compare(n.widget)||e>0&&o<=0||r<this.length&&s<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-r),!0)}domAtPos(e){return e==0?bn.before(this.dom):bn.after(this.dom,e==this.length)}split(e){let r=this.length-e;this.length=e;let n=new To(this.widget,r,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return A0}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Zt.empty}domBoundsAround(){return null}become(e){return e instanceof To&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,r){return this.widget.coordsAt(this.dom,e,r)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:r,endSide:n}=this.deco;return r==n?!1:e<0?r<0:n>0}}class ki{eq(e){return!1}updateDOM(e,r){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,r,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var An=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(An||(An={}));class Ne extends ka{constructor(e,r,n,i){super(),this.startSide=e,this.endSide=r,this.widget=n,this.spec=i}get heightRelevant(){return!1}static mark(e){return new mf(e)}static widget(e){let r=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return r+=n&&!e.inlineOrder?r>0?3e8:-4e8:r>0?1e8:-1e8,new $s(e,r,r,n,e.widget||null,!1)}static replace(e){let r=!!e.block,n,i;if(e.isBlockGap)n=-5e8,i=4e8;else{let{start:o,end:s}=ZE(e,r);n=(o?r?-3e8:-1:5e8)-1,i=(s?r?2e8:1:-6e8)+1}return new $s(e,n,i,r,e.widget||null,!0)}static line(e){return new yf(e)}static set(e,r=!1){return qt.of(e,r)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ne.none=qt.empty;class mf extends Ne{constructor(e){let{start:r,end:n}=ZE(e);super(r?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var r,n;return this==e||e instanceof mf&&this.tagName==e.tagName&&(this.class||((r=this.attrs)===null||r===void 0?void 0:r.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&M0(this.attrs,e.attrs,"class")}range(e,r=e){if(e>=r)throw new RangeError("Mark decorations may not be empty");return super.range(e,r)}}mf.prototype.point=!1;class yf extends Ne{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof yf&&this.spec.class==e.spec.class&&M0(this.spec.attributes,e.spec.attributes)}range(e,r=e){if(r!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,r)}}yf.prototype.mapMode=Yr.TrackBefore;yf.prototype.point=!0;class $s extends Ne{constructor(e,r,n,i,o,s){super(r,n,o,e),this.block=i,this.isReplace=s,this.mapMode=i?r<=0?Yr.TrackBefore:Yr.TrackAfter:Yr.TrackDel}get type(){return this.startSide!=this.endSide?An.WidgetRange:this.startSide<=0?An.WidgetBefore:An.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof $s&&ED(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,r=e){if(this.isReplace&&(e>r||e==r&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&r!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,r)}}$s.prototype.point=!0;function ZE(t,e=!1){let{inclusiveStart:r,inclusiveEnd:n}=t;return r==null&&(r=t.inclusive),n==null&&(n=t.inclusive),{start:r??e,end:n??e}}function ED(t,e){return t==e||!!(t&&e&&t.compare(e))}function $y(t,e,r,n=0){let i=r.length-1;i>=0&&r[i]+n>=t?r[i]=Math.max(r[i],e):r.push(t,e)}class bc{constructor(e,r,n,i){this.doc=e,this.pos=r,this.end=n,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=r}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof To&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Xr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(oh(new Ul(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof To)&&this.getLine()}buildText(e,r,n){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(r.slice(r.length-n)),this.getLine().append(oh(new Bi(this.text.slice(this.textOff,this.textOff+i)),r),n),this.atCursorPos=!0,this.textOff+=i,e-=i,n=0}}span(e,r,n,i){this.buildText(r-e,n,i),this.pos=r,this.openStart<0&&(this.openStart=i)}point(e,r,n,i,o,s){if(this.disallowBlockEffectsFor[s]&&n instanceof $s){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(r>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=r-e;if(n instanceof $s)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new To(n.widget||Yl.block,a,n));else{let l=ls.create(n.widget||Yl.inline,a,a?0:n.startSide),c=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e<r||n.startSide>0),u=!l.isEditable&&(e<r||o>i.length||n.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),c&&(f.append(oh(new Ul(1),i),o),o=i.length+Math.max(0,o-i.length)),f.append(oh(l,i),o),this.atCursorPos=u,this.pendingBuffer=u?e<r||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=r),this.openStart<0&&(this.openStart=o)}static build(e,r,n,i,o){let s=new bc(e,r,n,o);return s.openEnd=qt.spans(i,r,n,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function oh(t,e){for(let r of e)t=new Zo(r,[t],t.length);return t}class Yl extends ki{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Yl.inline=new Yl("span");Yl.block=new Yl("div");var dr=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(dr||(dr={}));const $a=dr.LTR,j0=dr.RTL;function NE(t){let e=[];for(let r=0;r<t.length;r++)e.push(1<<+t[r]);return e}const QD=NE("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),TD=NE("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Cy=Object.create(null),Ui=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),r=t.charCodeAt(1);Cy[e]=r,Cy[r]=-e}function IE(t){return t<=247?QD[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?TD[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const RD=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class us{get dir(){return this.level%2?j0:$a}constructor(e,r,n){this.from=e,this.to=r,this.level=n}side(e,r){return this.dir==r==e?this.to:this.from}forward(e,r){return e==(this.dir==r)}static find(e,r,n,i){let o=-1;for(let s=0;s<e.length;s++){let a=e[s];if(a.from<=r&&a.to>=r){if(a.level==n)return s;(o<0||(i!=0?i<0?a.from<r:a.to>r:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function WE(t,e){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++){let n=t[r],i=e[r];if(n.from!=i.from||n.to!=i.to||n.direction!=i.direction||!WE(n.inner,i.inner))return!1}return!0}const tr=[];function AD(t,e,r,n,i){for(let o=0;o<=n.length;o++){let s=o?n[o-1].to:e,a=o<n.length?n[o].from:r,l=o?256:i;for(let c=s,u=l,f=l;c<a;c++){let h=IE(t.charCodeAt(c));h==512?h=u:h==8&&f==4&&(h=16),tr[c]=h==4?2:h,h&7&&(f=h),u=h}for(let c=s,u=l,f=l;c<a;c++){let h=tr[c];if(h==128)c<a-1&&u==tr[c+1]&&u&24?h=tr[c]=u:tr[c]=256;else if(h==64){let d=c+1;for(;d<a&&tr[d]==64;)d++;let p=c&&u==8||d<r&&tr[d]==8?f==1?1:8:256;for(let g=c;g<d;g++)tr[g]=p;c=d-1}else h==8&&f==1&&(tr[c]=1);u=h,h&7&&(f=h)}}}function MD(t,e,r,n,i){let o=i==1?2:1;for(let s=0,a=0,l=0;s<=n.length;s++){let c=s?n[s-1].to:e,u=s<n.length?n[s].from:r;for(let f=c,h,d,p;f<u;f++)if(d=Cy[h=t.charCodeAt(f)])if(d<0){for(let g=a-3;g>=0;g-=3)if(Ui[g+1]==-d){let m=Ui[g+2],y=m&2?i:m&4?m&1?o:i:0;y&&(tr[f]=tr[Ui[g]]=y),a=g;break}}else{if(Ui.length==189)break;Ui[a++]=f,Ui[a++]=h,Ui[a++]=l}else if((p=tr[f])==2||p==1){let g=p==i;l=g?0:1;for(let m=a-3;m>=0;m-=3){let y=Ui[m+2];if(y&2)break;if(g)Ui[m+2]|=2;else{if(y&4)break;Ui[m+2]|=4}}}}}function jD(t,e,r,n){for(let i=0,o=n;i<=r.length;i++){let s=i?r[i-1].to:t,a=i<r.length?r[i].from:e;for(let l=s;l<a;){let c=tr[l];if(c==256){let u=l+1;for(;;)if(u==a){if(i==r.length)break;u=r[i++].to,a=i<r.length?r[i].from:e}else if(tr[u]==256)u++;else break;let f=o==1,h=(u<e?tr[u]:n)==1,d=f==h?f?1:2:n;for(let p=u,g=i,m=g?r[g-1].to:t;p>l;)p==m&&(p=r[--g].from,m=g?r[g-1].to:t),tr[--p]=d;l=u}else o=c,l++}}}function Ey(t,e,r,n,i,o,s){let a=n%2?2:1;if(n%2==i%2)for(let l=e,c=0;l<r;){let u=!0,f=!1;if(c==o.length||l<o[c].from){let g=tr[l];g!=a&&(u=!1,f=g==16)}let h=!u&&a==1?[]:null,d=u?n:n+1,p=l;e:for(;;)if(c<o.length&&p==o[c].from){if(f)break e;let g=o[c];if(!u)for(let m=g.to,y=c+1;;){if(m==r)break e;if(y<o.length&&o[y].from==m)m=o[y++].to;else{if(tr[m]==a)break e;break}}if(c++,h)h.push(g);else{g.from>l&&s.push(new us(l,g.from,d));let m=g.direction==$a!=!(d%2);Qy(t,m?n+1:n,i,g.inner,g.from,g.to,s),l=g.to}p=g.to}else{if(p==r||(u?tr[p]!=a:tr[p]==a))break;p++}h?Ey(t,l,p,n+1,i,h,s):l<p&&s.push(new us(l,p,d)),l=p}else for(let l=r,c=o.length;l>e;){let u=!0,f=!1;if(!c||l>o[c-1].to){let g=tr[l-1];g!=a&&(u=!1,f=g==16)}let h=!u&&a==1?[]:null,d=u?n:n+1,p=l;e:for(;;)if(c&&p==o[c-1].to){if(f)break e;let g=o[--c];if(!u)for(let m=g.from,y=c;;){if(m==e)break e;if(y&&o[y-1].to==m)m=o[--y].from;else{if(tr[m-1]==a)break e;break}}if(h)h.push(g);else{g.to<l&&s.push(new us(g.to,l,d));let m=g.direction==$a!=!(d%2);Qy(t,m?n+1:n,i,g.inner,g.from,g.to,s),l=g.from}p=g.from}else{if(p==e||(u?tr[p-1]!=a:tr[p-1]==a))break;p--}h?Ey(t,p,l,n+1,i,h,s):p<l&&s.push(new us(p,l,d)),l=p}}function Qy(t,e,r,n,i,o,s){let a=e%2?2:1;AD(t,i,o,n,a),MD(t,i,o,n,a),jD(i,o,n,a),Ey(t,i,o,e,r,n,s)}function DD(t,e,r){if(!t)return[new us(0,0,e==j0?1:0)];if(e==$a&&!r.length&&!RD.test(t))return BE(t.length);if(r.length)for(;t.length>tr.length;)tr[tr.length]=256;let n=[],i=e==$a?0:1;return Qy(t,i,i,r,0,t.length,n),n}function BE(t){return[new us(0,t,0)]}let LE="";function qD(t,e,r,n,i){var o;let s=n.head-t.from,a=us.find(e,s,(o=n.bidiLevel)!==null&&o!==void 0?o:-1,n.assoc),l=e[a],c=l.side(i,r);if(s==c){let h=a+=i?1:-1;if(h<0||h>=e.length)return null;l=e[a=h],s=l.side(!i,r),c=l.side(i,r)}let u=fn(t.text,s,l.forward(i,r));(u<l.from||u>l.to)&&(u=c),LE=t.text.slice(Math.min(s,u),Math.max(s,u));let f=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return f&&u==c&&f.level+(i?0:1)<l.level?le.cursor(f.side(!i,r)+t.from,f.forward(i,r)?1:-1,f.level):le.cursor(u+t.from,l.forward(i,r)?-1:1,l.level)}function ZD(t,e,r){for(let n=e;n<r;n++){let i=IE(t.charCodeAt(n));if(i==1)return $a;if(i==2||i==4)return j0}return $a}const VE=Ie.define(),XE=Ie.define(),FE=Ie.define(),UE=Ie.define(),Ty=Ie.define(),YE=Ie.define(),zE=Ie.define(),GE=Ie.define({combine:t=>t.some(e=>e)}),HE=Ie.define({combine:t=>t.some(e=>e)}),KE=Ie.define();class Tl{constructor(e,r="nearest",n="nearest",i=5,o=5,s=!1){this.range=e,this.y=r,this.x=n,this.yMargin=i,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new Tl(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Tl(le.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const sh=pt.define({map:(t,e)=>t.map(e)}),JE=pt.define();function Tn(t,e,r){let n=t.facet(UE);n.length?n[0](e):window.onerror?window.onerror(String(e),r,void 0,void 0,e):r?console.error(r+":",e):console.error(e)}const rs=Ie.define({combine:t=>t.length?t[0]:!0});let ND=0;const Ju=Ie.define();class nr{constructor(e,r,n,i,o){this.id=e,this.create=r,this.domEventHandlers=n,this.domEventObservers=i,this.extension=o(this)}static define(e,r){const{eventHandlers:n,eventObservers:i,provide:o,decorations:s}=r||{};return new nr(ND++,e,n,i,a=>{let l=[Ju.of(a)];return s&&l.push(Fc.of(c=>{let u=c.plugin(a);return u?s(u):Ne.none})),o&&l.push(o(a)),l})}static fromClass(e,r){return nr.define(n=>new e(n),r)}}class OO{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let r=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(r)}catch(n){if(Tn(r.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(r){Tn(e.state,r,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var r;if(!((r=this.value)===null||r===void 0)&&r.destroy)try{this.value.destroy()}catch(n){Tn(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const eQ=Ie.define(),D0=Ie.define(),Fc=Ie.define(),tQ=Ie.define(),q0=Ie.define(),rQ=Ie.define();function CS(t,e){let r=t.state.facet(rQ);if(!r.length)return r;let n=r.map(o=>o instanceof Function?o(t):o),i=[];return qt.spans(n,e.from,e.to,{point(){},span(o,s,a,l){let c=o-e.from,u=s-e.from,f=i;for(let h=a.length-1;h>=0;h--,l--){let d=a[h].spec.bidiIsolate,p;if(d==null&&(d=ZD(e.text,c,u)),l>0&&f.length&&(p=f[f.length-1]).to==c&&p.direction==d)p.to=u,f=p.inner;else{let g={from:c,to:u,direction:d,inner:[]};f.push(g),f=g.inner}}}}),i}const nQ=Ie.define();function iQ(t){let e=0,r=0,n=0,i=0;for(let o of t.state.facet(nQ)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(r=Math.max(r,s.right)),s.top!=null&&(n=Math.max(n,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:e,right:r,top:n,bottom:i}}const ec=Ie.define();class vi{constructor(e,r,n,i){this.fromA=e,this.toA=r,this.fromB=n,this.toB=i}join(e){return new vi(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let r=e.length,n=this;for(;r>0;r--){let i=e[r-1];if(!(i.fromA>n.toA)){if(i.toA<n.fromA)break;n=n.join(i),e.splice(r-1,1)}}return e.splice(r,0,n),e}static extendWithRanges(e,r){if(r.length==0)return e;let n=[];for(let i=0,o=0,s=0,a=0;;i++){let l=i==e.length?null:e[i],c=s-a,u=l?l.fromB:1e9;for(;o<r.length&&r[o]<u;){let f=r[o],h=r[o+1],d=Math.max(a,f),p=Math.min(u,h);if(d<=p&&new vi(d+c,p+c,d,p).addToSet(n),h>u)break;o+=2}if(!l)return n;new vi(l.fromA,l.toA,l.fromB,l.toB).addToSet(n),s=l.toA,a=l.toB}}}class Cp{constructor(e,r,n){this.view=e,this.state=r,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Ur.empty(this.startState.doc.length);for(let o of n)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,s,a,l)=>i.push(new vi(o,s,a,l))),this.changedRanges=i}static create(e,r,n){return new Cp(e,r,n)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class ES extends rr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ne.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Xr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new vi(0,0,0,e.state.doc.length)],0,null)}update(e){var r;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:c,toA:u})=>u<this.minWidthFrom||c>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((r=this.domChanged)===null||r===void 0)&&r.newSel?i=this.domChanged.newSel.head:!FD(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?WD(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;n=new vi(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(n.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Fe.ie||Fe.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),l=VD(s,a,e.changes);return n=vi.extendWithRanges(n,l),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,r,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,r,n);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Fe.chrome||Fe.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||i.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.children)s instanceof To&&s.widget instanceof QS&&o.push(s.dom);i.updateGaps(o)}updateChildren(e,r,n){let i=n?n.range.addToSet(e.slice()):e,o=this.childCursor(r);for(let s=i.length-1;;s--){let a=s>=0?i[s]:null;if(!a)break;let{fromA:l,toA:c,fromB:u,toB:f}=a,h,d,p,g;if(n&&n.range.fromB<f&&n.range.toB>u){let b=bc.build(this.view.state.doc,u,n.range.fromB,this.decorations,this.dynamicDecorationMap),w=bc.build(this.view.state.doc,n.range.toB,f,this.decorations,this.dynamicDecorationMap);d=b.breakAtStart,p=b.openStart,g=w.openEnd;let _=this.compositionView(n);w.breakAtStart?_.breakAfter=1:w.content.length&&_.merge(_.length,_.length,w.content[0],!1,w.openStart,0)&&(_.breakAfter=w.content[0].breakAfter,w.content.shift()),b.content.length&&_.merge(0,0,b.content[b.content.length-1],!0,0,b.openEnd)&&b.content.pop(),h=b.content.concat(_).concat(w.content)}else({content:h,breakAtStart:d,openStart:p,openEnd:g}=bc.build(this.view.state.doc,u,f,this.decorations,this.dynamicDecorationMap));let{i:m,off:y}=o.findPos(c,1),{i:O,off:v}=o.findPos(l,-1);TE(this,O,v,m,y,h,d,p,g)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let r of e.transactions)for(let n of r.effects)n.is(JE)&&(this.editContextFormatting=n.value)}compositionView(e){let r=new Bi(e.text.nodeValue);r.flags|=8;for(let{deco:i}of e.marks)r=new Zo(i,[r],r.length);let n=new Xr;return n.append(r,0),n}fixCompositionDOM(e){let r=(o,s)=>{s.flags|=8|(s.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(s);let a=rr.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},n=this.childPos(e.range.fromB,1),i=this.children[n.i];r(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)n=i.childPos(n.off,1),i=i.children[n.i],r(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,r=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,i=n==this.dom,o=!i&&Zd(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(i||r||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),c=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(Fe.gecko&&a.empty&&!this.hasComposition&&ID(l)){let f=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(f,l.node.childNodes[l.offset]||null)),l=c=new bn(f,0),s=!0}let u=this.view.observer.selectionRange;(s||!u.focusNode||(!vc(l.node,l.offset,u.anchorNode,u.anchorOffset)||!vc(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{Fe.android&&Fe.chrome&&this.dom.contains(u.focusNode)&&XD(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Vc(this.view.root);if(f)if(a.empty){if(Fe.gecko){let h=BD(l.node,l.offset);if(h&&h!=3){let d=(h==1?CE:EE)(l.node,l.offset);d&&(l=new bn(d.node,d.offset))}}f.collapse(l.node,l.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=a.bidiLevel)}else if(f.extend){f.collapse(l.node,l.offset);try{f.extend(c.node,c.offset)}catch{}}else{let h=document.createRange();a.anchor>a.head&&([l,c]=[c,l]),h.setEnd(c.node,c.offset),h.setStart(l.node,l.offset),f.removeAllRanges(),f.addRange(h)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new bn(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new bn(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,r){return this.hasComposition&&r.empty&&vc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==r.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,r=e.state.selection.main,n=Vc(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!n||!r.empty||!r.assoc||!n.modify)return;let s=Xr.find(this,r.head);if(!s)return;let a=s.posAtStart;if(r.head==a||r.head==a+s.length)return;let l=this.coordsAt(r.head,-1),c=this.coordsAt(r.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(r.head+r.assoc);n.collapse(u.node,u.offset),n.modify("move",r.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=r.from&&n.collapse(i,o)}moveToLine(e){let r=this.dom,n;if(e.node!=r)return e;for(let i=e.offset;!n&&i<r.childNodes.length;i++){let o=rr.get(r.childNodes[i]);o instanceof Xr&&(n=o.domAtPos(0))}for(let i=e.offset-1;!n&&i>=0;i--){let o=rr.get(r.childNodes[i]);o instanceof Xr&&(n=o.domAtPos(o.length))}return n?new bn(n.node,n.offset,!0):e}nearest(e){for(let r=e;r;){let n=rr.get(r);if(n&&n.rootView==this)return n;r=r.parentNode}return null}posFromDOM(e,r){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,r)+n.posAtStart}domAtPos(e){let{i:r,off:n}=this.childCursor().findPos(e,-1);for(;r<this.children.length-1;){let i=this.children[r];if(n<i.length||i instanceof Xr)break;r++,n=0}return this.children[r].domAtPos(n)}coordsAt(e,r){let n=null,i=0;for(let o=this.length,s=this.children.length-1;s>=0;s--){let a=this.children[s],l=o-a.breakAfter,c=l-a.length;if(l<e)break;if(c<=e&&(c<e||a.covers(-1))&&(l>e||a.covers(1))&&(!n||a instanceof Xr&&!(n instanceof Xr&&r>=0)))n=a,i=c;else if(n&&c==e&&l==e&&a instanceof To&&Math.abs(r)<2){if(a.deco.startSide<0)break;s&&(n=null)}o=c}return n?n.coordsAt(e-i,r):null}coordsForChar(e){let{i:r,off:n}=this.childPos(e,1),i=this.children[r];if(!(i instanceof Xr))return null;for(;i.children.length;){let{i:a,off:l}=i.childPos(n,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}n=l}if(!(i instanceof Bi))return null;let o=fn(i.text,n);if(o==n)return null;let s=_a(i.dom,n,o).getClientRects();for(let a=0;a<s.length;a++){let l=s[a];if(a==s.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let r=[],{from:n,to:i}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==dr.LTR;for(let c=0,u=0;u<this.children.length;u++){let f=this.children[u],h=c+f.length;if(h>i)break;if(c>=n){let d=f.dom.getBoundingClientRect();if(r.push(d.height),s){let p=f.dom.lastChild,g=p?Xc(p):[];if(g.length){let m=g[g.length-1],y=l?m.right-d.left:d.right-m.left;y>a&&(a=y,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=h)}}}c=h+f.breakAfter}return r}textDirectionAt(e){let{i:r}=this.childPos(e,1);return getComputedStyle(this.children[r].dom).direction=="rtl"?dr.RTL:dr.LTR}measureTextSize(){for(let o of this.children)if(o instanceof Xr){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),r,n,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=Xc(e.firstChild)[0];r=e.getBoundingClientRect().height,n=o?o.width/27:7,i=o?o.height:r,e.remove()}),{lineHeight:r,charWidth:n,textHeight:i}}childCursor(e=this.length){let r=this.children.length;return r&&(e-=this.children[--r].length),new QE(this.children,e,r)}computeBlockGapDeco(){let e=[],r=this.view.viewState;for(let n=0,i=0;;i++){let o=i==r.viewports.length?null:r.viewports[i],s=o?o.from-1:this.length;if(s>n){let a=(r.lineBlockAt(s).bottom-r.lineBlockAt(n).top)/this.view.scaleY;e.push(Ne.replace({widget:new QS(a),block:!0,inclusive:!0,isBlockGap:!0}).range(n,s))}if(!o)break;n=o.to+1}return Ne.set(e)}updateDeco(){let e=1,r=this.view.state.facet(Fc).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),n=!1,i=this.view.state.facet(tQ).map((o,s)=>{let a=typeof o=="function";return a&&(n=!0),a?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=n,r.push(qt.join(i))),this.decorations=[this.editContextFormatting,...r,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(KE))try{if(c(this.view,e.range,e))return!0}catch(u){Tn(this.view.state,u,"scroll handler")}let{range:r}=e,n=this.coordsAt(r.head,r.empty?r.assoc:r.head>r.anchor?-1:1),i;if(!n)return;!r.empty&&(i=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(n={left:Math.min(n.left,i.left),top:Math.min(n.top,i.top),right:Math.max(n.right,i.right),bottom:Math.max(n.bottom,i.bottom)});let o=iQ(this.view),s={left:n.left-o.left,top:n.top-o.top,right:n.right+o.right,bottom:n.bottom+o.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;bD(this.view.scrollDOM,s,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==dr.LTR)}}function ID(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}class QS extends ki{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function oQ(t,e){let r=t.observer.selectionRange;if(!r.focusNode)return null;let n=CE(r.focusNode,r.focusOffset),i=EE(r.focusNode,r.focusOffset),o=n||i;if(i&&n&&i.node!=n.node){let a=rr.get(i.node);if(!a||a instanceof Bi&&a.text!=i.node.nodeValue)o=i;else if(t.docView.lastCompositionAfterCursor){let l=rr.get(n.node);!l||l instanceof Bi&&l.text!=n.node.nodeValue||(o=i)}}if(t.docView.lastCompositionAfterCursor=o!=n,!o)return null;let s=e-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}function WD(t,e,r){let n=oQ(t,r);if(!n)return null;let{node:i,from:o,to:s}=n,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(n.from,n.to)!=a)return null;let l=e.invertedDesc,c=new vi(l.mapPos(o),l.mapPos(s),o,s),u=[];for(let f=i.parentNode;;f=f.parentNode){let h=rr.get(f);if(h instanceof Zo)u.push({node:f,deco:h.mark});else{if(h instanceof Xr||f.nodeName=="DIV"&&f.parentNode==t.contentDOM)return{range:c,text:i,marks:u,line:f};if(f!=t.contentDOM)u.push({node:f,deco:new mf({inclusive:!0,attributes:CD(f),tagName:f.tagName.toLowerCase()})});else return null}}}function BD(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let LD=class{constructor(){this.changes=[]}compareRange(e,r){$y(e,r,this.changes)}comparePoint(e,r){$y(e,r,this.changes)}};function VD(t,e,r){let n=new LD;return qt.compare(t,e,r,n),n.changes}function XD(t,e){for(let r=t;r&&r!=e;r=r.assignedSlot||r.parentNode)if(r.nodeType==1&&r.contentEditable=="false")return!0;return!1}function FD(t,e){let r=!1;return e&&t.iterChangedRanges((n,i)=>{n<e.to&&i>e.from&&(r=!0)}),r}function UD(t,e,r=1){let n=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return le.cursor(e);o==0?r=1:o==i.length&&(r=-1);let s=o,a=o;r<0?s=fn(i.text,o,!1):a=fn(i.text,o);let l=n(i.text.slice(s,a));for(;s>0;){let c=fn(i.text,s,!1);if(n(i.text.slice(c,s))!=l)break;s=c}for(;a<i.length;){let c=fn(i.text,a);if(n(i.text.slice(a,c))!=l)break;a=c}return le.range(s+i.from,a+i.from)}function YD(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function zD(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function mO(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function TS(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function RS(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Ry(t,e,r){let n,i,o,s,a=!1,l,c,u,f;for(let p=t.firstChild;p;p=p.nextSibling){let g=Xc(p);for(let m=0;m<g.length;m++){let y=g[m];i&&mO(i,y)&&(y=TS(RS(y,i.bottom),i.top));let O=YD(e,y),v=zD(r,y);if(O==0&&v==0)return p.nodeType==3?AS(p,e,r):Ry(p,e,r);if(!n||s>v||s==v&&o>O){n=p,i=y,o=O,s=v;let b=v?r<y.top?-1:1:O?e<y.left?-1:1:0;a=!b||(b>0?m<g.length-1:m>0)}O==0?r>y.bottom&&(!u||u.bottom<y.bottom)?(l=p,u=y):r<y.top&&(!f||f.top>y.top)&&(c=p,f=y):u&&mO(u,y)?u=RS(u,y.bottom):f&&mO(f,y)&&(f=TS(f,y.top))}}if(u&&u.bottom>=r?(n=l,i=u):f&&f.top<=r&&(n=c,i=f),!n)return{node:t,offset:0};let h=Math.max(i.left,Math.min(i.right,e));if(n.nodeType==3)return AS(n,h,r);if(a&&n.contentEditable!="false")return Ry(n,h,r);let d=Array.prototype.indexOf.call(t.childNodes,n)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:d}}function AS(t,e,r){let n=t.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<n;a++){let l=_a(t,a,a+1).getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(u.top==u.bottom)continue;s||(s=e-u.left);let f=(u.top>r?u.top-r:r-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&f<o){let h=e>=(u.left+u.right)/2,d=h;if((Fe.chrome||Fe.gecko)&&_a(t,a).getBoundingClientRect().left==u.right&&(d=!h),f<=0)return{node:t,offset:a+(d?1:0)};i=a+(d?1:0),o=f}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function sQ(t,e,r,n=-1){var i,o;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:f}=e,h=f-a;if(h<0)return 0;if(h>c)return t.state.doc.length;for(let b=t.viewState.heightOracle.textHeight/2,w=!1;l=t.elementAtHeight(h),l.type!=An.Text;)for(;h=n>0?l.bottom+b:l.top-b,!(h>=0&&h<=c);){if(w)return r?null:0;w=!0,n=-n}f=a+h;let d=l.from;if(d<t.viewport.from)return t.viewport.from==0?0:r?null:MS(t,s,l,u,f);if(d>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:r?null:MS(t,s,l,u,f);let p=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:p,m=g.elementFromPoint(u,f);m&&!t.contentDOM.contains(m)&&(m=null),m||(u=Math.max(s.left+1,Math.min(s.right-1,u)),m=g.elementFromPoint(u,f),m&&!t.contentDOM.contains(m)&&(m=null));let y,O=-1;if(m&&((i=t.docView.nearest(m))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let b=p.caretPositionFromPoint(u,f);b&&({offsetNode:y,offset:O}=b)}else if(p.caretRangeFromPoint){let b=p.caretRangeFromPoint(u,f);b&&({startContainer:y,startOffset:O}=b,(!t.contentDOM.contains(y)||Fe.safari&&GD(y,O,u)||Fe.chrome&&HD(y,O,u))&&(y=void 0))}}if(!y||!t.docView.dom.contains(y)){let b=Xr.find(t.docView,d);if(!b)return h>l.top+l.height/2?l.to:l.from;({node:y,offset:O}=Ry(b.dom,u,f))}let v=t.docView.nearest(y);if(!v)return null;if(v.isWidget&&((o=v.dom)===null||o===void 0?void 0:o.nodeType)==1){let b=v.dom.getBoundingClientRect();return e.y<b.top||e.y<=b.bottom&&e.x<=(b.left+b.right)/2?v.posAtStart:v.posAtEnd}else return v.localPosFromDOM(y,O)+v.posAtStart}function MS(t,e,r,n,i){let o=Math.round((n-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&r.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((i-r.top-(t.defaultLineHeight-a)*.5)/a);o+=l*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(r.from,r.to);return r.from+yy(s,o,t.state.tabSize)}function GD(t,e,r){let n;if(t.nodeType!=3||e!=(n=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return _a(t,n-1,n).getBoundingClientRect().left>r}function HD(t,e,r){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let n=t.nodeType==1?t.getBoundingClientRect():_a(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return r-n.left>5}function Ay(t,e){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){for(let n of r.type)if(n.to>e||n.to==e&&(n.to==r.to||n.type==An.Text))return n}return r}function KD(t,e,r,n){let i=Ay(t,e.head),o=!n||i.type!=An.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),l=t.posAtCoords({x:r==(a==dr.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(l!=null)return le.cursor(l,r?-1:1)}return le.cursor(r?i.to:i.from,r?-1:1)}function jS(t,e,r,n){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let a=e,l=null;;){let c=qD(i,o,s,a,r),u=LE;if(!c){if(i.number==(r?t.state.doc.lines:1))return a;u=`
|
|
84
|
+
`,i=t.state.doc.line(i.number+(r?1:-1)),o=t.bidiSpans(i),c=t.visualLineSide(i,!r)}if(l){if(!l(u))return a}else{if(!n)return c;l=n(u)}a=c}}function JD(t,e,r){let n=t.state.charCategorizer(e),i=n(r);return o=>{let s=n(o);return i==wr.Space&&(i=s),i==s}}function eq(t,e,r,n){let i=e.head,o=r?1:-1;if(i==(r?t.state.doc.length:0))return le.cursor(i,e.assoc);let s=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,e.assoc||-1),u=t.documentTop;if(c)s==null&&(s=c.left-l.left),a=o<0?c.top:c.bottom;else{let d=t.viewState.lineBlockAt(i);s==null&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-d.from))),a=(o<0?d.top:d.bottom)+u}let f=l.left+s,h=n??t.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=a+(h+d)*o,g=sQ(t,{x:f,y:p},!1,o);if(p<l.top||p>l.bottom||(o<0?g<i:g>i)){let m=t.docView.coordsForChar(g),y=!m||p<m.top?-1:1;return le.cursor(g,y,void 0,s)}}}function Nd(t,e,r){for(;;){let n=0;for(let i of t)i.between(e-1,e+1,(o,s,a)=>{if(e>o&&e<s){let l=n||r||(e-o<s-e?-1:1);e=l<0?o:s,n=l}});if(!n)return e}}function yO(t,e,r){let n=Nd(t.state.facet(q0).map(i=>i(t)),r.from,e.head>r.from?-1:1);return n==r.from?r:le.cursor(n,n<r.from?1:-1)}class tq{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Fe.safari&&e.contentDOM.addEventListener("input",()=>null),Fe.gecko&&mq(e.contentDOM.ownerDocument)}handleEvent(e){!uq(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,r){let n=this.handlers[e];if(n){for(let i of n.observers)i(this.view,r);for(let i of n.handlers){if(r.defaultPrevented)break;if(i(this.view,r)){r.preventDefault();break}}}}ensureHandlers(e){let r=rq(e),n=this.handlers,i=this.view.contentDOM;for(let o in r)if(o!="scroll"){let s=!r[o].handlers.length,a=n[o];a&&s!=!a.handlers.length&&(i.removeEventListener(o,this.handleEvent),a=null),a||i.addEventListener(o,this.handleEvent,{passive:s})}for(let o in n)o!="scroll"&&!r[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=r}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&lQ.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Fe.android&&Fe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let r;return Fe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((r=aQ.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||nq.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=r||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let r=this.pendingIOSKey;return!r||r.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Ql(this.view.contentDOM,r.key,r.keyCode,r instanceof KeyboardEvent?r:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Fe.safari&&!Fe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function DS(t,e){return(r,n)=>{try{return e.call(t,n,r)}catch(i){Tn(r.state,i)}}}function rq(t){let e=Object.create(null);function r(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of t){let i=n.spec;if(i&&i.domEventHandlers)for(let o in i.domEventHandlers){let s=i.domEventHandlers[o];s&&r(o).handlers.push(DS(n.value,s))}if(i&&i.domEventObservers)for(let o in i.domEventObservers){let s=i.domEventObservers[o];s&&r(o).observers.push(DS(n.value,s))}}for(let n in Li)r(n).handlers.push(Li[n]);for(let n in wi)r(n).observers.push(wi[n]);return e}const aQ=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],nq="dthko",lQ=[16,17,18,20,91,92,224,225],ah=6;function lh(t){return Math.max(0,t)*.7+8}function iq(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class oq{constructor(e,r,n,i){this.view=e,this.startEvent=r,this.style=n,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=r,this.scrollParent=SD(e.contentDOM),this.atoms=e.state.facet(q0).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=r.shiftKey,this.multiple=e.state.facet(Dt.allowMultipleSelections)&&sq(e,r),this.dragging=lq(e,r)&&hQ(r)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var r;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&iq(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,o=((r=this.scrollParent)===null||r===void 0?void 0:r.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=iQ(this.view);e.clientX-s.left<=o.left+ah?n=-lh(o.left-e.clientX):e.clientX+s.right>=o.right-ah&&(n=lh(e.clientX-o.right)),e.clientY-s.top<=o.top+ah?i=-lh(o.top-e.clientY):e.clientY+s.bottom>=o.bottom-ah&&(i=lh(e.clientY-o.bottom)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,r){this.scrollSpeed={x:e,y:r},e||r?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let r=null;for(let n=0;n<e.ranges.length;n++){let i=e.ranges[n],o=null;if(i.empty){let s=Nd(this.atoms,i.from,0);s!=i.from&&(o=le.cursor(s,-1))}else{let s=Nd(this.atoms,i.from,-1),a=Nd(this.atoms,i.to,1);(s!=i.from||a!=i.to)&&(o=le.range(i.from==i.anchor?s:a,i.from==i.head?s:a))}o&&(r||(r=e.ranges.slice()),r[n]=o)}return r?le.create(r,e.mainIndex):e}select(e){let{view:r}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(r.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(r=>r.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function sq(t,e){let r=t.state.facet(VE);return r.length?r[0](e):Fe.mac?e.metaKey:e.ctrlKey}function aq(t,e){let r=t.state.facet(XE);return r.length?r[0](e):Fe.mac?!e.altKey:!e.ctrlKey}function lq(t,e){let{main:r}=t.state.selection;if(r.empty)return!1;let n=Vc(t.root);if(!n||n.rangeCount==0)return!0;let i=n.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let s=i[o];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function uq(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let r=e.target,n;r!=t.contentDOM;r=r.parentNode)if(!r||r.nodeType==11||(n=rr.get(r))&&n.ignoreEvent(e))return!1;return!0}const Li=Object.create(null),wi=Object.create(null),uQ=Fe.ie&&Fe.ie_version<15||Fe.ios&&Fe.webkit_version<604;function cq(t){let e=t.dom.parentNode;if(!e)return;let r=e.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(()=>{t.focus(),r.remove(),cQ(t,r.value)},50)}function cQ(t,e){let{state:r}=t,n,i=1,o=r.toText(e),s=o.lines==r.selection.ranges.length;if(My!=null&&r.selection.ranges.every(l=>l.empty)&&My==o.toString()){let l=-1;n=r.changeByRange(c=>{let u=r.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let f=r.toText((s?o.line(i++).text:e)+r.lineBreak);return{changes:{from:u.from,insert:f},range:le.cursor(c.from+f.length)}})}else s?n=r.changeByRange(l=>{let c=o.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:le.cursor(l.from+c.length)}}):n=r.replaceSelection(o);t.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}wi.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Li.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);wi.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};wi.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Li.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let r=null;for(let n of t.state.facet(FE))if(r=n(t,e),r)break;if(!r&&e.button==0&&(r=dq(t,e)),r){let n=!t.hasFocus;t.inputState.startMouseSelection(new oq(t,e,r,n)),n&&t.observer.ignore(()=>{xE(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function qS(t,e,r,n){if(n==1)return le.cursor(e,r);if(n==2)return UD(t.state,e,r);{let i=Xr.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),s=i?i.posAtStart:o.from,a=i?i.posAtEnd:o.to;return a<t.state.doc.length&&a==o.to&&a++,le.range(s,a)}}let fQ=(t,e)=>t>=e.top&&t<=e.bottom,ZS=(t,e,r)=>fQ(e,r)&&t>=r.left&&t<=r.right;function fq(t,e,r,n){let i=Xr.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&ZS(r,n,s))return-1;let a=i.coordsAt(o,1);return a&&ZS(r,n,a)?1:s&&fQ(n,s)?-1:1}function NS(t,e){let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:r,bias:fq(t,r,e.clientX,e.clientY)}}const hq=Fe.ie&&Fe.ie_version<=11;let IS=null,WS=0,BS=0;function hQ(t){if(!hq)return t.detail;let e=IS,r=BS;return IS=t,BS=Date.now(),WS=!e||r>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(WS+1)%3:1}function dq(t,e){let r=NS(t,e),n=hQ(e),i=t.state.selection;return{update(o){o.docChanged&&(r.pos=o.changes.mapPos(r.pos),i=i.map(o.changes))},get(o,s,a){let l=NS(t,o),c,u=qS(t,l.pos,l.bias,n);if(r.pos!=l.pos&&!s){let f=qS(t,r.pos,r.bias,n),h=Math.min(f.from,u.from),d=Math.max(f.to,u.to);u=h<u.from?le.range(h,d):le.range(d,h)}return s?i.replaceRange(i.main.extend(u.from,u.to)):a&&n==1&&i.ranges.length>1&&(c=pq(i,l.pos))?c:a?i.addRange(u):le.create([u])}}}function pq(t,e){for(let r=0;r<t.ranges.length;r++){let{from:n,to:i}=t.ranges[r];if(n<=e&&i>=e)return le.create(t.ranges.slice(0,r).concat(t.ranges.slice(r+1)),t.mainIndex==r?0:t.mainIndex-(t.mainIndex>r?1:0))}return null}Li.dragstart=(t,e)=>{let{selection:{main:r}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,s=o+i.length;(o>=r.to||s<=r.from)&&(r=le.range(o,s))}}let{inputState:n}=t;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=r,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(r.from,r.to)),e.dataTransfer.effectAllowed="copyMove"),!1};Li.dragend=t=>(t.inputState.draggedContent=null,!1);function LS(t,e,r,n){if(!r)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=n&&o&&aq(t,e)?{from:o.from,to:o.to}:null,a={from:i,insert:r},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Li.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let r=e.dataTransfer.files;if(r&&r.length){let n=Array(r.length),i=0,o=()=>{++i==r.length&&LS(t,e,n.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s<r.length;s++){let a=new FileReader;a.onerror=o,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(n[s]=a.result),o()},a.readAsText(r[s])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return LS(t,e,n,!0),!0}return!1};Li.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let r=uQ?null:e.clipboardData;return r?(cQ(t,r.getData("text/plain")||r.getData("text/uri-list")),!0):(cq(t),!1)};function gq(t,e){let r=t.dom.parentNode;if(!r)return;let n=r.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),t.focus()},50)}function Oq(t){let e=[],r=[],n=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),r.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>i&&(e.push(s.text),r.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),i=s.number}n=!0}return{text:e.join(t.lineBreak),ranges:r,linewise:n}}let My=null;Li.copy=Li.cut=(t,e)=>{let{text:r,ranges:n,linewise:i}=Oq(t.state);if(!r&&!i)return!1;My=i?r:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let o=uQ?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",r),!0):(gq(t,r),!1)};const dQ=Oo.define();function pQ(t,e){let r=[];for(let n of t.facet(zE)){let i=n(t,e);i&&r.push(i)}return r?t.update({effects:r,annotations:dQ.of(!0)}):null}function gQ(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let r=pQ(t.state,e);r?t.dispatch(r):t.update([])}},10)}wi.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),gQ(t)};wi.blur=t=>{t.observer.clearSelectionRange(),gQ(t)};wi.compositionstart=wi.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};wi.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Fe.chrome&&Fe.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};wi.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Li.beforeinput=(t,e)=>{var r;let n;if(Fe.chrome&&Fe.android&&(n=aQ.find(i=>i.inputType==e.inputType))&&(t.observer.delayAndroidKey(n.key,n.keyCode),n.key=="Backspace"||n.key=="Delete")){let i=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Fe.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Fe.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>wi.compositionend(t,e),20),!1};const VS=new Set;function mq(t){VS.has(t)||(VS.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const XS=["pre-wrap","normal","pre-line","break-spaces"];class yq{constructor(e){this.lineWrapping=e,this.doc=Zt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,r){let n=this.doc.lineAt(r).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((r-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return XS.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let r=!1;for(let n=0;n<e.length;n++){let i=e[n];i<0?n++:this.heightSamples[Math.floor(i*10)]||(r=!0,this.heightSamples[Math.floor(i*10)]=!0)}return r}refresh(e,r,n,i,o,s){let a=XS.indexOf(e)>-1,l=Math.round(r)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=r,this.charWidth=n,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let c=0;c<s.length;c++){let u=s[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return l}}class vq{constructor(e,r){this.from=e,this.heights=r,this.index=0}get more(){return this.index<this.heights.length}}class lo{constructor(e,r,n,i,o){this.from=e,this.length=r,this.top=n,this.height=i,this._content=o}get type(){return typeof this._content=="number"?An.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof $s?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let r=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new lo(this.from,this.length+e.length,this.top,this.height+e.height,r)}}var cr=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(cr||(cr={}));const Id=.001;class Mn{constructor(e,r,n=2){this.length=e,this.height=r,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,r){this.height!=r&&(Math.abs(this.height-r)>Id&&(e.heightChanged=!0),this.height=r)}replace(e,r,n){return Mn.of(n)}decomposeLeft(e,r){r.push(this)}decomposeRight(e,r){r.push(this)}applyChanges(e,r,n,i){let o=this,s=n.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:f}=i[a],h=o.lineAt(l,cr.ByPosNoHeight,n.setDoc(r),0,0),d=h.to>=c?h:o.lineAt(c,cr.ByPosNoHeight,n,0,0);for(f+=d.to-c,c=d.to;a>0&&h.from<=i[a-1].toA;)l=i[a-1].fromA,u=i[a-1].fromB,a--,l<h.from&&(h=o.lineAt(l,cr.ByPosNoHeight,n,0,0));u+=h.from-l,l=h.from;let p=Z0.build(n.setDoc(s),e,u,f);o=o.replace(l,c,p)}return o.updateHeight(n,0)}static empty(){return new Jn(0,0)}static of(e){if(e.length==1)return e[0];let r=0,n=e.length,i=0,o=0;for(;;)if(r==n)if(i>o*2){let a=e[r-1];a.break?e.splice(--r,1,a.left,null,a.right):e.splice(--r,1,a.left,a.right),n+=1+a.break,i-=a.size}else if(o>i*2){let a=e[n];a.break?e.splice(n,1,a.left,null,a.right):e.splice(n,1,a.left,a.right),n+=2+a.break,o-=a.size}else break;else if(i<o){let a=e[r++];a&&(i+=a.size)}else{let a=e[--n];a&&(o+=a.size)}let s=0;return e[r-1]==null?(s=1,r--):e[r]==null&&(s=1,n++),new bq(Mn.of(e.slice(0,r)),s,Mn.of(e.slice(n)))}}Mn.prototype.size=1;class OQ extends Mn{constructor(e,r,n){super(e,r),this.deco=n}blockAt(e,r,n,i){return new lo(i,this.length,n,this.height,this.deco||0)}lineAt(e,r,n,i,o){return this.blockAt(0,n,i,o)}forEachLine(e,r,n,i,o,s){e<=o+this.length&&r>=o&&s(this.blockAt(0,n,i,o))}updateHeight(e,r=0,n=!1,i){return i&&i.from<=r&&i.more&&this.setHeight(e,i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Jn extends OQ{constructor(e,r){super(e,r,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,r,n,i){return new lo(i,this.length,n,this.height,this.breaks)}replace(e,r,n){let i=n[0];return n.length==1&&(i instanceof Jn||i instanceof an&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof an?i=new Jn(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Mn.of(n)}updateHeight(e,r=0,n=!1,i){return i&&i.from<=r&&i.more?this.setHeight(e,i.heights[i.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class an extends Mn{constructor(e){super(e,0)}heightMetrics(e,r){let n=e.doc.lineAt(r).number,i=e.doc.lineAt(r+this.length).number,o=i-n+1,s,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);s=l/o,this.length>o+1&&(a=(this.height-l)/(this.length-o-1))}else s=this.height/o;return{firstLine:n,lastLine:i,perLine:s,perChar:a}}blockAt(e,r,n,i){let{firstLine:o,lastLine:s,perLine:a,perChar:l}=this.heightMetrics(r,i);if(r.lineWrapping){let c=i+(e<r.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),u=r.doc.lineAt(c),f=a+u.length*l,h=Math.max(n,e-f/2);return new lo(u.from,u.length,h,f,0)}else{let c=Math.max(0,Math.min(s-o,Math.floor((e-n)/a))),{from:u,length:f}=r.doc.line(o+c);return new lo(u,f,n+a*c,a,0)}}lineAt(e,r,n,i,o){if(r==cr.ByHeight)return this.blockAt(e,n,i,o);if(r==cr.ByPosNoHeight){let{from:d,to:p}=n.doc.lineAt(e);return new lo(d,p-d,0,0,0)}let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,o),c=n.doc.lineAt(e),u=a+c.length*l,f=c.number-s,h=i+a*f+l*(c.from-o-f);return new lo(c.from,c.length,Math.max(i,Math.min(h,i+this.height-u)),u,0)}forEachLine(e,r,n,i,o,s){e=Math.max(e,o),r=Math.min(r,o+this.length);let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(n,o);for(let u=e,f=i;u<=r;){let h=n.doc.lineAt(u);if(u==e){let p=h.number-a;f+=l*p+c*(e-o-p)}let d=l+c*h.length;s(new lo(h.from,h.length,f,d,0)),f+=d,u=h.to+1}}replace(e,r,n){let i=this.length-r;if(i>0){let o=n[n.length-1];o instanceof an?n[n.length-1]=new an(o.length+i):n.push(null,new an(i-1))}if(e>0){let o=n[0];o instanceof an?n[0]=new an(e+o.length):n.unshift(new an(e-1),null)}return Mn.of(n)}decomposeLeft(e,r){r.push(new an(e-1),null)}decomposeRight(e,r){r.push(null,new an(this.length-e-1))}updateHeight(e,r=0,n=!1,i){let o=r+this.length;if(i&&i.from<=r+this.length&&i.more){let s=[],a=Math.max(r,i.from),l=-1;for(i.from>r&&s.push(new an(i.from-r-1).updateHeight(e,r));a<=o&&i.more;){let u=e.doc.lineAt(a).length;s.length&&s.push(null);let f=i.heights[i.index++];l==-1?l=f:Math.abs(f-l)>=Id&&(l=-2);let h=new Jn(u,f);h.outdated=!1,s.push(h),a+=u+1}a<=o&&s.push(null,new an(o-a).updateHeight(e,a));let c=Mn.of(s);return(l<0||Math.abs(c.height-this.height)>=Id||Math.abs(l-this.heightMetrics(e,r).perLine)>=Id)&&(e.heightChanged=!0),c}else(n||this.outdated)&&(this.setHeight(e,e.heightForGap(r,r+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class bq extends Mn{constructor(e,r,n){super(e.length+r+n.length,e.height+n.height,r|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,r,n,i){let o=n+this.left.height;return e<o?this.left.blockAt(e,r,n,i):this.right.blockAt(e,r,o,i+this.left.length+this.break)}lineAt(e,r,n,i,o){let s=i+this.left.height,a=o+this.left.length+this.break,l=r==cr.ByHeight?e<s:e<a,c=l?this.left.lineAt(e,r,n,i,o):this.right.lineAt(e,r,n,s,a);if(this.break||(l?c.to<a:c.from>a))return c;let u=r==cr.ByPosNoHeight?cr.ByPosNoHeight:cr.ByPos;return l?c.join(this.right.lineAt(a,u,n,s,a)):this.left.lineAt(a,u,n,i,o).join(c)}forEachLine(e,r,n,i,o,s){let a=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,r,n,i,o,s),r>=l&&this.right.forEachLine(e,r,n,a,l,s);else{let c=this.lineAt(l,cr.ByPos,n,i,o);e<c.from&&this.left.forEachLine(e,c.from-1,n,i,o,s),c.to>=e&&c.from<=r&&s(c),r>c.to&&this.right.forEachLine(c.to+1,r,n,a,l,s)}}replace(e,r,n){let i=this.left.length+this.break;if(r<i)return this.balanced(this.left.replace(e,r,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,r-i,n));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let a of n)o.push(a);if(e>0&&FS(o,s-1),r<this.length){let a=o.length;this.decomposeRight(r,o),FS(o,a)}return Mn.of(o)}decomposeLeft(e,r){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,r);r.push(this.left),this.break&&(n++,e>=n&&r.push(null)),e>n&&this.right.decomposeLeft(e-n,r)}decomposeRight(e,r){let n=this.left.length,i=n+this.break;if(e>=i)return this.right.decomposeRight(e-i,r);e<n&&this.left.decomposeRight(e,r),this.break&&e<i&&r.push(null),r.push(this.right)}balanced(e,r){return e.size>2*r.size||r.size>2*e.size?Mn.of(this.break?[e,null,r]:[e,r]):(this.left=e,this.right=r,this.height=e.height+r.height,this.outdated=e.outdated||r.outdated,this.size=e.size+r.size,this.length=e.length+this.break+r.length,this)}updateHeight(e,r=0,n=!1,i){let{left:o,right:s}=this,a=r+o.length+this.break,l=null;return i&&i.from<=r+o.length&&i.more?l=o=o.updateHeight(e,r,n,i):o.updateHeight(e,r,n),i&&i.from<=a+s.length&&i.more?l=s=s.updateHeight(e,a,n,i):s.updateHeight(e,a,n),l?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function FS(t,e){let r,n;t[e]==null&&(r=t[e-1])instanceof an&&(n=t[e+1])instanceof an&&t.splice(e-1,3,new an(r.length+1+n.length))}const Sq=5;class Z0{constructor(e,r){this.pos=e,this.oracle=r,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,r){if(this.lineStart>-1){let n=Math.min(r,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Jn?i.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new Jn(n-this.pos,-1)),this.writtenTo=n,r>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=r}point(e,r,n){if(e<r||n.heightRelevant){let i=n.widget?n.widget.estimatedHeight:0,o=n.widget?n.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=r-e;n.block?this.addBlock(new OQ(s,i,n)):(s||o||i>=Sq)&&this.addLineDeco(i,o,s)}else r>e&&this.span(e,r);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:r}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=r,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Jn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,r){let n=new an(r-e);return this.oracle.doc.lineAt(e).to==r&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Jn)return e;let r=new Jn(0,-1);return this.nodes.push(r),r}addBlock(e){this.enterLine();let r=e.deco;r&&r.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,r&&r.endSide>0&&(this.covering=e)}addLineDeco(e,r,n){let i=this.ensureLine();i.length+=n,i.collapsed+=n,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=r,this.writtenTo=this.pos=this.pos+n}finish(e){let r=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(r instanceof Jn)&&!this.isCovered?this.nodes.push(new Jn(0,-1)):(this.writtenTo<this.pos||r==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let i of this.nodes)i instanceof Jn&&i.updateHeight(this.oracle,n),n+=i?i.length:1;return this.nodes}static build(e,r,n,i){let o=new Z0(n,e);return qt.spans(r,n,i,o,0),o.finish(n)}}function wq(t,e,r){let n=new Pq;return qt.compare(t,e,r,n,0),n.changes}class Pq{constructor(){this.changes=[]}compareRange(){}comparePoint(e,r,n,i){(e<r||n&&n.heightRelevant||i&&i.heightRelevant)&&$y(e,r,this.changes,5)}}function kq(t,e){let r=t.getBoundingClientRect(),n=t.ownerDocument,i=n.defaultView||window,o=Math.max(0,r.left),s=Math.min(i.innerWidth,r.right),a=Math.max(0,r.top),l=Math.min(i.innerHeight,r.bottom);for(let c=t.parentNode;c&&c!=n.body;)if(c.nodeType==1){let u=c,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let h=u.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),a=Math.max(a,h.top),l=c==t.parentNode?h.bottom:Math.min(l,h.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:o-r.left,right:Math.max(o,s)-r.left,top:a-(r.top+e),bottom:Math.max(a,l)-(r.top+e)}}function xq(t,e){let r=t.getBoundingClientRect();return{left:0,right:r.right-r.left,top:e,bottom:r.bottom-(r.top+e)}}class vO{constructor(e,r,n){this.from=e,this.to=r,this.size=n}static same(e,r){if(e.length!=r.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],o=r[n];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e,r){return Ne.replace({widget:new _q(this.size*(r?e.scaleY:e.scaleX),r)}).range(this.from,this.to)}}class _q extends ki{constructor(e,r){super(),this.size=e,this.vertical=r}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class US{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=YS,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=dr.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let r=e.facet(D0).some(n=>typeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new yq(r),this.stateDeco=e.facet(Fc).filter(n=>typeof n!="function"),this.heightMap=Mn.empty().applyChanges(this.stateDeco,Zt.empty,this.heightOracle.setDoc(e.doc),[new vi(0,0,0,e.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ne.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:r}=this.state.selection;for(let n=0;n<=1;n++){let i=n?r.head:r.anchor;if(!e.some(({from:o,to:s})=>i>=o&&i<=s)){let{from:o,to:s}=this.lineBlockAt(i);e.push(new uh(o,s))}}return this.viewports=e.sort((n,i)=>n.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?YS:new N0(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(tc(e,this.scaler))})}update(e,r=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(Fc).filter(u=>typeof u!="function");let i=e.changedRanges,o=vi.extendWithRanges(i,wq(n,this.stateDeco,e?e.changes:Ur.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(r&&(r.range.head<l.from||r.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,r));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),r&&(this.scrollTarget=r),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(HE)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let r=e.contentDOM,n=window.getComputedStyle(r),i=this.heightOracle,o=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?dr.RTL:dr.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),a=r.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:b,scaleY:w}=kE(r,a);(b>.005&&Math.abs(this.scaleX-b)>.005||w>.005&&Math.abs(this.scaleY-w)>.005)&&(this.scaleX=b,this.scaleY=w,c|=8,s=l=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,h=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=h)&&(this.paddingTop=f,this.paddingBottom=h,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=$E(e.scrollDOM);let p=(this.printing?xq:kq)(r,this.paddingTop),g=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let y=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(y!=this.inView&&(this.inView=y,y&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let O=a.width;if((this.contentDOMWidth!=O||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=8),l){let b=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(b)&&(s=!0),s||i.lineWrapping&&Math.abs(O-this.contentDOMWidth)>i.charWidth){let{lineHeight:w,charWidth:_,textHeight:C}=e.docView.measureTextSize();s=w>0&&i.refresh(o,w,_,C,O/_,b),s&&(e.docView.minWidth=0,c|=8)}g>0&&m>0?u=Math.max(g,m):g<0&&m<0&&(u=Math.min(g,m)),i.heightChanged=!1;for(let w of this.viewports){let _=w.from==this.viewport.from?b:e.docView.measureVisibleLineHeights(w);this.heightMap=(s?Mn.empty().applyChanges(this.stateDeco,Zt.empty,this.heightOracle,[new vi(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,s,new vq(w.from,_))}i.heightChanged&&(c|=2)}let v=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,r){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,l=new uh(i.lineAt(s-n*1e3,cr.ByHeight,o,0,0).from,i.lineAt(a+(1-n)*1e3,cr.ByHeight,o,0,0).to);if(r){let{head:c}=r.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(c,cr.ByPos,o,0,0),h;r.y=="center"?h=(f.top+f.bottom)/2-u/2:r.y=="start"||r.y=="nearest"&&c<l.from?h=f.top:h=f.bottom-u,l=new uh(i.lineAt(h-1e3/2,cr.ByHeight,o,0,0).from,i.lineAt(h+u+1e3/2,cr.ByHeight,o,0,0).to)}}return l}mapViewport(e,r){let n=r.mapPos(e.from,-1),i=r.mapPos(e.to,1);return new uh(this.heightMap.lineAt(n,cr.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,cr.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:r},n=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,cr.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(r,cr.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:a}=this;return(e==0||i<=s-Math.max(10,Math.min(-n,250)))&&(r==this.state.doc.length||o>=a+Math.max(10,Math.min(n,250)))&&i>s-2*1e3&&o<a+2*1e3}mapLineGaps(e,r){if(!e.length||r.empty)return e;let n=[];for(let i of e)r.touchesRange(i.from,i.to)||n.push(new vO(r.mapPos(i.from),r.mapPos(i.to),i.size));return n}ensureLineGaps(e,r){let n=this.heightOracle.lineWrapping,i=n?1e4:2e3,o=i>>1,s=i<<1;if(this.defaultTextDirection!=dr.LTR&&!n)return[];let a=[],l=(u,f,h,d)=>{if(f-u<o)return;let p=this.state.selection.main,g=[p.from];p.empty||g.push(p.to);for(let y of g)if(y>u&&y<f){l(u,y-10,h,d),l(y+10,f,h,d);return}let m=Cq(e,y=>y.from>=h.from&&y.to<=h.to&&Math.abs(y.from-u)<o&&Math.abs(y.to-f)<o&&!g.some(O=>y.from<O&&y.to>O));if(!m){if(f<h.to&&r&&n&&r.visibleRanges.some(y=>y.from<=f&&y.to>=f)){let y=r.moveToLineBoundary(le.cursor(f),!1,!0).head;y>u&&(f=y)}m=new vO(u,f,this.gapSize(h,u,f,d))}a.push(m)},c=u=>{if(u.length<s||u.type!=An.Text)return;let f=$q(u.from,u.to,this.stateDeco);if(f.total<s)return;let h=this.scrollTarget?this.scrollTarget.range.head:null,d,p;if(n){let g=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,m,y;if(h!=null){let O=fh(f,h),v=((this.visibleBottom-this.visibleTop)/2+g)/u.height;m=O-v,y=O+v}else m=(this.visibleTop-u.top-g)/u.height,y=(this.visibleBottom-u.top+g)/u.height;d=ch(f,m),p=ch(f,y)}else{let g=f.total*this.heightOracle.charWidth,m=i*this.heightOracle.charWidth,y,O;if(h!=null){let v=fh(f,h),b=((this.pixelViewport.right-this.pixelViewport.left)/2+m)/g;y=v-b,O=v+b}else y=(this.pixelViewport.left-m)/g,O=(this.pixelViewport.right+m)/g;d=ch(f,y),p=ch(f,O)}d>u.from&&l(u.from,d,u,f),p<u.to&&l(p,u.to,u,f)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(c):c(u);return a}gapSize(e,r,n,i){let o=fh(i,n)-fh(i,r);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){vO.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Ne.set(e.map(r=>r.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let r=[];qt.spans(e,this.viewport.from,this.viewport.to,{span(i,o){r.push({from:i,to:o})},point(){}},20);let n=r.length!=this.visibleRanges.length||this.visibleRanges.some((i,o)=>i.from!=r[o].from||i.to!=r[o].to);return this.visibleRanges=r,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(r=>r.from<=e&&r.to>=e)||tc(this.heightMap.lineAt(e,cr.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(r=>r.top<=e&&r.bottom>=e)||tc(this.heightMap.lineAt(this.scaler.fromDOM(e),cr.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let r=this.lineBlockAtHeight(e+8);return r.from>=this.viewport.from||this.viewportLines[0].top-e>200?r:this.viewportLines[0]}elementAtHeight(e){return tc(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class uh{constructor(e,r){this.from=e,this.to=r}}function $q(t,e,r){let n=[],i=t,o=0;return qt.spans(r,t,e,{span(){},point(s,a){s>i&&(n.push({from:i,to:s}),o+=s-i),i=a}},20),i<e&&(n.push({from:i,to:e}),o+=e-i),{total:o,ranges:n}}function ch({total:t,ranges:e},r){if(r<=0)return e[0].from;if(r>=1)return e[e.length-1].to;let n=Math.floor(t*r);for(let i=0;;i++){let{from:o,to:s}=e[i],a=s-o;if(n<=a)return o+n;n-=a}}function fh(t,e){let r=0;for(let{from:n,to:i}of t.ranges){if(e<=i){r+=e-n;break}r+=i-n}return r/t.total}function Cq(t,e){for(let r of t)if(e(r))return r}const YS={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class N0{constructor(e,r,n){let i=0,o=0,s=0;this.viewports=n.map(({from:a,to:l})=>{let c=r.lineAt(a,cr.ByPos,e,0,0).top,u=r.lineAt(l,cr.ByPos,e,0,0).bottom;return i+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(r.height-i);for(let a of this.viewports)a.domTop=s+(a.top-o)*this.scale,s=a.domBottom=a.domTop+(a.bottom-a.top),o=a.bottom}toDOM(e){for(let r=0,n=0,i=0;;r++){let o=r<this.viewports.length?this.viewports[r]:null;if(!o||e<o.top)return i+(e-n)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);n=o.bottom,i=o.domBottom}}fromDOM(e){for(let r=0,n=0,i=0;;r++){let o=r<this.viewports.length?this.viewports[r]:null;if(!o||e<o.domTop)return n+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);n=o.bottom,i=o.domBottom}}eq(e){return e instanceof N0?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((r,n)=>r.from==e.viewports[n].from&&r.to==e.viewports[n].to):!1}}function tc(t,e){if(e.scale==1)return t;let r=e.toDOM(t.top),n=e.toDOM(t.bottom);return new lo(t.from,t.length,r,n-r,Array.isArray(t._content)?t._content.map(i=>tc(i,e)):t._content)}const hh=Ie.define({combine:t=>t.join(" ")}),jy=Ie.define({combine:t=>t.indexOf(!0)>-1}),Dy=xs.newName(),mQ=xs.newName(),yQ=xs.newName(),vQ={"&light":"."+mQ,"&dark":"."+yQ};function qy(t,e,r){return new xs(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,i=>{if(i=="&")return t;if(!r||!r[i])throw new RangeError(`Unsupported selector: ${i}`);return r[i]}):t+" "+n}})}const Eq=qy("."+Dy,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},vQ),rc="";class Qq{constructor(e,r){this.points=e,this.text="",this.lineSeparator=r.facet(Dt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=rc}readRange(e,r){if(!e)return this;let n=e.parentNode;for(let i=e;;){this.findPointBefore(n,i);let o=this.text.length;this.readNode(i);let s=i.nextSibling;if(s==r)break;let a=rr.get(i),l=rr.get(s);(a&&l?a.breakAfter:(a?a.breakAfter:$p(i))||$p(s)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=s}return this.findPointBefore(n,r),this}readTextNode(e){let r=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,r.length));for(let n=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,a;if(this.lineSeparator?(o=r.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(a=i.exec(r))&&(o=a.index,s=a[0].length),this.append(r.slice(n,o<0?r.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=s-1);n=o+s}}readNode(e){if(e.cmIgnore)return;let r=rr.get(e),n=r&&r.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let i=n.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,r){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==r&&(n.pos=this.text.length)}findPointInside(e,r){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Tq(e,n.node,n.offset)?r:0))}}function Tq(t,e,r){for(;;){if(!e||r<qo(e))return!1;if(e==t)return!0;r=xa(e)+1,e=e.parentNode}}class zS{constructor(e,r){this.node=e,this.offset=r,this.pos=-1}}class Rq{constructor(e,r,n,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=r>-1;let{impreciseHead:o,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&r>-1)this.newSel=null;else if(r>-1&&(this.bounds=e.docView.domBoundsAround(r,n,0))){let a=o||s?[]:jq(e),l=new Qq(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=Dq(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!Sy(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!Sy(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((Fe.ios||Fe.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(l,c),h=Math.max(l,c),d=u.from-f,p=u.to-h;(d==0||d==1||f==0)&&(p==0||p==-1||h==e.state.doc.length)&&(l=0,c=e.state.doc.length)}this.newSel=le.single(c,l)}}}function bQ(t,e){let r,{newSel:n}=e,i=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,l=i.from,c=null;(o===8||Fe.android&&e.text.length<a-s)&&(l=i.to,c="end");let u=Mq(t.state.doc.sliceString(s,a,rc),e.text,l-s,c);u&&(Fe.chrome&&o==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==rc+rc&&u.toB--,r={from:s+u.from,to:s+u.toA,insert:Zt.of(e.text.slice(u.from,u.toB).split(rc))})}else n&&(!t.hasFocus&&t.state.facet(rs)||n.main.eq(i))&&(n=null);if(!r&&!n)return!1;if(!r&&e.typeOver&&!i.empty&&n&&n.main.empty?r={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:r&&r.from>=i.from&&r.to<=i.to&&(r.from!=i.from||r.to!=i.to)&&i.to-i.from-(r.to-r.from)<=4?r={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,r.from).append(r.insert).append(t.state.doc.slice(r.to,i.to))}:(Fe.mac||Fe.android)&&r&&r.from==r.to&&r.from==i.head-1&&/^\. ?$/.test(r.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(n&&r.insert.length==2&&(n=le.single(n.main.anchor-1,n.main.head-1)),r={from:i.from,to:i.to,insert:Zt.of([" "])}):Fe.chrome&&r&&r.from==r.to&&r.from==i.head&&r.insert.toString()==`
|
|
85
|
+
`&&t.lineWrapping&&(n&&(n=le.single(n.main.anchor-1,n.main.head-1)),r={from:i.from,to:i.to,insert:Zt.of([" "])}),r)return SQ(t,r,n,o);if(n&&!n.main.eq(i)){let s=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:n,scrollIntoView:s,userEvent:a}),!0}else return!1}function SQ(t,e,r,n=-1){if(Fe.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(Fe.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ql(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||n==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Ql(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ql(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s,a=()=>s||(s=Aq(t,e,r));return t.state.facet(YE).some(l=>l(t,e.from,e.to,o,a))||t.dispatch(a()),!0}function Aq(t,e,r){let n,i=t.state,o=i.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!r||r.main.empty&&r.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=o.from<e.from?i.sliceDoc(o.from,e.from):"",l=o.to>e.to?i.sliceDoc(e.to,o.to):"";n=i.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=i.changes(e),l=r&&r.main.to<=a.newLength?r.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let c=t.state.sliceDoc(e.from,e.to),u,f=r&&oQ(t,r.main.head);if(f){let p=e.insert.length-(e.to-e.from);u={from:f.from,to:f.to-p}}else u=t.state.doc.lineAt(o.head);let h=o.to-e.to,d=o.to-o.from;n=i.changeByRange(p=>{if(p.from==o.from&&p.to==o.to)return{changes:a,range:l||p.map(a)};let g=p.to-h,m=g-c.length;if(p.to-p.from!=d||t.state.sliceDoc(m,g)!=c||p.to>=u.from&&p.from<=u.to)return{range:p};let y=i.changes({from:m,to:g,insert:e.insert}),O=p.to-o.to;return{changes:y,range:l?le.range(Math.max(0,l.anchor+O),Math.max(0,l.head+O)):p.map(y)}})}else n={changes:a,selection:l&&i.selection.replaceRange(l)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(n,{userEvent:s,scrollIntoView:!0})}function Mq(t,e,r,n){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let s=t.length,a=e.length;for(;s>0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(n=="end"){let l=Math.max(0,o-Math.min(s,a));r-=s+l-o}if(s<o&&t.length<e.length){let l=r<=o&&r>=s?o-r:0;o-=l,a=o+(a-s),s=o}else if(a<o){let l=r<=o&&r>=a?o-r:0;o-=l,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function jq(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:r,anchorOffset:n,focusNode:i,focusOffset:o}=t.observer.selectionRange;return r&&(e.push(new zS(r,n)),(i!=r||o!=n)&&e.push(new zS(i,o))),e}function Dq(t,e){if(t.length==0)return null;let r=t[0].pos,n=t.length==2?t[1].pos:r;return r>-1&&n>-1?le.single(r+e,n+e):null}const qq={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},bO=Fe.ie&&Fe.ie_version<=11;class Zq{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new wD,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(r=>{for(let n of r)this.queue.push(n);(Fe.ie&&Fe.ie_version<=11||Fe.ios&&e.composing)&&r.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT===!0&&(this.editContext=new Iq(e),e.state.facet(rs)&&(e.contentDOM.editContext=this.editContext.editContext)),bO&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var r;((r=this.view.docView)===null||r===void 0?void 0:r.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(r=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),r.length>0&&r[r.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(r=>{r.length>0&&r[r.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){e.type=="change"&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((r,n)=>r!=e[n]))){this.gapIntersection.disconnect();for(let r of e)this.gapIntersection.observe(r);this.gaps=e}}onSelectionChange(e){let r=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,i=this.selectionRange;if(n.state.facet(rs)?n.root.activeElement!=this.dom:!Zd(n.dom,i))return;let o=i.anchorNode&&n.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){r||(this.selectionChanged=!1);return}(Fe.ie&&Fe.ie_version<=11||Fe.android&&Fe.chrome)&&!n.state.selection.main.empty&&i.focusNode&&vc(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,r=Vc(e.root);if(!r)return!1;let n=Fe.safari&&e.root.nodeType==11&&yD(this.dom.ownerDocument)==this.dom&&Nq(this.view,r)||r;if(!n||this.selectionRange.eq(n))return!1;let i=Zd(this.dom,n);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&kD(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,r){this.selectionRange.set(e.node,e.offset,r.node,r.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,r=null;for(let n=this.dom;n;)if(n.nodeType==1)!r&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:r||(r=this.scrollTargets.slice(0,e)),r&&r.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!r&&(r=this.scrollTargets.slice(0,e)),r){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=r)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,qq),bO&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),bO&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,r){var n;if(!this.delayedAndroidKey){let i=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&Ql(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:r,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let r=-1,n=-1,i=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(i=!0),r==-1?{from:r,to:n}=s:(r=Math.min(s.from,r),n=Math.max(s.to,n)))}return{from:r,to:n,typeOver:i}}readChange(){let{from:e,to:r,typeOver:n}=this.processRecords(),i=this.selectionChanged&&Zd(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new Rq(this.view,e,r,n);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let r=this.readChange();if(!r)return this.view.requestMeasure(),!1;let n=this.view.state,i=bQ(this.view,r);return this.view.state==n&&(r.domChanged||r.newSel&&!r.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let r=this.view.docView.nearest(e.target);if(!r||r.ignoreMutation(e))return null;if(r.markDirty(e.type=="attributes"),e.type=="attributes"&&(r.flags|=4),e.type=="childList"){let n=GS(r,e.previousSibling||e.target.previousSibling,-1),i=GS(r,e.nextSibling||e.target.nextSibling,1);return{from:n?r.posAfter(n):r.posAtStart,to:i?r.posBefore(i):r.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener("change",this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener("change",this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(rs)!=e.state.facet(rs)&&(e.view.contentDOM.editContext=e.state.facet(rs)?this.editContext.editContext:null))}destroy(){var e,r,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(r=this.gapIntersection)===null||r===void 0||r.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function GS(t,e,r){for(;e;){let n=rr.get(e);if(n&&n.parent==t)return n;let i=e.parentNode;e=i!=t.dom?i:r>0?e.nextSibling:e.previousSibling}return null}function HS(t,e){let r=e.startContainer,n=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return vc(s.node,s.offset,i,o)&&([r,n,i,o]=[i,o,r,n]),{anchorNode:r,anchorOffset:n,focusNode:i,focusOffset:o}}function Nq(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return HS(t,i)}let r=null;function n(i){i.preventDefault(),i.stopImmediatePropagation(),r=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),r?HS(t,r):null}class Iq{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.resetRange(e.state);let r=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});r.addEventListener("textupdate",n=>{let{anchor:i}=e.state.selection.main,o={from:this.toEditorPos(n.updateRangeStart),to:this.toEditorPos(n.updateRangeEnd),insert:Zt.of(n.text.split(`
|
|
86
|
+
`))};o.from==this.from&&i<this.from?o.from=i:o.to==this.to&&i>this.to&&(o.to=i),!(o.from==o.to&&!o.insert.length)&&(this.pendingContextChange=o,SQ(e,o,le.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd))),this.pendingContextChange&&this.revertPending(e.state))}),r.addEventListener("characterboundsupdate",n=>{let i=[],o=null;for(let s=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);s<a;s++){let l=e.coordsForChar(s);o=l&&new DOMRect(l.left,l.right,l.right-l.left,l.bottom-l.top)||o||new DOMRect,i.push(o)}r.updateCharacterBounds(n.rangeStart,i)}),r.addEventListener("textformatupdate",n=>{let i=[];for(let o of n.getTextFormats()){let s=o.underlineStyle,a=o.underlineThickness;if(s!="None"&&a!="None"){let l=`text-decoration: underline ${s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${a=="Thin"?1:2}px`;i.push(Ne.mark({attributes:{style:l}}).range(this.toEditorPos(o.rangeStart),this.toEditorPos(o.rangeEnd)))}}e.dispatch({effects:JE.of(Ne.set(i))})}),r.addEventListener("compositionstart",()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)}),r.addEventListener("compositionend",()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null}),this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let i=Vc(n.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let r=0,n=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,s,a,l,c)=>{if(n)return;let u=c.length-(s-o);if(i&&s>=i.to)if(i.from==o&&i.to==s&&i.insert.eq(c)){i=this.pendingContextChange=null,r+=u;return}else i=null,this.revertPending(e.state);if(o+=r,s+=r,s<=this.from)this.from+=u,this.to+=u;else if(o<this.to){if(o<this.from||s>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(s),c.toString()),this.to+=u}r+=u}),i&&!n&&this.revertPending(e.state),!n}update(e){!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:r}=e.selection.main;this.from=Math.max(0,r-1e4),this.to=Math.min(e.doc.length,r+1e4)}revertPending(e){let r=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(r.from),this.toContextPos(r.to+r.insert.length),e.doc.sliceString(r.from,r.to))}setSelection(e){let{main:r}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,r.anchor))),i=this.toContextPos(r.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(n,i)}rangeIsValid(e){let{head:r}=e.selection.main;return!(this.from>0&&r-this.from<500||this.to<e.doc.length&&this.to-r<500||this.to-this.from>1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}}class Ee{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(n=>n.forEach(i=>r(i,this)))||(n=>this.update(n)),this.dispatch=this.dispatch.bind(this),this._root=e.root||PD(e.parent)||document,this.viewState=new US(e.state||Dt.create(e)),e.scrollTo&&e.scrollTo.is(sh)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ju).map(n=>new OO(n));for(let n of this.plugins)n.update(this);this.observer=new Zq(this),this.inputState=new tq(this),this.inputState.ensureHandlers(this.plugins),this.docView=new ES(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let r=e.length==1&&e[0]instanceof Nr?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(r,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let r=!1,n=!1,i,o=this.state;for(let h of e){if(h.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=h.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,a=0,l=null;e.some(h=>h.annotation(dQ))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,l=pQ(o,s),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(Dt.phrases)!=this.state.facet(Dt.phrases))return this.setState(o);i=Cp.create(this,o,e),i.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(f&&(f=f.map(h.changes)),h.scrollIntoView){let{main:d}=h.state.selection;f=new Tl(d.empty?d:le.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of h.effects)d.is(sh)&&(f=d.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=Ep.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),r=this.docView.update(i),this.state.facet(ec)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(r,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(hh)!=i.state.facet(hh)&&(this.viewState.mustMeasureContent=!0),(r||n||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),r&&this.docViewUpdate(),!i.empty)for(let h of this.state.facet(Ty))try{h(i)}catch(d){Tn(this.state,d,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!bQ(this,u)&&c.force&&Ql(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let r=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new US(e),this.plugins=e.facet(Ju).map(n=>new OO(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new ES(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}r&&this.focus(),this.requestMeasure()}updatePlugins(e){let r=e.startState.facet(Ju),n=e.state.facet(Ju);if(r!=n){let i=[];for(let o of n){let s=r.indexOf(o);if(s<0)i.push(new OO(o));else{let a=this.plugins[s];a.mustUpdate=e,i.push(a)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);r!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let r=e.value;if(r&&r.docViewUpdate)try{r.docViewUpdate(this)}catch(n){Tn(this.state,n,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let r=null,n=this.scrollDOM,i=n.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if($E(n))o=-1,s=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(i);o=d.from,s=d.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(d=>{try{return d.read(this)}catch(p){return Tn(this.state,p),KS}}),f=Cp.create(this,this.state,[]),h=!1;f.flags|=l,r?r.flags|=l:r=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),h=this.docView.update(f),h&&this.docViewUpdate());for(let d=0;d<c.length;d++)if(u[d]!=KS)try{let p=c[d];p.write&&p.write(u[d],this)}catch(p){Tn(this.state,p)}if(h&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let p=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-s;if(p>1||p<-1){i=i+p,n.scrollTop=i/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(r&&!r.empty)for(let a of this.state.facet(Ty))a(r)}get themeClasses(){return Dy+" "+(this.state.facet(jy)?yQ:mQ)+" "+this.state.facet(hh)}updateAttrs(){let e=JS(this,eQ,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),r={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(rs)?"true":"false",class:"cm-content",style:`${Fe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(r["aria-readonly"]="true"),JS(this,D0,r);let n=this.observer.ignore(()=>{let i=_y(this.contentDOM,this.contentAttrs,r),o=_y(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=r,n}showAnnouncements(e){let r=!0;for(let n of e)for(let i of n.effects)if(i.is(Ee.announce)){r&&(this.announceDOM.textContent=""),r=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(ec);let e=this.state.facet(Ee.cspNonce);xs.mount(this.root,this.styleModules.concat(Eq).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let r=0;r<this.measureRequests.length;r++)if(this.measureRequests[r].key===e.key){this.measureRequests[r]=e;return}}this.measureRequests.push(e)}}plugin(e){let r=this.pluginMap.get(e);return(r===void 0||r&&r.spec!=e)&&this.pluginMap.set(e,r=this.plugins.find(n=>n.spec==e)||null),r&&r.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,r,n){return yO(this,e,jS(this,e,r,n))}moveByGroup(e,r){return yO(this,e,jS(this,e,r,n=>JD(this,e.head,n)))}visualLineSide(e,r){let n=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=n[r?n.length-1:0];return le.cursor(o.side(r,i)+e.from,o.forward(!r,i)?1:-1)}moveToLineBoundary(e,r,n=!0){return KD(this,e,r,n)}moveVertically(e,r,n){return yO(this,e,eq(this,e,r,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,r=0){return this.docView.posFromDOM(e,r)}posAtCoords(e,r=!0){return this.readMeasured(),sQ(this,e,r)}coordsAtPos(e,r=1){this.readMeasured();let n=this.docView.coordsAt(e,r);if(!n||n.left==n.right)return n;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),s=o[us.find(o,e-i.from,-1,r)];return R0(n,s.dir==dr.LTR==r>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(GE)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Wq)return BE(e.length);let r=this.textDirectionAt(e.from),n;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==r&&(o.fresh||WE(o.isolates,n=CS(this,e))))return o.order;n||(n=CS(this,e));let i=DD(e.text,r,n);return this.bidiCache.push(new Ep(e.from,e.to,r,n,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Fe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{xE(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,r={}){return sh.of(new Tl(typeof e=="number"?le.cursor(e):e,r.y,r.x,r.yMargin,r.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:r}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return sh.of(new Tl(le.cursor(n.from),"start","start",n.top-e,r,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return nr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return nr.define(()=>({}),{eventObservers:e})}static theme(e,r){let n=xs.newName(),i=[hh.of(n),ec.of(qy(`.${n}`,e))];return r&&r.dark&&i.push(jy.of(!0)),i}static baseTheme(e){return Io.lowest(ec.of(qy("."+Dy,e,vQ)))}static findFromDOM(e){var r;let n=e.querySelector(".cm-content"),i=n&&rr.get(n)||rr.get(e);return((r=i==null?void 0:i.rootView)===null||r===void 0?void 0:r.view)||null}}Ee.styleModule=ec;Ee.inputHandler=YE;Ee.scrollHandler=KE;Ee.focusChangeEffect=zE;Ee.perLineTextDirection=GE;Ee.exceptionSink=UE;Ee.updateListener=Ty;Ee.editable=rs;Ee.mouseSelectionStyle=FE;Ee.dragMovesSelection=XE;Ee.clickAddsSelectionRange=VE;Ee.decorations=Fc;Ee.outerDecorations=tQ;Ee.atomicRanges=q0;Ee.bidiIsolatedRanges=rQ;Ee.scrollMargins=nQ;Ee.darkTheme=jy;Ee.cspNonce=Ie.define({combine:t=>t.length?t[0]:""});Ee.contentAttributes=D0;Ee.editorAttributes=eQ;Ee.lineWrapping=Ee.contentAttributes.of({class:"cm-lineWrapping"});Ee.announce=pt.define();const Wq=4096,KS={};class Ep{constructor(e,r,n,i,o,s){this.from=e,this.to=r,this.dir=n,this.isolates=i,this.fresh=o,this.order=s}static update(e,r){if(r.empty&&!e.some(o=>o.fresh))return e;let n=[],i=e.length?e[e.length-1].dir:dr.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let s=e[o];s.dir==i&&!r.touchesRange(s.from,s.to)&&n.push(new Ep(r.mapPos(s.from,1),r.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return n}}function JS(t,e,r){for(let n=t.state.facet(e),i=n.length-1;i>=0;i--){let o=n[i],s=typeof o=="function"?o(t):o;s&&xy(s,r)}return r}const Bq=Fe.mac?"mac":Fe.windows?"win":Fe.linux?"linux":"key";function Lq(t,e){const r=t.split(/-(?!$)/);let n=r[r.length-1];n=="Space"&&(n=" ");let i,o,s,a;for(let l=0;l<r.length-1;++l){const c=r[l];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))i=!0;else if(/^(c|ctrl|control)$/i.test(c))o=!0;else if(/^s(hift)?$/i.test(c))s=!0;else if(/^mod$/i.test(c))e=="mac"?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+c)}return i&&(n="Alt-"+n),o&&(n="Ctrl-"+n),a&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function dh(t,e,r){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),r!==!1&&e.shiftKey&&(t="Shift-"+t),t}const Vq=Io.default(Ee.domEventHandlers({keydown(t,e){return PQ(wQ(e.state),t,e,"editor")}})),vf=Ie.define({enables:Vq}),ew=new WeakMap;function wQ(t){let e=t.facet(vf),r=ew.get(e);return r||ew.set(e,r=Uq(e.reduce((n,i)=>n.concat(i),[]))),r}function Xq(t,e,r){return PQ(wQ(t.state),e,t,r)}let ns=null;const Fq=4e3;function Uq(t,e=Bq){let r=Object.create(null),n=Object.create(null),i=(s,a)=>{let l=n[s];if(l==null)n[s]=a;else if(l!=a)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,a,l,c,u)=>{var f,h;let d=r[s]||(r[s]=Object.create(null)),p=a.split(/ (?!$)/).map(y=>Lq(y,e));for(let y=1;y<p.length;y++){let O=p.slice(0,y).join(" ");i(O,!0),d[O]||(d[O]={preventDefault:!0,stopPropagation:!1,run:[v=>{let b=ns={view:v,prefix:O,scope:s};return setTimeout(()=>{ns==b&&(ns=null)},Fq),!0}]})}let g=p.join(" ");i(g,!1);let m=d[g]||(d[g]={preventDefault:!1,stopPropagation:!1,run:((h=(f=d._any)===null||f===void 0?void 0:f.run)===null||h===void 0?void 0:h.slice())||[]});l&&m.run.push(l),c&&(m.preventDefault=!0),u&&(m.stopPropagation=!0)};for(let s of t){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let c of a){let u=r[c]||(r[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=s;for(let h in u)u[h].run.push(d=>f(d,Zy))}let l=s[e]||s.key;if(l)for(let c of a)o(c,l,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(c,"Shift-"+l,s.shift,s.preventDefault,s.stopPropagation)}return r}let Zy=null;function PQ(t,e,r,n){Zy=e;let i=mD(e),o=ln(i,0),s=di(o)==i.length&&i!=" ",a="",l=!1,c=!1,u=!1;ns&&ns.view==r&&ns.scope==n&&(a=ns.prefix+" ",lQ.indexOf(e.keyCode)<0&&(c=!0,ns=null));let f=new Set,h=m=>{if(m){for(let y of m.run)if(!f.has(y)&&(f.add(y),y(r)))return m.stopPropagation&&(u=!0),!0;m.preventDefault&&(m.stopPropagation&&(u=!0),c=!0)}return!1},d=t[n],p,g;return d&&(h(d[a+dh(i,e,!s)])?l=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Fe.windows&&e.ctrlKey&&e.altKey)&&(p=_s[e.keyCode])&&p!=i?(h(d[a+dh(p,e,!0)])||e.shiftKey&&(g=Lc[e.keyCode])!=i&&g!=p&&h(d[a+dh(g,e,!1)]))&&(l=!0):s&&e.shiftKey&&h(d[a+dh(i,e,!0)])&&(l=!0),!l&&h(d._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),Zy=null,l}class bf{constructor(e,r,n,i,o){this.className=e,this.left=r,this.top=n,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,r){return r.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,r,n){if(n.empty){let i=e.coordsAtPos(n.head,n.assoc||1);if(!i)return[];let o=kQ(e);return[new bf(r,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return Yq(e,r,n)}}function kQ(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==dr.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function tw(t,e,r,n){let i=t.coordsAtPos(e,r*2);if(!i)return n;let o=t.dom.getBoundingClientRect(),s=(i.top+i.bottom)/2,a=t.posAtCoords({x:o.left+1,y:s}),l=t.posAtCoords({x:o.right-1,y:s});return a==null||l==null?n:{from:Math.max(n.from,Math.min(a,l)),to:Math.min(n.to,Math.max(a,l))}}function Yq(t,e,r){if(r.to<=t.viewport.from||r.from>=t.viewport.to)return[];let n=Math.max(r.from,t.viewport.from),i=Math.min(r.to,t.viewport.to),o=t.textDirection==dr.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=kQ(t),c=s.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),f=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),h=a.right-(u?parseInt(u.paddingRight):0),d=Ay(t,n),p=Ay(t,i),g=d.type==An.Text?d:null,m=p.type==An.Text?p:null;if(g&&(t.lineWrapping||d.widgetLineBreaks)&&(g=tw(t,n,1,g)),m&&(t.lineWrapping||p.widgetLineBreaks)&&(m=tw(t,i,-1,m)),g&&m&&g.from==m.from&&g.to==m.to)return O(v(r.from,r.to,g));{let w=g?v(r.from,null,g):b(d,!1),_=m?v(null,r.to,m):b(p,!0),C=[];return(g||d).to<(m||p).from-(g&&m?1:0)||d.widgetLineBreaks>1&&w.bottom+t.defaultLineHeight/2<_.top?C.push(y(f,w.bottom,h,_.top)):w.bottom<_.top&&t.elementAtHeight((w.bottom+_.top)/2).type==An.Text&&(w.bottom=_.top=(w.bottom+_.top)/2),O(w).concat(C).concat(O(_))}function y(w,_,C,P){return new bf(e,w-l.left,_-l.top-.01,C-w,P-_+.01)}function O({top:w,bottom:_,horizontal:C}){let P=[];for(let k=0;k<C.length;k+=2)P.push(y(C[k],w,C[k+1],_));return P}function v(w,_,C){let P=1e9,k=-1e9,x=[];function E(F,H,M,B,D){let X=t.coordsAtPos(F,F==C.to?-2:2),G=t.coordsAtPos(M,M==C.from?2:-2);!X||!G||(P=Math.min(X.top,G.top,P),k=Math.max(X.bottom,G.bottom,k),D==dr.LTR?x.push(o&&H?f:X.left,o&&B?h:G.right):x.push(!o&&B?f:G.left,!o&&H?h:X.right))}let R=w??C.from,I=_??C.to;for(let F of t.visibleRanges)if(F.to>R&&F.from<I)for(let H=Math.max(F.from,R),M=Math.min(F.to,I);;){let B=t.state.doc.lineAt(H);for(let D of t.bidiSpans(B)){let X=D.from+B.from,G=D.to+B.from;if(X>=M)break;G>H&&E(Math.max(X,H),w==null&&X<=R,Math.min(G,M),_==null&&G>=I,D.dir)}if(H=B.to+1,H>=M)break}return x.length==0&&E(R,w==null,I,_==null,t.textDirection),{top:P,bottom:k,horizontal:x}}function b(w,_){let C=a.top+(_?w.top:w.bottom);return{top:C,bottom:C,horizontal:[]}}}function zq(t,e){return t.constructor==e.constructor&&t.eq(e)}class Gq{constructor(e,r){this.view=e,this.layer=r,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),r.above&&this.dom.classList.add("cm-layer-above"),r.class&&this.dom.classList.add(r.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),r.mount&&r.mount(this.dom,e)}update(e){e.startState.facet(Wd)!=e.state.facet(Wd)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let r=0,n=e.facet(Wd);for(;r<n.length&&n[r]!=this.layer;)r++;this.dom.style.zIndex=String((this.layer.above?150:-1)-r)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:r}=this.view;(e!=this.scaleX||r!=this.scaleY)&&(this.scaleX=e,this.scaleY=r,this.dom.style.transform=`scale(${1/e}, ${1/r})`)}draw(e){if(e.length!=this.drawn.length||e.some((r,n)=>!zq(r,this.drawn[n]))){let r=this.dom.firstChild,n=0;for(let i of e)i.update&&r&&i.constructor&&this.drawn[n].constructor&&i.update(r,this.drawn[n])?(r=r.nextSibling,n++):this.dom.insertBefore(i.draw(),r);for(;r;){let i=r.nextSibling;r.remove(),r=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Wd=Ie.define();function xQ(t){return[nr.define(e=>new Gq(e,t)),Wd.of(t)]}const _Q=!Fe.ios,Uc=Ie.define({combine(t){return Vi(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,r)=>Math.min(e,r),drawRangeCursor:(e,r)=>e||r})}});function Hq(t={}){return[Uc.of(t),Kq,Jq,eZ,HE.of(!0)]}function $Q(t){return t.startState.facet(Uc)!=t.state.facet(Uc)}const Kq=xQ({above:!0,markers(t){let{state:e}=t,r=e.facet(Uc),n=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty?!o||_Q:r.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=i.empty?i:le.cursor(i.head,i.head>i.anchor?-1:1);for(let l of bf.forRange(t,s,a))n.push(l)}}return n},update(t,e){t.transactions.some(n=>n.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let r=$Q(t);return r&&rw(t.state,e),t.docChanged||t.selectionSet||r},mount(t,e){rw(e.state,t)},class:"cm-cursorLayer"});function rw(t,e){e.style.animationDuration=t.facet(Uc).cursorBlinkRate+"ms"}const Jq=xQ({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:bf.forRange(t,"cm-selectionBackground",e)).reduce((e,r)=>e.concat(r))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||$Q(t)},class:"cm-selectionLayer"}),Ny={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};_Q&&(Ny[".cm-line"].caretColor=Ny[".cm-content"].caretColor="transparent !important");const eZ=Io.highest(Ee.theme(Ny)),CQ=pt.define({map(t,e){return t==null?null:e.mapPos(t)}}),nc=Kr.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((r,n)=>n.is(CQ)?n.value:r,t)}}),tZ=nr.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let r=t.state.field(nc);r==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(nc)!=r||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(nc),r=e!=null&&t.coordsAtPos(e);if(!r)return null;let n=t.scrollDOM.getBoundingClientRect();return{left:r.left-n.left+t.scrollDOM.scrollLeft*t.scaleX,top:r.top-n.top+t.scrollDOM.scrollTop*t.scaleY,height:r.bottom-r.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:r}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/r+"px",this.cursor.style.height=t.height/r+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(nc)!=t&&this.view.dispatch({effects:CQ.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function rZ(){return[nc,tZ]}function nw(t,e,r,n,i){e.lastIndex=0;for(let o=t.iterRange(r,n),s=r,a;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;a=e.exec(o.value);)i(s+a.index,a)}function nZ(t,e){let r=t.visibleRanges;if(r.length==1&&r[0].from==t.viewport.from&&r[0].to==t.viewport.to)return r;let n=[];for(let{from:i,to:o}of r)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),n.length&&n[n.length-1].to>=i?n[n.length-1].to=o:n.push({from:i,to:o});return n}class iZ{constructor(e){const{regexp:r,decoration:n,decorate:i,boundary:o,maxLength:s=1e3}=e;if(!r.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=r,i)this.addMatch=(a,l,c,u)=>i(u,c,c+a[0].length,a,l);else if(typeof n=="function")this.addMatch=(a,l,c,u)=>{let f=n(a,l,c);f&&u(c,c+a[0].length,f)};else if(n)this.addMatch=(a,l,c,u)=>u(c,c+a[0].length,n);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let r=new ks,n=r.add.bind(r);for(let{from:i,to:o}of nZ(e,this.maxLength))nw(e.state.doc,this.regexp,i,o,(s,a)=>this.addMatch(a,e,s,n));return r.finish()}updateDeco(e,r){let n=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,s,a,l)=>{l>e.view.viewport.from&&a<e.view.viewport.to&&(n=Math.min(a,n),i=Math.max(l,i))}),e.viewportChanged||i-n>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,r.map(e.changes),n,i):r}updateRange(e,r,n,i){for(let o of e.visibleRanges){let s=Math.max(o.from,n),a=Math.min(o.to,i);if(a>s){let l=e.state.doc.lineAt(s),c=l.to<a?e.state.doc.lineAt(a):l,u=Math.max(o.from,l.from),f=Math.min(o.to,c.to);if(this.boundary){for(;s>l.from;s--)if(this.boundary.test(l.text[s-1-l.from])){u=s;break}for(;a<c.to;a++)if(this.boundary.test(c.text[a-c.from])){f=a;break}}let h=[],d,p=(g,m,y)=>h.push(y.range(g,m));if(l==c)for(this.regexp.lastIndex=u-l.from;(d=this.regexp.exec(l.text))&&d.index<f-l.from;)this.addMatch(d,e,d.index+l.from,p);else nw(e.state.doc,this.regexp,u,f,(g,m)=>this.addMatch(m,e,g,p));r=r.update({filterFrom:u,filterTo:f,filter:(g,m)=>g<u||m>f,add:h})}}return r}}const Iy=/x/.unicode!=null?"gu":"g",oZ=new RegExp(`[\0-\b
|
|
87
|
+
--\u2028\u2029\uFEFF-]`,Iy),sZ={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let SO=null;function aZ(){var t;if(SO==null&&typeof document<"u"&&document.body){let e=document.body.style;SO=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return SO||!1}const Bd=Ie.define({combine(t){let e=Vi(t,{render:null,specialChars:oZ,addSpecialChars:null});return(e.replaceTabs=!aZ())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Iy)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Iy)),e}});function lZ(t={}){return[Bd.of(t),uZ()]}let iw=null;function uZ(){return iw||(iw=nr.fromClass(class{constructor(t){this.view=t,this.decorations=Ne.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Bd)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new iZ({regexp:t.specialChars,decoration:(e,r,n)=>{let{doc:i}=r.state,o=ln(e[0],0);if(o==9){let s=i.lineAt(n),a=r.state.tabSize,l=Wi(s.text,a,n-s.from);return Ne.replace({widget:new dZ((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=Ne.replace({widget:new hZ(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Bd);t.startState.facet(Bd)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const cZ="•";function fZ(t){return t>=32?cZ:t==10?"":String.fromCharCode(9216+t)}class hZ extends ki{constructor(e,r){super(),this.options=e,this.code=r}eq(e){return e.code==this.code}toDOM(e){let r=fZ(this.code),n=e.state.phrase("Control character")+" "+(sZ[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,n,r);if(i)return i;let o=document.createElement("span");return o.textContent=r,o.title=n,o.setAttribute("aria-label",n),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class dZ extends ki{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function pZ(){return OZ}const gZ=Ne.line({class:"cm-activeLine"}),OZ=nr.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,r=[];for(let n of t.state.selection.ranges){let i=t.lineBlockAt(n.head);i.from>e&&(r.push(gZ.range(i.from)),e=i.from)}return Ne.set(r)}},{decorations:t=>t.decorations}),Wy=2e3;function mZ(t,e,r){let n=Math.min(e.line,r.line),i=Math.max(e.line,r.line),o=[];if(e.off>Wy||r.off>Wy||e.col<0||r.col<0){let s=Math.min(e.off,r.off),a=Math.max(e.off,r.off);for(let l=n;l<=i;l++){let c=t.doc.line(l);c.length<=a&&o.push(le.range(c.from+s,c.to+a))}}else{let s=Math.min(e.col,r.col),a=Math.max(e.col,r.col);for(let l=n;l<=i;l++){let c=t.doc.line(l),u=yy(c.text,s,t.tabSize,!0);if(u<0)o.push(le.cursor(c.to));else{let f=yy(c.text,a,t.tabSize);o.push(le.range(c.from+u,c.from+f))}}}return o}function yZ(t,e){let r=t.coordsAtPos(t.viewport.from);return r?Math.round(Math.abs((r.left-e)/t.defaultCharacterWidth)):-1}function ow(t,e){let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),n=t.state.doc.lineAt(r),i=r-n.from,o=i>Wy?-1:i==n.length?yZ(t,e.clientX):Wi(n.text,t.state.tabSize,r-n.from);return{line:n.number,col:o,off:i}}function vZ(t,e){let r=ow(t,e),n=t.state.selection;return r?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(r.line).from),s=i.state.doc.lineAt(o);r={line:s.number,col:r.col,off:Math.min(r.off,s.length)},n=n.map(i.changes)}},get(i,o,s){let a=ow(t,i);if(!a)return n;let l=mZ(t.state,r,a);return l.length?s?le.create(l.concat(n.ranges)):le.create(l):n}}:null}function bZ(t){let e=(t==null?void 0:t.eventFilter)||(r=>r.altKey&&r.button==0);return Ee.mouseSelectionStyle.of((r,n)=>e(n)?vZ(r,n):null)}const SZ={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},wZ={style:"cursor: crosshair"};function PZ(t={}){let[e,r]=SZ[t.key||"Alt"],n=nr.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||r(i))},keyup(i){(i.keyCode==e||!r(i))&&this.set(!1)},mousemove(i){this.set(r(i))}}});return[n,Ee.contentAttributes.of(i=>{var o;return!((o=i.plugin(n))===null||o===void 0)&&o.isDown?wZ:null})]}const Tu="-10000px";class EQ{constructor(e,r,n,i){this.facet=r,this.createTooltipView=n,this.removeTooltipView=i,this.input=e.state.facet(r),this.tooltips=this.input.filter(s=>s);let o=null;this.tooltipViews=this.tooltips.map(s=>o=n(s,o))}update(e,r){var n;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let s=[],a=r?[]:null;for(let l=0;l<o.length;l++){let c=o[l],u=-1;if(c){for(let f=0;f<this.tooltips.length;f++){let h=this.tooltips[f];h&&h.create==c.create&&(u=f)}if(u<0)s[l]=this.createTooltipView(c,l?s[l-1]:null),a&&(a[l]=!!c.above);else{let f=s[l]=this.tooltipViews[u];a&&(a[l]=r[u]),f.update&&f.update(e)}}}for(let l of this.tooltipViews)s.indexOf(l)<0&&(this.removeTooltipView(l),(n=l.destroy)===null||n===void 0||n.call(l));return r&&(a.forEach((l,c)=>r[c]=l),r.length=a.length),this.input=i,this.tooltips=o,this.tooltipViews=s,!0}}function kZ(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const wO=Ie.define({combine:t=>{var e,r,n;return{position:Fe.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((r=t.find(i=>i.parent))===null||r===void 0?void 0:r.parent)||null,tooltipSpace:((n=t.find(i=>i.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||kZ}}}),sw=new WeakMap,I0=nr.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(wO);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new EQ(t,W0,(r,n)=>this.createTooltip(r,n),r=>{this.resizeObserver&&this.resizeObserver.unobserve(r.dom),r.dom.remove()}),this.above=this.manager.tooltips.map(r=>!!r.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(r=>{Date.now()>this.lastTransaction-50&&r.length>0&&r[r.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let r=e||t.geometryChanged,n=t.state.facet(wO);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;r=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);r=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);r&&this.maybeMeasure()}createTooltip(t,e){let r=t.create(this.view),n=e?e.dom:null;if(r.dom.classList.add("cm-tooltip"),t.arrow&&!r.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",r.dom.appendChild(i)}return r.dom.style.position=this.position,r.dom.style.top=Tu,r.dom.style.left="0px",this.container.insertBefore(r.dom,n),r.mount&&r.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(r.dom),r}destroy(){var t,e,r;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(t=n.destroy)===null||t===void 0||t.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(r=this.intersectionObserver)===null||r===void 0||r.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,r=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Fe.gecko)n=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Tu&&i.style.left=="0px"){let o=i.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(n||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,r=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:r}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((i,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(wO).tooltipSpace(this.view),scaleX:e,scaleY:r,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{editor:r,space:n,scaleX:i,scaleY:o}=t,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:u}=c,f=t.pos[a],h=t.size[a];if(!f||f.bottom<=Math.max(r.top,n.top)||f.top>=Math.min(r.bottom,n.bottom)||f.right<Math.max(r.left,n.left)-.1||f.left>Math.min(r.right,n.right)+.1){u.style.top=Tu;continue}let d=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,g=h.right-h.left,m=(e=sw.get(c))!==null&&e!==void 0?e:h.bottom-h.top,y=c.offset||_Z,O=this.view.textDirection==dr.LTR,v=h.width>n.right-n.left?O?n.left:n.right-h.width:O?Math.min(f.left-(d?14:0)+y.x,n.right-g):Math.max(n.left,f.left-g+(d?14:0)-y.x),b=this.above[a];!l.strictSide&&(b?f.top-(h.bottom-h.top)-y.y<n.top:f.bottom+(h.bottom-h.top)+y.y>n.bottom)&&b==n.bottom-f.bottom>f.top-n.top&&(b=this.above[a]=!b);let w=(b?f.top-n.top:n.bottom-f.bottom)-p;if(w<m&&c.resize!==!1){if(w<this.view.defaultLineHeight){u.style.top=Tu;continue}sw.set(c,m),u.style.height=(m=w)/o+"px"}else u.style.height&&(u.style.height="");let _=b?f.top-m-p-y.y:f.bottom+p+y.y,C=v+g;if(c.overlap!==!0)for(let P of s)P.left<C&&P.right>v&&P.top<_+m&&P.bottom>_&&(_=b?P.top-m-2-p:P.bottom+p+2);if(this.position=="absolute"?(u.style.top=(_-t.parent.top)/o+"px",u.style.left=(v-t.parent.left)/i+"px"):(u.style.top=_/o+"px",u.style.left=v/i+"px"),d){let P=f.left+(O?y.x:-y.x)-(v+14-7);d.style.left=P/i+"px"}c.overlap!==!0&&s.push({left:v,top:_,right:C,bottom:_+m}),u.classList.toggle("cm-tooltip-above",b),u.classList.toggle("cm-tooltip-below",!b),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Tu}},{eventObservers:{scroll(){this.maybeMeasure()}}}),xZ=Ee.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),_Z={x:0,y:0},W0=Ie.define({enables:[I0,xZ]}),Qp=Ie.define({combine:t=>t.reduce((e,r)=>e.concat(r),[])});class _g{static create(e){return new _g(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new EQ(e,Qp,(r,n)=>this.createHostedView(r,n),r=>r.dom.remove())}createHostedView(e,r){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,r?r.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let r of this.manager.tooltipViews)r.mount&&r.mount(e);this.mounted=!0}positioned(e){for(let r of this.manager.tooltipViews)r.positioned&&r.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let r of this.manager.tooltipViews)(e=r.destroy)===null||e===void 0||e.call(r)}passProp(e){let r;for(let n of this.manager.tooltipViews){let i=n[e];if(i!==void 0){if(r===void 0)r=i;else if(r!==i)return}}return r}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const $Z=W0.compute([Qp],t=>{let e=t.facet(Qp);return e.length===0?null:{pos:Math.min(...e.map(r=>r.pos)),end:Math.max(...e.map(r=>{var n;return(n=r.end)!==null&&n!==void 0?n:r.pos})),create:_g.create,above:e[0].above,arrow:e.some(r=>r.arrow)}});class CZ{constructor(e,r,n,i,o){this.view=e,this.source=r,this.field=n,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:r}=this,n=e.docView.nearest(r.target);if(!n)return;let i,o=1;if(n instanceof ls)i=n.posAtStart;else{if(i=e.posAtCoords(r),i==null)return;let a=e.coordsAtPos(i);if(!a||r.y<a.top||r.y>a.bottom||r.x<a.left-e.defaultCharacterWidth||r.x>a.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=l&&l.dir==dr.RTL?-1:1;o=r.x<a.left?-c:c}let s=this.source(e,i,o);if(s!=null&&s.then){let a=this.pending={pos:i};s.then(l=>{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Tn(e.state,l,"hover tooltip"))}else s&&!(Array.isArray(s)&&!s.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let e=this.view.plugin(I0),r=e?e.manager.tooltips.findIndex(n=>n.create==_g.create):-1;return r>-1?e.manager.tooltipViews[r]:null}mousemove(e){var r,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!EZ(o.dom,e)||this.pending){let{pos:s}=i[0]||this.pending,a=(n=(r=i[0])===null||r===void 0?void 0:r.end)!==null&&n!==void 0?n:s;(s==a?this.view.posAtCoords(this.lastMove)!=s:!QZ(this.view,s,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:r}=this;if(r.length){let{tooltip:n}=this;n&&n.dom.contains(e.relatedTarget)?this.watchTooltipLeave(n.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let r=n=>{e.removeEventListener("mouseleave",r),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",r)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const ph=4;function EZ(t,e){let r=t.getBoundingClientRect();return e.clientX>=r.left-ph&&e.clientX<=r.right+ph&&e.clientY>=r.top-ph&&e.clientY<=r.bottom+ph}function QZ(t,e,r,n,i,o){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>n||s.right<n||s.top>i||Math.min(s.bottom,a)<i)return!1;let l=t.posAtCoords({x:n,y:i},!1);return l>=e&&l<=r}function TZ(t,e={}){let r=pt.define(),n=Kr.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(s=>!e.hideOn(o,s))),o.docChanged)){let s=[];for(let a of i){let l=o.changes.mapPos(a.pos,-1,Yr.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),a);c.pos=l,c.end!=null&&(c.end=o.changes.mapPos(c.end)),s.push(c)}}i=s}for(let s of o.effects)s.is(r)&&(i=s.value),s.is(RZ)&&(i=[]);return i},provide:i=>Qp.from(i)});return[n,nr.define(i=>new CZ(i,t,n,r,e.hoverTime||300)),$Z]}function QQ(t,e){let r=t.plugin(I0);if(!r)return null;let n=r.manager.tooltips.indexOf(e);return n<0?null:r.manager.tooltipViews[n]}const RZ=pt.define(),aw=Ie.define({combine(t){let e,r;for(let n of t)e=e||n.topContainer,r=r||n.bottomContainer;return{topContainer:e,bottomContainer:r}}});function Yc(t,e){let r=t.plugin(TQ),n=r?r.specs.indexOf(e):-1;return n>-1?r.panels[n]:null}const TQ=nr.fromClass(class{constructor(t){this.input=t.state.facet(zc),this.specs=this.input.filter(r=>r),this.panels=this.specs.map(r=>r(t));let e=t.state.facet(aw);this.top=new gh(t,!0,e.topContainer),this.bottom=new gh(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(r=>r.top)),this.bottom.sync(this.panels.filter(r=>!r.top));for(let r of this.panels)r.dom.classList.add("cm-panel"),r.mount&&r.mount()}update(t){let e=t.state.facet(aw);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new gh(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new gh(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let r=t.state.facet(zc);if(r!=this.input){let n=r.filter(l=>l),i=[],o=[],s=[],a=[];for(let l of n){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),a.push(u)):(u=this.panels[c],u.update&&u.update(t)),i.push(u),(u.top?o:s).push(u)}this.specs=n,this.panels=i,this.top.sync(o),this.bottom.sync(s);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let n of this.panels)n.update&&n.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Ee.scrollMargins.of(e=>{let r=e.plugin(t);return r&&{top:r.top.scrollMargin(),bottom:r.bottom.scrollMargin()}})});class gh{constructor(e,r,n){this.view=e,this.top=r,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let r of this.panels)r.destroy&&e.indexOf(r)<0&&r.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let r=this.container||this.view.dom;r.insertBefore(this.dom,this.top?r.firstChild:null)}let e=this.dom.firstChild;for(let r of this.panels)if(r.dom.parentNode==this.dom){for(;e!=r.dom;)e=lw(e);e=e.nextSibling}else this.dom.insertBefore(r.dom,e);for(;e;)e=lw(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function lw(t){let e=t.nextSibling;return t.remove(),e}const zc=Ie.define({enables:TQ});class Cs extends ka{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Cs.prototype.elementClass="";Cs.prototype.toDOM=void 0;Cs.prototype.mapMode=Yr.TrackBefore;Cs.prototype.startSide=Cs.prototype.endSide=-1;Cs.prototype.point=!0;const Ld=Ie.define(),Vd=Ie.define(),By=Ie.define({combine:t=>t.some(e=>e)});function AZ(t){let e=[MZ];return t&&t.fixed===!1&&e.push(By.of(!0)),e}const MZ=nr.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Vd).map(e=>new cw(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(By),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,r=t.view.viewport,n=Math.min(e.to,r.to)-Math.max(e.from,r.from);this.syncGutters(n<(r.to-r.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(By)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let r=qt.iter(this.view.state.facet(Ld),this.view.viewport.from),n=[],i=this.gutters.map(o=>new jZ(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(o.type)){let s=!0;for(let a of o.type)if(a.type==An.Text&&s){Ly(r,n,a.from);for(let l of i)l.line(this.view,a,n);s=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(o.type==An.Text){Ly(r,n,o.from);for(let s of i)s.line(this.view,o,n)}else if(o.widget)for(let s of i)s.widget(this.view,o);for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Vd),r=t.state.facet(Vd),n=t.docChanged||t.heightChanged||t.viewportChanged||!qt.eq(t.startState.facet(Ld),t.state.facet(Ld),t.view.viewport.from,t.view.viewport.to);if(e==r)for(let i of this.gutters)i.update(t)&&(n=!0);else{n=!0;let i=[];for(let o of r){let s=e.indexOf(o);s<0?i.push(new cw(this.view,o)):(this.gutters[s].update(t),i.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return n}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Ee.scrollMargins.of(e=>{let r=e.plugin(t);return!r||r.gutters.length==0||!r.fixed?null:e.textDirection==dr.LTR?{left:r.dom.offsetWidth*e.scaleX}:{right:r.dom.offsetWidth*e.scaleX}})});function uw(t){return Array.isArray(t)?t:[t]}function Ly(t,e,r){for(;t.value&&t.from<=r;)t.from==r&&e.push(t.value),t.next()}class jZ{constructor(e,r,n){this.gutter=e,this.height=n,this.i=0,this.cursor=qt.iter(e.markers,r.from)}addElement(e,r,n){let{gutter:i}=this,o=(r.top-this.height)/e.scaleY,s=r.height/e.scaleY;if(this.i==i.elements.length){let a=new RQ(e,s,o,n);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,s,o,n);this.height=r.bottom,this.i++}line(e,r,n){let i=[];Ly(this.cursor,i,r.from),n.length&&(i=i.concat(n));let o=this.gutter.config.lineMarker(e,r,i);o&&i.unshift(o);let s=this.gutter;i.length==0&&!s.config.renderEmptyElements||this.addElement(e,r,i)}widget(e,r){let n=this.gutter.config.widgetMarker(e,r.widget,r);n&&this.addElement(e,r,[n])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let r=e.elements.pop();e.dom.removeChild(r.dom),r.destroy()}}}class cw{constructor(e,r){this.view=e,this.config=r,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in r.domEventHandlers)this.dom.addEventListener(n,i=>{let o=i.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();s=(l.top+l.bottom)/2}else s=i.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);r.domEventHandlers[n](e,a,i)&&i.preventDefault()});this.markers=uw(r.markers(e)),r.initialSpacer&&(this.spacer=new RQ(e,0,0,[r.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let r=this.markers;if(this.markers=uw(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let n=e.view.viewport;return!qt.eq(this.markers,r,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class RQ{constructor(e,r,n,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,r,n,i)}update(e,r,n,i){this.height!=r&&(this.height=r,this.dom.style.height=r+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),DZ(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,r){let n="cm-gutterElement",i=this.dom.firstChild;for(let o=0,s=0;;){let a=s,l=o<r.length?r[o++]:null,c=!1;if(l){let u=l.elementClass;u&&(n+=" "+u);for(let f=s;f<this.markers.length;f++)if(this.markers[f].compare(l)){a=f,c=!0;break}}else a=this.markers.length;for(;s<a;){let u=this.markers[s++];if(u.toDOM){u.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!l)break;l.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),c&&s++}this.dom.className=n,this.markers=r}destroy(){this.setMarkers(null,[])}}function DZ(t,e){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].compare(e[r]))return!1;return!0}const qZ=Ie.define(),vl=Ie.define({combine(t){return Vi(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,r){let n=Object.assign({},e);for(let i in r){let o=n[i],s=r[i];n[i]=o?(a,l,c)=>o(a,l,c)||s(a,l,c):s}return n}})}});class PO extends Cs{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function kO(t,e){return t.state.facet(vl).formatNumber(e,t.state)}const ZZ=Vd.compute([vl],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(qZ)},lineMarker(e,r,n){return n.some(i=>i.toDOM)?null:new PO(kO(e,e.state.doc.lineAt(r.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(vl)!=e.state.facet(vl),initialSpacer(e){return new PO(kO(e,fw(e.state.doc.lines)))},updateSpacer(e,r){let n=kO(r.view,fw(r.view.state.doc.lines));return n==e.number?e:new PO(n)},domEventHandlers:t.facet(vl).domEventHandlers}));function NZ(t={}){return[vl.of(t),AZ(),ZZ]}function fw(t){let e=9;for(;e<t;)e=e*10+9;return e}const IZ=new class extends Cs{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},WZ=Ld.compute(["selection"],t=>{let e=[],r=-1;for(let n of t.selection.ranges){let i=t.doc.lineAt(n.head).from;i>r&&(r=i,e.push(IZ.range(i)))}return qt.of(e)});function BZ(){return WZ}const AQ=1024;let LZ=0;class gi{constructor(e,r){this.from=e,this.to=r}}class gt{constructor(e={}){this.id=LZ++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Gr.match(e)),r=>{let n=e(r);return n===void 0?null:[this,n]}}}gt.closedBy=new gt({deserialize:t=>t.split(" ")});gt.openedBy=new gt({deserialize:t=>t.split(" ")});gt.group=new gt({deserialize:t=>t.split(" ")});gt.isolate=new gt({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});gt.contextHash=new gt({perNode:!0});gt.lookAhead=new gt({perNode:!0});gt.mounted=new gt({perNode:!0});class Gc{constructor(e,r,n){this.tree=e,this.overlay=r,this.parser=n}static get(e){return e&&e.props&&e.props[gt.mounted.id]}}const VZ=Object.create(null);class Gr{constructor(e,r,n,i=0){this.name=e,this.props=r,this.id=n,this.flags=i}static define(e){let r=e.props&&e.props.length?Object.create(null):VZ,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Gr(e.name||"",r,e.id,n);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");r[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let r=this.prop(gt.group);return r?r.indexOf(e)>-1:!1}return this.id==e}static match(e){let r=Object.create(null);for(let n in e)for(let i of n.split(" "))r[i]=e[n];return n=>{for(let i=n.prop(gt.group),o=-1;o<(i?i.length:0);o++){let s=r[o<0?n.name:i[o]];if(s)return s}}}}Gr.none=new Gr("",Object.create(null),0,8);class Sf{constructor(e){this.types=e;for(let r=0;r<e.length;r++)if(e[r].id!=r)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let r=[];for(let n of this.types){let i=null;for(let o of e){let s=o(n);s&&(i||(i=Object.assign({},n.props)),i[s[0].id]=s[1])}r.push(i?new Gr(n.name,i,n.id,n.flags):n)}return new Sf(r)}}const Oh=new WeakMap,hw=new WeakMap;var sr;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(sr||(sr={}));class zt{constructor(e,r,n,i,o){if(this.type=e,this.children=r,this.positions=n,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=Gc.get(this);if(e&&!e.overlay)return e.tree.toString();let r="";for(let n of this.children){let i=n.toString();i&&(r&&(r+=","),r+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(r.length?"("+r+")":""):r}cursor(e=0){return new Tp(this.topNode,e)}cursorAt(e,r=0,n=0){let i=Oh.get(this)||this.topNode,o=new Tp(i);return o.moveTo(e,r),Oh.set(this,o._tree),o}get topNode(){return new Sn(this,0,0,null)}resolve(e,r=0){let n=Hc(Oh.get(this)||this.topNode,e,r,!1);return Oh.set(this,n),n}resolveInner(e,r=0){let n=Hc(hw.get(this)||this.topNode,e,r,!0);return hw.set(this,n),n}resolveStack(e,r=0){return UZ(this,e,r)}iterate(e){let{enter:r,leave:n,from:i=0,to:o=this.length}=e,s=e.mode||0,a=(s&sr.IncludeAnonymous)>0;for(let l=this.cursor(s|sr.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!a&&l.type.isAnonymous||r(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&n&&(a||!l.type.isAnonymous)&&n(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let r in this.props)e.push([+r,this.props[r]]);return e}balance(e={}){return this.children.length<=8?this:V0(Gr.none,this.children,this.positions,0,this.children.length,0,this.length,(r,n,i)=>new zt(this.type,r,n,i,this.propValues),e.makeTree||((r,n,i)=>new zt(Gr.none,r,n,i)))}static build(e){return YZ(e)}}zt.empty=new zt(Gr.none,[],[],0);class B0{constructor(e,r){this.buffer=e,this.index=r}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new B0(this.buffer,this.index)}}class Es{constructor(e,r,n){this.buffer=e,this.length=r,this.set=n}get type(){return Gr.none}toString(){let e=[];for(let r=0;r<this.buffer.length;)e.push(this.childString(r)),r=this.buffer[r+3];return e.join(",")}childString(e){let r=this.buffer[e],n=this.buffer[e+3],i=this.set.types[r],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,n==e)return o;let s=[];for(;e<n;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,r,n,i,o){let{buffer:s}=this,a=-1;for(let l=e;l!=r&&!(MQ(o,i,s[l+1],s[l+2])&&(a=l,n>0));l=s[l+3]);return a}slice(e,r,n){let i=this.buffer,o=new Uint16Array(r-e),s=0;for(let a=e,l=0;a<r;){o[l++]=i[a++],o[l++]=i[a++]-n;let c=o[l++]=i[a++]-n;o[l++]=i[a++]-e,s=Math.max(s,c)}return new Es(o,s,this.set)}}function MQ(t,e,r,n){switch(t){case-2:return r<e;case-1:return n>=e&&r<e;case 0:return r<e&&n>e;case 1:return r<=e&&n>e;case 2:return n>e;case 4:return!0}}function Hc(t,e,r,n){for(var i;t.from==t.to||(r<1?t.from>=e:t.from>e)||(r>-1?t.to<=e:t.to<e);){let s=!n&&t instanceof Sn&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=n?0:sr.IgnoreOverlays;if(n)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof Sn&&s.index<0&&((i=a.enter(e,r,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,r,o);if(!s)return t;t=s}}class jQ{cursor(e=0){return new Tp(this,e)}getChild(e,r=null,n=null){let i=dw(this,e,r,n);return i.length?i[0]:null}getChildren(e,r=null,n=null){return dw(this,e,r,n)}resolve(e,r=0){return Hc(this,e,r,!1)}resolveInner(e,r=0){return Hc(this,e,r,!0)}matchContext(e){return Vy(this,e)}enterUnfinishedNodesBefore(e){let r=this.childBefore(e),n=this;for(;r;){let i=r.lastChild;if(!i||i.to!=r.to)break;i.type.isError&&i.from==i.to?(n=r,r=i.prevSibling):r=i}return n}get node(){return this}get next(){return this.parent}}class Sn extends jQ{constructor(e,r,n,i){super(),this._tree=e,this.from=r,this.index=n,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,r,n,i,o=0){for(let s=this;;){for(let{children:a,positions:l}=s._tree,c=r>0?a.length:-1;e!=c;e+=r){let u=a[e],f=l[e]+s.from;if(MQ(i,n,f,f+u.length)){if(u instanceof Es){if(o&sr.ExcludeBuffers)continue;let h=u.findChild(0,u.buffer.length,r,n-f,i);if(h>-1)return new uo(new XZ(s,u,e,f),null,h)}else if(o&sr.IncludeAnonymous||!u.type.isAnonymous||L0(u)){let h;if(!(o&sr.IgnoreMounts)&&(h=Gc.get(u))&&!h.overlay)return new Sn(h.tree,f,e,s);let d=new Sn(u,f,e,s);return o&sr.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(r<0?u.children.length-1:0,r,n,i)}}}if(o&sr.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+r:e=r<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,r,n=0){let i;if(!(n&sr.IgnoreOverlays)&&(i=Gc.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:s,to:a}of i.overlay)if((r>0?s<=o:s<o)&&(r<0?a>=o:a>o))return new Sn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,r,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function dw(t,e,r,n){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(r!=null){for(let s=!1;!s;)if(s=i.type.is(r),!i.nextSibling())return o}for(;;){if(n!=null&&i.type.is(n))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return n==null?o:[]}}function Vy(t,e,r=e.length-1){for(let n=t.parent;r>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[r]&&e[r]!=n.name)return!1;r--}}return!0}class XZ{constructor(e,r,n,i){this.parent=e,this.buffer=r,this.index=n,this.start=i}}class uo extends jQ{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,r,n){super(),this.context=e,this._parent=r,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,r,n){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,r-this.context.start,n);return o<0?null:new uo(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,r,n=0){if(n&sr.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],r>0?1:-1,e-this.context.start,r);return o<0?null:new uo(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,r=e.buffer[this.index+3];return r<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new uo(this.context,this._parent,r):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,r=this._parent?this._parent.index+4:0;return this.index==r?this.externalSibling(-1):new uo(this.context,this._parent,e.findChild(r,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],r=[],{buffer:n}=this.context,i=this.index+4,o=n.buffer[this.index+3];if(o>i){let s=n.buffer[this.index+1];e.push(n.slice(i,o,s)),r.push(0)}return new zt(this.type,e,r,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function DQ(t){if(!t.length)return null;let e=0,r=t[0];for(let o=1;o<t.length;o++){let s=t[o];(s.from>r.from||s.to<r.to)&&(r=s,e=o)}let n=r instanceof Sn&&r.index<0?null:r.parent,i=t.slice();return n?i[e]=n:i.splice(e,1),new FZ(i,r)}class FZ{constructor(e,r){this.heads=e,this.node=r}get next(){return DQ(this.heads)}}function UZ(t,e,r){let n=t.resolveInner(e,r),i=null;for(let o=n instanceof Sn?n:n.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(i||(i=[n])).push(s.resolve(e,r)),o=s}else{let s=Gc.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new Sn(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[n])).push(Hc(a,e,r,!1))}}return i?DQ(i):n}class Tp{get name(){return this.type.name}constructor(e,r=0){if(this.mode=r,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Sn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,r){this.index=e;let{start:n,buffer:i}=this.buffer;return this.type=r||i.set.types[i.buffer[e]],this.from=n+i.buffer[e+1],this.to=n+i.buffer[e+2],!0}yield(e){return e?e instanceof Sn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,r,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,r,n,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,r-this.buffer.start,n);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,r,n=this.mode){return this.buffer?n&sr.ExcludeBuffers?!1:this.enterChild(1,e,r):this.yield(this._tree.enter(e,r,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&sr.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&sr.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:r}=this.buffer,n=this.stack.length-1;if(e<0){let i=n<0?0:this.stack[n]+4;if(this.index!=i)return this.yieldBuf(r.findChild(i,this.index,-1,0,4))}else{let i=r.buffer[this.index+3];if(i<(n<0?r.buffer.length:r.buffer[this.stack[n]+3]))return this.yieldBuf(i)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let r,n,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:r,parent:n}=i)}else({index:r,_parent:n}=this._tree);for(;n;{index:r,_parent:n}=n)if(r>-1)for(let o=r+e,s=e<0?-1:n._tree.children.length;o!=s;o+=e){let a=n._tree.children[o];if(this.mode&sr.IncludeAnonymous||a instanceof Es||!a.type.isAnonymous||L0(a))return!1}return!0}move(e,r){if(r&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,r=0){for(;(this.from==this.to||(r<1?this.from>=e:this.from>e)||(r>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,r););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,r=null,n=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;r=s,n=o+1;break e}i=this.stack[--o]}for(let i=n;i<this.stack.length;i++)r=new uo(this.buffer,r,this.stack[i]);return this.bufferNode=new uo(this.buffer,r,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,r){for(let n=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(i=!0)}for(;i&&r&&r(this),i=this.type.isAnonymous,!this.nextSibling();){if(!n)return;this.parent(),n--,i=!0}}}matchContext(e){if(!this.buffer)return Vy(this.node,e);let{buffer:r}=this.buffer,{types:n}=r.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return Vy(this.node,e,i);let s=n[r.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function L0(t){return t.children.some(e=>e instanceof Es||!e.type.isAnonymous||L0(e))}function YZ(t){var e;let{buffer:r,nodeSet:n,maxBufferLength:i=AQ,reused:o=[],minRepeatType:s=n.types.length}=t,a=Array.isArray(r)?new B0(r,r.length):r,l=n.types,c=0,u=0;function f(w,_,C,P,k,x){let{id:E,start:R,end:I,size:F}=a,H=u;for(;F<0;)if(a.next(),F==-1){let G=o[E];C.push(G),P.push(R-w);return}else if(F==-3){c=E;return}else if(F==-4){u=E;return}else throw new RangeError(`Unrecognized record size: ${F}`);let M=l[E],B,D,X=R-w;if(I-R<=i&&(D=m(a.pos-_,k))){let G=new Uint16Array(D.size-D.skip),se=a.pos-D.size,ce=G.length;for(;a.pos>se;)ce=y(D.start,G,ce);B=new Es(G,I-D.start,n),X=D.start-w}else{let G=a.pos-F;a.next();let se=[],ce=[],U=E>=s?E:-1,K=0,oe=I;for(;a.pos>G;)U>=0&&a.id==U&&a.size>=0?(a.end<=oe-i&&(p(se,ce,R,K,a.end,oe,U,H),K=se.length,oe=a.end),a.next()):x>2500?h(R,G,se,ce):f(R,G,se,ce,U,x+1);if(U>=0&&K>0&&K<se.length&&p(se,ce,R,K,R,oe,U,H),se.reverse(),ce.reverse(),U>-1&&K>0){let Re=d(M);B=V0(M,se,ce,0,se.length,0,I-R,Re,Re)}else B=g(M,se,ce,I-R,H-I)}C.push(B),P.push(X)}function h(w,_,C,P){let k=[],x=0,E=-1;for(;a.pos>_;){let{id:R,start:I,end:F,size:H}=a;if(H>4)a.next();else{if(E>-1&&I<E)break;E<0&&(E=F-i),k.push(R,I,F),x++,a.next()}}if(x){let R=new Uint16Array(x*4),I=k[k.length-2];for(let F=k.length-3,H=0;F>=0;F-=3)R[H++]=k[F],R[H++]=k[F+1]-I,R[H++]=k[F+2]-I,R[H++]=H;C.push(new Es(R,k[2]-I,n)),P.push(I-w)}}function d(w){return(_,C,P)=>{let k=0,x=_.length-1,E,R;if(x>=0&&(E=_[x])instanceof zt){if(!x&&E.type==w&&E.length==P)return E;(R=E.prop(gt.lookAhead))&&(k=C[x]+E.length+R)}return g(w,_,C,P,k)}}function p(w,_,C,P,k,x,E,R){let I=[],F=[];for(;w.length>P;)I.push(w.pop()),F.push(_.pop()+C-k);w.push(g(n.types[E],I,F,x-k,R-x)),_.push(k-C)}function g(w,_,C,P,k=0,x){if(c){let E=[gt.contextHash,c];x=x?[E].concat(x):[E]}if(k>25){let E=[gt.lookAhead,k];x=x?[E].concat(x):[E]}return new zt(w,_,C,P,x)}function m(w,_){let C=a.fork(),P=0,k=0,x=0,E=C.end-i,R={size:0,start:0,skip:0};e:for(let I=C.pos-w;C.pos>I;){let F=C.size;if(C.id==_&&F>=0){R.size=P,R.start=k,R.skip=x,x+=4,P+=4,C.next();continue}let H=C.pos-F;if(F<0||H<I||C.start<E)break;let M=C.id>=s?4:0,B=C.start;for(C.next();C.pos>H;){if(C.size<0)if(C.size==-3)M+=4;else break e;else C.id>=s&&(M+=4);C.next()}k=B,P+=F,x+=M}return(_<0||P==w)&&(R.size=P,R.start=k,R.skip=x),R.size>4?R:void 0}function y(w,_,C){let{id:P,start:k,end:x,size:E}=a;if(a.next(),E>=0&&P<s){let R=C;if(E>4){let I=a.pos-(E-4);for(;a.pos>I;)C=y(w,_,C)}_[--C]=R,_[--C]=x-w,_[--C]=k-w,_[--C]=P}else E==-3?c=P:E==-4&&(u=P);return C}let O=[],v=[];for(;a.pos>0;)f(t.start||0,t.bufferStart||0,O,v,-1,0);let b=(e=t.length)!==null&&e!==void 0?e:O.length?v[0]+O[0].length:0;return new zt(l[t.topID],O.reverse(),v.reverse(),b)}const pw=new WeakMap;function Xd(t,e){if(!t.isAnonymous||e instanceof Es||e.type!=t)return 1;let r=pw.get(e);if(r==null){r=1;for(let n of e.children){if(n.type!=t||!(n instanceof zt)){r=1;break}r+=Xd(t,n)}pw.set(e,r)}return r}function V0(t,e,r,n,i,o,s,a,l){let c=0;for(let p=n;p<i;p++)c+=Xd(t,e[p]);let u=Math.ceil(c*1.5/8),f=[],h=[];function d(p,g,m,y,O){for(let v=m;v<y;){let b=v,w=g[v],_=Xd(t,p[v]);for(v++;v<y;v++){let C=Xd(t,p[v]);if(_+C>=u)break;_+=C}if(v==b+1){if(_>u){let C=p[b];d(C.children,C.positions,0,C.children.length,g[b]+O);continue}f.push(p[b])}else{let C=g[v-1]+p[v-1].length-w;f.push(V0(t,p,g,b,v,w,C,null,l))}h.push(w+O-o)}}return d(e,r,n,i,0),(a||l)(f,h,s)}class qQ{constructor(){this.map=new WeakMap}setBuffer(e,r,n){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(r,n)}getBuffer(e,r){let n=this.map.get(e);return n&&n.get(r)}set(e,r){e instanceof uo?this.setBuffer(e.context.buffer,e.index,r):e instanceof Sn&&this.map.set(e.tree,r)}get(e){return e instanceof uo?this.getBuffer(e.context.buffer,e.index):e instanceof Sn?this.map.get(e.tree):void 0}cursorSet(e,r){e.buffer?this.setBuffer(e.buffer.buffer,e.index,r):this.map.set(e.tree,r)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Ro{constructor(e,r,n,i,o=!1,s=!1){this.from=e,this.to=r,this.tree=n,this.offset=i,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,r=[],n=!1){let i=[new Ro(0,e.length,e,0,!1,n)];for(let o of r)o.to>e.length&&i.push(o);return i}static applyChanges(e,r,n=128){if(!r.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<r.length?r[a]:null,f=u?u.fromA:1e9;if(f-l>=n)for(;s&&s.from<f;){let h=s;if(l>=h.from||f<=h.to||c){let d=Math.max(h.from,l)-c,p=Math.min(h.to,f)-c;h=d>=p?null:new Ro(d,p,h.tree,h.offset+c,a>0,!!u)}if(h&&i.push(h),s.to>f)break;s=o<e.length?e[o++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}class X0{startParse(e,r,n){return typeof e=="string"&&(e=new zZ(e)),n=n?n.length?n.map(i=>new gi(i.from,i.to)):[new gi(0,0)]:[new gi(0,e.length)],this.createParse(e,r||[],n)}parse(e,r,n){let i=this.startParse(e,r,n);for(;;){let o=i.advance();if(o)return o}}}class zZ{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,r){return this.string.slice(e,r)}}function F0(t){return(e,r,n,i)=>new HZ(e,t,r,n,i)}class gw{constructor(e,r,n,i,o){this.parser=e,this.parse=r,this.overlay=n,this.target=i,this.from=o}}function Ow(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class GZ{constructor(e,r,n,i,o,s,a){this.parser=e,this.predicate=r,this.mounts=n,this.index=i,this.start=o,this.target=s,this.prev=a,this.depth=0,this.ranges=[]}}const Xy=new gt({perNode:!0});class HZ{constructor(e,r,n,i,o){this.nest=r,this.input=n,this.fragments=i,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new zt(n.type,n.children,n.positions,n.length,n.propValues.concat([[Xy,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],r=e.parse.advance();if(r){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[gt.mounted.id]=new Gc(r,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let r=this.innerDone;r<this.inner.length;r++)this.inner[r].from<e&&(e=Math.min(e,this.inner[r].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let r=this.innerDone;r<this.inner.length;r++)this.inner[r].parse.stopAt(e)}startInner(){let e=new eN(this.fragments),r=null,n=null,i=new Tp(new Sn(this.baseTree,this.ranges[0].from,0,null),sr.IncludeAnonymous|sr.IgnoreMounts);e:for(let o,s;;){let a=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(r){let c=r.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let f=u.from+c.pos,h=u.to+c.pos;f>=i.from&&h<=i.to&&!r.ranges.some(d=>d.from<h&&d.to>f)&&r.ranges.push({from:f,to:h})}}a=!1}else if(n&&(s=KZ(n.ranges,i.from,i.to)))a=s!=2;else if(!i.type.isAnonymous&&(o=this.nest(i,this.input))&&(i.from<i.to||!o.overlay)){i.tree||JZ(i);let c=e.findMounts(i.from,o.parser);if(typeof o.overlay=="function")r=new GZ(o.parser,o.overlay,c,this.inner.length,i.from,i.tree,r);else{let u=vw(this.ranges,o.overlay||(i.from<i.to?[new gi(i.from,i.to)]:[]));u.length&&Ow(u),(u.length||!o.overlay)&&this.inner.push(new gw(o.parser,u.length?o.parser.startParse(this.input,bw(c,u),u):o.parser.startParse(""),o.overlay?o.overlay.map(f=>new gi(f.from-i.from,f.to-i.from)):null,i.tree,u.length?u[0].from:i.from)),o.overlay?u.length&&(n={ranges:u,depth:0,prev:n}):a=!1}}else r&&(l=r.predicate(i))&&(l===!0&&(l=new gi(i.from,i.to)),l.from<l.to&&r.ranges.push(l));if(a&&i.firstChild())r&&r.depth++,n&&n.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(r&&!--r.depth){let c=vw(this.ranges,r.ranges);c.length&&(Ow(c),this.inner.splice(r.index,0,new gw(r.parser,r.parser.startParse(this.input,bw(r.mounts,c),c),r.ranges.map(u=>new gi(u.from-r.start,u.to-r.start)),r.target,c[0].from))),r=r.prev}n&&!--n.depth&&(n=n.prev)}}}}function KZ(t,e,r){for(let n of t){if(n.from>=r)break;if(n.to>e)return n.from<=e&&n.to>=r?2:1}return 0}function mw(t,e,r,n,i,o){if(e<r){let s=t.buffer[e+1];n.push(t.slice(e,r,s)),i.push(s-o)}}function JZ(t){let{node:e}=t,r=[],n=e.context.buffer;do r.push(t.index),t.parent();while(!t.tree);let i=t.tree,o=i.children.indexOf(n),s=i.children[o],a=s.buffer,l=[o];function c(u,f,h,d,p,g){let m=r[g],y=[],O=[];mw(s,u,m,y,O,d);let v=a[m+1],b=a[m+2];l.push(y.length);let w=g?c(m+4,a[m+3],s.set.types[a[m]],v,b-v,g-1):e.toTree();return y.push(w),O.push(v-d),mw(s,a[m+3],f,y,O,d),new zt(h,y,O,p)}i.children[o]=c(0,a.length,Gr.none,0,s.length,r.length-1);for(let u of l){let f=t.tree.children[u],h=t.tree.positions[u];t.yield(new Sn(f,h+t.from,u,t._tree))}}class yw{constructor(e,r){this.offset=r,this.done=!1,this.cursor=e.cursor(sr.IncludeAnonymous|sr.IgnoreMounts)}moveTo(e){let{cursor:r}=this,n=e-this.offset;for(;!this.done&&r.from<n;)r.to>=e&&r.enter(n,1,sr.IgnoreOverlays|sr.ExcludeBuffers)||r.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let r=this.cursor.tree;;){if(r==e.tree)return!0;if(r.children.length&&r.positions[0]==0&&r.children[0]instanceof zt)r=r.children[0];else break}return!1}}let eN=class{constructor(e){var r;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(r=n.tree.prop(Xy))!==null&&r!==void 0?r:n.to,this.inner=new yw(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let r=this.curFrag=this.fragments[this.fragI];this.curTo=(e=r.tree.prop(Xy))!==null&&e!==void 0?e:r.to,this.inner=new yw(r.tree,-r.offset)}}findMounts(e,r){var n;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let s=(n=o.tree)===null||n===void 0?void 0:n.prop(gt.mounted);if(s&&s.parser==r)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=o.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:o.from-l.offset,mount:s})}}}return i}};function vw(t,e){let r=null,n=e;for(let i=1,o=0;i<t.length;i++){let s=t[i-1].to,a=t[i].from;for(;o<n.length;o++){let l=n[o];if(l.from>=a)break;l.to<=s||(r||(n=r=e.slice()),l.from<s?(r[o]=new gi(l.from,s),l.to>a&&r.splice(o+1,0,new gi(a,l.to))):l.to>a?r[o--]=new gi(a,l.to):r.splice(o--,1))}}return n}function tN(t,e,r,n){let i=0,o=0,s=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:s?t[i].to:t[i].from,f=o==e.length?1e9:a?e[o].to:e[o].from;if(s!=a){let h=Math.max(l,r),d=Math.min(u,f,n);h<d&&c.push(new gi(h,d))}if(l=Math.min(u,f),l==1e9)break;u==l&&(s?(s=!1,i++):s=!0),f==l&&(a?(a=!1,o++):a=!0)}return c}function bw(t,e){let r=[];for(let{pos:n,mount:i,frag:o}of t){let s=n+(i.overlay?i.overlay[0].from:0),a=s+i.tree.length,l=Math.max(o.from,s),c=Math.min(o.to,a);if(i.overlay){let u=i.overlay.map(h=>new gi(h.from+n,h.to+n)),f=tN(e,u,l,c);for(let h=0,d=l;;h++){let p=h==f.length,g=p?c:f[h].from;if(g>d&&r.push(new Ro(d,g,i.tree,-s,o.from>=d||o.openStart,o.to<=g||o.openEnd)),p)break;d=f[h].to}}else r.push(new Ro(l,c,i.tree,-s,o.from>=s||o.openStart,o.to<=a||o.openEnd))}return r}let rN=0;class Mi{constructor(e,r,n){this.set=e,this.base=r,this.modified=n,this.id=rN++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let r=new Mi([],null,[]);if(r.set.push(r),e)for(let n of e.set)r.set.push(n);return r}static defineModifier(){let e=new Rp;return r=>r.modified.indexOf(e)>-1?r:Rp.get(r.base||r,r.modified.concat(e).sort((n,i)=>n.id-i.id))}}let nN=0;class Rp{constructor(){this.instances=[],this.id=nN++}static get(e,r){if(!r.length)return e;let n=r[0].instances.find(a=>a.base==e&&iN(r,a.modified));if(n)return n;let i=[],o=new Mi(i,e,r);for(let a of r)a.instances.push(o);let s=oN(r);for(let a of e.set)if(!a.modified.length)for(let l of s)i.push(Rp.get(a,l));return o}}function iN(t,e){return t.length==e.length&&t.every((r,n)=>r==e[n])}function oN(t){let e=[[]];for(let r=0;r<t.length;r++)for(let n=0,i=e.length;n<i;n++)e.push(e[n].concat(t[r]));return e.sort((r,n)=>n.length-r.length)}function js(t){let e=Object.create(null);for(let r in t){let n=t[r];Array.isArray(n)||(n=[n]);for(let i of r.split(" "))if(i){let o=[],s=2,a=i;for(let f=0;;){if(a=="..."&&f>0&&f+3==i.length){s=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!h)throw new RangeError("Invalid path: "+i);if(o.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==i.length)break;let d=i[f++];if(f==i.length&&d=="!"){s=0;break}if(d!="/")throw new RangeError("Invalid path: "+i);a=i.slice(f)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new Ap(n,s,l>0?o.slice(0,l):null);e[c]=u.sort(e[c])}}return ZQ.add(e)}const ZQ=new gt;class Ap{constructor(e,r,n,i){this.tags=e,this.mode=r,this.context=n,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Ap.empty=new Ap([],2,null);function NQ(t,e){let r=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))r[o.tag.id]=o.class;else for(let s of o.tag)r[s.id]=o.class;let{scope:n,all:i=null}=e||{};return{style:o=>{let s=i;for(let a of o)for(let l of a.set){let c=r[l.id];if(c){s=s?s+" "+c:c;break}}return s},scope:n}}function sN(t,e){let r=null;for(let n of t){let i=n.style(e);i&&(r=r?r+" "+i:i)}return r}function aN(t,e,r,n=0,i=t.length){let o=new lN(n,Array.isArray(e)?e:[e],r);o.highlightRange(t.cursor(),n,i,"",o.highlighters),o.flush(i)}class lN{constructor(e,r,n){this.at=e,this.highlighters=r,this.span=n,this.class=""}startSpan(e,r){r!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=r)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,r,n,i,o){let{type:s,from:a,to:l}=e;if(a>=n||l<=r)return;s.isTop&&(o=this.highlighters.filter(d=>!d.scope||d.scope(s)));let c=i,u=uN(e)||Ap.empty,f=sN(o,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(r,a),c),u.opaque)return;let h=e.tree&&e.tree.prop(gt.mounted);if(h&&h.overlay){let d=e.node.enter(h.overlay[0].from+a,1),p=this.highlighters.filter(m=>!m.scope||m.scope(h.tree.type)),g=e.firstChild();for(let m=0,y=a;;m++){let O=m<h.overlay.length?h.overlay[m]:null,v=O?O.from+a:l,b=Math.max(r,y),w=Math.min(n,v);if(b<w&&g)for(;e.from<w&&(this.highlightRange(e,b,w,i,o),this.startSpan(Math.min(w,e.to),c),!(e.to>=v||!e.nextSibling())););if(!O||v>n)break;y=O.to+a,y>r&&(this.highlightRange(d.cursor(),Math.max(r,O.from+a),Math.min(n,y),"",p),this.startSpan(Math.min(n,y),c))}g&&e.parent()}else if(e.firstChild()){h&&(i="");do if(!(e.to<=r)){if(e.from>=n)break;this.highlightRange(e,r,n,i,o),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}}function uN(t){let e=t.type.prop(ZQ);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const je=Mi.define,mh=je(),Go=je(),Sw=je(Go),ww=je(Go),Ho=je(),yh=je(Ho),xO=je(Ho),Gi=je(),Ys=je(Gi),Yi=je(),zi=je(),Fy=je(),Ru=je(Fy),vh=je(),S={comment:mh,lineComment:je(mh),blockComment:je(mh),docComment:je(mh),name:Go,variableName:je(Go),typeName:Sw,tagName:je(Sw),propertyName:ww,attributeName:je(ww),className:je(Go),labelName:je(Go),namespace:je(Go),macroName:je(Go),literal:Ho,string:yh,docString:je(yh),character:je(yh),attributeValue:je(yh),number:xO,integer:je(xO),float:je(xO),bool:je(Ho),regexp:je(Ho),escape:je(Ho),color:je(Ho),url:je(Ho),keyword:Yi,self:je(Yi),null:je(Yi),atom:je(Yi),unit:je(Yi),modifier:je(Yi),operatorKeyword:je(Yi),controlKeyword:je(Yi),definitionKeyword:je(Yi),moduleKeyword:je(Yi),operator:zi,derefOperator:je(zi),arithmeticOperator:je(zi),logicOperator:je(zi),bitwiseOperator:je(zi),compareOperator:je(zi),updateOperator:je(zi),definitionOperator:je(zi),typeOperator:je(zi),controlOperator:je(zi),punctuation:Fy,separator:je(Fy),bracket:Ru,angleBracket:je(Ru),squareBracket:je(Ru),paren:je(Ru),brace:je(Ru),content:Gi,heading:Ys,heading1:je(Ys),heading2:je(Ys),heading3:je(Ys),heading4:je(Ys),heading5:je(Ys),heading6:je(Ys),contentSeparator:je(Gi),list:je(Gi),quote:je(Gi),emphasis:je(Gi),strong:je(Gi),link:je(Gi),monospace:je(Gi),strikethrough:je(Gi),inserted:je(),deleted:je(),changed:je(),invalid:je(),meta:vh,documentMeta:je(vh),annotation:je(vh),processingInstruction:je(vh),definition:Mi.defineModifier(),constant:Mi.defineModifier(),function:Mi.defineModifier(),standard:Mi.defineModifier(),local:Mi.defineModifier(),special:Mi.defineModifier()};NQ([{tag:S.link,class:"tok-link"},{tag:S.heading,class:"tok-heading"},{tag:S.emphasis,class:"tok-emphasis"},{tag:S.strong,class:"tok-strong"},{tag:S.keyword,class:"tok-keyword"},{tag:S.atom,class:"tok-atom"},{tag:S.bool,class:"tok-bool"},{tag:S.url,class:"tok-url"},{tag:S.labelName,class:"tok-labelName"},{tag:S.inserted,class:"tok-inserted"},{tag:S.deleted,class:"tok-deleted"},{tag:S.literal,class:"tok-literal"},{tag:S.string,class:"tok-string"},{tag:S.number,class:"tok-number"},{tag:[S.regexp,S.escape,S.special(S.string)],class:"tok-string2"},{tag:S.variableName,class:"tok-variableName"},{tag:S.local(S.variableName),class:"tok-variableName tok-local"},{tag:S.definition(S.variableName),class:"tok-variableName tok-definition"},{tag:S.special(S.variableName),class:"tok-variableName2"},{tag:S.definition(S.propertyName),class:"tok-propertyName tok-definition"},{tag:S.typeName,class:"tok-typeName"},{tag:S.namespace,class:"tok-namespace"},{tag:S.className,class:"tok-className"},{tag:S.macroName,class:"tok-macroName"},{tag:S.propertyName,class:"tok-propertyName"},{tag:S.operator,class:"tok-operator"},{tag:S.comment,class:"tok-comment"},{tag:S.meta,class:"tok-meta"},{tag:S.invalid,class:"tok-invalid"},{tag:S.punctuation,class:"tok-punctuation"}]);var _O;const fa=new gt;function U0(t){return Ie.define({combine:t?e=>e.concat(t):void 0})}const Y0=new gt;class Oi{constructor(e,r,n=[],i=""){this.data=e,this.name=i,Dt.prototype.hasOwnProperty("tree")||Object.defineProperty(Dt.prototype,"tree",{get(){return pr(this)}}),this.parser=r,this.extension=[Gl.of(this),Dt.languageData.of((o,s,a)=>{let l=Pw(o,s,a),c=l.type.prop(fa);if(!c)return[];let u=o.facet(c),f=l.type.prop(Y0);if(f){let h=l.resolve(s-l.from,a);for(let d of f)if(d.test(h,o)){let p=o.facet(d.facet);return d.type=="replace"?p:p.concat(u)}}return u})].concat(n)}isActiveAt(e,r,n=-1){return Pw(e,r,n).type.prop(fa)==this.data}findRegions(e){let r=e.facet(Gl);if((r==null?void 0:r.data)==this.data)return[{from:0,to:e.doc.length}];if(!r||!r.allowsNesting)return[];let n=[],i=(o,s)=>{if(o.prop(fa)==this.data){n.push({from:s,to:s+o.length});return}let a=o.prop(gt.mounted);if(a){if(a.tree.prop(fa)==this.data){if(a.overlay)for(let l of a.overlay)n.push({from:l.from+s,to:l.to+s});else n.push({from:s,to:s+o.length});return}else if(a.overlay){let l=n.length;if(i(a.tree,a.overlay[0].from+s),n.length>l)return}}for(let l=0;l<o.children.length;l++){let c=o.children[l];c instanceof zt&&i(c,o.positions[l]+s)}};return i(pr(e),0),n}get allowsNesting(){return!0}}Oi.setState=pt.define();function Pw(t,e,r){let n=t.facet(Gl),i=pr(t).topNode;if(!n||n.allowsNesting)for(let o=i;o;o=o.enter(e,r,sr.ExcludeBuffers))o.type.isTop&&(i=o);return i}class Qs extends Oi{constructor(e,r,n){super(e,r,[],n),this.parser=r}static define(e){let r=U0(e.languageData);return new Qs(r,e.parser.configure({props:[fa.add(n=>n.isTop?r:void 0)]}),e.name)}configure(e,r){return new Qs(this.data,this.parser.configure(e),r||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function pr(t){let e=t.field(Oi.state,!1);return e?e.tree:zt.empty}class cN{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,r){let n=this.cursorPos-this.string.length;return e<n||r>=this.cursorPos?this.doc.sliceString(e,r):this.string.slice(e-n,r-n)}}let Au=null;class Kc{constructor(e,r,n=[],i,o,s,a,l){this.parser=e,this.state=r,this.fragments=n,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,r,n){return new Kc(e,r,[],zt.empty,0,n,[],null)}startParse(){return this.parser.startParse(new cN(this.state.doc),this.fragments)}work(e,r){return r!=null&&r>=this.state.doc.length&&(r=void 0),this.tree!=zt.empty&&this.isDone(r??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),r!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>r)&&r<this.state.doc.length&&this.parse.stopAt(r);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Ro.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(r??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,r;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(r=this.parse.advance()););}),this.treeLen=e,this.tree=r,this.fragments=this.withoutTempSkipped(Ro.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let r=Au;Au=this;try{return e()}finally{Au=r}}withoutTempSkipped(e){for(let r;r=this.tempSkipped.pop();)e=kw(e,r.from,r.to);return e}changes(e,r){let{fragments:n,tree:i,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,f,h)=>l.push({fromA:c,toA:u,fromB:f,toB:h})),n=Ro.applyChanges(n,l),i=zt.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);u<f&&a.push({from:u,to:f})}}}return new Kc(this.parser,r,n,i,o,s,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let r=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:i,to:o}=this.skipped[n];i<e.to&&o>e.from&&(this.fragments=kw(this.fragments,i,o),this.skipped.splice(n--,1))}return this.skipped.length>=r?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,r){this.skipped.push({from:e,to:r})}static getSkippingParser(e){return new class extends X0{createParse(r,n,i){let o=i[0].from,s=i[i.length-1].to;return{parsedPos:o,advance(){let l=Au;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=s,new zt(Gr.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let r=this.fragments;return this.treeLen>=e&&r.length&&r[0].from==0&&r[0].to>=e}static get(){return Au}}function kw(t,e,r){return Ro.applyChanges(t,[{fromA:e,toA:r,fromB:e,toB:r}])}class zl{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let r=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),r.viewport.to);return r.work(20,n)||r.takeTree(),new zl(r)}static init(e){let r=Math.min(3e3,e.doc.length),n=Kc.create(e.facet(Gl).parser,e,{from:0,to:r});return n.work(20,r)||n.takeTree(),new zl(n)}}Oi.state=Kr.define({create:zl.init,update(t,e){for(let r of e.effects)if(r.is(Oi.setState))return r.value;return e.startState.facet(Gl)!=e.state.facet(Gl)?zl.init(e.state):t.apply(e)}});let IQ=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(IQ=t=>{let e=-1,r=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(r):cancelIdleCallback(e)});const $O=typeof navigator<"u"&&(!((_O=navigator.scheduling)===null||_O===void 0)&&_O.isInputPending)?()=>navigator.scheduling.isInputPending():null,fN=nr.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let r=this.view.state.field(Oi.state).context;(r.updateViewport(e.view.viewport)||this.view.viewport.to>r.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(r)}scheduleWork(){if(this.working)return;let{state:e}=this.view,r=e.field(Oi.state);(r.tree!=r.context.tree||!r.context.isDone(e.doc.length))&&(this.working=IQ(this.work))}work(e){this.working=null;let r=Date.now();if(this.chunkEnd<r&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=r+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:i}}=this.view,o=n.field(Oi.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!$O?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<i&&n.doc.length>i+1e3,l=o.context.work(()=>$O&&$O()||Date.now()>s,i+(a?0:1e5));this.chunkBudget-=Date.now()-r,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Oi.setState.of(new zl(o.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(r=>Tn(this.view.state,r)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Gl=Ie.define({combine(t){return t.length?t[0]:null},enables:t=>[Oi.state,fN,Ee.contentAttributes.compute([t],e=>{let r=e.facet(t);return r&&r.name?{"data-language":r.name}:{}})]});class Ca{constructor(e,r=[]){this.language=e,this.support=r,this.extension=[e,r]}}class Mp{constructor(e,r,n,i,o,s=void 0){this.name=e,this.alias=r,this.extensions=n,this.filename=i,this.loadFunc=o,this.support=s,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:r,support:n}=e;if(!r){if(!n)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");r=()=>Promise.resolve(n)}return new Mp(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,r,n)}static matchFilename(e,r){for(let i of e)if(i.filename&&i.filename.test(r))return i;let n=/\.([^.]+)$/.exec(r);if(n){for(let i of e)if(i.extensions.indexOf(n[1])>-1)return i}return null}static matchLanguageName(e,r,n=!0){r=r.toLowerCase();for(let i of e)if(i.alias.some(o=>o==r))return i;if(n)for(let i of e)for(let o of i.alias){let s=r.indexOf(o);if(s>-1&&(o.length>2||!/\w/.test(r[s-1])&&!/\w/.test(r[s+o.length])))return i}return null}}const hN=Ie.define(),wf=Ie.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(r=>r!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Hl(t){let e=t.facet(wf);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function jp(t,e){let r="",n=t.tabSize,i=t.facet(wf)[0];if(i==" "){for(;e>=n;)r+=" ",e-=n;i=" "}for(let o=0;o<e;o++)r+=i;return r}function WQ(t,e){t instanceof Dt&&(t=new z0(t));for(let n of t.state.facet(hN)){let i=n(t,e);if(i!==void 0)return i}let r=pr(t.state);return r.length>=e?dN(t,r,e):null}class z0{constructor(e,r={}){this.state=e,this.options=r,this.unit=Hl(e)}lineAt(e,r=1){let n=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=n.from&&i<=n.to?o&&i==e?{text:"",from:e}:(r<0?i<e:i<=e)?{text:n.text.slice(i-n.from),from:i}:{text:n.text.slice(0,i-n.from),from:n.from}:n}textAfterPos(e,r=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:i}=this.lineAt(e,r);return n.slice(e-i,Math.min(n.length,e+100-i))}column(e,r=1){let{text:n,from:i}=this.lineAt(e,r),o=this.countColumn(n,e-i),s=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return s>-1&&(o+=s-this.countColumn(n,n.search(/\S|$/))),o}countColumn(e,r=e.length){return Wi(e,this.state.tabSize,r)}lineIndent(e,r=1){let{text:n,from:i}=this.lineAt(e,r),o=this.options.overrideIndentation;if(o){let s=o(i);if(s>-1)return s}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Ta=new gt;function dN(t,e,r){let n=e.resolveStack(r),i=n.node.enterUnfinishedNodesBefore(r);if(i!=n.node){let o=[];for(let s=i;s!=n.node;s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)n={node:o[s],next:n}}return BQ(n,t,r)}function BQ(t,e,r){for(let n=t;n;n=n.next){let i=gN(n.node);if(i)return i(G0.create(e,r,n))}return 0}function pN(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function gN(t){let e=t.type.prop(Ta);if(e)return e;let r=t.firstChild,n;if(r&&(n=r.type.prop(gt.closedBy))){let i=t.lastChild,o=i&&n.indexOf(i.name)>-1;return s=>LQ(s,!0,1,void 0,o&&!pN(s)?i.from:void 0)}return t.parent==null?ON:null}function ON(){return 0}class G0 extends z0{constructor(e,r,n){super(e.state,e.options),this.base=e,this.pos=r,this.context=n}get node(){return this.context.node}static create(e,r,n){return new G0(e,r,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let r=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(r.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(mN(n,e))break;r=this.state.doc.lineAt(n.from)}return this.lineIndent(r.from)}continue(){return BQ(this.context.next,this.base,this.pos)}}function mN(t,e){for(let r=e;r;r=r.parent)if(t==r)return!0;return!1}function yN(t){let e=t.node,r=e.childAfter(e.from),n=e.lastChild;if(!r)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(r.from),s=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let a=r.to;;){let l=e.childAfter(a);if(!l||l==n)return null;if(!l.type.isSkipped)return l.from<s?r:null;a=l.to}}function vN({closing:t,align:e=!0,units:r=1}){return n=>LQ(n,e,r,t)}function LQ(t,e,r,n,i){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=n&&o.slice(s,s+n.length)==n||i==t.pos+s,l=e?yN(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*r)}const bN=t=>t.baseIndent;function Rl({except:t,units:e=1}={}){return r=>{let n=t&&t.test(r.textAfter);return r.baseIndent+(n?0:e*r.unit)}}const SN=200;function wN(){return Dt.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let r=t.newDoc,{head:n}=t.newSelection.main,i=r.lineAt(n);if(n>i.from+SN)return t;let o=r.sliceString(i.from,n);if(!e.some(c=>c.test(o)))return t;let{state:s}=t,a=-1,l=[];for(let{head:c}of s.selection.ranges){let u=s.doc.lineAt(c);if(u.from==a)continue;a=u.from;let f=WQ(s,u.from);if(f==null)continue;let h=/^\s*/.exec(u.text)[0],d=jp(s,f);h!=d&&l.push({from:u.from,to:u.from+h.length,insert:d})}return l.length?[t,{changes:l,sequential:!0}]:t})}const VQ=Ie.define(),Ds=new gt;function H0(t){let e=t.firstChild,r=t.lastChild;return e&&e.to<r.from?{from:e.to,to:r.type.isError?t.to:r.from}:null}function PN(t,e,r){let n=pr(t);if(n.length<r)return null;let i=n.resolveStack(r,1),o=null;for(let s=i;s;s=s.next){let a=s.node;if(a.to<=r||a.from>r)continue;if(o&&a.from<e)break;let l=a.type.prop(Ds);if(l&&(a.to<n.length-50||n.length==t.doc.length||!kN(a))){let c=l(a,t);c&&c.from<=r&&c.from>=e&&c.to>r&&(o=c)}}return o}function kN(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function XQ(t,e,r){for(let n of t.facet(VQ)){let i=n(t,e,r);if(i)return i}return PN(t,e,r)}function FQ(t,e){let r=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);return r>=n?void 0:{from:r,to:n}}const K0=pt.define({map:FQ}),$g=pt.define({map:FQ});function UQ(t){let e=[];for(let{head:r}of t.state.selection.ranges)e.some(n=>n.from<=r&&n.to>=r)||e.push(t.lineBlockAt(r));return e}const Pf=Kr.define({create(){return Ne.none},update(t,e){t=t.map(e.changes);for(let r of e.effects)if(r.is(K0)&&!xN(t,r.value.from,r.value.to)){let{preparePlaceholder:n}=e.state.facet(J0),i=n?Ne.replace({widget:new RN(n(e.state,r.value))}):xw;t=t.update({add:[i.range(r.value.from,r.value.to)]})}else r.is($g)&&(t=t.update({filter:(n,i)=>r.value.from!=n||r.value.to!=i,filterFrom:r.value.from,filterTo:r.value.to}));if(e.selection){let r=!1,{head:n}=e.selection.main;t.between(n,n,(i,o)=>{i<n&&o>n&&(r=!0)}),r&&(t=t.update({filterFrom:n,filterTo:n,filter:(i,o)=>o<=n||i>=n}))}return t},provide:t=>Ee.decorations.from(t),toJSON(t,e){let r=[];return t.between(0,e.doc.length,(n,i)=>{r.push(n,i)}),r},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let r=0;r<t.length;){let n=t[r++],i=t[r++];if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(xw.range(n,i))}return Ne.set(e,!0)}});function YQ(t,e,r){var n;let i=null;return(n=t.field(Pf,!1))===null||n===void 0||n.between(e,r,(o,s)=>{(!i||i.from>o)&&(i={from:o,to:s})}),i}function xN(t,e,r){let n=!1;return t.between(e,e,(i,o)=>{i==e&&o==r&&(n=!0)}),n}function zQ(t,e){return t.field(Pf,!1)?e:e.concat(pt.appendConfig.of(TN()))}const _N=t=>{for(let e of UQ(t)){let r=XQ(t.state,e.from,e.to);if(r)return t.dispatch({effects:zQ(t.state,[K0.of(r),GQ(t,r)])}),!0}return!1},$N=t=>{if(!t.state.field(Pf,!1))return!1;let e=[];for(let r of UQ(t)){let n=YQ(t.state,r.from,r.to);n&&e.push($g.of(n),GQ(t,n,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function GQ(t,e,r=!0){let n=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return Ee.announce.of(`${t.state.phrase(r?"Folded lines":"Unfolded lines")} ${n} ${t.state.phrase("to")} ${i}.`)}const CN=t=>{let{state:e}=t,r=[];for(let n=0;n<e.doc.length;){let i=t.lineBlockAt(n),o=XQ(e,i.from,i.to);o&&r.push(K0.of(o)),n=(o?t.lineBlockAt(o.to):i).to+1}return r.length&&t.dispatch({effects:zQ(t.state,r)}),!!r.length},EN=t=>{let e=t.state.field(Pf,!1);if(!e||!e.size)return!1;let r=[];return e.between(0,t.state.doc.length,(n,i)=>{r.push($g.of({from:n,to:i}))}),t.dispatch({effects:r}),!0},QN={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},J0=Ie.define({combine(t){return Vi(t,QN)}});function TN(t){let e=[Pf,AN];return t&&e.push(J0.of(t)),e}function HQ(t,e){let{state:r}=t,n=r.facet(J0),i=s=>{let a=t.lineBlockAt(t.posAtDOM(s.target)),l=YQ(t.state,a.from,a.to);l&&t.dispatch({effects:$g.of(l)}),s.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=n.placeholderText,o.setAttribute("aria-label",r.phrase("folded code")),o.title=r.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const xw=Ne.replace({widget:new class extends ki{toDOM(t){return HQ(t,null)}}});class RN extends ki{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return HQ(e,this.value)}}const AN=Ee.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class lu{constructor(e,r){this.specs=e;let n;function i(a){let l=xs.newName();return(n||(n=Object.create(null)))["."+l]=a,l}const o=typeof r.all=="string"?r.all:r.all?i(r.all):void 0,s=r.scope;this.scope=s instanceof Oi?a=>a.prop(fa)==s.data:s?a=>a==s:void 0,this.style=NQ(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:o}).style,this.module=n?new xs(n):null,this.themeType=r.themeType}static define(e,r){return new lu(e,r||{})}}const Uy=Ie.define(),KQ=Ie.define({combine(t){return t.length?[t[0]]:null}});function CO(t){let e=t.facet(Uy);return e.length?e:t.facet(KQ)}function e1(t,e){let r=[jN],n;return t instanceof lu&&(t.module&&r.push(Ee.styleModule.of(t.module)),n=t.themeType),e!=null&&e.fallback?r.push(KQ.of(t)):n?r.push(Uy.computeN([Ee.darkTheme],i=>i.facet(Ee.darkTheme)==(n=="dark")?[t]:[])):r.push(Uy.of(t)),r}class MN{constructor(e){this.markCache=Object.create(null),this.tree=pr(e.state),this.decorations=this.buildDeco(e,CO(e.state)),this.decoratedTo=e.viewport.to}update(e){let r=pr(e.state),n=CO(e.state),i=n!=CO(e.startState),{viewport:o}=e.view,s=e.changes.mapPos(this.decoratedTo,1);r.length<o.to&&!i&&r.type==this.tree.type&&s>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(r!=this.tree||e.viewportChanged||i)&&(this.tree=r,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=o.to)}buildDeco(e,r){if(!r||!this.tree.length)return Ne.none;let n=new ks;for(let{from:i,to:o}of e.visibleRanges)aN(this.tree,r,(s,a,l)=>{n.add(s,a,this.markCache[l]||(this.markCache[l]=Ne.mark({class:l})))},i,o);return n.finish()}}const jN=Io.high(nr.fromClass(MN,{decorations:t=>t.decorations})),DN=lu.define([{tag:S.meta,color:"#404740"},{tag:S.link,textDecoration:"underline"},{tag:S.heading,textDecoration:"underline",fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.strong,fontWeight:"bold"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.keyword,color:"#708"},{tag:[S.atom,S.bool,S.url,S.contentSeparator,S.labelName],color:"#219"},{tag:[S.literal,S.inserted],color:"#164"},{tag:[S.string,S.deleted],color:"#a11"},{tag:[S.regexp,S.escape,S.special(S.string)],color:"#e40"},{tag:S.definition(S.variableName),color:"#00f"},{tag:S.local(S.variableName),color:"#30a"},{tag:[S.typeName,S.namespace],color:"#085"},{tag:S.className,color:"#167"},{tag:[S.special(S.variableName),S.macroName],color:"#256"},{tag:S.definition(S.propertyName),color:"#00c"},{tag:S.comment,color:"#940"},{tag:S.invalid,color:"#f00"}]),qN=Ee.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),JQ=1e4,eT="()[]{}",tT=Ie.define({combine(t){return Vi(t,{afterCursor:!0,brackets:eT,maxScanDistance:JQ,renderMatch:IN})}}),ZN=Ne.mark({class:"cm-matchingBracket"}),NN=Ne.mark({class:"cm-nonmatchingBracket"});function IN(t){let e=[],r=t.matched?ZN:NN;return e.push(r.range(t.start.from,t.start.to)),t.end&&e.push(r.range(t.end.from,t.end.to)),e}const WN=Kr.define({create(){return Ne.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let r=[],n=e.state.facet(tT);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=cs(e.state,i.head,-1,n)||i.head>0&&cs(e.state,i.head-1,1,n)||n.afterCursor&&(cs(e.state,i.head,1,n)||i.head<e.state.doc.length&&cs(e.state,i.head+1,-1,n));o&&(r=r.concat(n.renderMatch(o,e.state)))}return Ne.set(r,!0)},provide:t=>Ee.decorations.from(t)}),BN=[WN,qN];function LN(t={}){return[tT.of(t),BN]}const rT=new gt;function Yy(t,e,r){let n=t.prop(e<0?gt.openedBy:gt.closedBy);if(n)return n;if(t.name.length==1){let i=r.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[r[i+e]]}return null}function zy(t){let e=t.type.prop(rT);return e?e(t.node):t}function cs(t,e,r,n={}){let i=n.maxScanDistance||JQ,o=n.brackets||eT,s=pr(t),a=s.resolveInner(e,r);for(let l=a;l;l=l.parent){let c=Yy(l.type,r,o);if(c&&l.from<l.to){let u=zy(l);if(u&&(r>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return VN(t,e,r,l,u,c,o)}}return XN(t,e,r,s,a.type,i,o)}function VN(t,e,r,n,i,o,s){let a=n.parent,l={from:i.from,to:i.to},c=0,u=a==null?void 0:a.cursor();if(u&&(r<0?u.childBefore(n.from):u.childAfter(n.to)))do if(r<0?u.to<=n.from:u.from>=n.to){if(c==0&&o.indexOf(u.type.name)>-1&&u.from<u.to){let f=zy(u);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(Yy(u.type,r,s))c++;else if(Yy(u.type,-r,s)){if(c==0){let f=zy(u);return{start:l,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}c--}}while(r<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function XN(t,e,r,n,i,o,s){let a=r<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=s.indexOf(a);if(l<0||l%2==0!=r>0)return null;let c={from:r<0?e-1:e,to:r>0?e+1:e},u=t.doc.iterRange(e,r>0?t.doc.length:0),f=0;for(let h=0;!u.next().done&&h<=o;){let d=u.value;r<0&&(h+=d.length);let p=e+h*r;for(let g=r>0?0:d.length-1,m=r>0?d.length:-1;g!=m;g+=r){let y=s.indexOf(d[g]);if(!(y<0||n.resolveInner(p+g,1).type!=i))if(y%2==0==r>0)f++;else{if(f==1)return{start:c,end:{from:p+g,to:p+g+1},matched:y>>1==l>>1};f--}}r>0&&(h+=d.length)}return u.done?{start:c,matched:!1}:null}const FN=Object.create(null),_w=[Gr.none],$w=[],Cw=Object.create(null),UN=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])UN[t]=YN(FN,e);function EO(t,e){$w.indexOf(t)>-1||($w.push(t),console.warn(e))}function YN(t,e){let r=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||S[c];u?typeof u=="function"?l.length?l=l.map(u):EO(c,`Modifier ${c} used at start of tag`):l.length?EO(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:EO(c,`Unknown highlighting tag ${c}`)}for(let c of l)r.push(c)}if(!r.length)return 0;let n=e.replace(/ /g,"_"),i=n+" "+r.map(a=>a.id),o=Cw[i];if(o)return o.id;let s=Cw[i]=Gr.define({id:_w.length,name:n,props:[js({[n]:r})]});return _w.push(s),s.id}dr.RTL,dr.LTR;const zN="#e5c07b",Ew="#e06c75",GN="#56b6c2",HN="#ffffff",Fd="#abb2bf",Gy="#7d8799",KN="#61afef",JN="#98c379",Qw="#d19a66",eI="#c678dd",tI="#21252b",Tw="#2c313a",Rw="#282c34",QO="#353a42",rI="#3E4451",Aw="#528bff",nI=Ee.theme({"&":{color:Fd,backgroundColor:Rw},".cm-content":{caretColor:Aw},".cm-cursor, .cm-dropCursor":{borderLeftColor:Aw},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:rI},".cm-panels":{backgroundColor:tI,color:Fd},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Rw,color:Gy,border:"none"},".cm-activeLineGutter":{backgroundColor:Tw},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:QO},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:QO,borderBottomColor:QO},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Tw,color:Fd}}},{dark:!0}),iI=lu.define([{tag:S.keyword,color:eI},{tag:[S.name,S.deleted,S.character,S.propertyName,S.macroName],color:Ew},{tag:[S.function(S.variableName),S.labelName],color:KN},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:Qw},{tag:[S.definition(S.name),S.separator],color:Fd},{tag:[S.typeName,S.className,S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:zN},{tag:[S.operator,S.operatorKeyword,S.url,S.escape,S.regexp,S.link,S.special(S.string)],color:GN},{tag:[S.meta,S.comment],color:Gy},{tag:S.strong,fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.link,color:Gy,textDecoration:"underline"},{tag:S.heading,fontWeight:"bold",color:Ew},{tag:[S.atom,S.bool,S.special(S.variableName)],color:Qw},{tag:[S.processingInstruction,S.string,S.inserted],color:JN},{tag:S.invalid,color:HN}]),oI=[nI,e1(iI)];function qr(){return qr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},qr.apply(this,arguments)}var xi=t=>{var{theme:e,settings:r={},styles:n=[]}=t,i={".cm-gutters":{}},o={};r.background&&(o.backgroundColor=r.background),r.backgroundImage&&(o.backgroundImage=r.backgroundImage),r.foreground&&(o.color=r.foreground),r.fontSize&&(o.fontSize=r.fontSize),(r.background||r.foreground)&&(i["&"]=o),r.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:r.fontFamily}),r.gutterBackground&&(i[".cm-gutters"].backgroundColor=r.gutterBackground),r.gutterForeground&&(i[".cm-gutters"].color=r.gutterForeground),r.gutterBorder&&(i[".cm-gutters"].borderRightColor=r.gutterBorder),r.caret&&(i[".cm-content"]={caretColor:r.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:r.caret});var s={};r.gutterActiveForeground&&(s.color=r.gutterActiveForeground),r.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:r.lineHighlight},s.backgroundColor=r.lineHighlight),i[".cm-activeLineGutter"]=s,r.selection&&(i["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:r.selection+" !important"}),r.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:r.selectionMatch});var a=Ee.theme(i,{dark:e==="dark"}),l=lu.define(n),c=[a,e1(l)];return c},sI={background:"#272822",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#49483E",selectionMatch:"#49483E",gutterBackground:"#272822",gutterForeground:"#FFFFFF70",lineHighlight:"#0000003b"},aI=t=>{var{theme:e="dark",settings:r={},styles:n=[]}=t||{};return xi({theme:e,settings:qr({},sI,r),styles:[{tag:[S.comment,S.documentMeta],color:"#8292a2"},{tag:[S.number,S.bool,S.null,S.atom],color:"#ae81ff"},{tag:[S.attributeValue,S.className,S.name],color:"#e6db74"},{tag:[S.propertyName,S.attributeName],color:"#a6e22e"},{tag:[S.variableName],color:"#9effff"},{tag:[S.squareBracket],color:"#bababa"},{tag:[S.string,S.special(S.brace)],color:"#e6db74"},{tag:[S.regexp,S.className,S.typeName,S.definition(S.typeName)],color:"#66d9ef"},{tag:[S.definition(S.variableName),S.definition(S.propertyName),S.function(S.variableName)],color:"#fd971f"},{tag:[S.keyword,S.definitionKeyword,S.modifier,S.tagName,S.angleBracket],color:"#f92672"},...n]})},lI=aI(),uI={background:"#0f0f0f",foreground:"#defdef",caret:"#00FF00",selection:"#515151",selectionMatch:"#515151",gutterBackground:"#555",gutterForeground:"#FFFFFF",lineHighlight:"#0a6bcb3d"},cI=t=>{var{theme:e="dark",settings:r={},styles:n=[]}=t||{};return xi({theme:e,settings:qr({},uI,r),styles:[{tag:S.keyword,color:"darkgoldenrod",fontWeight:"bold"},{tag:S.atom,color:"#77F"},{tag:S.comment,color:"#7a7b7c",fontStyle:"italic"},{tag:S.number,color:"violet"},{tag:S.definition(S.variableName),color:"#fffabc"},{tag:S.variableName,color:"#abcdef"},{tag:S.function(S.variableName),color:"#fffabc"},{tag:S.typeName,color:"#FFDD44"},{tag:S.tagName,color:"#def"},{tag:S.string,color:"#2b4"},{tag:S.meta,color:"#C9F"},{tag:S.bracket,color:"#8a8a8a"},{tag:S.attributeName,color:"#DDFF00"},{tag:S.heading,color:"aquamarine",fontWeight:"bold"},{tag:S.link,color:"blueviolet",fontWeight:"bold"},...n]})},fI=cI(),hI={background:"#282a36",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"rgba(255, 255, 255, 0.1)",selectionMatch:"rgba(255, 255, 255, 0.2)",gutterBackground:"#282a36",gutterForeground:"#6D8A88",gutterBorder:"transparent",lineHighlight:"rgba(255, 255, 255, 0.1)"},dI=t=>{var{theme:e="dark",settings:r={},styles:n=[]}=t||{};return xi({theme:e,settings:qr({},hI,r),styles:[{tag:S.comment,color:"#6272a4"},{tag:S.string,color:"#f1fa8c"},{tag:S.atom,color:"#bd93f9"},{tag:S.meta,color:"#f8f8f2"},{tag:[S.keyword,S.operator,S.tagName],color:"#ff79c6"},{tag:[S.function(S.propertyName),S.propertyName],color:"#66d9ef"},{tag:[S.definition(S.variableName),S.function(S.variableName),S.className,S.attributeName],color:"#50fa7b"},{tag:S.atom,color:"#bd93f9"},...n]})},pI=dI(),gI={background:"#fff",foreground:"#000",caret:"#FFFFFF",selection:"#d7d4f0",selectionMatch:"#d7d4f0",gutterBackground:"#f7f7f7",gutterForeground:"#999",lineHighlight:"#006fff1c",gutterBorder:"transparent"},OI=t=>{var{theme:e="light",settings:r={},styles:n=[]}=t||{};return xi({theme:e,settings:qr({},gI,r),styles:[{tag:[S.comment],color:"#3F7F5F"},{tag:[S.documentMeta],color:"#FF1717"},{tag:S.keyword,color:"#7F0055",fontWeight:"bold"},{tag:S.atom,color:"#00f"},{tag:S.number,color:"#164"},{tag:S.propertyName,color:"#164"},{tag:[S.variableName,S.definition(S.variableName)],color:"#0000C0"},{tag:S.function(S.variableName),color:"#0000C0"},{tag:S.string,color:"#2A00FF"},{tag:S.operator,color:"black"},{tag:S.tagName,color:"#170"},{tag:S.attributeName,color:"#00c"},{tag:S.link,color:"#219"},...n]})},mI=OI(),yI={background:"#fff",foreground:"#24292e",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#6e7781"},vI=t=>{var{theme:e="light",settings:r={},styles:n=[]}=t||{};return xi({theme:e,settings:qr({},yI,r),styles:[{tag:[S.standard(S.tagName),S.tagName],color:"#116329"},{tag:[S.comment,S.bracket],color:"#6a737d"},{tag:[S.className,S.propertyName],color:"#6f42c1"},{tag:[S.variableName,S.attributeName,S.number,S.operator],color:"#005cc5"},{tag:[S.keyword,S.typeName,S.typeOperator,S.typeName],color:"#d73a49"},{tag:[S.string,S.meta,S.regexp],color:"#032f62"},{tag:[S.name,S.quote],color:"#22863a"},{tag:[S.heading,S.strong],color:"#24292e",fontWeight:"bold"},{tag:[S.emphasis],color:"#24292e",fontStyle:"italic"},{tag:[S.deleted],color:"#b31d28",backgroundColor:"ffeef0"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#e36209"},{tag:[S.url,S.escape,S.regexp,S.link],color:"#032f62"},{tag:S.link,textDecoration:"underline"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.invalid,color:"#cb2431"},...n]})};vI();var bI={background:"#0d1117",foreground:"#c9d1d9",caret:"#c9d1d9",selection:"#003d73",selectionMatch:"#003d73",lineHighlight:"#36334280"},SI=t=>{var{theme:e="dark",settings:r={},styles:n=[]}=t||{};return xi({theme:e,settings:qr({},bI,r),styles:[{tag:[S.standard(S.tagName),S.tagName],color:"#7ee787"},{tag:[S.comment,S.bracket],color:"#8b949e"},{tag:[S.className,S.propertyName],color:"#d2a8ff"},{tag:[S.variableName,S.attributeName,S.number,S.operator],color:"#79c0ff"},{tag:[S.keyword,S.typeName,S.typeOperator,S.typeName],color:"#ff7b72"},{tag:[S.string,S.meta,S.regexp],color:"#a5d6ff"},{tag:[S.name,S.quote],color:"#7ee787"},{tag:[S.heading,S.strong],color:"#d2a8ff",fontWeight:"bold"},{tag:[S.emphasis],color:"#d2a8ff",fontStyle:"italic"},{tag:[S.deleted],color:"#ffdcd7",backgroundColor:"ffeef0"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#ffab70"},{tag:S.link,textDecoration:"underline"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.invalid,color:"#f97583"},...n]})},wI=SI(),PI={background:"#2e3235",foreground:"#bdbdbd",caret:"#a0a4ae",selection:"#d7d4f063",selectionMatch:"#d7d4f063",gutterBackground:"#2e3235",gutterForeground:"#999",gutterActiveForeground:"#4f5b66",lineHighlight:"#545b6130"},nT=t=>{var{theme:e="dark",settings:r={},styles:n=[]}=t||{};return xi({theme:e,settings:qr({},PI,r),styles:[{tag:S.keyword,color:"#cf6edf"},{tag:[S.name,S.deleted,S.character,S.macroName],color:"#56c8d8"},{tag:[S.propertyName],color:"#facf4e"},{tag:[S.variableName],color:"#bdbdbd"},{tag:[S.function(S.variableName)],color:"#56c8d8"},{tag:[S.labelName],color:"#cf6edf"},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:"#facf4e"},{tag:[S.definition(S.name),S.separator],color:"#fa5788"},{tag:[S.brace],color:"#cf6edf"},{tag:[S.annotation],color:"#ff5f52"},{tag:[S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:"#ffad42"},{tag:[S.typeName,S.className],color:"#ffad42"},{tag:[S.operator,S.operatorKeyword],color:"#7186f0"},{tag:[S.tagName],color:"#99d066"},{tag:[S.squareBracket],color:"#ff5f52"},{tag:[S.angleBracket],color:"#606f7a"},{tag:[S.attributeName],color:"#bdbdbd"},{tag:[S.regexp],color:"#ff5f52"},{tag:[S.quote],color:"#6abf69"},{tag:[S.string],color:"#99d066"},{tag:S.link,color:"#56c8d8",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[S.url,S.escape,S.special(S.string)],color:"#facf4e"},{tag:[S.meta],color:"#707d8b"},{tag:[S.comment],color:"#707d8b",fontStyle:"italic"},{tag:S.monospace,color:"#bdbdbd"},{tag:S.strong,fontWeight:"bold",color:"#ff5f52"},{tag:S.emphasis,fontStyle:"italic",color:"#99d066"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.heading,fontWeight:"bold",color:"#facf4e"},{tag:S.heading1,fontWeight:"bold",color:"#facf4e"},{tag:[S.heading2,S.heading3,S.heading4],fontWeight:"bold",color:"#facf4e"},{tag:[S.heading5,S.heading6],color:"#facf4e"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#56c8d8"},{tag:[S.processingInstruction,S.inserted],color:"#ff5f52"},{tag:[S.contentSeparator],color:"#56c8d8"},{tag:S.invalid,color:"#606f7a",borderBottom:"1px dotted #ff5f52"},...n]})};nT();var kI=nT(),xI={background:"#FAFAFA",foreground:"#90A4AE",caret:"#272727",selection:"#80CBC440",selectionMatch:"#80CBC440",gutterBackground:"#FAFAFA",gutterForeground:"#90A4AE",gutterBorder:"transparent",lineHighlight:"#CCD7DA50"},_I=t=>{var{theme:e="light",settings:r={},styles:n=[]}=t||{};return xi({theme:e,settings:qr({},xI,r),styles:[{tag:S.keyword,color:"#39ADB5"},{tag:[S.name,S.deleted,S.character,S.macroName],color:"#90A4AE"},{tag:[S.propertyName],color:"#6182B8"},{tag:[S.processingInstruction,S.string,S.inserted,S.special(S.string)],color:"#91B859"},{tag:[S.function(S.variableName),S.labelName],color:"#6182B8"},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:"#39ADB5"},{tag:[S.definition(S.name),S.separator],color:"#90A4AE"},{tag:[S.className],color:"#E2931D"},{tag:[S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:"#F76D47"},{tag:[S.typeName],color:"#E2931D",fontStyle:"#E2931D"},{tag:[S.operator,S.operatorKeyword],color:"#39ADB5"},{tag:[S.url,S.escape,S.regexp,S.link],color:"#91B859"},{tag:[S.meta,S.comment],color:"#90A4AE"},{tag:S.strong,fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.link,textDecoration:"underline"},{tag:S.heading,fontWeight:"bold",color:"#39ADB5"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#90A4AE"},{tag:S.invalid,color:"#E5393570"},{tag:S.strikethrough,textDecoration:"line-through"},...n]})};_I();var $I={background:"#2e3440",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#00000073",selectionMatch:"#00000073",gutterBackground:"#2e3440",gutterForeground:"#4c566a",gutterActiveForeground:"#d8dee9",lineHighlight:"#4c566a29"},CI=t=>{var{theme:e="dark",settings:r={},styles:n=[]}=t||{};return xi({theme:e,settings:qr({},$I,r),styles:[{tag:S.keyword,color:"#5e81ac"},{tag:[S.name,S.deleted,S.character,S.propertyName,S.macroName],color:"#88c0d0"},{tag:[S.variableName],color:"#8fbcbb"},{tag:[S.function(S.variableName)],color:"#8fbcbb"},{tag:[S.labelName],color:"#81a1c1"},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:"#5e81ac"},{tag:[S.definition(S.name),S.separator],color:"#a3be8c"},{tag:[S.brace],color:"#8fbcbb"},{tag:[S.annotation],color:"#d30102"},{tag:[S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:"#b48ead"},{tag:[S.typeName,S.className],color:"#ebcb8b"},{tag:[S.operator,S.operatorKeyword],color:"#a3be8c"},{tag:[S.tagName],color:"#b48ead"},{tag:[S.squareBracket],color:"#bf616a"},{tag:[S.angleBracket],color:"#d08770"},{tag:[S.attributeName],color:"#ebcb8b"},{tag:[S.regexp],color:"#5e81ac"},{tag:[S.quote],color:"#b48ead"},{tag:[S.string],color:"#a3be8c"},{tag:S.link,color:"#a3be8c",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[S.url,S.escape,S.special(S.string)],color:"#8fbcbb"},{tag:[S.meta],color:"#88c0d0"},{tag:[S.monospace],color:"#d8dee9",fontStyle:"italic"},{tag:[S.comment],color:"#4c566a",fontStyle:"italic"},{tag:S.strong,fontWeight:"bold",color:"#5e81ac"},{tag:S.emphasis,fontStyle:"italic",color:"#5e81ac"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.heading,fontWeight:"bold",color:"#5e81ac"},{tag:S.special(S.heading1),fontWeight:"bold",color:"#5e81ac"},{tag:S.heading1,fontWeight:"bold",color:"#5e81ac"},{tag:[S.heading2,S.heading3,S.heading4],fontWeight:"bold",color:"#5e81ac"},{tag:[S.heading5,S.heading6],color:"#5e81ac"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#d08770"},{tag:[S.processingInstruction,S.inserted],color:"#8fbcbb"},{tag:[S.contentSeparator],color:"#ebcb8b"},{tag:S.invalid,color:"#434c5e",borderBottom:"1px dotted #d30102"},...n]})},EI=CI(),QI={background:"#fff",foreground:"#3D3D3D",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#AFAFAF",lineHighlight:"#d5e6ff69"};function TI(t){var{theme:e="light",settings:r={},styles:n=[]}=t||{};return xi({theme:e,settings:qr({},QI,r),styles:[{tag:[S.comment,S.quote],color:"#707F8D"},{tag:[S.typeName,S.typeOperator],color:"#aa0d91"},{tag:[S.keyword],color:"#aa0d91",fontWeight:"bold"},{tag:[S.string,S.meta],color:"#D23423"},{tag:[S.name],color:"#032f62"},{tag:[S.typeName],color:"#522BB2"},{tag:[S.variableName],color:"#23575C"},{tag:[S.definition(S.variableName)],color:"#327A9E"},{tag:[S.regexp,S.link],color:"#0e0eff"},...n]})}var RI=TI(),AI={background:"#292A30",foreground:"#CECFD0",caret:"#fff",selection:"#727377",selectionMatch:"#727377",lineHighlight:"#ffffff0f"},MI=t=>{var{theme:e="dark",settings:r={},styles:n=[]}=t||{};return xi({theme:e,settings:qr({},AI,r),styles:[{tag:[S.comment,S.quote],color:"#7F8C98"},{tag:[S.keyword],color:"#FF7AB2",fontWeight:"bold"},{tag:[S.string,S.meta],color:"#FF8170"},{tag:[S.typeName],color:"#DABAFF"},{tag:[S.definition(S.variableName)],color:"#6BDFFF"},{tag:[S.name],color:"#6BAA9F"},{tag:[S.variableName],color:"#ACF2E4"},{tag:[S.regexp,S.link],color:"#FF8170"},...n]})};MI();const Mw="#202e46",iT="#e2e2e2",jI="#b9c7e6",DI="rgba(255,255,255,0.2)",qI="rgba(255,255,255,0.5)",ZI="#000",NI="rgba(0,0,0,0.4)",II="rgba(0,0,0,0.1)",WI="white",uu=["#77fd8c","#00ffff","#66ecff","#ffb9ff","#ffabb3","#ffdb56"],jw=uu[0],Mu=uu[1],BI=uu[2],Dw=uu[3],LI=uu[4],qw=uu[5],VI="#ff2222",XI=t=>{let{state:e}=t,r=e.doc.lineAt(e.selection.main.from),n=t1(t.state,r.from);return n.line?FI(t):n.block?GI(t):!1};function kf(t,e){return({state:r,dispatch:n})=>{if(r.readOnly)return!1;let i=t(e,r);return i?(n(r.update(i)),!0):!1}}const FI=kf(r1,0),UI=kf(r1,1),YI=kf(r1,2),zI=kf(oT,0),GI=kf((t,e)=>oT(t,e,KI(e)),0);function t1(t,e){let r=t.languageDataAt("commentTokens",e);return r.length?r[0]:{}}const ju=50;function HI(t,{open:e,close:r},n,i){let o=t.sliceDoc(n-ju,n),s=t.sliceDoc(i,i+ju),a=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(s)[0].length,c=o.length-a;if(o.slice(c-e.length,c)==e&&s.slice(l,l+r.length)==r)return{open:{pos:n-a,margin:a&&1},close:{pos:i+l,margin:l&&1}};let u,f;i-n<=2*ju?u=f=t.sliceDoc(n,i):(u=t.sliceDoc(n,n+ju),f=t.sliceDoc(i-ju,i));let h=/^\s*/.exec(u)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-r.length;return u.slice(h,h+e.length)==e&&f.slice(p,p+r.length)==r?{open:{pos:n+h+e.length,margin:/\s/.test(u.charAt(h+e.length))?1:0},close:{pos:i-d-r.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function KI(t){let e=[];for(let r of t.selection.ranges){let n=t.doc.lineAt(r.from),i=r.to<=n.to?n:t.doc.lineAt(r.to),o=e.length-1;o>=0&&e[o].to>n.from?e[o].to=i.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:i.to})}return e}function oT(t,e,r=e.selection.ranges){let n=r.map(o=>t1(e,o.from).block);if(!n.every(o=>o))return null;let i=r.map((o,s)=>HI(e,n[s],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(r.map((o,s)=>i[s]?[]:[{from:o.from,insert:n[s].open+" "},{from:o.to,insert:" "+n[s].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let s=0,a;s<i.length;s++)if(a=i[s]){let l=n[s],{open:c,close:u}=a;o.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:o}}return null}function r1(t,e,r=e.selection.ranges){let n=[],i=-1;for(let{from:o,to:s}of r){let a=n.length,l=1e9,c=t1(e,o).line;if(c){for(let u=o;u<=s;){let f=e.doc.lineAt(u);if(f.from>i&&(o==s||s>f.from)){i=f.from;let h=/^\s*/.exec(f.text)[0].length,d=h==f.length,p=f.text.slice(h,h+c.length)==c?h:-1;h<f.text.length&&h<l&&(l=h),n.push({line:f,comment:p,token:c,indent:h,empty:d,single:!1})}u=f.to+1}if(l<1e9)for(let u=a;u<n.length;u++)n[u].indent<n[u].line.text.length&&(n[u].indent=l);n.length==a+1&&(n[a].single=!0)}}if(t!=2&&n.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:l,indent:c,empty:u,single:f}of n)(f||!u)&&o.push({from:a.from+c,insert:l+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&n.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:a,token:l}of n)if(a>=0){let c=s.from+a,u=c+l.length;s.text[u-s.from]==" "&&u++,o.push({from:c,to:u})}return{changes:o}}return null}const Hy=Oo.define(),JI=Oo.define(),eW=Ie.define(),sT=Ie.define({combine(t){return Vi(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,r)=>r},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,r)=>(n,i)=>e(n,i)||r(n,i)})}}),aT=Kr.define({create(){return co.empty},update(t,e){let r=e.state.facet(sT),n=e.annotation(Hy);if(n){let l=Vn.fromTransaction(e,n.selection),c=n.side,u=c==0?t.undone:t.done;return l?u=Dp(u,u.length,r.minDepth,l):u=cT(u,e.startState.selection),new co(c==0?n.rest:u,c==0?u:n.rest)}let i=e.annotation(JI);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Nr.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=Vn.fromTransaction(e),s=e.annotation(Nr.time),a=e.annotation(Nr.userEvent);return o?t=t.addChanges(o,s,a,r,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,r.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new co(t.done.map(Vn.fromJSON),t.undone.map(Vn.fromJSON))}});function tW(t={}){return[aT,sT.of(t),Ee.domEventHandlers({beforeinput(e,r){let n=e.inputType=="historyUndo"?lT:e.inputType=="historyRedo"?Ky:null;return n?(e.preventDefault(),n(r)):!1}})]}function n1(t,e){return function({state:r,dispatch:n}){if(!e&&r.readOnly)return!1;let i=r.field(aT,!1);if(!i)return!1;let o=i.pop(t,r,e);return o?(n(o),!0):!1}}const lT=n1(0,!1),Ky=n1(1,!1),rW=n1(0,!0);class Vn{constructor(e,r,n,i,o){this.changes=e,this.effects=r,this.mapped=n,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new Vn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,r,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(r=this.mapped)===null||r===void 0?void 0:r.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Vn(e.changes&&Ur.fromJSON(e.changes),[],e.mapped&&po.fromJSON(e.mapped),e.startSelection&&le.fromJSON(e.startSelection),e.selectionsAfter.map(le.fromJSON))}static fromTransaction(e,r){let n=mi;for(let i of e.startState.facet(eW)){let o=i(e);o.length&&(n=n.concat(o))}return!n.length&&e.changes.empty?null:new Vn(e.changes.invert(e.startState.doc),n,void 0,r||e.startState.selection,mi)}static selection(e){return new Vn(void 0,mi,void 0,void 0,e)}}function Dp(t,e,r,n){let i=e+1>r+20?e-r-1:0,o=t.slice(i,e);return o.push(n),o}function nW(t,e){let r=[],n=!1;return t.iterChangedRanges((i,o)=>r.push(i,o)),e.iterChangedRanges((i,o,s,a)=>{for(let l=0;l<r.length;){let c=r[l++],u=r[l++];a>=c&&s<=u&&(n=!0)}}),n}function iW(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((r,n)=>r.empty!=e.ranges[n].empty).length===0}function uT(t,e){return t.length?e.length?t.concat(e):t:e}const mi=[],oW=200;function cT(t,e){if(t.length){let r=t[t.length-1],n=r.selectionsAfter.slice(Math.max(0,r.selectionsAfter.length-oW));return n.length&&n[n.length-1].eq(e)?t:(n.push(e),Dp(t,t.length-1,1e9,r.setSelAfter(n)))}else return[Vn.selection([e])]}function sW(t){let e=t[t.length-1],r=t.slice();return r[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),r}function TO(t,e){if(!t.length)return t;let r=t.length,n=mi;for(;r;){let i=aW(t[r-1],e,n);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,r);return o[r-1]=i,o}else e=i.mapped,r--,n=i.selectionsAfter}return n.length?[Vn.selection(n)]:mi}function aW(t,e,r){let n=uT(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):mi,r);if(!t.changes)return Vn.selection(n);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new Vn(i,pt.mapEffects(t.effects,e),s,t.startSelection.map(o),n)}const lW=/^(input\.type|delete)($|\.)/;class co{constructor(e,r,n=0,i=void 0){this.done=e,this.undone=r,this.prevTime=n,this.prevUserEvent=i}isolate(){return this.prevTime?new co(this.done,this.undone):this}addChanges(e,r,n,i,o){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!n||lW.test(n))&&(!a.selectionsAfter.length&&r-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,nW(a.changes,e.changes))||n=="input.type.compose")?s=Dp(s,s.length-1,i.minDepth,new Vn(e.changes.compose(a.changes),uT(e.effects,a.effects),a.mapped,a.startSelection,mi)):s=Dp(s,s.length,i.minDepth,e),new co(s,mi,r,n)}addSelection(e,r,n,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:mi;return o.length>0&&r-this.prevTime<i&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&iW(o[o.length-1],e)?this:new co(cT(this.done,e),this.undone,r,n)}addMapping(e){return new co(TO(this.done,e),TO(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,r,n){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],s=o.selectionsAfter[0]||r.selection;if(n&&o.selectionsAfter.length)return r.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:Hy.of({side:e,rest:sW(i),selection:s}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let a=i.length==1?mi:i.slice(0,i.length-1);return o.mapped&&(a=TO(a,o.mapped)),r.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:Hy.of({side:e,rest:a,selection:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}co.empty=new co(mi,mi);function xf(t,e){return le.create(t.ranges.map(e),t.mainIndex)}function qs(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Ra({state:t,dispatch:e},r){let n=xf(t.selection,r);return n.eq(t.selection,!0)?!1:(e(qs(t,n)),!0)}function Cg(t,e){return le.cursor(e?t.to:t.from)}function fT(t,e){return Ra(t,r=>r.empty?t.moveByChar(r,e):Cg(r,e))}function Zs(t){return t.textDirectionAt(t.state.selection.main.head)==dr.LTR}const Zw=t=>fT(t,!Zs(t)),Nw=t=>fT(t,Zs(t));function hT(t,e){return Ra(t,r=>r.empty?t.moveByGroup(r,e):Cg(r,e))}const uW=t=>hT(t,!Zs(t)),cW=t=>hT(t,Zs(t));function dT(t,e){return Ra(t,r=>{if(!r.empty)return Cg(r,e);let n=t.moveVertically(r,e);return n.head!=r.head?n:t.moveToLineBoundary(r,e)})}const Iw=t=>dT(t,!1),Ww=t=>dT(t,!0);function pT(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,r=0,n=0,i;if(e){for(let o of t.state.facet(Ee.scrollMargins)){let s=o(t);s!=null&&s.top&&(r=Math.max(s==null?void 0:s.top,r)),s!=null&&s.bottom&&(n=Math.max(s==null?void 0:s.bottom,n))}i=t.scrollDOM.clientHeight-r-n}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:n,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function gT(t,e){let r=pT(t),{state:n}=t,i=xf(n.selection,s=>s.empty?t.moveVertically(s,e,r.height):Cg(s,e));if(i.eq(n.selection))return!1;let o;if(r.selfScroll){let s=t.coordsAtPos(n.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+r.marginTop,c=a.bottom-r.marginBottom;s&&s.top>l&&s.bottom<c&&(o=Ee.scrollIntoView(i.main.head,{y:"start",yMargin:s.top-l}))}return t.dispatch(qs(n,i),{effects:o}),!0}const RO=t=>gT(t,!1),AO=t=>gT(t,!0);function Eg(t,e,r){let n=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,r);if(i.head==e.head&&i.head!=(r?n.to:n.from)&&(i=t.moveToLineBoundary(e,r,!1)),!r&&i.head==n.from&&n.length){let o=/^\s*/.exec(t.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;o&&e.head!=n.from+o&&(i=le.cursor(n.from+o))}return i}const Bw=t=>Ra(t,e=>Eg(t,e,!0)),Lw=t=>Ra(t,e=>Eg(t,e,!1)),fW=t=>Ra(t,e=>le.cursor(t.lineBlockAt(e.head).from,1)),hW=t=>Ra(t,e=>le.cursor(t.lineBlockAt(e.head).to,-1));function dW(t,e,r){let n=!1,i=xf(t.selection,o=>{let s=cs(t,o.head,-1)||cs(t,o.head,1)||o.head>0&&cs(t,o.head-1,1)||o.head<t.doc.length&&cs(t,o.head+1,-1);if(!s||!s.end)return o;n=!0;let a=s.start.from==o.head?s.end.to:s.end.from;return r?le.range(o.anchor,a):le.cursor(a)});return n?(e(qs(t,i)),!0):!1}const pW=({state:t,dispatch:e})=>dW(t,e,!1);function Ns(t,e){let r=xf(t.state.selection,n=>{let i=e(n);return le.range(n.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return r.eq(t.state.selection)?!1:(t.dispatch(qs(t.state,r)),!0)}function OT(t,e){return Ns(t,r=>t.moveByChar(r,e))}const Vw=t=>OT(t,!Zs(t)),Xw=t=>OT(t,Zs(t));function mT(t,e){return Ns(t,r=>t.moveByGroup(r,e))}const gW=t=>mT(t,!Zs(t)),OW=t=>mT(t,Zs(t));function yT(t,e){return Ns(t,r=>t.moveVertically(r,e))}const Fw=t=>yT(t,!1),Uw=t=>yT(t,!0);function vT(t,e){return Ns(t,r=>t.moveVertically(r,e,pT(t).height))}const Yw=t=>vT(t,!1),zw=t=>vT(t,!0),Gw=t=>Ns(t,e=>Eg(t,e,!0)),Hw=t=>Ns(t,e=>Eg(t,e,!1)),mW=t=>Ns(t,e=>le.cursor(t.lineBlockAt(e.head).from)),yW=t=>Ns(t,e=>le.cursor(t.lineBlockAt(e.head).to)),Kw=({state:t,dispatch:e})=>(e(qs(t,{anchor:0})),!0),Jw=({state:t,dispatch:e})=>(e(qs(t,{anchor:t.doc.length})),!0),eP=({state:t,dispatch:e})=>(e(qs(t,{anchor:t.selection.main.anchor,head:0})),!0),tP=({state:t,dispatch:e})=>(e(qs(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),vW=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),bW=({state:t,dispatch:e})=>{let r=Tg(t).map(({from:n,to:i})=>le.range(n,Math.min(i+1,t.doc.length)));return e(t.update({selection:le.create(r),userEvent:"select"})),!0};function Qg(t,e){if(t.state.readOnly)return!1;let r="delete.selection",{state:n}=t,i=n.changeByRange(o=>{let{from:s,to:a}=o;if(s==a){let l=e(o);l<s?(r="delete.backward",l=bh(t,l,!1)):l>s&&(r="delete.forward",l=bh(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=bh(t,s,!1),a=bh(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:le.cursor(s,s<o.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(n.update(i,{scrollIntoView:!0,userEvent:r,effects:r=="delete.selection"?Ee.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function bh(t,e,r){if(t instanceof Ee)for(let n of t.state.facet(Ee.atomicRanges).map(i=>i(t)))n.between(e,e,(i,o)=>{i<e&&o>e&&(e=r?o:i)});return e}const bT=(t,e)=>Qg(t,r=>{let n=r.from,{state:i}=t,o=i.doc.lineAt(n),s,a;if(!e&&n>o.from&&n<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,n-o.from))){if(s[s.length-1]==" ")return n-1;let l=Wi(s,i.tabSize),c=l%Hl(i)||Hl(i);for(let u=0;u<c&&s[s.length-1-u]==" ";u++)n--;a=n}else a=fn(o.text,n-o.from,e,e)+o.from,a==n&&o.number!=(e?i.doc.lines:1)?a+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(a-o.from,n-o.from))&&(a=fn(o.text,a-o.from,!1,!1)+o.from);return a}),MO=t=>bT(t,!1),rP=t=>bT(t,!0),ST=(t,e)=>Qg(t,r=>{let n=r.head,{state:i}=t,o=i.doc.lineAt(n),s=i.charCategorizer(n);for(let a=null;;){if(n==(e?o.to:o.from)){n==r.head&&o.number!=(e?i.doc.lines:1)&&(n+=e?1:-1);break}let l=fn(o.text,n-o.from,e)+o.from,c=o.text.slice(Math.min(n,l)-o.from,Math.max(n,l)-o.from),u=s(c);if(a!=null&&u!=a)break;(c!=" "||n!=r.head)&&(a=u),n=l}return n}),nP=t=>ST(t,!1),SW=t=>ST(t,!0),iP=t=>Qg(t,e=>{let r=t.lineBlockAt(e.head).to;return e.head<r?r:Math.min(t.state.doc.length,e.head+1)}),wW=t=>Qg(t,e=>{let r=t.lineBlockAt(e.head).from;return e.head>r?r:Math.max(0,e.head-1)}),PW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:Zt.of(["",""])},range:le.cursor(n.from)}));return e(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0},kW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{if(!n.empty||n.from==0||n.from==t.doc.length)return{range:n};let i=n.from,o=t.doc.lineAt(i),s=i==o.from?i-1:fn(o.text,i-o.from,!1)+o.from,a=i==o.to?i+1:fn(o.text,i-o.from,!0)+o.from;return{changes:{from:s,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(s,i))},range:le.cursor(a)}});return r.changes.empty?!1:(e(t.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Tg(t){let e=[],r=-1;for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),o=t.doc.lineAt(n.to);if(!n.empty&&n.to==o.from&&(o=t.doc.lineAt(n.to-1)),r>=i.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(n)}else e.push({from:i.from,to:o.to,ranges:[n]});r=o.number+1}return e}function wT(t,e,r){if(t.readOnly)return!1;let n=[],i=[];for(let o of Tg(t)){if(r?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(r?o.to+1:o.from-1),a=s.length+1;if(r){n.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let l of o.ranges)i.push(le.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{n.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let l of o.ranges)i.push(le.range(l.anchor-a,l.head-a))}}return n.length?(e(t.update({changes:n,scrollIntoView:!0,selection:le.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const xW=({state:t,dispatch:e})=>wT(t,e,!1),_W=({state:t,dispatch:e})=>wT(t,e,!0);function PT(t,e,r){if(t.readOnly)return!1;let n=[];for(let i of Tg(t))r?n.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):n.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const $W=({state:t,dispatch:e})=>PT(t,e,!1),CW=({state:t,dispatch:e})=>PT(t,e,!0),EW=t=>{if(t.state.readOnly)return!1;let{state:e}=t,r=e.changes(Tg(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),n=xf(e.selection,i=>t.moveVertically(i,!0)).map(r);return t.dispatch({changes:r,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function QW(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let r=pr(t).resolveInner(e),n=r.childBefore(e),i=r.childAfter(e),o;return n&&i&&n.to<=e&&i.from>=e&&(o=n.type.prop(gt.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(n.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(n.to,i.from))?{from:n.to,to:i.from}:null}const oP=TW(!1);function TW(t){return({state:e,dispatch:r})=>{if(e.readOnly)return!1;let n=e.changeByRange(i=>{let{from:o,to:s}=i,a=e.doc.lineAt(o),l=!t&&o==s&&QW(e,o);t&&(o=s=(s<=a.to?a:e.doc.lineAt(s)).to);let c=new z0(e,{simulateBreak:o,simulateDoubleBreak:!!l}),u=WQ(c,o);for(u==null&&(u=Wi(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));s<a.to&&/\s/.test(a.text[s-a.from]);)s++;l?{from:o,to:s}=l:o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let f=["",jp(e,u)];return l&&f.push(jp(e,c.lineIndent(a.from,-1))),{changes:{from:o,to:s,insert:Zt.of(f)},range:le.cursor(o+1+f[1].length)}});return r(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function kT(t,e){let r=-1;return t.changeByRange(n=>{let i=[];for(let s=n.from;s<=n.to;){let a=t.doc.lineAt(s);a.number>r&&(n.empty||n.to>a.from)&&(e(a,i,n),r=a.number),s=a.to+1}let o=t.changes(i);return{changes:i,range:le.range(o.mapPos(n.anchor,1),o.mapPos(n.head,1))}})}const sP=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(kT(t,(r,n)=>{n.push({from:r.from,insert:t.facet(wf)})}),{userEvent:"input.indent"})),!0),aP=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(kT(t,(r,n)=>{let i=/^\s*/.exec(r.text)[0];if(!i)return;let o=Wi(i,t.tabSize),s=0,a=jp(t,Math.max(0,o-Hl(t)));for(;s<i.length&&s<a.length&&i.charCodeAt(s)==a.charCodeAt(s);)s++;n.push({from:r.from+s,to:r.from+i.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0);function or(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,r=arguments[1];if(r&&typeof r=="object"&&r.nodeType==null&&!Array.isArray(r)){for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var i=r[n];typeof i=="string"?t.setAttribute(n,i):i!=null&&(t[n]=i)}e++}for(;e<arguments.length;e++)xT(t,arguments[e]);return t}function xT(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var r=0;r<e.length;r++)xT(t,e[r]);else throw new RangeError("Unsupported child node: "+e)}const lP=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Kl{constructor(e,r,n=0,i=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,i),this.bufferStart=n,this.normalize=o?a=>o(lP(a)):lP,this.query=this.normalize(r)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let r=C0(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=di(e);let i=this.normalize(r);for(let o=0,s=n;;o++){let a=i.charCodeAt(o),l=this.match(a,s,this.bufferPos+this.bufferStart);if(o==i.length-1){if(l)return this.value=l,this;break}s==n&&o<r.length&&r.charCodeAt(o)==a&&s++}}}match(e,r,n){let i=null;for(let o=0;o<this.matches.length;o+=2){let s=this.matches[o],a=!1;this.query.charCodeAt(s)==e&&(s==this.query.length-1?i={from:this.matches[o+1],to:n}:(this.matches[o]++,a=!0)),a||(this.matches.splice(o,2),o-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:r,to:n}:this.matches.push(1,r)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(Kl.prototype[Symbol.iterator]=function(){return this});const _T={from:-1,to:-1,match:/.*/.exec("")},i1="gm"+(/x/.unicode==null?"":"u");class $T{constructor(e,r,n,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=_T,/\\[sWDnr]|\n|\r|\[\^/.test(r))return new CT(e,r,n,i,o);this.re=new RegExp(r,i1+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.iter=e.iter();let s=e.lineAt(i);this.curLineStart=s.from,this.matchPos=qp(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let r=this.matchPos<=this.to&&this.re.exec(this.curLine);if(r){let n=this.curLineStart+r.index,i=n+r[0].length;if(this.matchPos=qp(this.text,i+(n==i?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<i||n>this.value.to)&&(!this.test||this.test(n,i,r)))return this.value={from:n,to:i,match:r},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const jO=new WeakMap;class Al{constructor(e,r){this.from=e,this.text=r}get to(){return this.from+this.text.length}static get(e,r,n){let i=jO.get(e);if(!i||i.from>=n||i.to<=r){let a=new Al(r,e.sliceString(r,n));return jO.set(e,a),a}if(i.from==r&&i.to==n)return i;let{text:o,from:s}=i;return s>r&&(o=e.sliceString(r,s)+o,s=r),i.to<n&&(o+=e.sliceString(i.to,n)),jO.set(e,new Al(s,o)),new Al(r,o.slice(r-s,n-s))}}class CT{constructor(e,r,n,i,o){this.text=e,this.to=o,this.done=!1,this.value=_T,this.matchPos=qp(e,i),this.re=new RegExp(r,i1+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.flat=Al.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,r=this.re.exec(this.flat.text);if(r&&!r[0]&&r.index==e&&(this.re.lastIndex=e+1,r=this.re.exec(this.flat.text)),r){let n=this.flat.from+r.index,i=n+r[0].length;if((this.flat.to>=this.to||r.index+r[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,i,r)))return this.value={from:n,to:i,match:r},this.matchPos=qp(this.text,i+(n==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Al.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&($T.prototype[Symbol.iterator]=CT.prototype[Symbol.iterator]=function(){return this});function RW(t){try{return new RegExp(t,i1),!0}catch{return!1}}function qp(t,e){if(e>=t.length)return e;let r=t.lineAt(e),n;for(;e<r.to&&(n=r.text.charCodeAt(e-r.from))>=56320&&n<57344;)e++;return e}function Jy(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),r=or("input",{class:"cm-textfield",name:"line",value:e}),n=or("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:Zp.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},or("label",t.state.phrase("Go to line"),": ",r)," ",or("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(r.value);if(!o)return;let{state:s}=t,a=s.doc.lineAt(s.selection.main.head),[,l,c,u,f]=o,h=u?+u.slice(1):0,d=c?+c:a.number;if(c&&f){let m=d/100;l&&(m=m*(l=="-"?-1:1)+a.number/s.doc.lines),d=Math.round(s.doc.lines*m)}else c&&l&&(d=d*(l=="-"?-1:1)+a.number);let p=s.doc.line(Math.max(1,Math.min(s.doc.lines,d))),g=le.cursor(p.from+Math.max(0,Math.min(h,p.length)));t.dispatch({effects:[Zp.of(!1),Ee.scrollIntoView(g.from,{y:"center"})],selection:g}),t.focus()}return{dom:n}}const Zp=pt.define(),uP=Kr.define({create(){return!0},update(t,e){for(let r of e.effects)r.is(Zp)&&(t=r.value);return t},provide:t=>zc.from(t,e=>e?Jy:null)}),AW=t=>{let e=Yc(t,Jy);if(!e){let r=[Zp.of(!0)];t.state.field(uP,!1)==null&&r.push(pt.appendConfig.of([uP,MW])),t.dispatch({effects:r}),e=Yc(t,Jy)}return e&&e.dom.querySelector("input").select(),!0},MW=Ee.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),jW={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},ET=Ie.define({combine(t){return Vi(t,jW,{highlightWordAroundCursor:(e,r)=>e||r,minSelectionLength:Math.min,maxMatches:Math.min})}});function DW(t){let e=[WW,IW];return t&&e.push(ET.of(t)),e}const qW=Ne.mark({class:"cm-selectionMatch"}),ZW=Ne.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function cP(t,e,r,n){return(r==0||t(e.sliceDoc(r-1,r))!=wr.Word)&&(n==e.doc.length||t(e.sliceDoc(n,n+1))!=wr.Word)}function NW(t,e,r,n){return t(e.sliceDoc(r,r+1))==wr.Word&&t(e.sliceDoc(n-1,n))==wr.Word}const IW=nr.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(ET),{state:r}=t,n=r.selection;if(n.ranges.length>1)return Ne.none;let i=n.main,o,s=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ne.none;let l=r.wordAt(i.head);if(!l)return Ne.none;s=r.charCategorizer(i.head),o=r.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return Ne.none;if(e.wholeWords){if(o=r.sliceDoc(i.from,i.to),s=r.charCategorizer(i.head),!(cP(s,r,i.from,i.to)&&NW(s,r,i.from,i.to)))return Ne.none}else if(o=r.sliceDoc(i.from,i.to),!o)return Ne.none}let a=[];for(let l of t.visibleRanges){let c=new Kl(r.doc,o,l.from,l.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!s||cP(s,r,u,f))&&(i.empty&&u<=i.from&&f>=i.to?a.push(ZW.range(u,f)):(u>=i.to||f<=i.from)&&a.push(qW.range(u,f)),a.length>e.maxMatches))return Ne.none}}return Ne.set(a)}},{decorations:t=>t.decorations}),WW=Ee.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),BW=({state:t,dispatch:e})=>{let{selection:r}=t,n=le.create(r.ranges.map(i=>t.wordAt(i.head)||le.cursor(i.head)),r.mainIndex);return n.eq(r)?!1:(e(t.update({selection:n})),!0)};function LW(t,e){let{main:r,ranges:n}=t.selection,i=t.wordAt(r.head),o=i&&i.from==r.from&&i.to==r.to;for(let s=!1,a=new Kl(t.doc,e,n[n.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new Kl(t.doc,e,0,Math.max(0,n[n.length-1].from-1)),s=!0}else{if(s&&n.some(l=>l.from==a.value.from))continue;if(o){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const VW=({state:t,dispatch:e})=>{let{ranges:r}=t.selection;if(r.some(o=>o.from===o.to))return BW({state:t,dispatch:e});let n=t.sliceDoc(r[0].from,r[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=n))return!1;let i=LW(t,n);return i?(e(t.update({selection:t.selection.addRange(le.range(i.from,i.to),!1),effects:Ee.scrollIntoView(i.to)})),!0):!1},cu=Ie.define({combine(t){return Vi(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new JW(e),scrollToMatch:e=>Ee.scrollIntoView(e)})}});class QT{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||RW(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(r,n)=>n=="n"?`
|
|
88
|
+
`:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new YW(this):new FW(this)}getCursor(e,r=0,n){let i=e.doc?e:Dt.create({doc:e});return n==null&&(n=i.doc.length),this.regexp?nl(this,i,r,n):rl(this,i,r,n)}}class TT{constructor(e){this.spec=e}}function rl(t,e,r,n){return new Kl(e.doc,t.unquoted,r,n,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?XW(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function XW(t,e){return(r,n,i,o)=>((o>r||o+i.length<n)&&(o=Math.max(0,r-2),i=t.sliceString(o,Math.min(t.length,n+2))),(e(Np(i,r-o))!=wr.Word||e(Ip(i,r-o))!=wr.Word)&&(e(Ip(i,n-o))!=wr.Word||e(Np(i,n-o))!=wr.Word))}class FW extends TT{constructor(e){super(e)}nextMatch(e,r,n){let i=rl(this.spec,e,n,e.doc.length).nextOverlapping();return i.done&&(i=rl(this.spec,e,0,r).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,r,n){for(let i=n;;){let o=Math.max(r,i-1e4-this.spec.unquoted.length),s=rl(this.spec,e,o,i),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(o==r)return null;i-=1e4}}prevMatch(e,r,n){return this.prevMatchInRange(e,0,r)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,r){let n=rl(this.spec,e,0,e.doc.length),i=[];for(;!n.next().done;){if(i.length>=r)return null;i.push(n.value)}return i}highlight(e,r,n,i){let o=rl(this.spec,e,Math.max(0,r-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function nl(t,e,r,n){return new $T(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?UW(e.charCategorizer(e.selection.main.head)):void 0},r,n)}function Np(t,e){return t.slice(fn(t,e,!1),e)}function Ip(t,e){return t.slice(e,fn(t,e))}function UW(t){return(e,r,n)=>!n[0].length||(t(Np(n.input,n.index))!=wr.Word||t(Ip(n.input,n.index))!=wr.Word)&&(t(Ip(n.input,n.index+n[0].length))!=wr.Word||t(Np(n.input,n.index+n[0].length))!=wr.Word)}class YW extends TT{nextMatch(e,r,n){let i=nl(this.spec,e,n,e.doc.length).next();return i.done&&(i=nl(this.spec,e,0,r).next()),i.done?null:i.value}prevMatchInRange(e,r,n){for(let i=1;;i++){let o=Math.max(r,n-i*1e4),s=nl(this.spec,e,o,n),a=null;for(;!s.next().done;)a=s.value;if(a&&(o==r||a.from>o+10))return a;if(o==r)return null}}prevMatch(e,r,n){return this.prevMatchInRange(e,0,r)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(r,n)=>n=="$"?"$":n=="&"?e.match[0]:n!="0"&&+n<e.match.length?e.match[n]:r)}matchAll(e,r){let n=nl(this.spec,e,0,e.doc.length),i=[];for(;!n.next().done;){if(i.length>=r)return null;i.push(n.value)}return i}highlight(e,r,n,i){let o=nl(this.spec,e,Math.max(0,r-250),Math.min(n+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const Jc=pt.define(),o1=pt.define(),bs=Kr.define({create(t){return new DO(ev(t).create(),null)},update(t,e){for(let r of e.effects)r.is(Jc)?t=new DO(r.value.create(),t.panel):r.is(o1)&&(t=new DO(t.query,r.value?s1:null));return t},provide:t=>zc.from(t,e=>e.panel)});class DO{constructor(e,r){this.query=e,this.panel=r}}const zW=Ne.mark({class:"cm-searchMatch"}),GW=Ne.mark({class:"cm-searchMatch cm-searchMatch-selected"}),HW=nr.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(bs))}update(t){let e=t.state.field(bs);(e!=t.startState.field(bs)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Ne.none;let{view:r}=this,n=new ks;for(let i=0,o=r.visibleRanges,s=o.length;i<s;i++){let{from:a,to:l}=o[i];for(;i<s-1&&l>o[i+1].from-2*250;)l=o[++i].to;t.highlight(r.state,a,l,(c,u)=>{let f=r.state.selection.ranges.some(h=>h.from==c&&h.to==u);n.add(c,u,f?GW:zW)})}return n.finish()}},{decorations:t=>t.decorations});function _f(t){return e=>{let r=e.state.field(bs,!1);return r&&r.query.spec.valid?t(e,r):DT(e)}}const fP=_f((t,{query:e})=>{let{to:r}=t.state.selection.main,n=e.nextMatch(t.state,r,r);if(!n)return!1;let i=le.single(n.from,n.to),o=t.state.facet(cu);return t.dispatch({selection:i,effects:[a1(t,n),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),jT(t),!0}),hP=_f((t,{query:e})=>{let{state:r}=t,{from:n}=r.selection.main,i=e.prevMatch(r,n,n);if(!i)return!1;let o=le.single(i.from,i.to),s=t.state.facet(cu);return t.dispatch({selection:o,effects:[a1(t,i),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),jT(t),!0}),RT=_f((t,{query:e})=>{let r=e.matchAll(t.state,1e3);return!r||!r.length?!1:(t.dispatch({selection:le.create(r.map(n=>le.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),KW=({state:t,dispatch:e})=>{let r=t.selection;if(r.ranges.length>1||r.main.empty)return!1;let{from:n,to:i}=r.main,o=[],s=0;for(let a=new Kl(t.doc,t.sliceDoc(n,i));!a.next().done;){if(o.length>1e3)return!1;a.value.from==n&&(s=o.length),o.push(le.range(a.value.from,a.value.to))}return e(t.update({selection:le.create(o,s),userEvent:"select.search.matches"})),!0},dP=_f((t,{query:e})=>{let{state:r}=t,{from:n,to:i}=r.selection.main;if(r.readOnly)return!1;let o=e.nextMatch(r,n,n);if(!o)return!1;let s=[],a,l,c=[];if(o.from==n&&o.to==i&&(l=r.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=e.nextMatch(r,o.from,o.to),c.push(Ee.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(n).number)+"."))),o){let u=s.length==0||s[0].from>=o.to?0:o.to-o.from-l.length;a=le.single(o.from-u,o.to-u),c.push(a1(t,o)),c.push(r.facet(cu).scrollToMatch(a.main,t))}return t.dispatch({changes:s,selection:a,effects:c,userEvent:"input.replace"}),!0}),AT=_f((t,{query:e})=>{if(t.state.readOnly)return!1;let r=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:s}=i;return{from:o,to:s,insert:e.getReplacement(i)}});if(!r.length)return!1;let n=t.state.phrase("replaced $ matches",r.length)+".";return t.dispatch({changes:r,effects:Ee.announce.of(n),userEvent:"input.replace.all"}),!0});function s1(t){return t.state.facet(cu).createPanel(t)}function ev(t,e){var r,n,i,o,s;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=t.facet(cu);return new QT({search:((r=e==null?void 0:e.literal)!==null&&r!==void 0?r:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(n=e==null?void 0:e.caseSensitive)!==null&&n!==void 0?n:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:c.wholeWord})}function MT(t){let e=Yc(t,s1);return e&&e.dom.querySelector("[main-field]")}function jT(t){let e=MT(t);e&&e==t.root.activeElement&&e.select()}const DT=t=>{let e=t.state.field(bs,!1);if(e&&e.panel){let r=MT(t);if(r&&r!=t.root.activeElement){let n=ev(t.state,e.query.spec);n.valid&&t.dispatch({effects:Jc.of(n)}),r.focus(),r.select()}}else t.dispatch({effects:[o1.of(!0),e?Jc.of(ev(t.state,e.query.spec)):pt.appendConfig.of(tB)]});return!0},qT=t=>{let e=t.state.field(bs,!1);if(!e||!e.panel)return!1;let r=Yc(t,s1);return r&&r.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:o1.of(!1)}),!0};class JW{constructor(e){this.view=e;let r=this.query=e.state.field(bs).query.spec;this.commit=this.commit.bind(this),this.searchField=or("input",{value:r.search,placeholder:zn(e,"Find"),"aria-label":zn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=or("input",{value:r.replace,placeholder:zn(e,"Replace"),"aria-label":zn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=or("input",{type:"checkbox",name:"case",form:"",checked:r.caseSensitive,onchange:this.commit}),this.reField=or("input",{type:"checkbox",name:"re",form:"",checked:r.regexp,onchange:this.commit}),this.wordField=or("input",{type:"checkbox",name:"word",form:"",checked:r.wholeWord,onchange:this.commit});function n(i,o,s){return or("button",{class:"cm-button",name:i,onclick:o,type:"button"},s)}this.dom=or("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,n("next",()=>fP(e),[zn(e,"next")]),n("prev",()=>hP(e),[zn(e,"previous")]),n("select",()=>RT(e),[zn(e,"all")]),or("label",null,[this.caseField,zn(e,"match case")]),or("label",null,[this.reField,zn(e,"regexp")]),or("label",null,[this.wordField,zn(e,"by word")]),...e.state.readOnly?[]:[or("br"),this.replaceField,n("replace",()=>dP(e),[zn(e,"replace")]),n("replaceAll",()=>AT(e),[zn(e,"replace all")])],or("button",{name:"close",onclick:()=>qT(e),"aria-label":zn(e,"close"),type:"button"},["×"])])}commit(){let e=new QT({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Jc.of(e)}))}keydown(e){Xq(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?hP:fP)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),dP(this.view))}update(e){for(let r of e.transactions)for(let n of r.effects)n.is(Jc)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(cu).top}}function zn(t,e){return t.state.phrase(e)}const Sh=30,wh=/[\s\.,:;?!]/;function a1(t,{from:e,to:r}){let n=t.state.doc.lineAt(e),i=t.state.doc.lineAt(r).to,o=Math.max(n.from,e-Sh),s=Math.min(i,r+Sh),a=t.state.sliceDoc(o,s);if(o!=n.from){for(let l=0;l<Sh;l++)if(!wh.test(a[l+1])&&wh.test(a[l])){a=a.slice(l);break}}if(s!=i){for(let l=a.length-1;l>a.length-Sh;l--)if(!wh.test(a[l-1])&&wh.test(a[l])){a=a.slice(0,l);break}}return Ee.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${n.number}.`)}const eB=Ee.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),tB=[bs,Io.low(HW),eB];class l1{constructor(e,r,n){this.state=e,this.pos=r,this.explicit=n,this.abortListeners=[]}tokenBefore(e){let r=pr(this.state).resolveInner(this.pos,-1);for(;r&&e.indexOf(r.name)<0;)r=r.parent;return r?{from:r.from,to:this.pos,text:this.state.sliceDoc(r.from,this.pos),type:r.type}:null}matchBefore(e){let r=this.state.doc.lineAt(this.pos),n=Math.max(r.from,this.pos-250),i=r.text.slice(n-r.from,this.pos-r.from),o=i.search(NT(e,!1));return o<0?null:{from:n+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,r){e=="abort"&&this.abortListeners&&this.abortListeners.push(r)}}function pP(t){let e=Object.keys(t).join(""),r=/\w/.test(e);return r&&(e=e.replace(/\w/g,"")),`[${r?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function rB(t){let e=Object.create(null),r=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)r[i[o]]=!0}let n=pP(e)+pP(r)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function ZT(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[r,n]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:rB(e);return i=>{let o=i.matchBefore(n);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:r}:null}}function nB(t,e){return r=>{for(let n=pr(r.state).resolveInner(r.pos,-1);n;n=n.parent){if(t.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(r)}}class gP{constructor(e,r,n,i){this.completion=e,this.source=r,this.match=n,this.score=i}}function Ss(t){return t.selection.main.from}function NT(t,e){var r;let{source:n}=t,i=e&&n[0]!="^",o=n[n.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${n})${o?"$":""}`,(r=t.flags)!==null&&r!==void 0?r:t.ignoreCase?"i":"")}const u1=Oo.define();function iB(t,e,r,n){let{main:i}=t.selection,o=r-i.from,s=n-i.from;return Object.assign(Object.assign({},t.changeByRange(a=>a!=i&&r!=n&&t.sliceDoc(a.from+o,a.from+s)!=t.sliceDoc(r,n)?{range:a}:{changes:{from:a.from+o,to:n==i.from?a.to:a.from+s,insert:e},range:le.cursor(a.from+o+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const OP=new WeakMap;function oB(t){if(!Array.isArray(t))return t;let e=OP.get(t);return e||OP.set(t,e=ZT(t)),e}const Wp=pt.define(),ef=pt.define();class sB{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let r=0;r<e.length;){let n=ln(e,r),i=di(n);this.chars.push(n);let o=e.slice(r,r+i),s=o.toUpperCase();this.folded.push(ln(s==o?o.toLowerCase():s,0)),r+=i}this.astral=e.length!=this.chars.length}ret(e,r){return this.score=e,this.matched=r,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:r,folded:n,any:i,precise:o,byWord:s}=this;if(r.length==1){let O=ln(e,0),v=di(O),b=v==e.length?0:-100;if(O!=r[0])if(O==n[0])b+=-200;else return null;return this.ret(b,[0,v])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=r.length,c=0;if(a<0){for(let O=0,v=Math.min(e.length,200);O<v&&c<l;){let b=ln(e,O);(b==r[c]||b==n[c])&&(i[c++]=O),O+=di(b)}if(c<l)return null}let u=0,f=0,h=!1,d=0,p=-1,g=-1,m=/[a-z]/.test(e),y=!0;for(let O=0,v=Math.min(e.length,200),b=0;O<v&&f<l;){let w=ln(e,O);a<0&&(u<l&&w==r[u]&&(o[u++]=O),d<l&&(w==r[d]||w==n[d]?(d==0&&(p=O),g=O+1,d++):d=0));let _,C=w<255?w>=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(_=C0(w))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!O||C==1&&m||b==0&&C!=0)&&(r[f]==w||n[f]==w&&(h=!0)?s[f++]=O:s.length&&(y=!1)),b=C,O+=di(w)}return f==l&&s[0]==0&&y?this.result(-100+(h?-200:0),s,e):d==l&&p==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):d==l?this.ret(-900-e.length,[p,g]):f==l?this.result(-100+(h?-200:0)+-700+(y?0:-1100),s,e):r.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,r,n){let i=[],o=0;for(let s of r){let a=s+(this.astral?di(ln(n,s)):1);o&&i[o-1]==s?i[o-1]=a:(i[o++]=s,i[o++]=a)}return this.ret(e-n.length,i)}}class aB{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let r=e.slice(0,this.pattern.length),n=r==this.pattern?0:r.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,r.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const cn=Ie.define({combine(t){return Vi(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:lB,filterStrict:!1,compareCompletions:(e,r)=>e.label.localeCompare(r.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,r)=>e&&r,closeOnBlur:(e,r)=>e&&r,icons:(e,r)=>e&&r,tooltipClass:(e,r)=>n=>mP(e(n),r(n)),optionClass:(e,r)=>n=>mP(e(n),r(n)),addToOptions:(e,r)=>e.concat(r),filterStrict:(e,r)=>e||r})}});function mP(t,e){return t?e?t+" "+e:t:e}function lB(t,e,r,n,i,o){let s=t.textDirection==dr.RTL,a=s,l=!1,c="top",u,f,h=e.left-i.left,d=i.right-e.right,p=n.right-n.left,g=n.bottom-n.top;if(a&&h<Math.min(p,d)?a=!1:!a&&d<Math.min(p,h)&&(a=!0),p<=(a?h:d))u=Math.max(i.top,Math.min(r.top,i.bottom-g))-e.top,f=Math.min(400,a?h:d);else{l=!0,f=Math.min(400,(s?e.right:i.right-e.left)-30);let O=i.bottom-e.bottom;O>=g||O>e.top?u=r.bottom-e.top:(c="bottom",u=e.bottom-r.top)}let m=(e.bottom-e.top)/o.offsetHeight,y=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${u/m}px; max-width: ${f/y}px`,class:"cm-completionInfo-"+(l?s?"left-narrow":"right-narrow":a?"left":"right")}}function uB(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(r){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),r.type&&n.classList.add(...r.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(r,n,i,o){let s=document.createElement("span");s.className="cm-completionLabel";let a=r.displayLabel||r.label,l=0;for(let c=0;c<o.length;){let u=o[c++],f=o[c++];u>l&&s.appendChild(document.createTextNode(a.slice(l,u)));let h=s.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(a.slice(u,f))),h.className="cm-completionMatchedText",l=f}return l<a.length&&s.appendChild(document.createTextNode(a.slice(l))),s},position:50},{render(r){if(!r.detail)return null;let n=document.createElement("span");return n.className="cm-completionDetail",n.textContent=r.detail,n},position:80}),e.sort((r,n)=>r.position-n.position).map(r=>r.render)}function qO(t,e,r){if(t<=r)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/r);return{from:i*r,to:(i+1)*r}}let n=Math.floor((t-e)/r);return{from:t-(n+1)*r,to:t-n*r}}class cB{constructor(e,r,n){this.view=e,this.stateField=r,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(r),{options:o,selected:s}=i.open,a=e.state.facet(cn);this.optionContent=uB(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=qO(o.length,s,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(r).open;for(let u=l.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<c.length){this.applyCompletion(e,c[+f[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(cn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:ef.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,r){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,r,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var r;let n=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=i){let{options:o,selected:s,disabled:a}=n.open;(!i.open||i.open.options!=o)&&(this.range=qO(o.length,s,e.state.facet(cn).maxRenderedOptions),this.showOptions(o,n.id)),this.updateSel(),a!=((r=i.open)===null||r===void 0?void 0:r.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let r=this.tooltipClass(e);if(r!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of r.split(" "))n&&this.dom.classList.add(n);this.currentClass=r}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),r=e.open;if((r.selected>-1&&r.selected<this.range.from||r.selected>=this.range.to)&&(this.range=qO(r.options.length,r.selected,this.view.state.facet(cn).maxRenderedOptions),this.showOptions(r.options,e.id)),this.updateSelectedOption(r.selected)){this.destroyInfo();let{completion:n}=r.options[r.selected],{info:i}=n;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(n);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,n)}).catch(s=>Tn(this.view.state,s,"completion info")):this.addInfoPane(o,n)}}addInfoPane(e,r){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;n.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let r=null;for(let n=this.list.firstChild,i=this.range.from;n;n=n.nextSibling,i++)n.nodeName!="LI"||!n.id?i--:i==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),r=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return r&&hB(this.list,r),r}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let r=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return i.top>Math.min(o.bottom,r.bottom)-10||i.bottom<Math.max(o.top,r.top)+10?null:this.view.state.facet(cn).positionInfo(this.view,r,i,n,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,r,n){const i=document.createElement("ul");i.id=r,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let s=n.from;s<n.to;s++){let{completion:a,match:l}=e[s],{section:c}=a;if(c){let h=typeof c=="string"?c:c.name;if(h!=o&&(s>n.from||n.from==0))if(o=h,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let d=i.appendChild(document.createElement("completion-section"));d.textContent=h}}const u=i.appendChild(document.createElement("li"));u.id=r+"-"+s,u.setAttribute("role","option");let f=this.optionClass(a);f&&(u.className=f);for(let h of this.optionContent){let d=h(a,this.view.state,this.view,l);d&&u.appendChild(d)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function fB(t,e){return r=>new cB(r,t,e)}function hB(t,e){let r=t.getBoundingClientRect(),n=e.getBoundingClientRect(),i=r.height/t.offsetHeight;n.top<r.top?t.scrollTop-=(r.top-n.top)/i:n.bottom>r.bottom&&(t.scrollTop+=(n.bottom-r.bottom)/i)}function yP(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function dB(t,e){let r=[],n=null,i=c=>{r.push(c);let{section:u}=c.completion;if(u){n||(n=[]);let f=typeof u=="string"?u:u.name;n.some(h=>h.name==f)||n.push(typeof u=="string"?{name:f}:u)}},o=e.facet(cn);for(let c of t)if(c.hasResult()){let u=c.result.getMatch;if(c.result.filter===!1)for(let f of c.result.options)i(new gP(f,c.source,u?u(f):[],1e9-r.length));else{let f=e.sliceDoc(c.from,c.to),h,d=o.filterStrict?new aB(f):new sB(f);for(let p of c.result.options)if(h=d.match(p.label)){let g=p.displayLabel?u?u(p,h.matched):[]:h.matched;i(new gP(p,c.source,g,h.score+(p.boost||0)))}}}if(n){let c=Object.create(null),u=0,f=(h,d)=>{var p,g;return((p=h.rank)!==null&&p!==void 0?p:1e9)-((g=d.rank)!==null&&g!==void 0?g:1e9)||(h.name<d.name?-1:1)};for(let h of n.sort(f))u-=1e5,c[h.name]=u;for(let h of r){let{section:d}=h.completion;d&&(h.score+=c[typeof d=="string"?d:d.name])}}let s=[],a=null,l=o.compareCompletions;for(let c of r.sort((u,f)=>f.score-u.score||l(u.completion,f.completion))){let u=c.completion;!a||a.label!=u.label||a.detail!=u.detail||a.type!=null&&u.type!=null&&a.type!=u.type||a.apply!=u.apply||a.boost!=u.boost?s.push(c):yP(c.completion)>yP(a)&&(s[s.length-1]=c),a=c.completion}return s}class bl{constructor(e,r,n,i,o,s){this.options=e,this.attrs=r,this.tooltip=n,this.timestamp=i,this.selected=o,this.disabled=s}setSelected(e,r){return e==this.selected||e>=this.options.length?this:new bl(this.options,vP(r,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,r,n,i,o){let s=dB(e,r);if(!s.length)return i&&e.some(l=>l.state==1)?new bl(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let a=r.facet(cn).selectOnOpen?0:-1;if(i&&i.selected!=a&&i.selected!=-1){let l=i.options[i.selected].completion;for(let c=0;c<s.length;c++)if(s[c].completion==l){a=c;break}}return new bl(s,vP(n,a),{pos:e.reduce((l,c)=>c.hasResult()?Math.min(l,c.from):l,1e8),create:yB,above:o.aboveCursor},i?i.timestamp:Date.now(),a,!1)}map(e){return new bl(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Bp{constructor(e,r,n){this.active=e,this.id=r,this.open=n}static start(){return new Bp(OB,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:r}=e,n=r.facet(cn),o=(n.override||r.languageDataAt("autocomplete",Ss(r)).map(oB)).map(a=>(this.active.find(c=>c.source==a)||new Qn(a,this.active.some(c=>c.state!=0)?1:0)).update(e,n));o.length==this.active.length&&o.every((a,l)=>a==this.active[l])&&(o=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!pB(o,this.active)?s=bl.build(o,r,this.id,s,n):s&&s.disabled&&!o.some(a=>a.state==1)&&(s=null),!s&&o.every(a=>a.state!=1)&&o.some(a=>a.hasResult())&&(o=o.map(a=>a.hasResult()?new Qn(a.source,0):a));for(let a of e.effects)a.is(WT)&&(s=s&&s.setSelected(a.value,this.id));return o==this.active&&s==this.open?this:new Bp(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:gB}}function pB(t,e){if(t==e)return!0;for(let r=0,n=0;;){for(;r<t.length&&!t[r].hasResult;)r++;for(;n<e.length&&!e[n].hasResult;)n++;let i=r==t.length,o=n==e.length;if(i||o)return i==o;if(t[r++].result!=e[n++].result)return!1}}const gB={"aria-autocomplete":"list"};function vP(t,e){let r={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(r["aria-activedescendant"]=t+"-"+e),r}const OB=[];function tv(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(u1);if(r&&e.activateOnCompletion(r))return"input"}return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Qn{constructor(e,r,n=-1){this.source=e,this.state=r,this.explicitPos=n}hasResult(){return!1}update(e,r){let n=tv(e,r),i=this;n?i=i.handleUserEvent(e,n,r):e.docChanged?i=i.handleChange(e):e.selection&&i.state!=0&&(i=new Qn(i.source,0));for(let o of e.effects)if(o.is(Wp))i=new Qn(i.source,1,o.value?Ss(e.state):-1);else if(o.is(ef))i=new Qn(i.source,0);else if(o.is(IT))for(let s of o.value)s.source==i.source&&(i=s);return i}handleUserEvent(e,r,n){return r=="delete"||!n.activateOnTyping?this.map(e.changes):new Qn(this.source,1)}handleChange(e){return e.changes.touchesRange(Ss(e.startState))?new Qn(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Qn(this.source,this.state,e.mapPos(this.explicitPos))}}class Ml extends Qn{constructor(e,r,n,i,o){super(e,2,r),this.result=n,this.from=i,this.to=o}hasResult(){return!0}handleUserEvent(e,r,n){var i;let o=this.result;o.map&&!e.changes.empty&&(o=o.map(o,e.changes));let s=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),l=Ss(e.state);if((this.explicitPos<0?l<=s:l<this.from)||l>a||!o||r=="delete"&&Ss(e.startState)==this.from)return new Qn(this.source,r=="input"&&n.activateOnTyping?1:0);let c=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return mB(o.validFor,e.state,s,a)?new Ml(this.source,c,o,s,a):o.update&&(o=o.update(o,s,a,new l1(e.state,l,c>=0)))?new Ml(this.source,c,o,o.from,(i=o.to)!==null&&i!==void 0?i:Ss(e.state)):new Qn(this.source,1,c)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Qn(this.source,0):this.map(e.changes)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ml(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Qn(this.source,0)}}function mB(t,e,r,n){if(!t)return!1;let i=e.sliceDoc(r,n);return typeof t=="function"?t(i,r,n,e):NT(t,!0).test(i)}const IT=pt.define({map(t,e){return t.map(r=>r.map(e))}}),WT=pt.define(),Bn=Kr.define({create(){return Bp.start()},update(t,e){return t.update(e)},provide:t=>[W0.from(t,e=>e.tooltip),Ee.contentAttributes.from(t,e=>e.attrs)]});function c1(t,e){const r=e.completion.apply||e.completion.label;let n=t.state.field(Bn).active.find(i=>i.source==e.source);return n instanceof Ml?(typeof r=="string"?t.dispatch(Object.assign(Object.assign({},iB(t.state,r,n.from,n.to)),{annotations:u1.of(e.completion)})):r(t,e.completion,n.from,n.to),!0):!1}const yB=fB(Bn,c1);function fs(t,e="option"){return r=>{let n=r.state.field(Bn,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<r.state.facet(cn).interactionDelay)return!1;let i=1,o;e=="page"&&(o=QQ(r,n.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=n.open.options,a=n.open.selected>-1?n.open.selected+i*(t?1:-1):t?0:s-1;return a<0?a=e=="page"?0:s-1:a>=s&&(a=e=="page"?s-1:0),r.dispatch({effects:WT.of(a)}),!0}}const rv=t=>{let e=t.state.field(Bn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(cn).interactionDelay?!1:c1(t,e.open.options[e.open.selected])},BT=t=>t.state.field(Bn,!1)?(t.dispatch({effects:Wp.of(!0)}),!0):!1,LT=t=>{let e=t.state.field(Bn,!1);return!e||!e.active.some(r=>r.state!=0)?!1:(t.dispatch({effects:ef.of(null)}),!0)};class vB{constructor(e,r){this.active=e,this.context=r,this.time=Date.now(),this.updates=[],this.done=void 0}}const bB=50,SB=1e3,wB=nr.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Bn).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(Bn),r=t.state.facet(cn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Bn)==e)return;let n=t.transactions.some(o=>(o.selection||o.docChanged)&&!tv(o,r));for(let o=0;o<this.running.length;o++){let s=this.running[o];if(n||s.updates.length+t.transactions.length>bB&&Date.now()-s.time>SB){for(let a of s.context.abortListeners)try{a()}catch(l){Tn(this.view.state,l)}s.context.abortListeners=null,this.running.splice(o--,1)}else s.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(s=>s.is(Wp)))&&(this.pendingStart=!0);let i=this.pendingStart?50:r.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.state==1&&!this.running.some(s=>s.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)tv(o,r)=="input"?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Bn);for(let r of e.active)r.state==1&&!this.running.some(n=>n.active.source==r.source)&&this.startQuery(r)}startQuery(t){let{state:e}=this.view,r=Ss(e),n=new l1(e,r,t.explicitPos==r),i=new vB(t,n);this.running.push(i),Promise.resolve(t.source(n)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:ef.of(null)}),Tn(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(cn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],r=this.view.state.facet(cn);for(let n=0;n<this.running.length;n++){let i=this.running[n];if(i.done===void 0)continue;if(this.running.splice(n--,1),i.done){let s=new Ml(i.active.source,i.active.explicitPos,i.done,i.done.from,(t=i.done.to)!==null&&t!==void 0?t:Ss(i.updates.length?i.updates[0].startState:this.view.state));for(let a of i.updates)s=s.update(a,r);if(s.hasResult()){e.push(s);continue}}let o=this.view.state.field(Bn).active.find(s=>s.source==i.active.source);if(o&&o.state==1)if(i.done==null){let s=new Qn(i.active.source,0);for(let a of i.updates)s=s.update(a,r);s.state!=1&&e.push(s)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:IT.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Bn,!1);if(e&&e.tooltip&&this.view.state.facet(cn).closeOnBlur){let r=e.open&&QQ(this.view,e.open.tooltip);(!r||!r.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ef.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Wp.of(!1)}),20),this.composing=0}}}),PB=typeof navigator=="object"&&/Win/.test(navigator.platform),kB=Io.highest(Ee.domEventHandlers({keydown(t,e){let r=e.state.field(Bn,!1);if(!r||!r.open||r.open.disabled||r.open.selected<0||t.key.length>1||t.ctrlKey&&!(PB&&t.altKey)||t.metaKey)return!1;let n=r.open.options[r.open.selected],i=r.active.find(s=>s.source==n.source),o=n.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&c1(e,n),!1}})),VT=Ee.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class xB{constructor(e,r,n,i){this.field=e,this.line=r,this.from=n,this.to=i}}class f1{constructor(e,r,n){this.field=e,this.from=r,this.to=n}map(e){let r=e.mapPos(this.from,-1,Yr.TrackDel),n=e.mapPos(this.to,1,Yr.TrackDel);return r==null||n==null?null:new f1(this.field,r,n)}}class h1{constructor(e,r){this.lines=e,this.fieldPositions=r}instantiate(e,r){let n=[],i=[r],o=e.doc.lineAt(r),s=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(n.length){let c=s,u=/^\t*/.exec(l)[0].length;for(let f=0;f<u;f++)c+=e.facet(wf);i.push(r+c.length-u),l=c+l.slice(u)}n.push(l),r+=l.length+1}let a=this.fieldPositions.map(l=>new f1(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:n,ranges:a}}static parse(e){let r=[],n=[],i=[],o;for(let s of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(s);){let a=o[1]?+o[1]:null,l=o[2]||o[3]||"",c=-1,u=l.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<r.length;f++)(a!=null?r[f].seq==a:u&&r[f].name==u)&&(c=f);if(c<0){let f=0;for(;f<r.length&&(a==null||r[f].seq!=null&&r[f].seq<a);)f++;r.splice(f,0,{seq:a,name:u}),c=f;for(let h of i)h.field>=c&&h.field++}i.push(new xB(c,n.length,o.index,o.index+u.length)),s=s.slice(0,o.index)+l+s.slice(o.index+o[0].length)}s=s.replace(/\\([{}])/g,(a,l,c)=>{for(let u of i)u.line==n.length&&u.from>c&&(u.from--,u.to--);return l}),n.push(s)}return new h1(n,i)}}let _B=Ne.widget({widget:new class extends ki{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),$B=Ne.mark({class:"cm-snippetField"});class fu{constructor(e,r){this.ranges=e,this.active=r,this.deco=Ne.set(e.map(n=>(n.from==n.to?_B:$B).range(n.from,n.to)))}map(e){let r=[];for(let n of this.ranges){let i=n.map(e);if(!i)return null;r.push(i)}return new fu(r,this.active)}selectionInsideField(e){return e.ranges.every(r=>this.ranges.some(n=>n.field==this.active&&n.from<=r.from&&n.to>=r.to))}}const $f=pt.define({map(t,e){return t&&t.map(e)}}),CB=pt.define(),tf=Kr.define({create(){return null},update(t,e){for(let r of e.effects){if(r.is($f))return r.value;if(r.is(CB)&&t)return new fu(t.ranges,r.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Ee.decorations.from(t,e=>e?e.deco:Ne.none)});function d1(t,e){return le.create(t.filter(r=>r.field==e).map(r=>le.range(r.from,r.to)))}function EB(t){let e=h1.parse(t);return(r,n,i,o)=>{let{text:s,ranges:a}=e.instantiate(r.state,i),l={changes:{from:i,to:o,insert:Zt.of(s)},scrollIntoView:!0,annotations:n?[u1.of(n),Nr.userEvent.of("input.complete")]:void 0};if(a.length&&(l.selection=d1(a,0)),a.some(c=>c.field>0)){let c=new fu(a,0),u=l.effects=[$f.of(c)];r.state.field(tf,!1)===void 0&&u.push(pt.appendConfig.of([tf,MB,jB,VT]))}r.dispatch(r.state.update(l))}}function XT(t){return({state:e,dispatch:r})=>{let n=e.field(tf,!1);if(!n||t<0&&n.active==0)return!1;let i=n.active+t,o=t>0&&!n.ranges.some(s=>s.field==i+t);return r(e.update({selection:d1(n.ranges,i),effects:$f.of(o?null:new fu(n.ranges,i)),scrollIntoView:!0})),!0}}const QB=({state:t,dispatch:e})=>t.field(tf,!1)?(e(t.update({effects:$f.of(null)})),!0):!1,TB=XT(1),RB=XT(-1),AB=[{key:"Tab",run:TB,shift:RB},{key:"Escape",run:QB}],bP=Ie.define({combine(t){return t.length?t[0]:AB}}),MB=Io.highest(vf.compute([bP],t=>t.facet(bP)));function Nn(t,e){return Object.assign(Object.assign({},e),{apply:EB(t)})}const jB=Ee.domEventHandlers({mousedown(t,e){let r=e.state.field(tf,!1),n;if(!r||(n=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=r.ranges.find(o=>o.from<=n&&o.to>=n);return!i||i.field==r.active?!1:(e.dispatch({selection:d1(r.ranges,i.field),effects:$f.of(r.ranges.some(o=>o.field>i.field)?new fu(r.ranges,i.field):null),scrollIntoView:!0}),!0)}}),rf={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ha=pt.define({map(t,e){let r=e.mapPos(t,-1,Yr.TrackAfter);return r??void 0}}),p1=new class extends ka{};p1.startSide=1;p1.endSide=-1;const FT=Kr.define({create(){return qt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let r=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:n=>n>=r.from&&n<=r.to})}for(let r of e.effects)r.is(ha)&&(t=t.update({add:[p1.range(r.value,r.value+1)]}));return t}});function DB(){return[ZB,FT]}const ZO="()[]{}<>";function UT(t){for(let e=0;e<ZO.length;e+=2)if(ZO.charCodeAt(e)==t)return ZO.charAt(e+1);return C0(t<128?t:t+1)}function YT(t,e){return t.languageDataAt("closeBrackets",e)[0]||rf}const qB=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),ZB=Ee.inputHandler.of((t,e,r,n)=>{if((qB?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(n.length>2||n.length==2&&di(ln(n,0))==1||e!=i.from||r!=i.to)return!1;let o=IB(t.state,n);return o?(t.dispatch(o),!0):!1}),NB=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=YT(t,t.selection.main.head).brackets||rf.brackets,i=null,o=t.changeByRange(s=>{if(s.empty){let a=WB(t.doc,s.head);for(let l of n)if(l==a&&Rg(t.doc,s.head)==UT(ln(l,0)))return{changes:{from:s.head-l.length,to:s.head+l.length},range:le.cursor(s.head-l.length)}}return{range:i=s}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i};function IB(t,e){let r=YT(t,t.selection.main.head),n=r.brackets||rf.brackets;for(let i of n){let o=UT(ln(i,0));if(e==i)return o==i?VB(t,i,n.indexOf(i+i+i)>-1,r):BB(t,i,o,r.before||rf.before);if(e==o&&zT(t,t.selection.main.from))return LB(t,i,o)}return null}function zT(t,e){let r=!1;return t.field(FT).between(0,t.doc.length,n=>{n==e&&(r=!0)}),r}function Rg(t,e){let r=t.sliceString(e,e+2);return r.slice(0,di(ln(r,0)))}function WB(t,e){let r=t.sliceString(e-2,e);return di(ln(r,0))==r.length?r:r.slice(1)}function BB(t,e,r,n){let i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:r,from:s.to}],effects:ha.of(s.to+e.length),range:le.range(s.anchor+e.length,s.head+e.length)};let a=Rg(t.doc,s.head);return!a||/\s/.test(a)||n.indexOf(a)>-1?{changes:{insert:e+r,from:s.head},effects:ha.of(s.head+e.length),range:le.cursor(s.head+e.length)}:{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function LB(t,e,r){let n=null,i=t.changeByRange(o=>o.empty&&Rg(t.doc,o.head)==r?{changes:{from:o.head,to:o.head+r.length,insert:r},range:le.cursor(o.head+r.length)}:n={range:o});return n?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function VB(t,e,r,n){let i=n.stringPrefixes||rf.stringPrefixes,o=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:ha.of(a.to+e.length),range:le.range(a.anchor+e.length,a.head+e.length)};let l=a.head,c=Rg(t.doc,l),u;if(c==e){if(SP(t,l))return{changes:{insert:e+e,from:l},effects:ha.of(l+e.length),range:le.cursor(l+e.length)};if(zT(t,l)){let h=r&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+h.length,insert:h},range:le.cursor(l+h.length)}}}else{if(r&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=wP(t,l-2*e.length,i))>-1&&SP(t,u))return{changes:{insert:e+e+e+e,from:l},effects:ha.of(l+e.length),range:le.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=wr.Word&&wP(t,l,i)>-1&&!XB(t,l,e,i))return{changes:{insert:e+e,from:l},effects:ha.of(l+e.length),range:le.cursor(l+e.length)}}return{range:o=a}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function SP(t,e){let r=pr(t).resolveInner(e+1);return r.parent&&r.from==e}function XB(t,e,r,n){let i=pr(t).resolveInner(e,-1),o=n.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+r.length+o)),l=a.indexOf(r);if(!l||l>-1&&n.indexOf(a.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>r.length+l;){if(t.sliceDoc(u.to-r.length,u.to)==r)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function wP(t,e,r){let n=t.charCategorizer(e);if(n(t.sliceDoc(e-1,e))!=wr.Word)return e;for(let i of r){let o=e-i.length;if(t.sliceDoc(o,e)==i&&n(t.sliceDoc(o-1,o))!=wr.Word)return o}return-1}function GT(t={}){return[kB,Bn,cn.of(t),wB,UB,VT]}const FB=[{key:"Ctrl-Space",run:BT},{key:"Escape",run:LT},{key:"ArrowDown",run:fs(!0)},{key:"ArrowUp",run:fs(!1)},{key:"PageDown",run:fs(!0,"page")},{key:"PageUp",run:fs(!1,"page")},{key:"Enter",run:rv}],UB=Io.highest(vf.computeN([cn],t=>t.facet(cn).defaultKeymap?[FB]:[]));class YB{constructor(e,r,n){this.from=e,this.to=r,this.diagnostic=n}}class ia{constructor(e,r,n){this.diagnostics=e,this.panel=r,this.selected=n}static init(e,r,n){let i=e,o=n.facet(da).markerFilter;o&&(i=o(i,n));let s=Ne.set(i.map(a=>a.from==a.to||a.from==a.to-1&&n.doc.lineAt(a.from).to==a.from?Ne.widget({widget:new i7(a),diagnostic:a}).range(a.from):Ne.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity+(a.markClass?" "+a.markClass:"")},diagnostic:a,inclusive:!0}).range(a.from,a.to)),!0);return new ia(s,r,Jl(s))}}function Jl(t,e=null,r=0){let n=null;return t.between(r,1e9,(i,o,{spec:s})=>{if(!(e&&s.diagnostic!=e))return n=new YB(i,o,s.diagnostic),!1}),n}function zB(t,e){let r=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(n=>n.is(g1))||t.changes.touchesRange(r.from,r.to))}function HT(t,e){return t.field(ti,!1)?e:e.concat(pt.appendConfig.of(tR))}function GB(t,e){return{effects:HT(t,[g1.of(e)])}}const g1=pt.define(),O1=pt.define(),KT=pt.define(),ti=Kr.define({create(){return new ia(Ne.none,null,null)},update(t,e){if(e.docChanged){let r=t.diagnostics.map(e.changes),n=null;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);n=Jl(r,t.selected.diagnostic,i)||Jl(r,null,i)}t=new ia(r,t.panel,n)}for(let r of e.effects)r.is(g1)?t=ia.init(r.value,t.panel,e.state):r.is(O1)?t=new ia(t.diagnostics,r.value?Ag.open:null,t.selected):r.is(KT)&&(t=new ia(t.diagnostics,t.panel,r.value));return t},provide:t=>[zc.from(t,e=>e.panel),Ee.decorations.from(t,e=>e.diagnostics)]}),HB=Ne.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function KB(t,e,r){let{diagnostics:n}=t.state.field(ti),i=[],o=2e8,s=0;n.between(e-(r<0?1:0),e+(r>0?1:0),(l,c,{spec:u})=>{e>=l&&e<=c&&(l==c||(e>l||r>0)&&(e<c||r<0))&&(i.push(u.diagnostic),o=Math.min(l,o),s=Math.max(c,s))});let a=t.state.facet(da).tooltipFilter;return a&&(i=a(i,t.state)),i.length?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create(){return{dom:JB(t,i)}}}:null}function JB(t,e){return or("ul",{class:"cm-tooltip-lint"},e.map(r=>eR(t,r,!1)))}const e7=t=>{let e=t.state.field(ti,!1);(!e||!e.panel)&&t.dispatch({effects:HT(t.state,[O1.of(!0)])});let r=Yc(t,Ag.open);return r&&r.dom.querySelector(".cm-panel-lint ul").focus(),!0},PP=t=>{let e=t.state.field(ti,!1);return!e||!e.panel?!1:(t.dispatch({effects:O1.of(!1)}),!0)},t7=t=>{let e=t.state.field(ti,!1);if(!e)return!1;let r=t.state.selection.main,n=e.diagnostics.iter(r.to+1);return!n.value&&(n=e.diagnostics.iter(0),!n.value||n.from==r.from&&n.to==r.to)?!1:(t.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)},r7=nr.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(da);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let t=Date.now();if(t<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-t);else{this.set=!1;let{state:e}=this.view,{sources:r}=e.facet(da);r.length&&Promise.all(r.map(n=>Promise.resolve(n(this.view)))).then(n=>{let i=n.reduce((o,s)=>o.concat(s));this.view.state.doc==e.doc&&this.view.dispatch(GB(this.view.state,i))},n=>{Tn(this.view.state,n)})}}update(t){let e=t.state.facet(da);(t.docChanged||e!=t.startState.facet(da)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),da=Ie.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Vi(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,r)=>e?r?n=>e(n)||r(n):e:r}))}});function n7(t,e={}){return[da.of({source:t,config:e}),r7,tR]}function JT(t){let e=[];if(t)e:for(let{name:r}of t){for(let n=0;n<r.length;n++){let i=r[n];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function eR(t,e,r){var n;let i=r?JT(e.actions):[];return or("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},or("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(n=e.actions)===null||n===void 0?void 0:n.map((o,s)=>{let a=!1,l=h=>{if(h.preventDefault(),a)return;a=!0;let d=Jl(t.state.field(ti).diagnostics,e);d&&o.apply(t,d.from,d.to)},{name:c}=o,u=i[s]?c.indexOf(i[s]):-1,f=u<0?c:[c.slice(0,u),or("u",c.slice(u,u+1)),c.slice(u+1)];return or("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[s]})"`}.`},f)}),e.source&&or("div",{class:"cm-diagnosticSource"},e.source))}class i7 extends ki{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return or("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class kP{constructor(e,r){this.diagnostic=r,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=eR(e,r,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Ag{constructor(e){this.view=e,this.items=[];let r=i=>{if(i.keyCode==27)PP(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=JT(o.actions);for(let a=0;a<s.length;a++)if(s[a].toUpperCase().charCodeAt(0)==i.keyCode){let l=Jl(this.view.state.field(ti).diagnostics,o);l&&o.actions[a].apply(e,l.from,l.to)}}else return;i.preventDefault()},n=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=or("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:r,onclick:n}),this.dom=or("div",{class:"cm-panel-lint"},this.list,or("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>PP(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(ti).selected;if(!e)return-1;for(let r=0;r<this.items.length;r++)if(this.items[r].diagnostic==e.diagnostic)return r;return-1}update(){let{diagnostics:e,selected:r}=this.view.state.field(ti),n=0,i=!1,o=null;for(e.between(0,this.view.state.doc.length,(s,a,{spec:l})=>{let c=-1,u;for(let f=n;f<this.items.length;f++)if(this.items[f].diagnostic==l.diagnostic){c=f;break}c<0?(u=new kP(this.view,l.diagnostic),this.items.splice(n,0,u),i=!0):(u=this.items[c],c>n&&(this.items.splice(n,c-n),i=!0)),r&&u.diagnostic==r.diagnostic?u.dom.hasAttribute("aria-selected")||(u.dom.setAttribute("aria-selected","true"),o=u):u.dom.hasAttribute("aria-selected")&&u.dom.removeAttribute("aria-selected"),n++});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new kP(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:a})=>{let l=a.height/this.list.offsetHeight;s.top<a.top?this.list.scrollTop-=(a.top-s.top)/l:s.bottom>a.bottom&&(this.list.scrollTop+=(s.bottom-a.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function r(){let n=e;e=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)r();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)r()}moveSelection(e){if(this.selectedIndex<0)return;let r=this.view.state.field(ti),n=Jl(r.diagnostics,this.items[e].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:KT.of(n)})}static open(e){return new Ag(e)}}function o7(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function Ph(t){return o7(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const s7=Ee.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ph("#d11")},".cm-lintRange-warning":{backgroundImage:Ph("orange")},".cm-lintRange-info":{backgroundImage:Ph("#999")},".cm-lintRange-hint":{backgroundImage:Ph("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),tR=[ti,Ee.decorations.compute([ti],t=>{let{selected:e,panel:r}=t.field(ti);return!e||!r||e.from==e.to?Ne.none:Ne.set([HB.range(e.from,e.to)])}),TZ(KB,{hideOn:zB}),s7],xP="500",a7={background:Mw,foreground:iT,caret:WI,selection:ZI,selectionMatch:NI,lineHighlight:II,gutterBackground:Mw,gutterForeground:DI,gutterActiveForeground:qI};function l7(t){const{theme:e="dark",settings:r={},styles:n=[]}=t||{};return[xi({theme:e,settings:{...a7,...r},styles:[{tag:[S.keyword,S.operatorKeyword,S.modifier,S.color,S.constant(S.name),S.standard(S.name),S.standard(S.tagName),S.special(S.brace),S.atom,S.bool,S.special(S.variableName)],color:jw},{tag:[S.controlKeyword,S.moduleKeyword],color:jw},{tag:[S.name,S.deleted,S.character,S.macroName,S.variableName,S.labelName,S.definition(S.name)],color:Mu},{tag:[S.propertyName],color:qw},{tag:S.heading,fontWeight:xP,color:BI},{tag:[S.typeName,S.className,S.tagName,S.number,S.changed,S.annotation,S.self,S.namespace],color:Mu},{tag:[S.function(S.variableName),S.function(S.propertyName)],color:Mu},{tag:[S.number],color:LI},{tag:[S.operator,S.punctuation,S.separator,S.url,S.escape,S.regexp],color:iT},{tag:[S.regexp],color:Dw},{tag:[S.special(S.string),S.string,S.inserted],color:Dw},{tag:[S.processingInstruction],color:Mu},{tag:[S.angleBracket],color:Mu},{tag:S.strong,fontWeight:xP},{tag:S.emphasis,fontStyle:"italic"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:[S.meta,S.comment],color:jI},{tag:S.link,color:qw,textDecoration:"underline"},{tag:S.invalid,color:VI},...n]}),Ee.theme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"transparent",outline:"1px solid #888888"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"transparent",outline:"1px solid #ff2222"}},{dark:!0})]}const u7=l7(),rR=[{value:fI,label:"abcdef"},{value:pI,label:"dracula"},{value:mI,label:"eclipse"},{value:kI,label:"material"},{value:EI,label:"nord"},{value:oI,label:"oneDark"},{value:lI,label:"okaidia"},{value:wI,label:"github"},{value:RI,label:"xcode"},{value:u7,label:"vizhub"}],nR=rR.reduce((t,e)=>(t[e.label]=e,t),{}),c7="vizhub",f7=(t,e)=>{const r=N.useRef(!0);N.useEffect(()=>{if(r.current)r.current=!1;else for(const n of Array.from(t.values())){const{editor:i,themeCompartment:o}=n;i.dispatch({effects:o.reconfigure([nR[e].value])})}},[e,t])},h7=t=>{const e=N.useCallback(d=>{t({type:"set_active_file_id",activeFileId:d})},[t]),r=N.useCallback(()=>{t({type:"set_active_file_left"})},[t]),n=N.useCallback(()=>{t({type:"set_active_file_right"})},[t]),i=N.useCallback(d=>{t({type:"open_tab",fileId:d.fileId,isTransient:d.isTransient})},[t]),o=N.useCallback(d=>{t({type:"close_tabs",fileIdsToClose:d})},[t]),s=N.useCallback(d=>{t({type:"set_theme",themeLabel:d})},[t]),a=N.useCallback(d=>{t({type:"set_is_settings_open",value:d})},[t]),l=N.useCallback(d=>{t({type:"set_is_doc_open",value:d})},[t]),c=N.useCallback(()=>{a(!1)},[a]),u=N.useCallback(()=>{l(!1)},[l]),f=N.useCallback(()=>{t({type:"editor_no_longer_wants_focus"})},[t]),h=N.useCallback(d=>{t({type:"set_username",username:d})},[t]);return{setActiveFileId:e,setActiveFileLeft:r,setActiveFileRight:n,openTab:i,closeTabs:o,setTheme:s,setIsSettingsOpen:a,setIsDocOpen:l,closeSettings:c,closeDoc:u,editorNoLongerWantsFocus:f,setUsername:h}},d7=()=>{const[t,e]=N.useState(new Set),r=N.useCallback(i=>t.has(i),[t]),n=N.useCallback(i=>{const o=new Set(t);r(i)?o.delete(i):o.add(i),e(o)},[t,r]);return{isDirectoryOpen:r,toggleDirectory:n}},p7=8,nv=()=>{let t="";for(let e=0;e<p7;e++)t+=Math.floor(Math.random()*10);return t},g7=({submitOperation:t,closeTabs:e,openTab:r})=>{const n=N.useCallback((c,u="")=>{if(c){const f=nv();t(h=>({...h,files:{...h.files,[f]:{name:c,text:u}}})),r({fileId:f,isTransient:!1})}},[t]),i=N.useCallback((c,u=null)=>{if(c){c+="/";const f=nv();t(h=>({...h,files:{...h.files,[f]:{name:c,text:u}}}))}},[t]),o=N.useCallback((c,u)=>{t(f=>({...f,files:{...f.files,[c]:{...f.files[c],name:f.files[c].name.substring(0,f.files[c].name.lastIndexOf("/")+1)+u}}}))},[t]),s=N.useCallback((c,u,f)=>{console.log(c),console.log(u),t(h=>{const d=Object.keys(h.files).reduce((p,g)=>{const m=h.files[g],y=m.name;if(y.includes(c+"/")){const v=y.substring(0,y.indexOf(c)+c.length).lastIndexOf(u),b=y.substring(0,v)+f+y.substring(v+u.length);p[g]={...m,name:b}}else p[g]=m;return p},{});return{...h,files:d}})},[t]),a=N.useCallback(c=>{e([c]),t(u=>{const f={...u.files};return delete f[c],{...u,files:f}})},[t,e]),l=N.useCallback(c=>{const u=[];t(f=>{const h={...f.files};for(const d in h)h[d].name.includes(c+"/")&&(u.push(d),delete h[d]);return{...f,files:h}}),e(u)},[t,e]);return{createFile:n,renameFile:o,deleteFile:a,createDirectory:i,renameDirectory:s,deleteDirectory:l}},O7=()=>N.useRef(new Map).current;/**
|
|
89
|
+
* @remix-run/router v1.16.1
|
|
90
|
+
*
|
|
91
|
+
* Copyright (c) Remix Software Inc.
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the MIT license found in the
|
|
94
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
95
|
+
*
|
|
96
|
+
* @license MIT
|
|
97
|
+
*/function nf(){return nf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},nf.apply(this,arguments)}var pa;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(pa||(pa={}));const _P="popstate";function m7(t){t===void 0&&(t={});function e(n,i){let{pathname:o,search:s,hash:a}=n.location;return iv("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:iR(i)}return v7(e,r,null,t)}function go(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function y7(){return Math.random().toString(36).substr(2,8)}function $P(t,e){return{usr:t.state,key:t.key,idx:e}}function iv(t,e,r,n){return r===void 0&&(r=null),nf({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Mg(e):e,{state:r,key:e&&e.key||n||y7()})}function iR(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Mg(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function v7(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,s=i.history,a=pa.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(nf({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function f(){a=pa.Pop;let m=u(),y=m==null?null:m-c;c=m,l&&l({action:a,location:g.location,delta:y})}function h(m,y){a=pa.Push;let O=iv(g.location,m,y);r&&r(O,m),c=u()+1;let v=$P(O,c),b=g.createHref(O);try{s.pushState(v,"",b)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(b)}o&&l&&l({action:a,location:g.location,delta:1})}function d(m,y){a=pa.Replace;let O=iv(g.location,m,y);r&&r(O,m),c=u();let v=$P(O,c),b=g.createHref(O);s.replaceState(v,"",b),o&&l&&l({action:a,location:g.location,delta:0})}function p(m){let y=i.location.origin!=="null"?i.location.origin:i.location.href,O=typeof m=="string"?m:iR(m);return O=O.replace(/ $/,"%20"),go(y,"No window.location.(origin|href) available to create URL for href: "+O),new URL(O,y)}let g={get action(){return a},get location(){return t(i,s)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(_P,f),l=m,()=>{i.removeEventListener(_P,f),l=null}},createHref(m){return e(i,m)},createURL:p,encodeLocation(m){let y=p(m);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:d,go(m){return s.go(m)}};return g}var CP;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(CP||(CP={}));function b7(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function S7(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Mg(t):t;return{pathname:r?r.startsWith("/")?r:w7(r,e):e,search:$7(n),hash:C7(i)}}function w7(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function NO(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function P7(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function k7(t,e){let r=P7(t);return e?r.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function x7(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Mg(t):(i=nf({},t),go(!i.pathname||!i.pathname.includes("?"),NO("?","pathname","search",i)),go(!i.pathname||!i.pathname.includes("#"),NO("#","pathname","hash",i)),go(!i.search||!i.search.includes("#"),NO("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=r;else{let f=e.length-1;if(!n&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?e[f]:"/"}let l=S7(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const _7=t=>t.join("/").replace(/\/\/+/g,"/"),$7=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,C7=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,oR=["post","put","patch","delete"];new Set(oR);const E7=["get",...oR];new Set(E7);/**
|
|
98
|
+
* React Router v6.23.1
|
|
99
|
+
*
|
|
100
|
+
* Copyright (c) Remix Software Inc.
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the MIT license found in the
|
|
103
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
104
|
+
*
|
|
105
|
+
* @license MIT
|
|
106
|
+
*/function Lp(){return Lp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Lp.apply(this,arguments)}const sR=N.createContext(null),m1=N.createContext(null),y1=N.createContext(null),v1=N.createContext({outlet:null,matches:[],isDataRoute:!1});function b1(){return N.useContext(y1)!=null}function aR(){return b1()||go(!1),N.useContext(y1).location}function lR(t){N.useContext(m1).static||N.useLayoutEffect(t)}function Q7(){let{isDataRoute:t}=N.useContext(v1);return t?j7():T7()}function T7(){b1()||go(!1);let t=N.useContext(sR),{basename:e,future:r,navigator:n}=N.useContext(m1),{matches:i}=N.useContext(v1),{pathname:o}=aR(),s=JSON.stringify(k7(i,r.v7_relativeSplatPath)),a=N.useRef(!1);return lR(()=>{a.current=!0}),N.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let f=x7(c,JSON.parse(s),o,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:_7([e,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[e,n,s,o,t])}var uR=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(uR||{}),cR=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(cR||{});function R7(t){let e=N.useContext(sR);return e||go(!1),e}function A7(t){let e=N.useContext(v1);return e||go(!1),e}function M7(t){let e=A7(),r=e.matches[e.matches.length-1];return r.route.id||go(!1),r.route.id}function j7(){let{router:t}=R7(uR.UseNavigateStable),e=M7(cR.UseNavigateStable),r=N.useRef(!1);return lR(()=>{r.current=!0}),N.useCallback(function(i,o){o===void 0&&(o={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Lp({fromRouteId:e},o)))},[t,e])}function D7(t){let{basename:e="/",children:r=null,location:n,navigationType:i=pa.Pop,navigator:o,static:s=!1,future:a}=t;b1()&&go(!1);let l=e.replace(/^\/*/,"/"),c=N.useMemo(()=>({basename:l,navigator:o,static:s,future:Lp({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof n=="string"&&(n=Mg(n));let{pathname:u="/",search:f="",hash:h="",state:d=null,key:p="default"}=n,g=N.useMemo(()=>{let m=b7(u,l);return m==null?null:{location:{pathname:m,search:f,hash:h,state:d,key:p},navigationType:i}},[l,u,f,h,d,p,i]);return g==null?null:N.createElement(m1.Provider,{value:c},N.createElement(y1.Provider,{children:r,value:g}))}new Promise(()=>{});/**
|
|
107
|
+
* React Router DOM v6.23.1
|
|
108
|
+
*
|
|
109
|
+
* Copyright (c) Remix Software Inc.
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the MIT license found in the
|
|
112
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
113
|
+
*
|
|
114
|
+
* @license MIT
|
|
115
|
+
*/function ov(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,r)=>{let n=t[r];return e.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function q7(t,e){let r=ov(t);return e&&e.forEach((n,i)=>{r.has(i)||e.getAll(i).forEach(o=>{r.append(i,o)})}),r}const Z7="6";try{window.__reactRouterVersion=Z7}catch{}const N7="startTransition",EP=hM[N7];function I7(t){let{basename:e,children:r,future:n,window:i}=t,o=N.useRef();o.current==null&&(o.current=m7({window:i,v5Compat:!0}));let s=o.current,[a,l]=N.useState({action:s.action,location:s.location}),{v7_startTransition:c}=n||{},u=N.useCallback(f=>{c&&EP?EP(()=>l(f)):l(f)},[l,c]);return N.useLayoutEffect(()=>s.listen(u),[s,u]),N.createElement(D7,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:s,future:n})}var QP;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(QP||(QP={}));var TP;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(TP||(TP={}));function W7(t){let e=N.useRef(ov(t)),r=N.useRef(!1),n=aR(),i=N.useMemo(()=>q7(n.search,r.current?null:e.current),[n.search]),o=Q7(),s=N.useCallback((a,l)=>{const c=ov(typeof a=="function"?a(i):a);r.current=!0,o("?"+c,l)},[o,i]);return[i,s]}const fR="~",RP=(t,e)=>{if(t&&t.files){for(const r of Object.keys(t.files))if(t.files[r].name===e)return r}return null},AP=(t,e)=>{if(t&&t.files){const r=t.files[e];if(r)return r.name}return null},B7=({tabStateParams:t,content:e})=>{const{file:r,tabs:n}=t,i=[],o=RP(e,r);return n?n.split(fR).forEach(s=>{const a=RP(e,s);a&&i.push({fileId:a})}):o&&i.push({fileId:o}),{tabList:i,activeFileId:o}},L7=({tabList:t,activeFileId:e,content:r})=>{const n=AP(r,e),i={};if(n&&(i.file=n,t.length>1)){const o=t.map(s=>AP(r,s.fileId)).join(fR);i.tabs=o}return i},V7=({content:t,openTab:e,setActiveFileId:r,tabList:n,activeFileId:i})=>{const[o,s]=W7(),a=N.useMemo(()=>({file:o.get("file"),tabs:o.get("tabs")}),[o]),l=N.useRef(!1);N.useEffect(()=>{if(l.current||!t)return;const{tabList:f,activeFileId:h}=B7({tabStateParams:a,content:t});l.current=!0,f.forEach(e),r(h)},[t,o,r,e,l]);const c=N.useRef(t);N.useEffect(()=>{c.current=t},[t]);const u=N.useRef(s);N.useEffect(()=>{u.current=s},[s]),N.useEffect(()=>{if(!c.current)return;const f=L7({tabList:n,activeFileId:i,content:c.current});u.current(h=>{const d=new URLSearchParams(h);return f.file?d.set("file",f.file):d.delete("file"),f.tabs?d.set("tabs",f.tabs):d.delete("tabs"),d})},[n,i])},X7=t=>{const r=/Mac|iMac|MacBook/i.test(navigator.userAgent)?t.metaKey:t.ctrlKey;return r&&t.key==="s"?!0:!!(t.key==="F5"||r&&t.key==="Enter"||t.shiftKey&&t.key==="Enter"||t.altKey&&t.key==="Enter"||r&&t.shiftKey&&(t.key==="B"||t.key==="b")||r&&t.shiftKey&&t.key==="F10"||t.key==="F8"||t.key==="F9")};let Ci=null,kh=null;const hR=new Set(["FunctionDeclaration","ClassDeclaration","MethodDeclaration","Block","IfStatement","ForStatement","WhileStatement","SwitchStatement","TryStatement","CatchClause","WithStatement","ArrowFunction","ImportGroup"]),F7=new Set(["VariableDeclaration","FunctionDeclaration","ClassDeclaration","MethodDeclaration","PropertyDeclaration","ImportDeclaration","ExportDeclaration","CallExpression","ArrayPattern","ObjectPattern","PatternProperty","ArgList","TypeArgList","ParamList","ForOfSpec"]);function MP(t){let e=t,r=0;for(;e&&e.type;){const n=e.type.name;hR.has(n)&&r++,e=e.parent}return r}function U7(t,e){const r=t.state,n=[],i=e,o=r.doc.sliceString(i.from,i.to),s=MP(i);if(i){if(pr(r).iterate({enter(a){if(F7.has(a.name)||hR.has(a.name)){const l=a.node;[...l.getChildren("VariableDefinition"),...l.getChildren("PropertyDefinition"),...l.getChildren("PropertyName"),...l.getChildren("Identifier")].forEach(u=>{r.doc.sliceString(u.from,u.to)===o&&u.type.id!==i.type.id&&n.push({identifier:u,context:MP(u)})})}}}),n.length>0){n.sort((l,c)=>l.context-c.context);let a=n[0].identifier;for(let l=n.length-1;l>=0;l--)if(n[l].context<=s){a=n[l].identifier;break}return a}return null}}const Y7=({closeTabs:t,activeFileId:e,handleOpenCreateFileModal:r,setActiveFileLeft:n,setActiveFileRight:i,runPrettierRef:o,runCodeRef:s,sidebarRef:a,editorCache:l,codeEditorRef:c})=>{N.useEffect(()=>{const u=g=>{if(X7(g)){g.preventDefault();const m=o.current;m!==null&&m();const y=s.current;y!==null&&y();return}if(g.ctrlKey===!0&&document.addEventListener("mouseover",p),g.altKey===!0){if(g.key==="w"){t([e]);return}if(g.key==="n"){r();return}if(g.key==="PageUp"){n();return}if(g.key==="PageDown"){i();return}g.key==="1"&&a.current&&a.current.focus(),g.key==="2"&&c.current&&c.current.focus()}},f=()=>{Ci&&(Ci.style.cursor="initial",Ci.style.textDecoration="none",Ci=kh=null),document.removeEventListener("mouseover",p),document.removeEventListener("mousedown",h)},h=g=>{if(!kh||g.target!==Ci)return;const m=l.get(e).editor,y=kh;m.dispatch({selection:{anchor:y.from,head:y.to},scrollIntoView:!0,effects:Ee.scrollIntoView(y.from,{y:"center"})}),f()},d=g=>{g.ctrlKey||f()},p=g=>{const m=l.get(e).editor,y=pr(m.state),O=g.target;if(O==null||!m.dom.contains(O))return;const v=m.posAtDOM(O),b=y.resolveInner(v,1);if(b&&O instanceof HTMLSpanElement){const w=U7(m,b);w&&b.type.id!==w.type.id&&(Ci&&(Ci.style.cursor="initial",Ci.style.textDecoration="none"),Ci=O,kh=w,Ci.style.cursor="pointer",Ci.style.textDecoration="underline",document.addEventListener("mousedown",h,{once:!0}))}};return document.addEventListener("keydown",u),document.addEventListener("keyup",d),()=>{document.removeEventListener("keydown",u),document.removeEventListener("keyup",d)}},[r,t,e,n,i])},z7=t=>{const e=N.useRef(null);return N.useEffect(()=>{const r=()=>{t(n=>({...n,isInteracting:!0})),setTimeout(()=>{t(({isInteracting:n,...i})=>i)},0)};e.current=r},[t]),e},Hr=N.createContext(null),G7=({content:t,shareDBDoc:e,submitOperation:r,localPresence:n,docPresence:i,prettierWorker:o,typeScriptWorker:s,initialUsername:a,children:l,codeError:c=null,connected:u})=>{const{prettierError:f,runPrettierRef:h}=j5({shareDBDoc:e,submitOperation:r,prettierWorker:o}),d=z7(r),p=N.useRef(null),g=N.useRef(null),m=f||c;Z5({content:t,typeScriptWorker:s});const[y,O]=N.useReducer(H5,{defaultTheme:c7,initialUsername:a},z5),{tabList:v,activeFileId:b,theme:w,isSettingsOpen:_,isDocOpen:C,editorWantsFocus:P,username:k}=y,{setActiveFileId:x,setActiveFileLeft:E,setActiveFileRight:R,openTab:I,closeTabs:F,setTheme:H,setIsSettingsOpen:M,setIsDocOpen:B,closeSettings:D,closeDoc:X,editorNoLongerWantsFocus:G,setUsername:se}=h7(O);V7({content:t,openTab:I,setActiveFileId:x,tabList:v,activeFileId:b});const{isDirectoryOpen:ce,toggleDirectory:U}=d7(),K=O7();f7(K,w);const{createFile:oe,renameFile:Re,deleteFile:T,createDirectory:Z,renameDirectory:V,deleteDirectory:ne}=g7({submitOperation:r,closeTabs:F,openTab:I}),[fe,ge]=N.useState(!1),he=N.useCallback(()=>{ge(!0)},[]),we=N.useCallback(()=>{ge(!1)},[]),Ae=N.useCallback(pe=>{oe(pe),ge(!1)},[oe,ge]),[it,kt]=N.useState(!1),gr=N.useCallback(()=>{kt(!0)},[]),Ft=N.useCallback(()=>{kt(!1)},[]),er=N.useCallback(pe=>{Z(pe),kt(!1)},[Z,kt]),xn=t?t.files:null;Y7({closeTabs:F,activeFileId:b,handleOpenCreateFileModal:he,setActiveFileLeft:E,setActiveFileRight:R,runPrettierRef:h,runCodeRef:d,sidebarRef:p,editorCache:K,codeEditorRef:g});const[Pr,$]=N.useState(null),te={content:t,shareDBDoc:e,submitOperation:r,localPresence:n,docPresence:i,files:xn,createFile:oe,renameFile:Re,deleteFile:T,createDirectory:Z,renameDirectory:V,deleteDirectory:ne,activeFileId:b,setActiveFileId:x,setActiveFileLeft:E,setActiveFileRight:R,tabList:v,openTab:I,closeTabs:F,isSettingsOpen:_,setIsSettingsOpen:M,closeSettings:D,isDocOpen:C,setIsDocOpen:B,closeDoc:X,theme:w,setTheme:H,username:k,setUsername:se,isDirectoryOpen:ce,toggleDirectory:U,editorCache:K,editorWantsFocus:P,editorNoLongerWantsFocus:G,errorMessage:m,typeScriptWorker:s,isCreateFileModalOpen:fe,handleOpenCreateFileModal:he,handleCloseCreateFileModal:we,handleCreateFileClick:Ae,isCreateDirModalOpen:it,handleOpenCreateDirModal:gr,handleCloseCreateDirModal:Ft,handleCreateDirClick:er,runPrettierRef:h,runCodeRef:d,sidebarRef:p,codeEditorRef:g,connected:u,hoveredItemId:Pr,setHoveredItemId:$};return q.jsx(Hr.Provider,{value:te,children:l})},H7=20,K7=200,jP=4,DP=({side:t,isSidebarVisible:e=!0})=>{const{sidebarWidth:r,codeEditorWidth:n,moveSplitPane:i,isDraggingRight:o,isDraggingLeft:s,setIsDragging:a}=N.useContext(kg),{activeFileId:l}=N.useContext(Hr),c=t==="left"||l,u=N.useRef(0),f=N.useCallback(y=>{y.preventDefault(),u.current=y.clientX,a(!0,t),document.body.style.cursor="col-resize"},[a,t]),h=N.useCallback(y=>{y.preventDefault();const O=y.clientX-u.current;u.current=y.clientX,i(O,t)},[i,t]),d=N.useCallback(()=>{a(!1,t),document.body.style.cursor="default"},[a,t]),p=t==="left"&&s||t==="right"&&o;N.useEffect(()=>{if(p)return document.addEventListener("mousemove",h),document.addEventListener("mouseup",d),()=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",d)}},[p,h,d]);const g=p?K7:H7,m=(t==="left"?r:e?r+n:n)-g/2;return c?q.jsx("div",{className:"vz-resizer",onMouseDown:f,style:{left:m+g/2-1.5,width:g},children:q.jsx("div",{className:"vz-resizer-thumb",style:{left:jP/2-1.5,width:jP}})}):null},J7="vzCodeUsername",e3="Anonymous",t3=()=>{let t=e3;if(typeof window<"u"){const e=window.localStorage.getItem(J7);e!==null&&(t=e)}return t},r3=t=>{const e=N.useRef(t);N.useEffect(()=>{e.current!==t&&(e.current=t,window.localStorage.setItem("vzCodeUsername",t))},[t])};var qP=Object.prototype.toString,dR=function(e){var r=qP.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&qP.call(e.callee)==="[object Function]"),n},IO,ZP;function n3(){if(ZP)return IO;ZP=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=dR,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(h){var d=h.constructor;return d&&d.prototype===h},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if(typeof window>"u")return!1;for(var h in window)try{if(!c["$"+h]&&e.call(window,h)&&window[h]!==null&&typeof window[h]=="object")try{l(window[h])}catch{return!0}}catch{return!0}return!1}(),f=function(h){if(typeof window>"u"||!u)return l(h);try{return l(h)}catch{return!1}};t=function(d){var p=d!==null&&typeof d=="object",g=r.call(d)==="[object Function]",m=n(d),y=p&&r.call(d)==="[object String]",O=[];if(!p&&!g&&!m)throw new TypeError("Object.keys called on a non-object");var v=s&&g;if(y&&d.length>0&&!e.call(d,0))for(var b=0;b<d.length;++b)O.push(String(b));if(m&&d.length>0)for(var w=0;w<d.length;++w)O.push(String(w));else for(var _ in d)!(v&&_==="prototype")&&e.call(d,_)&&O.push(String(_));if(o)for(var C=f(d),P=0;P<a.length;++P)!(C&&a[P]==="constructor")&&e.call(d,a[P])&&O.push(a[P]);return O}}return IO=t,IO}var i3=Array.prototype.slice,o3=dR,NP=Object.keys,Ud=NP?function(e){return NP(e)}:n3(),IP=Object.keys;Ud.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return o3(n)?IP(i3.call(n)):IP(n)})}else Object.keys=Ud;return Object.keys||Ud};var pR=Ud,gR=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0},s3=gR,S1=function(){return s3()&&!!Symbol.toStringTag},a3=Error,l3=EvalError,u3=RangeError,c3=ReferenceError,OR=SyntaxError,hu=TypeError,f3=URIError,WP=typeof Symbol<"u"&&Symbol,h3=gR,d3=function(){return typeof WP!="function"||typeof Symbol!="function"||typeof WP("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:h3()},WO={__proto__:null,foo:{}},p3=Object,g3=function(){return{__proto__:WO}.foo===WO.foo&&!(WO instanceof p3)},O3="Function.prototype.bind called on incompatible ",m3=Object.prototype.toString,y3=Math.max,v3="[object Function]",BP=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var o=0;o<r.length;o+=1)n[o+e.length]=r[o];return n},b3=function(e,r){for(var n=[],i=r||0,o=0;i<e.length;i+=1,o+=1)n[o]=e[i];return n},S3=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},w3=function(e){var r=this;if(typeof r!="function"||m3.apply(r)!==v3)throw new TypeError(O3+r);for(var n=b3(arguments,1),i,o=function(){if(this instanceof i){var u=r.apply(this,BP(n,arguments));return Object(u)===u?u:this}return r.apply(e,BP(n,arguments))},s=y3(0,r.length-n.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(i=Function("binder","return function ("+S3(a,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var c=function(){};c.prototype=r.prototype,i.prototype=new c,c.prototype=null}return i},P3=w3,w1=Function.prototype.bind||P3,k3=Function.prototype.call,x3=Object.prototype.hasOwnProperty,_3=w1,$3=_3.call(k3,x3),Qt,C3=a3,E3=l3,Q3=u3,T3=c3,eu=OR,jl=hu,R3=f3,mR=Function,BO=function(t){try{return mR('"use strict"; return ('+t+").constructor;")()}catch{}},ma=Object.getOwnPropertyDescriptor;if(ma)try{ma({},"")}catch{ma=null}var LO=function(){throw new jl},A3=ma?function(){try{return arguments.callee,LO}catch{try{return ma(arguments,"callee").get}catch{return LO}}}():LO,Va=d3(),M3=g3(),rn=Object.getPrototypeOf||(M3?function(t){return t.__proto__}:null),il={},j3=typeof Uint8Array>"u"||!rn?Qt:rn(Uint8Array),ya={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Qt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Qt:ArrayBuffer,"%ArrayIteratorPrototype%":Va&&rn?rn([][Symbol.iterator]()):Qt,"%AsyncFromSyncIteratorPrototype%":Qt,"%AsyncFunction%":il,"%AsyncGenerator%":il,"%AsyncGeneratorFunction%":il,"%AsyncIteratorPrototype%":il,"%Atomics%":typeof Atomics>"u"?Qt:Atomics,"%BigInt%":typeof BigInt>"u"?Qt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Qt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Qt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Qt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":C3,"%eval%":eval,"%EvalError%":E3,"%Float32Array%":typeof Float32Array>"u"?Qt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Qt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Qt:FinalizationRegistry,"%Function%":mR,"%GeneratorFunction%":il,"%Int8Array%":typeof Int8Array>"u"?Qt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Qt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Qt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Va&&rn?rn(rn([][Symbol.iterator]())):Qt,"%JSON%":typeof JSON=="object"?JSON:Qt,"%Map%":typeof Map>"u"?Qt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Va||!rn?Qt:rn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Qt:Promise,"%Proxy%":typeof Proxy>"u"?Qt:Proxy,"%RangeError%":Q3,"%ReferenceError%":T3,"%Reflect%":typeof Reflect>"u"?Qt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Qt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Va||!rn?Qt:rn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Qt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Va&&rn?rn(""[Symbol.iterator]()):Qt,"%Symbol%":Va?Symbol:Qt,"%SyntaxError%":eu,"%ThrowTypeError%":A3,"%TypedArray%":j3,"%TypeError%":jl,"%Uint8Array%":typeof Uint8Array>"u"?Qt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Qt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Qt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Qt:Uint32Array,"%URIError%":R3,"%WeakMap%":typeof WeakMap>"u"?Qt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Qt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Qt:WeakSet};if(rn)try{null.error}catch(t){var D3=rn(rn(t));ya["%Error.prototype%"]=D3}var q3=function t(e){var r;if(e==="%AsyncFunction%")r=BO("async function () {}");else if(e==="%GeneratorFunction%")r=BO("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=BO("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&rn&&(r=rn(i.prototype))}return ya[e]=r,r},LP={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Cf=w1,Vp=$3,Z3=Cf.call(Function.call,Array.prototype.concat),N3=Cf.call(Function.apply,Array.prototype.splice),VP=Cf.call(Function.call,String.prototype.replace),Xp=Cf.call(Function.call,String.prototype.slice),I3=Cf.call(Function.call,RegExp.prototype.exec),W3=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,B3=/\\(\\)?/g,L3=function(e){var r=Xp(e,0,1),n=Xp(e,-1);if(r==="%"&&n!=="%")throw new eu("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new eu("invalid intrinsic syntax, expected opening `%`");var i=[];return VP(e,W3,function(o,s,a,l){i[i.length]=a?VP(l,B3,"$1"):s||o}),i},V3=function(e,r){var n=e,i;if(Vp(LP,n)&&(i=LP[n],n="%"+i[0]+"%"),Vp(ya,n)){var o=ya[n];if(o===il&&(o=q3(n)),typeof o>"u"&&!r)throw new jl("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new eu("intrinsic "+e+" does not exist!")},Ef=function(e,r){if(typeof e!="string"||e.length===0)throw new jl("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new jl('"allowMissing" argument must be a boolean');if(I3(/^%?[^%]*%?$/,e)===null)throw new eu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=L3(e),i=n.length>0?n[0]:"",o=V3("%"+i+"%",r),s=o.name,a=o.value,l=!1,c=o.alias;c&&(i=c[0],N3(n,Z3([0,1],c)));for(var u=1,f=!0;u<n.length;u+=1){var h=n[u],d=Xp(h,0,1),p=Xp(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new eu("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(l=!0),i+="."+h,s="%"+i+"%",Vp(ya,s))a=ya[s];else if(a!=null){if(!(h in a)){if(!r)throw new jl("base intrinsic for "+e+" exists, but the property is not available.");return}if(ma&&u+1>=n.length){var g=ma(a,h);f=!!g,f&&"get"in g&&!("originalValue"in g.get)?a=g.get:a=a[h]}else f=Vp(a,h),a=a[h];f&&!l&&(ya[s]=a)}}return a},yR={exports:{}},X3=Ef,Yd=X3("%Object.defineProperty%",!0)||!1;if(Yd)try{Yd({},"a",{value:1})}catch{Yd=!1}var P1=Yd,F3=Ef,zd=F3("%Object.getOwnPropertyDescriptor%",!0);if(zd)try{zd([],"length")}catch{zd=null}var vR=zd,XP=P1,U3=OR,Xa=hu,FP=vR,k1=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Xa("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Xa("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Xa("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Xa("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Xa("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Xa("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!FP&&FP(e,r);if(XP)XP(e,r,{configurable:s===null&&l?l.configurable:!s,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:o===null&&l?l.writable:!o});else if(a||!i&&!o&&!s)e[r]=n;else throw new U3("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},sv=P1,bR=function(){return!!sv};bR.hasArrayLengthDefineBug=function(){if(!sv)return null;try{return sv([],"length",{value:1}).length!==1}catch{return!0}};var x1=bR,Y3=Ef,UP=k1,z3=x1(),YP=vR,zP=hu,G3=Y3("%Math.floor%"),H3=function(e,r){if(typeof e!="function")throw new zP("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||G3(r)!==r)throw new zP("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&YP){var s=YP(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!n)&&(z3?UP(e,"length",r,!0,!0):UP(e,"length",r)),e};(function(t){var e=w1,r=Ef,n=H3,i=hu,o=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(s,o),l=P1,c=r("%Math.max%");t.exports=function(h){if(typeof h!="function")throw new i("a function is required");var d=a(e,s,arguments);return n(d,1+c(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(e,o,arguments)};l?l(t.exports,"apply",{value:u}):t.exports.apply=u})(yR);var _1=yR.exports,SR=Ef,wR=_1,K3=wR(SR("String.prototype.indexOf")),PR=function(e,r){var n=SR(e,!!r);return typeof n=="function"&&K3(e,".prototype.")>-1?wR(n):n},J3=S1(),eL=PR,av=eL("Object.prototype.toString"),jg=function(e){return J3&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:av(e)==="[object Arguments]"},kR=function(e){return jg(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&av(e)!=="[object Array]"&&av(e.callee)==="[object Function]"},tL=function(){return jg(arguments)}();jg.isLegacyArguments=kR;var rL=tL?jg:kR,nL=pR,iL=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",oL=Object.prototype.toString,sL=Array.prototype.concat,GP=k1,aL=function(t){return typeof t=="function"&&oL.call(t)==="[object Function]"},xR=x1(),lL=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!aL(n)||!n())return}xR?GP(t,e,r,!0):GP(t,e,r)},_R=function(t,e){var r=arguments.length>2?arguments[2]:{},n=nL(e);iL&&(n=sL.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)lL(t,n[i],e[n[i]],r[n[i]])};_R.supportsDescriptors=!!xR;var Qf=_R,HP=function(t){return t!==t},$R=function(e,r){return e===0&&r===0?1/e===1/r:!!(e===r||HP(e)&&HP(r))},uL=$R,CR=function(){return typeof Object.is=="function"?Object.is:uL},cL=CR,fL=Qf,hL=function(){var e=cL();return fL(Object,{is:e},{is:function(){return Object.is!==e}}),e},dL=Qf,pL=_1,gL=$R,ER=CR,OL=hL,QR=pL(ER(),Object);dL(QR,{getPolyfill:ER,implementation:gL,shim:OL});var mL=QR,lv=PR,TR=S1(),RR,AR,uv,cv;if(TR){RR=lv("Object.prototype.hasOwnProperty"),AR=lv("RegExp.prototype.exec"),uv={};var VO=function(){throw uv};cv={toString:VO,valueOf:VO},typeof Symbol.toPrimitive=="symbol"&&(cv[Symbol.toPrimitive]=VO)}var yL=lv("Object.prototype.toString"),vL=Object.getOwnPropertyDescriptor,bL="[object RegExp]",SL=TR?function(e){if(!e||typeof e!="object")return!1;var r=vL(e,"lastIndex"),n=r&&RR(r,"value");if(!n)return!1;try{AR(e,cv)}catch(i){return i===uv}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:yL(e)===bL},of=function(){return typeof(function(){}).name=="string"},Sc=Object.getOwnPropertyDescriptor;if(Sc)try{Sc([],"length")}catch{Sc=null}of.functionsHaveConfigurableNames=function(){if(!of()||!Sc)return!1;var e=Sc(function(){},"name");return!!e&&!!e.configurable};var wL=Function.prototype.bind;of.boundFunctionsHaveNames=function(){return of()&&typeof wL=="function"&&(function(){}).bind().name!==""};var PL=of,KP=k1,kL=x1(),xL=PL.functionsHaveConfigurableNames(),_L=hu,$L=function(e,r){if(typeof e!="function")throw new _L("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||xL)&&(kL?KP(e,"name",r,!0,!0):KP(e,"name",r)),e},CL=$L,EL=hu,QL=Object,MR=CL(function(){if(this==null||this!==QL(this))throw new EL("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},"get flags",!0),TL=MR,RL=Qf.supportsDescriptors,AL=Object.getOwnPropertyDescriptor,jR=function(){if(RL&&/a/mig.flags==="gim"){var e=AL(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),r==="dy")return e.get}}return TL},ML=Qf.supportsDescriptors,jL=jR,DL=Object.getOwnPropertyDescriptor,qL=Object.defineProperty,ZL=TypeError,JP=Object.getPrototypeOf,NL=/a/,IL=function(){if(!ML||!JP)throw new ZL("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=jL(),r=JP(NL),n=DL(r,"flags");return(!n||n.get!==e)&&qL(r,"flags",{configurable:!0,enumerable:!1,get:e}),e},WL=Qf,BL=_1,LL=MR,DR=jR,VL=IL,qR=BL(DR());WL(qR,{getPolyfill:DR,implementation:LL,shim:VL});var XL=qR,FL=Date.prototype.getDay,UL=function(e){try{return FL.call(e),!0}catch{return!1}},YL=Object.prototype.toString,zL="[object Date]",GL=S1(),HL=function(e){return typeof e!="object"||e===null?!1:GL?UL(e):YL.call(e)===zL},ek=pR,tk=rL,rk=mL,nk=SL,ik=XL,ok=HL,sk=Date.prototype.getTime;function ZR(t,e,r){var n=r||{};return(n.strict?rk(t,e):t===e)?!0:!t||!e||typeof t!="object"&&typeof e!="object"?n.strict?rk(t,e):t==e:KL(t,e,n)}function ak(t){return t==null}function lk(t){return!(!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number")}function KL(t,e,r){var n,i;if(typeof t!=typeof e||ak(t)||ak(e)||t.prototype!==e.prototype||tk(t)!==tk(e))return!1;var o=nk(t),s=nk(e);if(o!==s)return!1;if(o||s)return t.source===e.source&&ik(t)===ik(e);if(ok(t)&&ok(e))return sk.call(t)===sk.call(e);var a=lk(t),l=lk(e);if(a!==l)return!1;if(a||l){if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}if(typeof t!=typeof e)return!1;try{var c=ek(t),u=ek(e)}catch{return!1}if(c.length!==u.length)return!1;for(c.sort(),u.sort(),n=c.length-1;n>=0;n--)if(c[n]!=u[n])return!1;for(n=c.length-1;n>=0;n--)if(i=c[n],!ZR(t[i],e[i],r))return!1;return!0}var JL=ZR,fv=JL,hv;function uk(t,e,r,n,i){var o;return i?o=i.replaceOp(t,r,n):(o={p:t},o[e?"od":"ld"]=r,o[e?"oi":"li"]=n),[o]}function e4(t,e,r,n,i,o){const s=[];var a=hv.patch_make(e,r);return Object.keys(a).forEach(function(l){var c=a[l],u=c.start1;c.diffs.forEach(function([f,h]){switch(f){case n.DIFF_DELETE:if(o){var d=o.remove(u,h);s.push(i.editOp(t,o.type,d))}else s.push({sd:h,p:[...t,u]});break;case n.DIFF_INSERT:if(o){var d=o.insert(u,h);s.push(i.editOp(t,o.type,d))}else s.push({si:h,p:[...t,u]});case n.DIFF_EQUAL:u+=h.length;break;default:throw Error(`Unsupported operation type: ${f}`)}})}),s}var t4=function(t,e){if(e&&e.json1){var r=e.json1.type.compose;return t.reduce(r,null)}for(var n=0,i=t.length-1;n<i;++n){var o=t[n],s=t[n+1];fv(o.p.slice(0,-1),s.p.slice(0,-1))&&o.p[o.p.length-1]+1===s.p[s.p.length-1]&&(!o.li||!s.ld||fv(o.li,s.ld)&&(delete o.li,delete s.ld))}return t=t.filter(function(a){return Object.keys(a).length>1}),t},ic=function(t,e,r=[],n){var i=n&&n.diffMatchPatch,o=n&&n.json1,s=n&&n.textUnicode,a=typeof r[r.length-1]=="string"||r.length===0;if(fv(t,e)&&Array.isArray(t)===Array.isArray(e))return[];if(typeof e>"u"){var l;return o?l=o.removeOp(r,t):(l={p:r},l[a?"od":"ld"]=t),[l]}if(typeof t>"u"){var l;return o?l=o.insertOp(r,e):(l={p:r},l[a?"oi":"li"]=e),[l]}if(t===null||e===null){var y=[];if(o)y.push(o.removeOp(r,t)),y.push(o.insertOp(r,e));else{var c={p:r};c[a?"od":"ld"]=t;var u={p:r};u[a?"oi":"li"]=e,y=[c,u]}return y}if(i&&typeof t=="string"&&typeof e=="string")return hv||(hv=new i),e4(r,t,e,i,o,s);var f=["string","number","boolean"];if(f.includes(typeof e)||f.includes(typeof t))return uk(r,a,t,e,o);if(Array.isArray(e)&&Array.isArray(t)){for(var y=[],h=t.length,d=e.length,p=Math.min(h,d),y=[],g=0;g<p;++g){var m=ic(t[g],e[g],[...r,g],n);m.forEach(function(b){y.push(b)})}if(d>h)for(var g=p;g<d;g++){var m=ic(void 0,e[g],[...r,g],n);m.forEach(function(_){y.push(_)})}else if(d<h)for(var g=p;g<h;g++){var m=ic(t[g],void 0,[...r,p],n);m.forEach(function(_){y.push(_)})}return y}else if(Array.isArray(e)||Array.isArray(t))return uk(r,a,t,e,o);var y=[],O=new Set([...Object.keys(t),...Object.keys(e)]);return O.forEach(function(v){var b=ic(t[v],e[v],[...r,v],n);y=y.concat(b)}),y},r4=function(t,e,r,n,i){var o={diffMatchPatch:r,json1:n,textUnicode:i};return t4(ic(t,e,[],o),o)},n4=r4;const i4=Pi(n4);var NR={exports:{}};(function(t){var e=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,n=1,i=0;e.Diff=function(o,s){return[o,s]},e.prototype.diff_main=function(o,s,a,l){typeof l>"u"&&(this.Diff_Timeout<=0?l=Number.MAX_VALUE:l=new Date().getTime()+this.Diff_Timeout*1e3);var c=l;if(o==null||s==null)throw new Error("Null input. (diff_main)");if(o==s)return o?[new e.Diff(i,o)]:[];typeof a>"u"&&(a=!0);var u=a,f=this.diff_commonPrefix(o,s),h=o.substring(0,f);o=o.substring(f),s=s.substring(f),f=this.diff_commonSuffix(o,s);var d=o.substring(o.length-f);o=o.substring(0,o.length-f),s=s.substring(0,s.length-f);var p=this.diff_compute_(o,s,u,c);return h&&p.unshift(new e.Diff(i,h)),d&&p.push(new e.Diff(i,d)),this.diff_cleanupMerge(p),p},e.prototype.diff_compute_=function(o,s,a,l){var c;if(!o)return[new e.Diff(n,s)];if(!s)return[new e.Diff(r,o)];var u=o.length>s.length?o:s,f=o.length>s.length?s:o,h=u.indexOf(f);if(h!=-1)return c=[new e.Diff(n,u.substring(0,h)),new e.Diff(i,f),new e.Diff(n,u.substring(h+f.length))],o.length>s.length&&(c[0][0]=c[2][0]=r),c;if(f.length==1)return[new e.Diff(r,o),new e.Diff(n,s)];var d=this.diff_halfMatch_(o,s);if(d){var p=d[0],g=d[1],m=d[2],y=d[3],O=d[4],v=this.diff_main(p,m,a,l),b=this.diff_main(g,y,a,l);return v.concat([new e.Diff(i,O)],b)}return a&&o.length>100&&s.length>100?this.diff_lineMode_(o,s,l):this.diff_bisect_(o,s,l)},e.prototype.diff_lineMode_=function(o,s,a){var l=this.diff_linesToChars_(o,s);o=l.chars1,s=l.chars2;var c=l.lineArray,u=this.diff_main(o,s,!1,a);this.diff_charsToLines_(u,c),this.diff_cleanupSemantic(u),u.push(new e.Diff(i,""));for(var f=0,h=0,d=0,p="",g="";f<u.length;){switch(u[f][0]){case n:d++,g+=u[f][1];break;case r:h++,p+=u[f][1];break;case i:if(h>=1&&d>=1){u.splice(f-h-d,h+d),f=f-h-d;for(var m=this.diff_main(p,g,!1,a),y=m.length-1;y>=0;y--)u.splice(f,0,m[y]);f=f+m.length}d=0,h=0,p="",g="";break}f++}return u.pop(),u},e.prototype.diff_bisect_=function(o,s,a){for(var l=o.length,c=s.length,u=Math.ceil((l+c)/2),f=u,h=2*u,d=new Array(h),p=new Array(h),g=0;g<h;g++)d[g]=-1,p[g]=-1;d[f+1]=0,p[f+1]=0;for(var m=l-c,y=m%2!=0,O=0,v=0,b=0,w=0,_=0;_<u&&!(new Date().getTime()>a);_++){for(var C=-_+O;C<=_-v;C+=2){var P=f+C,k;C==-_||C!=_&&d[P-1]<d[P+1]?k=d[P+1]:k=d[P-1]+1;for(var x=k-C;k<l&&x<c&&o.charAt(k)==s.charAt(x);)k++,x++;if(d[P]=k,k>l)v+=2;else if(x>c)O+=2;else if(y){var E=f+m-C;if(E>=0&&E<h&&p[E]!=-1){var R=l-p[E];if(k>=R)return this.diff_bisectSplit_(o,s,k,x,a)}}}for(var I=-_+b;I<=_-w;I+=2){var E=f+I,R;I==-_||I!=_&&p[E-1]<p[E+1]?R=p[E+1]:R=p[E-1]+1;for(var F=R-I;R<l&&F<c&&o.charAt(l-R-1)==s.charAt(c-F-1);)R++,F++;if(p[E]=R,R>l)w+=2;else if(F>c)b+=2;else if(!y){var P=f+m-I;if(P>=0&&P<h&&d[P]!=-1){var k=d[P],x=f+k-P;if(R=l-R,k>=R)return this.diff_bisectSplit_(o,s,k,x,a)}}}}return[new e.Diff(r,o),new e.Diff(n,s)]},e.prototype.diff_bisectSplit_=function(o,s,a,l,c){var u=o.substring(0,a),f=s.substring(0,l),h=o.substring(a),d=s.substring(l),p=this.diff_main(u,f,!1,c),g=this.diff_main(h,d,!1,c);return p.concat(g)},e.prototype.diff_linesToChars_=function(o,s){var a=[],l={};a[0]="";function c(d){for(var p="",g=0,m=-1,y=a.length;m<d.length-1;){m=d.indexOf(`
|
|
116
|
+
`,g),m==-1&&(m=d.length-1);var O=d.substring(g,m+1);(l.hasOwnProperty?l.hasOwnProperty(O):l[O]!==void 0)?p+=String.fromCharCode(l[O]):(y==u&&(O=d.substring(g),m=d.length),p+=String.fromCharCode(y),l[O]=y,a[y++]=O),g=m+1}return p}var u=4e4,f=c(o);u=65535;var h=c(s);return{chars1:f,chars2:h,lineArray:a}},e.prototype.diff_charsToLines_=function(o,s){for(var a=0;a<o.length;a++){for(var l=o[a][1],c=[],u=0;u<l.length;u++)c[u]=s[l.charCodeAt(u)];o[a][1]=c.join("")}},e.prototype.diff_commonPrefix=function(o,s){if(!o||!s||o.charAt(0)!=s.charAt(0))return 0;for(var a=0,l=Math.min(o.length,s.length),c=l,u=0;a<c;)o.substring(u,c)==s.substring(u,c)?(a=c,u=a):l=c,c=Math.floor((l-a)/2+a);return c},e.prototype.diff_commonSuffix=function(o,s){if(!o||!s||o.charAt(o.length-1)!=s.charAt(s.length-1))return 0;for(var a=0,l=Math.min(o.length,s.length),c=l,u=0;a<c;)o.substring(o.length-c,o.length-u)==s.substring(s.length-c,s.length-u)?(a=c,u=a):l=c,c=Math.floor((l-a)/2+a);return c},e.prototype.diff_commonOverlap_=function(o,s){var a=o.length,l=s.length;if(a==0||l==0)return 0;a>l?o=o.substring(a-l):a<l&&(s=s.substring(0,a));var c=Math.min(a,l);if(o==s)return c;for(var u=0,f=1;;){var h=o.substring(c-f),d=s.indexOf(h);if(d==-1)return u;f+=d,(d==0||o.substring(c-f)==s.substring(0,f))&&(u=f,f++)}},e.prototype.diff_halfMatch_=function(o,s){if(this.Diff_Timeout<=0)return null;var a=o.length>s.length?o:s,l=o.length>s.length?s:o;if(a.length<4||l.length*2<a.length)return null;var c=this;function u(v,b,w){for(var _=v.substring(w,w+Math.floor(v.length/4)),C=-1,P="",k,x,E,R;(C=b.indexOf(_,C+1))!=-1;){var I=c.diff_commonPrefix(v.substring(w),b.substring(C)),F=c.diff_commonSuffix(v.substring(0,w),b.substring(0,C));P.length<F+I&&(P=b.substring(C-F,C)+b.substring(C,C+I),k=v.substring(0,w-F),x=v.substring(w+I),E=b.substring(0,C-F),R=b.substring(C+I))}return P.length*2>=v.length?[k,x,E,R,P]:null}var f=u(a,l,Math.ceil(a.length/4)),h=u(a,l,Math.ceil(a.length/2)),d;if(!f&&!h)return null;h?f?d=f[4].length>h[4].length?f:h:d=h:d=f;var p,g,m,y;o.length>s.length?(p=d[0],g=d[1],m=d[2],y=d[3]):(m=d[0],y=d[1],p=d[2],g=d[3]);var O=d[4];return[p,g,m,y,O]},e.prototype.diff_cleanupSemantic=function(o){for(var s=!1,a=[],l=0,c=null,u=0,f=0,h=0,d=0,p=0;u<o.length;)o[u][0]==i?(a[l++]=u,f=d,h=p,d=0,p=0,c=o[u][1]):(o[u][0]==n?d+=o[u][1].length:p+=o[u][1].length,c&&c.length<=Math.max(f,h)&&c.length<=Math.max(d,p)&&(o.splice(a[l-1],0,new e.Diff(r,c)),o[a[l-1]+1][0]=n,l--,l--,u=l>0?a[l-1]:-1,f=0,h=0,d=0,p=0,c=null,s=!0)),u++;for(s&&this.diff_cleanupMerge(o),this.diff_cleanupSemanticLossless(o),u=1;u<o.length;){if(o[u-1][0]==r&&o[u][0]==n){var g=o[u-1][1],m=o[u][1],y=this.diff_commonOverlap_(g,m),O=this.diff_commonOverlap_(m,g);y>=O?(y>=g.length/2||y>=m.length/2)&&(o.splice(u,0,new e.Diff(i,m.substring(0,y))),o[u-1][1]=g.substring(0,g.length-y),o[u+1][1]=m.substring(y),u++):(O>=g.length/2||O>=m.length/2)&&(o.splice(u,0,new e.Diff(i,g.substring(0,O))),o[u-1][0]=n,o[u-1][1]=m.substring(0,m.length-O),o[u+1][0]=r,o[u+1][1]=g.substring(O),u++),u++}u++}},e.prototype.diff_cleanupSemanticLossless=function(o){function s(O,v){if(!O||!v)return 6;var b=O.charAt(O.length-1),w=v.charAt(0),_=b.match(e.nonAlphaNumericRegex_),C=w.match(e.nonAlphaNumericRegex_),P=_&&b.match(e.whitespaceRegex_),k=C&&w.match(e.whitespaceRegex_),x=P&&b.match(e.linebreakRegex_),E=k&&w.match(e.linebreakRegex_),R=x&&O.match(e.blanklineEndRegex_),I=E&&v.match(e.blanklineStartRegex_);return R||I?5:x||E?4:_&&!P&&k?3:P||k?2:_||C?1:0}for(var a=1;a<o.length-1;){if(o[a-1][0]==i&&o[a+1][0]==i){var l=o[a-1][1],c=o[a][1],u=o[a+1][1],f=this.diff_commonSuffix(l,c);if(f){var h=c.substring(c.length-f);l=l.substring(0,l.length-f),c=h+c.substring(0,c.length-f),u=h+u}for(var d=l,p=c,g=u,m=s(l,c)+s(c,u);c.charAt(0)===u.charAt(0);){l+=c.charAt(0),c=c.substring(1)+u.charAt(0),u=u.substring(1);var y=s(l,c)+s(c,u);y>=m&&(m=y,d=l,p=c,g=u)}o[a-1][1]!=d&&(d?o[a-1][1]=d:(o.splice(a-1,1),a--),o[a][1]=p,g?o[a+1][1]=g:(o.splice(a+1,1),a--))}a++}},e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,e.whitespaceRegex_=/\s/,e.linebreakRegex_=/[\r\n]/,e.blanklineEndRegex_=/\n\r?\n$/,e.blanklineStartRegex_=/^\r?\n\r?\n/,e.prototype.diff_cleanupEfficiency=function(o){for(var s=!1,a=[],l=0,c=null,u=0,f=!1,h=!1,d=!1,p=!1;u<o.length;)o[u][0]==i?(o[u][1].length<this.Diff_EditCost&&(d||p)?(a[l++]=u,f=d,h=p,c=o[u][1]):(l=0,c=null),d=p=!1):(o[u][0]==r?p=!0:d=!0,c&&(f&&h&&d&&p||c.length<this.Diff_EditCost/2&&f+h+d+p==3)&&(o.splice(a[l-1],0,new e.Diff(r,c)),o[a[l-1]+1][0]=n,l--,c=null,f&&h?(d=p=!0,l=0):(l--,u=l>0?a[l-1]:-1,d=p=!1),s=!0)),u++;s&&this.diff_cleanupMerge(o)},e.prototype.diff_cleanupMerge=function(o){o.push(new e.Diff(i,""));for(var s=0,a=0,l=0,c="",u="",f;s<o.length;)switch(o[s][0]){case n:l++,u+=o[s][1],s++;break;case r:a++,c+=o[s][1],s++;break;case i:a+l>1?(a!==0&&l!==0&&(f=this.diff_commonPrefix(u,c),f!==0&&(s-a-l>0&&o[s-a-l-1][0]==i?o[s-a-l-1][1]+=u.substring(0,f):(o.splice(0,0,new e.Diff(i,u.substring(0,f))),s++),u=u.substring(f),c=c.substring(f)),f=this.diff_commonSuffix(u,c),f!==0&&(o[s][1]=u.substring(u.length-f)+o[s][1],u=u.substring(0,u.length-f),c=c.substring(0,c.length-f))),s-=a+l,o.splice(s,a+l),c.length&&(o.splice(s,0,new e.Diff(r,c)),s++),u.length&&(o.splice(s,0,new e.Diff(n,u)),s++),s++):s!==0&&o[s-1][0]==i?(o[s-1][1]+=o[s][1],o.splice(s,1)):s++,l=0,a=0,c="",u="";break}o[o.length-1][1]===""&&o.pop();var h=!1;for(s=1;s<o.length-1;)o[s-1][0]==i&&o[s+1][0]==i&&(o[s][1].substring(o[s][1].length-o[s-1][1].length)==o[s-1][1]?(o[s][1]=o[s-1][1]+o[s][1].substring(0,o[s][1].length-o[s-1][1].length),o[s+1][1]=o[s-1][1]+o[s+1][1],o.splice(s-1,1),h=!0):o[s][1].substring(0,o[s+1][1].length)==o[s+1][1]&&(o[s-1][1]+=o[s+1][1],o[s][1]=o[s][1].substring(o[s+1][1].length)+o[s+1][1],o.splice(s+1,1),h=!0)),s++;h&&this.diff_cleanupMerge(o)},e.prototype.diff_xIndex=function(o,s){var a=0,l=0,c=0,u=0,f;for(f=0;f<o.length&&(o[f][0]!==n&&(a+=o[f][1].length),o[f][0]!==r&&(l+=o[f][1].length),!(a>s));f++)c=a,u=l;return o.length!=f&&o[f][0]===r?u:u+(s-c)},e.prototype.diff_prettyHtml=function(o){for(var s=[],a=/&/g,l=/</g,c=/>/g,u=/\n/g,f=0;f<o.length;f++){var h=o[f][0],d=o[f][1],p=d.replace(a,"&").replace(l,"<").replace(c,">").replace(u,"¶<br>");switch(h){case n:s[f]='<ins style="background:#e6ffe6;">'+p+"</ins>";break;case r:s[f]='<del style="background:#ffe6e6;">'+p+"</del>";break;case i:s[f]="<span>"+p+"</span>";break}}return s.join("")},e.prototype.diff_text1=function(o){for(var s=[],a=0;a<o.length;a++)o[a][0]!==n&&(s[a]=o[a][1]);return s.join("")},e.prototype.diff_text2=function(o){for(var s=[],a=0;a<o.length;a++)o[a][0]!==r&&(s[a]=o[a][1]);return s.join("")},e.prototype.diff_levenshtein=function(o){for(var s=0,a=0,l=0,c=0;c<o.length;c++){var u=o[c][0],f=o[c][1];switch(u){case n:a+=f.length;break;case r:l+=f.length;break;case i:s+=Math.max(a,l),a=0,l=0;break}}return s+=Math.max(a,l),s},e.prototype.diff_toDelta=function(o){for(var s=[],a=0;a<o.length;a++)switch(o[a][0]){case n:s[a]="+"+encodeURI(o[a][1]);break;case r:s[a]="-"+o[a][1].length;break;case i:s[a]="="+o[a][1].length;break}return s.join(" ").replace(/%20/g," ")},e.prototype.diff_fromDelta=function(o,s){for(var a=[],l=0,c=0,u=s.split(/\t/g),f=0;f<u.length;f++){var h=u[f].substring(1);switch(u[f].charAt(0)){case"+":try{a[l++]=new e.Diff(n,decodeURI(h))}catch{throw new Error("Illegal escape in diff_fromDelta: "+h)}break;case"-":case"=":var d=parseInt(h,10);if(isNaN(d)||d<0)throw new Error("Invalid number in diff_fromDelta: "+h);var p=o.substring(c,c+=d);u[f].charAt(0)=="="?a[l++]=new e.Diff(i,p):a[l++]=new e.Diff(r,p);break;default:if(u[f])throw new Error("Invalid diff operation in diff_fromDelta: "+u[f])}}if(c!=o.length)throw new Error("Delta length ("+c+") does not equal source text length ("+o.length+").");return a},e.prototype.match_main=function(o,s,a){if(o==null||s==null||a==null)throw new Error("Null input. (match_main)");return a=Math.max(0,Math.min(a,o.length)),o==s?0:o.length?o.substring(a,a+s.length)==s?a:this.match_bitap_(o,s,a):-1},e.prototype.match_bitap_=function(o,s,a){if(s.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var l=this.match_alphabet_(s),c=this;function u(k,x){var E=k/s.length,R=Math.abs(a-x);return c.Match_Distance?E+R/c.Match_Distance:R?1:E}var f=this.Match_Threshold,h=o.indexOf(s,a);h!=-1&&(f=Math.min(u(0,h),f),h=o.lastIndexOf(s,a+s.length),h!=-1&&(f=Math.min(u(0,h),f)));var d=1<<s.length-1;h=-1;for(var p,g,m=s.length+o.length,y,O=0;O<s.length;O++){for(p=0,g=m;p<g;)u(O,a+g)<=f?p=g:m=g,g=Math.floor((m-p)/2+p);m=g;var v=Math.max(1,a-g+1),b=Math.min(a+g,o.length)+s.length,w=Array(b+2);w[b+1]=(1<<O)-1;for(var _=b;_>=v;_--){var C=l[o.charAt(_-1)];if(O===0?w[_]=(w[_+1]<<1|1)&C:w[_]=(w[_+1]<<1|1)&C|((y[_+1]|y[_])<<1|1)|y[_+1],w[_]&d){var P=u(O,_-1);if(P<=f)if(f=P,h=_-1,h>a)v=Math.max(1,2*a-h);else break}}if(u(O+1,a)>f)break;y=w}return h},e.prototype.match_alphabet_=function(o){for(var s={},a=0;a<o.length;a++)s[o.charAt(a)]=0;for(var a=0;a<o.length;a++)s[o.charAt(a)]|=1<<o.length-a-1;return s},e.prototype.patch_addContext_=function(o,s){if(s.length!=0){if(o.start2===null)throw Error("patch not initialized");for(var a=s.substring(o.start2,o.start2+o.length1),l=0;s.indexOf(a)!=s.lastIndexOf(a)&&a.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)l+=this.Patch_Margin,a=s.substring(o.start2-l,o.start2+o.length1+l);l+=this.Patch_Margin;var c=s.substring(o.start2-l,o.start2);c&&o.diffs.unshift(new e.Diff(i,c));var u=s.substring(o.start2+o.length1,o.start2+o.length1+l);u&&o.diffs.push(new e.Diff(i,u)),o.start1-=c.length,o.start2-=c.length,o.length1+=c.length+u.length,o.length2+=c.length+u.length}},e.prototype.patch_make=function(o,s,a){var l,c;if(typeof o=="string"&&typeof s=="string"&&typeof a>"u")l=o,c=this.diff_main(l,s,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(o&&typeof o=="object"&&typeof s>"u"&&typeof a>"u")c=o,l=this.diff_text1(c);else if(typeof o=="string"&&s&&typeof s=="object"&&typeof a>"u")l=o,c=s;else if(typeof o=="string"&&typeof s=="string"&&a&&typeof a=="object")l=o,c=a;else throw new Error("Unknown call format to patch_make.");if(c.length===0)return[];for(var u=[],f=new e.patch_obj,h=0,d=0,p=0,g=l,m=l,y=0;y<c.length;y++){var O=c[y][0],v=c[y][1];switch(!h&&O!==i&&(f.start1=d,f.start2=p),O){case n:f.diffs[h++]=c[y],f.length2+=v.length,m=m.substring(0,p)+v+m.substring(p);break;case r:f.length1+=v.length,f.diffs[h++]=c[y],m=m.substring(0,p)+m.substring(p+v.length);break;case i:v.length<=2*this.Patch_Margin&&h&&c.length!=y+1?(f.diffs[h++]=c[y],f.length1+=v.length,f.length2+=v.length):v.length>=2*this.Patch_Margin&&h&&(this.patch_addContext_(f,g),u.push(f),f=new e.patch_obj,h=0,g=m,d=p);break}O!==n&&(d+=v.length),O!==r&&(p+=v.length)}return h&&(this.patch_addContext_(f,g),u.push(f)),u},e.prototype.patch_deepCopy=function(o){for(var s=[],a=0;a<o.length;a++){var l=o[a],c=new e.patch_obj;c.diffs=[];for(var u=0;u<l.diffs.length;u++)c.diffs[u]=new e.Diff(l.diffs[u][0],l.diffs[u][1]);c.start1=l.start1,c.start2=l.start2,c.length1=l.length1,c.length2=l.length2,s[a]=c}return s},e.prototype.patch_apply=function(o,s){if(o.length==0)return[s,[]];o=this.patch_deepCopy(o);var a=this.patch_addPadding(o);s=a+s+a,this.patch_splitMax(o);for(var l=0,c=[],u=0;u<o.length;u++){var f=o[u].start2+l,h=this.diff_text1(o[u].diffs),d,p=-1;if(h.length>this.Match_MaxBits?(d=this.match_main(s,h.substring(0,this.Match_MaxBits),f),d!=-1&&(p=this.match_main(s,h.substring(h.length-this.Match_MaxBits),f+h.length-this.Match_MaxBits),(p==-1||d>=p)&&(d=-1))):d=this.match_main(s,h,f),d==-1)c[u]=!1,l-=o[u].length2-o[u].length1;else{c[u]=!0,l=d-f;var g;if(p==-1?g=s.substring(d,d+h.length):g=s.substring(d,p+this.Match_MaxBits),h==g)s=s.substring(0,d)+this.diff_text2(o[u].diffs)+s.substring(d+h.length);else{var m=this.diff_main(h,g,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(m)/h.length>this.Patch_DeleteThreshold)c[u]=!1;else{this.diff_cleanupSemanticLossless(m);for(var y=0,O,v=0;v<o[u].diffs.length;v++){var b=o[u].diffs[v];b[0]!==i&&(O=this.diff_xIndex(m,y)),b[0]===n?s=s.substring(0,d+O)+b[1]+s.substring(d+O):b[0]===r&&(s=s.substring(0,d+O)+s.substring(d+this.diff_xIndex(m,y+b[1].length))),b[0]!==r&&(y+=b[1].length)}}}}}return s=s.substring(a.length,s.length-a.length),[s,c]},e.prototype.patch_addPadding=function(o){for(var s=this.Patch_Margin,a="",l=1;l<=s;l++)a+=String.fromCharCode(l);for(var l=0;l<o.length;l++)o[l].start1+=s,o[l].start2+=s;var c=o[0],u=c.diffs;if(u.length==0||u[0][0]!=i)u.unshift(new e.Diff(i,a)),c.start1-=s,c.start2-=s,c.length1+=s,c.length2+=s;else if(s>u[0][1].length){var f=s-u[0][1].length;u[0][1]=a.substring(u[0][1].length)+u[0][1],c.start1-=f,c.start2-=f,c.length1+=f,c.length2+=f}if(c=o[o.length-1],u=c.diffs,u.length==0||u[u.length-1][0]!=i)u.push(new e.Diff(i,a)),c.length1+=s,c.length2+=s;else if(s>u[u.length-1][1].length){var f=s-u[u.length-1][1].length;u[u.length-1][1]+=a.substring(0,f),c.length1+=f,c.length2+=f}return a},e.prototype.patch_splitMax=function(o){for(var s=this.Match_MaxBits,a=0;a<o.length;a++)if(!(o[a].length1<=s)){var l=o[a];o.splice(a--,1);for(var c=l.start1,u=l.start2,f="";l.diffs.length!==0;){var h=new e.patch_obj,d=!0;for(h.start1=c-f.length,h.start2=u-f.length,f!==""&&(h.length1=h.length2=f.length,h.diffs.push(new e.Diff(i,f)));l.diffs.length!==0&&h.length1<s-this.Patch_Margin;){var p=l.diffs[0][0],g=l.diffs[0][1];p===n?(h.length2+=g.length,u+=g.length,h.diffs.push(l.diffs.shift()),d=!1):p===r&&h.diffs.length==1&&h.diffs[0][0]==i&&g.length>2*s?(h.length1+=g.length,c+=g.length,d=!1,h.diffs.push(new e.Diff(p,g)),l.diffs.shift()):(g=g.substring(0,s-h.length1-this.Patch_Margin),h.length1+=g.length,c+=g.length,p===i?(h.length2+=g.length,u+=g.length):d=!1,h.diffs.push(new e.Diff(p,g)),g==l.diffs[0][1]?l.diffs.shift():l.diffs[0][1]=l.diffs[0][1].substring(g.length))}f=this.diff_text2(h.diffs),f=f.substring(f.length-this.Patch_Margin);var m=this.diff_text1(l.diffs).substring(0,this.Patch_Margin);m!==""&&(h.length1+=m.length,h.length2+=m.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===i?h.diffs[h.diffs.length-1][1]+=m:h.diffs.push(new e.Diff(i,m))),d||o.splice(++a,0,h)}}},e.prototype.patch_toText=function(o){for(var s=[],a=0;a<o.length;a++)s[a]=o[a];return s.join("")},e.prototype.patch_fromText=function(o){var s=[];if(!o)return s;for(var a=o.split(`
|
|
117
|
+
`),l=0,c=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;l<a.length;){var u=a[l].match(c);if(!u)throw new Error("Invalid patch string: "+a[l]);var f=new e.patch_obj;for(s.push(f),f.start1=parseInt(u[1],10),u[2]===""?(f.start1--,f.length1=1):u[2]=="0"?f.length1=0:(f.start1--,f.length1=parseInt(u[2],10)),f.start2=parseInt(u[3],10),u[4]===""?(f.start2--,f.length2=1):u[4]=="0"?f.length2=0:(f.start2--,f.length2=parseInt(u[4],10)),l++;l<a.length;){var h=a[l].charAt(0);try{var d=decodeURI(a[l].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+d)}if(h=="-")f.diffs.push(new e.Diff(r,d));else if(h=="+")f.diffs.push(new e.Diff(n,d));else if(h==" ")f.diffs.push(new e.Diff(i,d));else{if(h=="@")break;if(h!=="")throw new Error('Invalid patch mode "'+h+'" in: '+d)}l++}}return s},e.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},e.patch_obj.prototype.toString=function(){var o,s;this.length1===0?o=this.start1+",0":this.length1==1?o=this.start1+1:o=this.start1+1+","+this.length1,this.length2===0?s=this.start2+",0":this.length2==1?s=this.start2+1:s=this.start2+1+","+this.length2;for(var a=["@@ -"+o+" +"+s+` @@
|
|
118
|
+
`],l,c=0;c<this.diffs.length;c++){switch(this.diffs[c][0]){case n:l="+";break;case r:l="-";break;case i:l=" ";break}a[c+1]=l+encodeURI(this.diffs[c][1])+`
|
|
119
|
+
`}return a.join("").replace(/%20/g," ")},t.exports=e,t.exports.diff_match_patch=e,t.exports.DIFF_DELETE=r,t.exports.DIFF_INSERT=n,t.exports.DIFF_EQUAL=i})(NR);var o4=NR.exports;const s4=Pi(o4),a4=(t,e)=>i4(t,e,s4,$0,tE),l4=t=>N.useCallback(r=>{const n=t.data,i=a4(n,r(n));i&&t&&t.submitOp(i)},[t]),u4=({connection:t})=>{const[e,r]=N.useState(null),[n,i]=N.useState(null),[o,s]=N.useState(null),[a,l]=N.useState(null),[c,u]=N.useState(!1);N.useEffect(()=>{t.on("connected",()=>{u(!0)}),t.on("disconnected",()=>{u(!1)});const h="documents",d="1",p=t.get(h,d);return p.subscribe(()=>{r(p),l(p.data),p.on("op",()=>{l(p.data)});const g=t.getDocPresence(h,d);g.subscribe(function(y){if(y)throw y});const m=()=>{const y=Date.now().toString(36),O=nv();return`${y}-${O}`};i(g.create(m())),s(g)}),()=>{}},[]);const f=l4(e);return{shareDBDoc:e,content:a,localPresence:n,docPresence:o,submitOperation:f,connected:c}};var dv={exports:{}},IR={exports:{}};(function(t){function e(r){return r&&r.__esModule?r:{default:r}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(IR);var Et=IR.exports,XO={exports:{}};/*!
|
|
120
|
+
Copyright (c) 2018 Jed Watson.
|
|
121
|
+
Licensed under the MIT License (MIT), see
|
|
122
|
+
http://jedwatson.github.io/classnames
|
|
123
|
+
*/var ck;function Jt(){return ck||(ck=1,function(t){(function(){var e={}.hasOwnProperty;function r(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,n(a)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)e.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}t.exports?(r.default=r,t.exports=r):window.classNames=r})()}(XO)),XO.exports}var FO={exports:{}},UO,fk;function c4(){if(fk)return UO;fk=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return UO=t,UO}var YO,hk;function f4(){if(hk)return YO;hk=1;var t=c4();function e(){}function r(){}return r.resetWarningCache=e,YO=function(){function n(s,a,l,c,u,f){if(f!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return o.PropTypes=o,o},YO}var dk;function Tf(){return dk||(dk=1,FO.exports=f4()()),FO.exports}var xh={exports:{}},_h={exports:{}},pk;function WR(){return pk||(pk=1,function(t,e){var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=l(N),o=r(Tf()),s=q;function a(f){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(a=function(p){return p?d:h})(f)}function l(f,h){if(!h&&f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var d=a(h);if(d&&d.has(f))return d.get(f);var p={__proto__:null},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in f)if(m!=="default"&&Object.prototype.hasOwnProperty.call(f,m)){var y=g?Object.getOwnPropertyDescriptor(f,m):null;y&&(y.get||y.set)?Object.defineProperty(p,m,y):p[m]=f[m]}return p.default=f,d&&d.set(f,p),p}const c={type:o.default.string,tooltip:o.default.bool,as:o.default.elementType},u=i.forwardRef(({as:f="div",className:h,type:d="valid",tooltip:p=!1,...g},m)=>(0,s.jsx)(f,{...g,ref:m,className:(0,n.default)(h,`${d}-${p?"tooltip":"feedback"}`)}));u.displayName="Feedback",u.propTypes=c,e.default=u,t.exports=e.default}(_h,_h.exports)),_h.exports}var $h={exports:{}},Ch={exports:{}},gk;function Is(){return gk||(gk=1,function(t,e){"use client";e.__esModule=!0,e.default=void 0;var r=i(N);function n(s){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(n=function(c){return c?l:a})(s)}function i(s,a){if(!a&&s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var l=n(a);if(l&&l.has(s))return l.get(s);var c={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in s)if(f!=="default"&&Object.prototype.hasOwnProperty.call(s,f)){var h=u?Object.getOwnPropertyDescriptor(s,f):null;h&&(h.get||h.set)?Object.defineProperty(c,f,h):c[f]=s[f]}return c.default=s,l&&l.set(s,c),c}const o=r.createContext({});e.default=o,t.exports=e.default}(Ch,Ch.exports)),Ch.exports}var mn={},Ok;function Er(){if(Ok)return mn;Ok=1,mn.__esModule=!0,mn.ThemeConsumer=mn.DEFAULT_MIN_BREAKPOINT=mn.DEFAULT_BREAKPOINTS=void 0,mn.createBootstrapComponent=g,mn.default=void 0,mn.useBootstrapBreakpoints=h,mn.useBootstrapMinBreakpoint=d,mn.useBootstrapPrefix=f,mn.useIsRTL=p;var t=i(N),e=t,r=q;function n(m){if(typeof WeakMap!="function")return null;var y=new WeakMap,O=new WeakMap;return(n=function(v){return v?O:y})(m)}function i(m,y){if(!y&&m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var O=n(y);if(O&&O.has(m))return O.get(m);var v={__proto__:null},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in m)if(w!=="default"&&Object.prototype.hasOwnProperty.call(m,w)){var _=b?Object.getOwnPropertyDescriptor(m,w):null;_&&(_.get||_.set)?Object.defineProperty(v,w,_):v[w]=m[w]}return v.default=m,O&&O.set(m,v),v}const o=mn.DEFAULT_BREAKPOINTS=["xxl","xl","lg","md","sm","xs"],s=mn.DEFAULT_MIN_BREAKPOINT="xs",a=e.createContext({prefixes:{},breakpoints:o,minBreakpoint:s}),{Consumer:l,Provider:c}=a;mn.ThemeConsumer=l;function u({prefixes:m={},breakpoints:y=o,minBreakpoint:O=s,dir:v,children:b}){const w=(0,t.useMemo)(()=>({prefixes:{...m},breakpoints:y,minBreakpoint:O,dir:v}),[m,y,O,v]);return(0,r.jsx)(c,{value:w,children:b})}function f(m,y){const{prefixes:O}=(0,t.useContext)(a);return m||O[y]||y}function h(){const{breakpoints:m}=(0,t.useContext)(a);return m}function d(){const{minBreakpoint:m}=(0,t.useContext)(a);return m}function p(){const{dir:m}=(0,t.useContext)(a);return m==="rtl"}function g(m,y){typeof y=="string"&&(y={prefix:y});const O=m.prototype&&m.prototype.isReactComponent,{prefix:v,forwardRefAs:b=O?"ref":"innerRef"}=y,w=e.forwardRef(({..._},C)=>{_[b]=C;const P=f(_.bsPrefix,v);return(0,r.jsx)(m,{..._,bsPrefix:P})});return w.displayName=`Bootstrap(${m.displayName||m.name})`,w}return mn.default=u,mn}var mk;function h4(){return mk||(mk=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=u(N),o=i,s=r(Is()),a=Er(),l=q;function c(h){if(typeof WeakMap!="function")return null;var d=new WeakMap,p=new WeakMap;return(c=function(g){return g?p:d})(h)}function u(h,d){if(!d&&h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var p=c(d);if(p&&p.has(h))return p.get(h);var g={__proto__:null},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in h)if(y!=="default"&&Object.prototype.hasOwnProperty.call(h,y)){var O=m?Object.getOwnPropertyDescriptor(h,y):null;O&&(O.get||O.set)?Object.defineProperty(g,y,O):g[y]=h[y]}return g.default=h,p&&p.set(h,g),g}const f=o.forwardRef(({id:h,bsPrefix:d,className:p,type:g="checkbox",isValid:m=!1,isInvalid:y=!1,as:O="input",...v},b)=>{const{controlId:w}=(0,i.useContext)(s.default);return d=(0,a.useBootstrapPrefix)(d,"form-check-input"),(0,l.jsx)(O,{...v,ref:b,type:g,id:h||w,className:(0,n.default)(p,d,m&&"is-valid",y&&"is-invalid")})});f.displayName="FormCheckInput",e.default=f,t.exports=e.default}($h,$h.exports)),$h.exports}var Eh={exports:{}},yk;function d4(){return yk||(yk=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=u(N),o=i,s=r(Is()),a=Er(),l=q;function c(h){if(typeof WeakMap!="function")return null;var d=new WeakMap,p=new WeakMap;return(c=function(g){return g?p:d})(h)}function u(h,d){if(!d&&h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var p=c(d);if(p&&p.has(h))return p.get(h);var g={__proto__:null},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in h)if(y!=="default"&&Object.prototype.hasOwnProperty.call(h,y)){var O=m?Object.getOwnPropertyDescriptor(h,y):null;O&&(O.get||O.set)?Object.defineProperty(g,y,O):g[y]=h[y]}return g.default=h,p&&p.set(h,g),g}const f=o.forwardRef(({bsPrefix:h,className:d,htmlFor:p,...g},m)=>{const{controlId:y}=(0,i.useContext)(s.default);return h=(0,a.useBootstrapPrefix)(h,"form-check-label"),(0,l.jsx)("label",{...g,ref:m,htmlFor:p||y,className:(0,n.default)(d,h)})});f.displayName="FormCheckLabel",e.default=f,t.exports=e.default}(Eh,Eh.exports)),Eh.exports}var Fa={},vk;function p4(){if(vk)return Fa;vk=1,Fa.__esModule=!0,Fa.forEach=i,Fa.hasChildOfType=o,Fa.map=n;var t=r(N);function e(s){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(e=function(c){return c?l:a})(s)}function r(s,a){if(!a&&s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var l=e(a);if(l&&l.has(s))return l.get(s);var c={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in s)if(f!=="default"&&Object.prototype.hasOwnProperty.call(s,f)){var h=u?Object.getOwnPropertyDescriptor(s,f):null;h&&(h.get||h.set)?Object.defineProperty(c,f,h):c[f]=s[f]}return c.default=s,l&&l.set(s,c),c}function n(s,a){let l=0;return t.Children.map(s,c=>t.isValidElement(c)?a(c,l++):c)}function i(s,a){let l=0;t.Children.forEach(s,c=>{t.isValidElement(c)&&a(c,l++)})}function o(s,a){return t.Children.toArray(s).some(l=>t.isValidElement(l)&&l.type===a)}return Fa}var bk;function BR(){return bk||(bk=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=p(N),o=i,s=r(WR()),a=r(h4()),l=r(d4()),c=r(Is()),u=Er(),f=p4(),h=q;function d(m){if(typeof WeakMap!="function")return null;var y=new WeakMap,O=new WeakMap;return(d=function(v){return v?O:y})(m)}function p(m,y){if(!y&&m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var O=d(y);if(O&&O.has(m))return O.get(m);var v={__proto__:null},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in m)if(w!=="default"&&Object.prototype.hasOwnProperty.call(m,w)){var _=b?Object.getOwnPropertyDescriptor(m,w):null;_&&(_.get||_.set)?Object.defineProperty(v,w,_):v[w]=m[w]}return v.default=m,O&&O.set(m,v),v}const g=o.forwardRef(({id:m,bsPrefix:y,bsSwitchPrefix:O,inline:v=!1,reverse:b=!1,disabled:w=!1,isValid:_=!1,isInvalid:C=!1,feedbackTooltip:P=!1,feedback:k,feedbackType:x,className:E,style:R,title:I="",type:F="checkbox",label:H,children:M,as:B="input",...D},X)=>{y=(0,u.useBootstrapPrefix)(y,"form-check"),O=(0,u.useBootstrapPrefix)(O,"form-switch");const{controlId:G}=(0,i.useContext)(c.default),se=(0,i.useMemo)(()=>({controlId:m||G}),[G,m]),ce=!M&&H!=null&&H!==!1||(0,f.hasChildOfType)(M,l.default),U=(0,h.jsx)(a.default,{...D,type:F==="switch"?"checkbox":F,ref:X,isValid:_,isInvalid:C,disabled:w,as:B});return(0,h.jsx)(c.default.Provider,{value:se,children:(0,h.jsx)("div",{style:R,className:(0,n.default)(E,ce&&y,v&&`${y}-inline`,b&&`${y}-reverse`,F==="switch"&&O),children:M||(0,h.jsxs)(h.Fragment,{children:[U,ce&&(0,h.jsx)(l.default,{title:I,children:H}),k&&(0,h.jsx)(s.default,{type:x,tooltip:P,children:k})]})})})});g.displayName="FormCheck",e.default=Object.assign(g,{Input:a.default,Label:l.default}),t.exports=e.default}(xh,xh.exports)),xh.exports}var Qh={exports:{}},zO,Sk;function Dg(){if(Sk)return zO;Sk=1;var t=function(){};return zO=t,zO}var wk;function g4(){return wk||(wk=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=f(N),o=i;r(Dg());var s=r(WR()),a=r(Is()),l=Er(),c=q;function u(d){if(typeof WeakMap!="function")return null;var p=new WeakMap,g=new WeakMap;return(u=function(m){return m?g:p})(d)}function f(d,p){if(!p&&d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var g=u(p);if(g&&g.has(d))return g.get(d);var m={__proto__:null},y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var O in d)if(O!=="default"&&Object.prototype.hasOwnProperty.call(d,O)){var v=y?Object.getOwnPropertyDescriptor(d,O):null;v&&(v.get||v.set)?Object.defineProperty(m,O,v):m[O]=d[O]}return m.default=d,g&&g.set(d,m),m}const h=o.forwardRef(({bsPrefix:d,type:p,size:g,htmlSize:m,id:y,className:O,isValid:v=!1,isInvalid:b=!1,plaintext:w,readOnly:_,as:C="input",...P},k)=>{const{controlId:x}=(0,i.useContext)(a.default);return d=(0,l.useBootstrapPrefix)(d,"form-control"),(0,c.jsx)(C,{...P,type:p,size:m,ref:k,readOnly:_,id:y||x,className:(0,n.default)(O,w?`${d}-plaintext`:d,g&&`${d}-${g}`,p==="color"&&`${d}-color`,v&&"is-valid",b&&"is-invalid")})});h.displayName="FormControl",e.default=Object.assign(h,{Feedback:s.default}),t.exports=e.default}(Qh,Qh.exports)),Qh.exports}var Th={exports:{}},Pk;function O4(){return Pk||(Pk=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=l(N),i=r(Jt()),o=Er(),s=q;function a(u){if(typeof WeakMap!="function")return null;var f=new WeakMap,h=new WeakMap;return(a=function(d){return d?h:f})(u)}function l(u,f){if(!f&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var h=a(f);if(h&&h.has(u))return h.get(u);var d={__proto__:null},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in u)if(g!=="default"&&Object.prototype.hasOwnProperty.call(u,g)){var m=p?Object.getOwnPropertyDescriptor(u,g):null;m&&(m.get||m.set)?Object.defineProperty(d,g,m):d[g]=u[g]}return d.default=u,h&&h.set(u,d),d}const c=n.forwardRef(({className:u,bsPrefix:f,as:h="div",...d},p)=>(f=(0,o.useBootstrapPrefix)(f,"form-floating"),(0,s.jsx)(h,{ref:p,className:(0,i.default)(u,f),...d})));c.displayName="FormFloating",e.default=c,t.exports=e.default}(Th,Th.exports)),Th.exports}var Rh={exports:{}},kk;function LR(){return kk||(kk=1,function(t,e){var r=Et;e.__esModule=!0,e.default=void 0;var n=l(N),i=n,o=r(Is()),s=q;function a(u){if(typeof WeakMap!="function")return null;var f=new WeakMap,h=new WeakMap;return(a=function(d){return d?h:f})(u)}function l(u,f){if(!f&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var h=a(f);if(h&&h.has(u))return h.get(u);var d={__proto__:null},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in u)if(g!=="default"&&Object.prototype.hasOwnProperty.call(u,g)){var m=p?Object.getOwnPropertyDescriptor(u,g):null;m&&(m.get||m.set)?Object.defineProperty(d,g,m):d[g]=u[g]}return d.default=u,h&&h.set(u,d),d}const c=i.forwardRef(({controlId:u,as:f="div",...h},d)=>{const p=(0,n.useMemo)(()=>({controlId:u}),[u]);return(0,s.jsx)(o.default.Provider,{value:p,children:(0,s.jsx)(f,{...h,ref:d})})});c.displayName="FormGroup",e.default=c,t.exports=e.default}(Rh,Rh.exports)),Rh.exports}var Ah={exports:{}},Ua={},xk;function m4(){if(xk)return Ua;xk=1;var t=Et;Ua.__esModule=!0,Ua.default=void 0,Ua.useCol=a;var e=t(Jt()),r=s(N),n=Er(),i=q;function o(c){if(typeof WeakMap!="function")return null;var u=new WeakMap,f=new WeakMap;return(o=function(h){return h?f:u})(c)}function s(c,u){if(!u&&c&&c.__esModule)return c;if(c===null||typeof c!="object"&&typeof c!="function")return{default:c};var f=o(u);if(f&&f.has(c))return f.get(c);var h={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in c)if(p!=="default"&&Object.prototype.hasOwnProperty.call(c,p)){var g=d?Object.getOwnPropertyDescriptor(c,p):null;g&&(g.get||g.set)?Object.defineProperty(h,p,g):h[p]=c[p]}return h.default=c,f&&f.set(c,h),h}function a({as:c,bsPrefix:u,className:f,...h}){u=(0,n.useBootstrapPrefix)(u,"col");const d=(0,n.useBootstrapBreakpoints)(),p=(0,n.useBootstrapMinBreakpoint)(),g=[],m=[];return d.forEach(y=>{const O=h[y];delete h[y];let v,b,w;typeof O=="object"&&O!=null?{span:v,offset:b,order:w}=O:v=O;const _=y!==p?`-${y}`:"";v&&g.push(v===!0?`${u}${_}`:`${u}${_}-${v}`),w!=null&&m.push(`order${_}-${w}`),b!=null&&m.push(`offset${_}-${b}`)}),[{...h,className:(0,e.default)(f,...g,...m)},{as:c,bsPrefix:u,spans:g}]}const l=r.forwardRef((c,u)=>{const[{className:f,...h},{as:d="div",bsPrefix:p,spans:g}]=a(c);return(0,i.jsx)(d,{...h,ref:u,className:(0,e.default)(f,!g.length&&p)})});return l.displayName="Col",Ua.default=l,Ua}var _k;function y4(){return _k||(_k=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=f(N),o=i;r(Dg());var s=r(m4()),a=r(Is()),l=Er(),c=q;function u(d){if(typeof WeakMap!="function")return null;var p=new WeakMap,g=new WeakMap;return(u=function(m){return m?g:p})(d)}function f(d,p){if(!p&&d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var g=u(p);if(g&&g.has(d))return g.get(d);var m={__proto__:null},y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var O in d)if(O!=="default"&&Object.prototype.hasOwnProperty.call(d,O)){var v=y?Object.getOwnPropertyDescriptor(d,O):null;v&&(v.get||v.set)?Object.defineProperty(m,O,v):m[O]=d[O]}return m.default=d,g&&g.set(d,m),m}const h=o.forwardRef(({as:d="label",bsPrefix:p,column:g=!1,visuallyHidden:m=!1,className:y,htmlFor:O,...v},b)=>{const{controlId:w}=(0,i.useContext)(a.default);p=(0,l.useBootstrapPrefix)(p,"form-label");let _="col-form-label";typeof g=="string"&&(_=`${_} ${_}-${g}`);const C=(0,n.default)(y,p,m&&"visually-hidden",g&&_);return O=O||w,g?(0,c.jsx)(s.default,{ref:b,as:"label",className:C,htmlFor:O,...v}):(0,c.jsx)(d,{ref:b,className:C,htmlFor:O,...v})});h.displayName="FormLabel",e.default=h,t.exports=e.default}(Ah,Ah.exports)),Ah.exports}var Mh={exports:{}},$k;function v4(){return $k||($k=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=u(N),o=i,s=Er(),a=r(Is()),l=q;function c(h){if(typeof WeakMap!="function")return null;var d=new WeakMap,p=new WeakMap;return(c=function(g){return g?p:d})(h)}function u(h,d){if(!d&&h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var p=c(d);if(p&&p.has(h))return p.get(h);var g={__proto__:null},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in h)if(y!=="default"&&Object.prototype.hasOwnProperty.call(h,y)){var O=m?Object.getOwnPropertyDescriptor(h,y):null;O&&(O.get||O.set)?Object.defineProperty(g,y,O):g[y]=h[y]}return g.default=h,p&&p.set(h,g),g}const f=o.forwardRef(({bsPrefix:h,className:d,id:p,...g},m)=>{const{controlId:y}=(0,i.useContext)(a.default);return h=(0,s.useBootstrapPrefix)(h,"form-range"),(0,l.jsx)("input",{...g,type:"range",ref:m,className:(0,n.default)(d,h),id:p||y})});f.displayName="FormRange",e.default=f,t.exports=e.default}(Mh,Mh.exports)),Mh.exports}var jh={exports:{}},Ck;function b4(){return Ck||(Ck=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=u(N),o=i,s=Er(),a=r(Is()),l=q;function c(h){if(typeof WeakMap!="function")return null;var d=new WeakMap,p=new WeakMap;return(c=function(g){return g?p:d})(h)}function u(h,d){if(!d&&h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var p=c(d);if(p&&p.has(h))return p.get(h);var g={__proto__:null},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in h)if(y!=="default"&&Object.prototype.hasOwnProperty.call(h,y)){var O=m?Object.getOwnPropertyDescriptor(h,y):null;O&&(O.get||O.set)?Object.defineProperty(g,y,O):g[y]=h[y]}return g.default=h,p&&p.set(h,g),g}const f=o.forwardRef(({bsPrefix:h,size:d,htmlSize:p,className:g,isValid:m=!1,isInvalid:y=!1,id:O,...v},b)=>{const{controlId:w}=(0,i.useContext)(a.default);return h=(0,s.useBootstrapPrefix)(h,"form-select"),(0,l.jsx)("select",{...v,size:p,ref:b,className:(0,n.default)(g,h,d&&`${h}-${d}`,m&&"is-valid",y&&"is-invalid"),id:O||w})});f.displayName="FormSelect",e.default=f,t.exports=e.default}(jh,jh.exports)),jh.exports}var Dh={exports:{}},Ek;function S4(){return Ek||(Ek=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=l(N),o=Er(),s=q;function a(u){if(typeof WeakMap!="function")return null;var f=new WeakMap,h=new WeakMap;return(a=function(d){return d?h:f})(u)}function l(u,f){if(!f&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var h=a(f);if(h&&h.has(u))return h.get(u);var d={__proto__:null},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in u)if(g!=="default"&&Object.prototype.hasOwnProperty.call(u,g)){var m=p?Object.getOwnPropertyDescriptor(u,g):null;m&&(m.get||m.set)?Object.defineProperty(d,g,m):d[g]=u[g]}return d.default=u,h&&h.set(u,d),d}const c=i.forwardRef(({bsPrefix:u,className:f,as:h="small",muted:d,...p},g)=>(u=(0,o.useBootstrapPrefix)(u,"form-text"),(0,s.jsx)(h,{...p,ref:g,className:(0,n.default)(f,u,d&&"text-muted")})));c.displayName="FormText",e.default=c,t.exports=e.default}(Dh,Dh.exports)),Dh.exports}var qh={exports:{}},Qk;function w4(){return Qk||(Qk=1,function(t,e){var r=Et;e.__esModule=!0,e.default=void 0;var n=a(N),i=r(BR()),o=q;function s(c){if(typeof WeakMap!="function")return null;var u=new WeakMap,f=new WeakMap;return(s=function(h){return h?f:u})(c)}function a(c,u){if(!u&&c&&c.__esModule)return c;if(c===null||typeof c!="object"&&typeof c!="function")return{default:c};var f=s(u);if(f&&f.has(c))return f.get(c);var h={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in c)if(p!=="default"&&Object.prototype.hasOwnProperty.call(c,p)){var g=d?Object.getOwnPropertyDescriptor(c,p):null;g&&(g.get||g.set)?Object.defineProperty(h,p,g):h[p]=c[p]}return h.default=c,f&&f.set(c,h),h}const l=n.forwardRef((c,u)=>(0,o.jsx)(i.default,{...c,ref:u,type:"switch"}));l.displayName="Switch",e.default=Object.assign(l,{Input:i.default.Input,Label:i.default.Label}),t.exports=e.default}(qh,qh.exports)),qh.exports}var Zh={exports:{}},Tk;function P4(){return Tk||(Tk=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=c(N),o=r(LR()),s=Er(),a=q;function l(f){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(l=function(p){return p?d:h})(f)}function c(f,h){if(!h&&f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var d=l(h);if(d&&d.has(f))return d.get(f);var p={__proto__:null},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in f)if(m!=="default"&&Object.prototype.hasOwnProperty.call(f,m)){var y=g?Object.getOwnPropertyDescriptor(f,m):null;y&&(y.get||y.set)?Object.defineProperty(p,m,y):p[m]=f[m]}return p.default=f,d&&d.set(f,p),p}const u=i.forwardRef(({bsPrefix:f,className:h,children:d,controlId:p,label:g,...m},y)=>(f=(0,s.useBootstrapPrefix)(f,"form-floating"),(0,a.jsxs)(o.default,{ref:y,className:(0,n.default)(h,f),controlId:p,...m,children:[d,(0,a.jsx)("label",{htmlFor:p,children:g})]})));u.displayName="FloatingLabel",e.default=u,t.exports=e.default}(Zh,Zh.exports)),Zh.exports}(function(t,e){var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=r(Tf()),o=O(N),s=r(BR()),a=r(g4()),l=r(O4()),c=r(LR()),u=r(y4()),f=r(v4()),h=r(b4()),d=r(S4()),p=r(w4()),g=r(P4()),m=q;function y(w){if(typeof WeakMap!="function")return null;var _=new WeakMap,C=new WeakMap;return(y=function(P){return P?C:_})(w)}function O(w,_){if(!_&&w&&w.__esModule)return w;if(w===null||typeof w!="object"&&typeof w!="function")return{default:w};var C=y(_);if(C&&C.has(w))return C.get(w);var P={__proto__:null},k=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in w)if(x!=="default"&&Object.prototype.hasOwnProperty.call(w,x)){var E=k?Object.getOwnPropertyDescriptor(w,x):null;E&&(E.get||E.set)?Object.defineProperty(P,x,E):P[x]=w[x]}return P.default=w,C&&C.set(w,P),P}const v={_ref:i.default.any,validated:i.default.bool,as:i.default.elementType},b=o.forwardRef(({className:w,validated:_,as:C="form",...P},k)=>(0,m.jsx)(C,{...P,ref:k,className:(0,n.default)(w,_&&"was-validated")}));b.displayName="Form",b.propTypes=v,e.default=Object.assign(b,{Group:c.default,Control:a.default,Floating:l.default,Check:s.default,Switch:p.default,Label:u.default,Text:d.default,Range:f.default,Select:h.default,FloatingLabel:g.default}),t.exports=e.default})(dv,dv.exports);var k4=dv.exports;const br=Pi(k4);var pv={exports:{}},zs={},Rk;function x4(){if(Rk)return zs;Rk=1,zs.__esModule=!0,zs.isTrivialHref=s,zs.useButtonProps=a,zs.default=void 0;var t=i(N),e=q;const r=["as","disabled"];function n(u){if(typeof WeakMap!="function")return null;var f=new WeakMap,h=new WeakMap;return(n=function(d){return d?h:f})(u)}function i(u,f){if(!f&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var h=n(f);if(h&&h.has(u))return h.get(u);var d={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in u)if(g!=="default"&&Object.prototype.hasOwnProperty.call(u,g)){var m=p?Object.getOwnPropertyDescriptor(u,g):null;m&&(m.get||m.set)?Object.defineProperty(d,g,m):d[g]=u[g]}return d.default=u,h&&h.set(u,d),d}function o(u,f){if(u==null)return{};var h={},d=Object.keys(u),p,g;for(g=0;g<d.length;g++)p=d[g],!(f.indexOf(p)>=0)&&(h[p]=u[p]);return h}function s(u){return!u||u.trim()==="#"}function a({tagName:u,disabled:f,href:h,target:d,rel:p,role:g,onClick:m,tabIndex:y=0,type:O}){u||(h!=null||d!=null||p!=null?u="a":u="button");const v={tagName:u};if(u==="button")return[{type:O||"button",disabled:f},v];const b=_=>{if((f||u==="a"&&s(h))&&_.preventDefault(),f){_.stopPropagation();return}m==null||m(_)},w=_=>{_.key===" "&&(_.preventDefault(),b(_))};return u==="a"&&(h||(h="#"),f&&(h=void 0)),[{role:g??"button",disabled:void 0,tabIndex:f?void 0:y,href:h,target:u==="a"?d:void 0,"aria-disabled":f||void 0,rel:u==="a"?p:void 0,onClick:b,onKeyDown:w},v]}const l=t.forwardRef((u,f)=>{let{as:h,disabled:d}=u,p=o(u,r);const[g,{tagName:m}]=a(Object.assign({tagName:h,disabled:d},p));return(0,e.jsx)(m,Object.assign({},p,g,{ref:f}))});l.displayName="Button";var c=l;return zs.default=c,zs}(function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=c(N),o=x4(),s=Er(),a=q;function l(f){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(l=function(p){return p?d:h})(f)}function c(f,h){if(!h&&f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var d=l(h);if(d&&d.has(f))return d.get(f);var p={__proto__:null},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in f)if(m!=="default"&&Object.prototype.hasOwnProperty.call(f,m)){var y=g?Object.getOwnPropertyDescriptor(f,m):null;y&&(y.get||y.set)?Object.defineProperty(p,m,y):p[m]=f[m]}return p.default=f,d&&d.set(f,p),p}const u=i.forwardRef(({as:f,bsPrefix:h,variant:d="primary",size:p,active:g=!1,disabled:m=!1,className:y,...O},v)=>{const b=(0,s.useBootstrapPrefix)(h,"btn"),[w,{tagName:_}]=(0,o.useButtonProps)({tagName:f,disabled:m,...O}),C=_;return(0,a.jsx)(C,{...w,...O,ref:v,disabled:m,className:(0,n.default)(y,b,g&&"active",d&&`${b}-${d}`,p&&`${b}-${p}`,O.href&&m&&"disabled")})});u.displayName="Button",e.default=u,t.exports=e.default})(pv,pv.exports);var _4=pv.exports;const tu=Pi(_4);var gv={exports:{}};const $1=!!(typeof window<"u"&&window.document&&window.document.createElement),$4=Object.freeze(Object.defineProperty({__proto__:null,default:$1},Symbol.toStringTag,{value:"Module"}));var Fp=!1,Up=!1;try{var GO={get passive(){return Fp=!0},get once(){return Up=Fp=!0}};$1&&(window.addEventListener("test",GO,GO),window.removeEventListener("test",GO,!0))}catch{}function VR(t,e,r,n){if(n&&typeof n!="boolean"&&!Up){var i=n.once,o=n.capture,s=r;!Up&&i&&(s=r.__once||function a(l){this.removeEventListener(e,a,o),r.call(this,l)},r.__once=s),t.addEventListener(e,s,Fp?n:o)}t.addEventListener(e,r,n)}const C4=Object.freeze(Object.defineProperty({__proto__:null,default:VR,get onceSupported(){return Up},get optionsSupported(){return Fp}},Symbol.toStringTag,{value:"Module"})),E4=Pn(C4),qg=Pn($4);function C1(t){return t&&t.ownerDocument||document}const Q4=Object.freeze(Object.defineProperty({__proto__:null,default:C1},Symbol.toStringTag,{value:"Module"})),Zg=Pn(Q4);function XR(t,e,r,n){var i=n&&typeof n!="boolean"?n.capture:n;t.removeEventListener(e,r,i),r.__once&&t.removeEventListener(e,r.__once,i)}const T4=Object.freeze(Object.defineProperty({__proto__:null,default:XR},Symbol.toStringTag,{value:"Module"})),R4=Pn(T4);var Nh;function A4(t){if((!Nh&&Nh!==0||t)&&$1){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),Nh=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return Nh}const M4=Object.freeze(Object.defineProperty({__proto__:null,default:A4},Symbol.toStringTag,{value:"Module"})),j4=Pn(M4);var Ih={},Ak;function FR(){if(Ak)return Ih;Ak=1,Ih.__esModule=!0,Ih.default=e;var t=N;function e(){return(0,t.useState)(null)}return Ih}var Wh={},Du={},Mk;function D4(){if(Mk)return Du;Mk=1,Du.__esModule=!0,Du.default=void 0;var t=N;function e(n){const i=(0,t.useRef)(n);return(0,t.useEffect)(()=>{i.current=n},[n]),i}var r=e;return Du.default=r,Du}var jk;function Ws(){if(jk)return Wh;jk=1,Wh.__esModule=!0,Wh.default=n;var t=N,e=r(D4());function r(i){return i&&i.__esModule?i:{default:i}}function n(i){const o=(0,e.default)(i);return(0,t.useCallback)(function(...s){return o.current&&o.current(...s)},[o])}return Wh}var Ya={},Dk;function Bs(){if(Dk)return Ya;Dk=1,Ya.__esModule=!0,Ya.default=void 0,Ya.mergeRefs=r;var t=N;const e=o=>!o||typeof o=="function"?o:s=>{o.current=s};function r(o,s){const a=e(o),l=e(s);return c=>{a&&a(c),l&&l(c)}}function n(o,s){return(0,t.useMemo)(()=>r(o,s),[o,s])}var i=n;return Ya.default=i,Ya}var Bh={},Lh={},qk;function q4(){if(qk)return Lh;qk=1,Lh.__esModule=!0,Lh.default=e;var t=N;function e(r){const n=(0,t.useRef)(r);return n.current=r,n}return Lh}var Zk;function E1(){if(Zk)return Bh;Zk=1,Bh.__esModule=!0,Bh.default=n;var t=r(q4()),e=N;function r(i){return i&&i.__esModule?i:{default:i}}function n(i){const o=(0,t.default)(i);(0,e.useEffect)(()=>()=>o.current(),[])}return Bh}function Z4(t){var e=C1(t);return e&&e.defaultView||window}function N4(t,e){return Z4(t).getComputedStyle(t,e)}var I4=/([A-Z])/g;function W4(t){return t.replace(I4,"-$1").toLowerCase()}var B4=/^ms-/;function Vh(t){return W4(t).replace(B4,"-ms-")}var L4=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function V4(t){return!!(t&&L4.test(t))}function UR(t,e){var r="",n="";if(typeof e=="string")return t.style.getPropertyValue(Vh(e))||N4(t).getPropertyValue(Vh(e));Object.keys(e).forEach(function(i){var o=e[i];!o&&o!==0?t.style.removeProperty(Vh(i)):V4(i)?n+=i+"("+o+") ":r+=Vh(i)+": "+o+";"}),n&&(r+="transform: "+n+";"),t.style.cssText+=";"+r}const X4=Object.freeze(Object.defineProperty({__proto__:null,default:UR},Symbol.toStringTag,{value:"Module"}));function Q1(t,e,r,n){return VR(t,e,r,n),function(){XR(t,e,r,n)}}const F4=Object.freeze(Object.defineProperty({__proto__:null,default:Q1},Symbol.toStringTag,{value:"Module"}));function U4(t,e,r,n){if(r===void 0&&(r=!1),n===void 0&&(n=!0),t){var i=document.createEvent("HTMLEvents");i.initEvent(e,r,n),t.dispatchEvent(i)}}function Y4(t){var e=UR(t,"transitionDuration")||"",r=e.indexOf("ms")===-1?1e3:1;return parseFloat(e)*r}function z4(t,e,r){r===void 0&&(r=5);var n=!1,i=setTimeout(function(){n||U4(t,"transitionend",!0)},e+r),o=Q1(t,"transitionend",function(){n=!0},{once:!0});return function(){clearTimeout(i),o()}}function G4(t,e,r,n){r==null&&(r=Y4(t)||0);var i=z4(t,r,n),o=Q1(t,"transitionend",e);return function(){i(),o()}}const H4=Object.freeze(Object.defineProperty({__proto__:null,default:G4},Symbol.toStringTag,{value:"Module"})),YR=Pn(H4);var qu={};function K4(t){t===void 0&&(t=C1());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}const J4=Object.freeze(Object.defineProperty({__proto__:null,default:K4},Symbol.toStringTag,{value:"Module"})),eV=Pn(J4);function tV(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}const rV=Object.freeze(Object.defineProperty({__proto__:null,default:tV},Symbol.toStringTag,{value:"Module"})),T1=Pn(rV),R1=Pn(F4);var Xh={},Nk;function A1(){if(Nk)return Xh;Nk=1,Xh.__esModule=!0,Xh.default=e;var t=N;function e(){const r=(0,t.useRef)(!0),n=(0,t.useRef)(()=>r.current);return(0,t.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),n.current}return Xh}var Fh={},Ik;function nV(){if(Ik)return Fh;Ik=1,Fh.__esModule=!0,Fh.default=e;var t=N;function e(r){const n=(0,t.useRef)(null);return(0,t.useEffect)(()=>{n.current=r}),n.current}return Fh}var Gs={};const M1=Pn(X4);var wo={},Wk;function iV(){if(Wk)return wo;Wk=1,wo.__esModule=!0,wo.dataAttr=r,wo.dataProp=n,wo.PROPERTY_PREFIX=wo.ATTRIBUTE_PREFIX=void 0;const t="data-rr-ui-";wo.ATTRIBUTE_PREFIX=t;const e="rrUi";wo.PROPERTY_PREFIX=e;function r(i){return`${t}${i}`}function n(i){return`${e}${i}`}return wo}var Uh={},Bk;function oV(){if(Bk)return Uh;Bk=1,Uh.__esModule=!0,Uh.default=t;function t(e=document){const r=e.defaultView;return Math.abs(r.innerWidth-e.documentElement.clientWidth)}return Uh}var Lk;function zR(){if(Lk)return Gs;Lk=1,Gs.__esModule=!0,Gs.default=Gs.OPEN_DATA_ATTRIBUTE=void 0;var t=n(M1),e=iV(),r=n(oV());function n(a){return a&&a.__esModule?a:{default:a}}const i=(0,e.dataAttr)("modal-open");Gs.OPEN_DATA_ATTRIBUTE=i;var s=class{constructor({ownerDocument:l,handleContainerOverflow:c=!0,isRTL:u=!1}={}){this.handleContainerOverflow=c,this.isRTL=u,this.modals=[],this.ownerDocument=l}getScrollbarWidth(){return(0,r.default)(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(l){}removeModalAttributes(l){}setContainerStyle(l){const c={overflow:"hidden"},u=this.isRTL?"paddingLeft":"paddingRight",f=this.getElement();l.style={overflow:f.style.overflow,[u]:f.style[u]},l.scrollBarWidth&&(c[u]=`${parseInt((0,t.default)(f,u)||"0",10)+l.scrollBarWidth}px`),f.setAttribute(i,""),(0,t.default)(f,c)}reset(){[...this.modals].forEach(l=>this.remove(l))}removeContainerStyle(l){const c=this.getElement();c.removeAttribute(i),Object.assign(c.style,l.style)}add(l){let c=this.modals.indexOf(l);return c!==-1||(c=this.modals.length,this.modals.push(l),this.setModalAttributes(l),c!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),c}remove(l){const c=this.modals.indexOf(l);c!==-1&&(this.modals.splice(c,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(l))}isTopModal(l){return!!this.modals.length&&this.modals[this.modals.length-1]===l}};return Gs.default=s,Gs}var za={},Ga={},Vk;function GR(){if(Vk)return Ga;Vk=1,Ga.__esModule=!0,Ga.default=o,Ga.WindowProvider=void 0;var t=N,e=r(qg);function r(s){return s&&s.__esModule?s:{default:s}}const n=(0,t.createContext)(e.default?window:void 0),i=n.Provider;Ga.WindowProvider=i;function o(){return(0,t.useContext)(n)}return Ga}var Xk;function HR(){if(Xk)return za;Xk=1,za.__esModule=!0,za.default=s,za.resolveContainerRef=void 0;var t=i(Zg),e=i(qg),r=N,n=i(GR());function i(a){return a&&a.__esModule?a:{default:a}}const o=(a,l)=>e.default?a==null?(l||(0,t.default)()).body:(typeof a=="function"&&(a=a()),a&&"current"in a&&(a=a.current),a&&("nodeType"in a||a.getBoundingClientRect)?a:null):null;za.resolveContainerRef=o;function s(a,l){const c=(0,n.default)(),[u,f]=(0,r.useState)(()=>o(a,c==null?void 0:c.document));if(!u){const h=o(a);h&&f(h)}return(0,r.useEffect)(()=>{l&&u&&l(u)},[l,u]),(0,r.useEffect)(()=>{const h=o(a);h!==u&&f(h)},[a,u]),u}return za}var Ha={},Zu={},Fk;function KR(){if(Fk)return Zu;Fk=1,Zu.__esModule=!0,Zu.default=void 0;var t=N;const e=typeof Vr<"u"&&Vr.navigator&&Vr.navigator.product==="ReactNative";var n=typeof document<"u"||e?t.useLayoutEffect:t.useEffect;return Zu.default=n,Zu}var Nu={},Uk;function sV(){if(Uk)return Nu;Uk=1,Nu.__esModule=!0,Nu.default=void 0;var t=n(Ws()),e=n(Bs()),r=N;function n(s){return s&&s.__esModule?s:{default:s}}function i({children:s,in:a,onExited:l,mountOnEnter:c,unmountOnExit:u}){const f=(0,r.useRef)(null),h=(0,r.useRef)(a),d=(0,t.default)(l);(0,r.useEffect)(()=>{a?h.current=!0:d(f.current)},[a,d]);const p=(0,e.default)(f,s.ref),g=(0,r.cloneElement)(s,{ref:p});return a?g:u||!h.current&&c?null:g}var o=i;return Nu.default=o,Nu}var Iu={},Yh={},Yk;function aV(){if(Yk)return Yh;Yk=1,Yh.__esModule=!0,Yh.default=o;var t=N,e=n(Bs());const r=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function n(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(s==null)return{};var l={},c=Object.keys(s),u,f;for(f=0;f<c.length;f++)u=c[f],!(a.indexOf(u)>=0)&&(l[u]=s[u]);return l}function o(s){let{onEnter:a,onEntering:l,onEntered:c,onExit:u,onExiting:f,onExited:h,addEndListener:d,children:p}=s,g=i(s,r);const m=(0,t.useRef)(null),y=(0,e.default)(m,typeof p=="function"?null:p.ref),O=x=>E=>{x&&m.current&&x(m.current,E)},v=(0,t.useCallback)(O(a),[a]),b=(0,t.useCallback)(O(l),[l]),w=(0,t.useCallback)(O(c),[c]),_=(0,t.useCallback)(O(u),[u]),C=(0,t.useCallback)(O(f),[f]),P=(0,t.useCallback)(O(h),[h]),k=(0,t.useCallback)(O(d),[d]);return Object.assign({},g,{nodeRef:m},a&&{onEnter:v},l&&{onEntering:b},c&&{onEntered:w},u&&{onExit:_},f&&{onExiting:C},h&&{onExited:P},d&&{addEndListener:k},{children:typeof p=="function"?(x,E)=>p(x,Object.assign({},E,{ref:y})):(0,t.cloneElement)(p,{ref:y})})}return Yh}var zk;function lV(){if(zk)return Iu;zk=1,Iu.__esModule=!0,Iu.default=void 0;var t=s(N),e=i(aV()),r=q;const n=["component"];function i(u){return u&&u.__esModule?u:{default:u}}function o(u){if(typeof WeakMap!="function")return null;var f=new WeakMap,h=new WeakMap;return(o=function(d){return d?h:f})(u)}function s(u,f){if(!f&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var h=o(f);if(h&&h.has(u))return h.get(u);var d={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in u)if(g!=="default"&&Object.prototype.hasOwnProperty.call(u,g)){var m=p?Object.getOwnPropertyDescriptor(u,g):null;m&&(m.get||m.set)?Object.defineProperty(d,g,m):d[g]=u[g]}return d.default=u,h&&h.set(u,d),d}function a(u,f){if(u==null)return{};var h={},d=Object.keys(u),p,g;for(g=0;g<d.length;g++)p=d[g],!(f.indexOf(p)>=0)&&(h[p]=u[p]);return h}var c=t.forwardRef((u,f)=>{let{component:h}=u,d=a(u,n);const p=(0,e.default)(d);return(0,r.jsx)(h,Object.assign({ref:f},p))});return Iu.default=c,Iu}var Gk;function JR(){if(Gk)return Ha;Gk=1,Ha.__esModule=!0,Ha.useTransition=u,Ha.default=f,Ha.renderTransition=h;var t=c(Bs()),e=c(Ws()),r=c(KR()),n=l(N),i=c(sV()),o=c(lV()),s=q;function a(d){if(typeof WeakMap!="function")return null;var p=new WeakMap,g=new WeakMap;return(a=function(m){return m?g:p})(d)}function l(d,p){if(!p&&d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var g=a(p);if(g&&g.has(d))return g.get(d);var m={},y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var O in d)if(O!=="default"&&Object.prototype.hasOwnProperty.call(d,O)){var v=y?Object.getOwnPropertyDescriptor(d,O):null;v&&(v.get||v.set)?Object.defineProperty(m,O,v):m[O]=d[O]}return m.default=d,g&&g.set(d,m),m}function c(d){return d&&d.__esModule?d:{default:d}}function u({in:d,onTransition:p}){const g=(0,n.useRef)(null),m=(0,n.useRef)(!0),y=(0,e.default)(p);return(0,r.default)(()=>{if(!g.current)return;let O=!1;return y({in:d,element:g.current,initial:m.current,isStale:()=>O}),()=>{O=!0}},[d,y]),(0,r.default)(()=>(m.current=!1,()=>{m.current=!0}),[]),g}function f({children:d,in:p,onExited:g,onEntered:m,transition:y}){const[O,v]=(0,n.useState)(!p);p&&O&&v(!1);const b=u({in:!!p,onTransition:_=>{const C=()=>{_.isStale()||(_.in?m==null||m(_.element,_.initial):(v(!0),g==null||g(_.element)))};Promise.resolve(y(_)).then(C,P=>{throw _.in||v(!0),P})}}),w=(0,t.default)(b,d.ref);return O&&!p?null:(0,n.cloneElement)(d,{ref:w})}function h(d,p,g){return d?(0,s.jsx)(o.default,Object.assign({},g,{component:d})):p?(0,s.jsx)(f,Object.assign({},g,{transition:p})):(0,s.jsx)(i.default,Object.assign({},g))}return Ha}var zh={},Hk;function eA(){if(Hk)return zh;Hk=1,zh.__esModule=!0,zh.isEscKey=t;function t(e){return e.code==="Escape"||e.keyCode===27}return zh}var Kk;function uV(){if(Kk)return qu;Kk=1,qu.__esModule=!0,qu.default=void 0;var t=v(eV),e=v(T1),r=v(qg),n=v(R1),i=O(N),o=v(Of),s=v(A1()),a=v(E1()),l=v(nV()),c=v(Ws()),u=v(zR()),f=v(HR()),h=v(GR()),d=JR(),p=eA(),g=q;const m=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function y(x){if(typeof WeakMap!="function")return null;var E=new WeakMap,R=new WeakMap;return(y=function(I){return I?R:E})(x)}function O(x,E){if(!E&&x&&x.__esModule)return x;if(x===null||typeof x!="object"&&typeof x!="function")return{default:x};var R=y(E);if(R&&R.has(x))return R.get(x);var I={},F=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var H in x)if(H!=="default"&&Object.prototype.hasOwnProperty.call(x,H)){var M=F?Object.getOwnPropertyDescriptor(x,H):null;M&&(M.get||M.set)?Object.defineProperty(I,H,M):I[H]=x[H]}return I.default=x,R&&R.set(x,I),I}function v(x){return x&&x.__esModule?x:{default:x}}function b(x,E){if(x==null)return{};var R={},I=Object.keys(x),F,H;for(H=0;H<I.length;H++)F=I[H],!(E.indexOf(F)>=0)&&(R[F]=x[F]);return R}let w;function _(x){return w||(w=new u.default({ownerDocument:x==null?void 0:x.document})),w}function C(x){const E=(0,h.default)(),R=x||_(E),I=(0,i.useRef)({dialog:null,backdrop:null});return Object.assign(I.current,{add:()=>R.add(I.current),remove:()=>R.remove(I.current),isTopModal:()=>R.isTopModal(I.current),setDialogRef:(0,i.useCallback)(F=>{I.current.dialog=F},[]),setBackdropRef:(0,i.useCallback)(F=>{I.current.backdrop=F},[])})}const P=(0,i.forwardRef)((x,E)=>{let{show:R=!1,role:I="dialog",className:F,style:H,children:M,backdrop:B=!0,keyboard:D=!0,onBackdropClick:X,onEscapeKeyDown:G,transition:se,runTransition:ce,backdropTransition:U,runBackdropTransition:K,autoFocus:oe=!0,enforceFocus:Re=!0,restoreFocus:T=!0,restoreFocusOptions:Z,renderDialog:V,renderBackdrop:ne=ze=>(0,g.jsx)("div",Object.assign({},ze)),manager:fe,container:ge,onShow:he,onHide:we=()=>{},onExit:Ae,onExited:it,onExiting:kt,onEnter:gr,onEntering:Ft,onEntered:er}=x,xn=b(x,m);const Pr=(0,h.default)(),$=(0,f.default)(ge),te=C(fe),pe=(0,s.default)(),$e=(0,l.default)(R),[ke,Te]=(0,i.useState)(!R),tt=(0,i.useRef)(null);(0,i.useImperativeHandle)(E,()=>te,[te]),r.default&&!$e&&R&&(tt.current=(0,t.default)(Pr==null?void 0:Pr.document)),R&&ke&&Te(!1);const nt=(0,c.default)(()=>{if(te.add(),Be.current=(0,n.default)(document,"keydown",Ce),Ze.current=(0,n.default)(document,"focus",()=>setTimeout(Qe),!0),he&&he(),oe){var ze,ut;const Rt=(0,t.default)((ze=(ut=te.dialog)==null?void 0:ut.ownerDocument)!=null?ze:Pr==null?void 0:Pr.document);te.dialog&&Rt&&!(0,e.default)(te.dialog,Rt)&&(tt.current=Rt,te.dialog.focus())}}),de=(0,c.default)(()=>{if(te.remove(),Be.current==null||Be.current(),Ze.current==null||Ze.current(),T){var ze;(ze=tt.current)==null||ze.focus==null||ze.focus(Z),tt.current=null}});(0,i.useEffect)(()=>{!R||!$||nt()},[R,$,nt]),(0,i.useEffect)(()=>{ke&&de()},[ke,de]),(0,a.default)(()=>{de()});const Qe=(0,c.default)(()=>{if(!Re||!pe()||!te.isTopModal())return;const ze=(0,t.default)(Pr==null?void 0:Pr.document);te.dialog&&ze&&!(0,e.default)(te.dialog,ze)&&te.dialog.focus()}),xe=(0,c.default)(ze=>{ze.target===ze.currentTarget&&(X==null||X(ze),B===!0&&we())}),Ce=(0,c.default)(ze=>{D&&(0,p.isEscKey)(ze)&&te.isTopModal()&&(G==null||G(ze),ze.defaultPrevented||we())}),Ze=(0,i.useRef)(),Be=(0,i.useRef)(),lt=(...ze)=>{Te(!0),it==null||it(...ze)};if(!$)return null;const ve=Object.assign({role:I,ref:te.setDialogRef,"aria-modal":I==="dialog"?!0:void 0},xn,{style:H,className:F,tabIndex:-1});let Xe=V?V(ve):(0,g.jsx)("div",Object.assign({},ve,{children:i.cloneElement(M,{role:"document"})}));Xe=(0,d.renderTransition)(se,ce,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!R,onExit:Ae,onExiting:kt,onExited:lt,onEnter:gr,onEntering:Ft,onEntered:er,children:Xe});let Ot=null;return B&&(Ot=ne({ref:te.setBackdropRef,onClick:xe}),Ot=(0,d.renderTransition)(U,K,{in:!!R,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Ot})),(0,g.jsx)(g.Fragment,{children:o.default.createPortal((0,g.jsxs)(g.Fragment,{children:[Ot,Xe]}),$)})});P.displayName="Modal";var k=Object.assign(P,{Manager:u.default});return qu.default=k,qu}var Ka={};function tA(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}const cV=Object.freeze(Object.defineProperty({__proto__:null,default:tA},Symbol.toStringTag,{value:"Module"}));function fV(t,e){t.classList?t.classList.add(e):tA(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}const hV=Object.freeze(Object.defineProperty({__proto__:null,default:fV},Symbol.toStringTag,{value:"Module"})),dV=Pn(hV);var pV=Function.prototype.bind.call(Function.prototype.call,[].slice);function gV(t,e){return pV(t.querySelectorAll(e))}const OV=Object.freeze(Object.defineProperty({__proto__:null,default:gV},Symbol.toStringTag,{value:"Module"})),mV=Pn(OV);function Jk(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function yV(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Jk(t.className,e):t.setAttribute("class",Jk(t.className&&t.className.baseVal||"",e))}const vV=Object.freeze(Object.defineProperty({__proto__:null,default:yV},Symbol.toStringTag,{value:"Module"})),bV=Pn(vV);var ex;function SV(){if(ex)return Ka;ex=1;var t=Et;Ka.__esModule=!0,Ka.default=void 0,Ka.getSharedManager=c;var e=t(dV),r=t(M1),n=t(mV),i=t(bV),o=t(zR());const s={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};let a=class extends o.default{adjustAndStore(f,h,d){const p=h.style[f];h.dataset[f]=p,(0,r.default)(h,{[f]:`${parseFloat((0,r.default)(h,f))+d}px`})}restore(f,h){const d=h.dataset[f];d!==void 0&&(delete h.dataset[f],(0,r.default)(h,{[f]:d}))}setContainerStyle(f){super.setContainerStyle(f);const h=this.getElement();if((0,e.default)(h,"modal-open"),!f.scrollBarWidth)return;const d=this.isRTL?"paddingLeft":"paddingRight",p=this.isRTL?"marginLeft":"marginRight";(0,n.default)(h,s.FIXED_CONTENT).forEach(g=>this.adjustAndStore(d,g,f.scrollBarWidth)),(0,n.default)(h,s.STICKY_CONTENT).forEach(g=>this.adjustAndStore(p,g,-f.scrollBarWidth)),(0,n.default)(h,s.NAVBAR_TOGGLER).forEach(g=>this.adjustAndStore(p,g,f.scrollBarWidth))}removeContainerStyle(f){super.removeContainerStyle(f);const h=this.getElement();(0,i.default)(h,"modal-open");const d=this.isRTL?"paddingLeft":"paddingRight",p=this.isRTL?"marginLeft":"marginRight";(0,n.default)(h,s.FIXED_CONTENT).forEach(g=>this.restore(d,g)),(0,n.default)(h,s.STICKY_CONTENT).forEach(g=>this.restore(p,g)),(0,n.default)(h,s.NAVBAR_TOGGLER).forEach(g=>this.restore(p,g))}},l;function c(u){return l||(l=new a(u)),l}return Ka.default=a,Ka}var Gh={exports:{}};function j1(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Ov(t,e){return Ov=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ov(t,e)}function rA(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ov(t,e)}Tf();const tx={disabled:!1},nA=Di.createContext(null);var wV=function(e){return e.scrollTop},Sl="unmounted",Ko="exited",Jo="entering",oa="entered",Yp="exiting",Wo=function(t){rA(e,t);function e(n,i){var o;o=t.call(this,n,i)||this;var s=i,a=s&&!s.isMounting?n.enter:n.appear,l;return o.appearStatus=null,n.in?a?(l=Ko,o.appearStatus=Jo):l=oa:n.unmountOnExit||n.mountOnEnter?l=Sl:l=Ko,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Sl?{status:Ko}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Jo&&s!==oa&&(o=Jo):(s===Jo||s===oa)&&(o=Yp)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},r.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Jo){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:rh.findDOMNode(this);s&&wV(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ko&&this.setState({status:Sl})},r.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[rh.findDOMNode(this),a],c=l[0],u=l[1],f=this.getTimeouts(),h=a?f.appear:f.enter;if(!i&&!s||tx.disabled){this.safeSetState({status:oa},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Jo},function(){o.props.onEntering(c,u),o.onTransitionEnd(h,function(){o.safeSetState({status:oa},function(){o.props.onEntered(c,u)})})})},r.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:rh.findDOMNode(this);if(!o||tx.disabled){this.safeSetState({status:Ko},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Yp},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ko},function(){i.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},r.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:rh.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===Sl)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=j1(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Di.createElement(nA.Provider,{value:null},typeof s=="function"?s(i,a):Di.cloneElement(Di.Children.only(s),a))},e}(Di.Component);Wo.contextType=nA;Wo.propTypes={};function Ja(){}Wo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ja,onEntering:Ja,onEntered:Ja,onExit:Ja,onExiting:Ja,onExited:Ja};Wo.UNMOUNTED=Sl;Wo.EXITED=Ko;Wo.ENTERING=Jo;Wo.ENTERED=oa;Wo.EXITING=Yp;const PV=Object.freeze(Object.defineProperty({__proto__:null,ENTERED:oa,ENTERING:Jo,EXITED:Ko,EXITING:Yp,UNMOUNTED:Sl,default:Wo},Symbol.toStringTag,{value:"Module"})),iA=Pn(PV);var Hh={exports:{}},rx;function kV(){return rx||(rx=1,function(t,e){var r=Et;e.__esModule=!0,e.default=s;var n=r(M1),i=r(YR);function o(a,l){const c=(0,n.default)(a,l)||"",u=c.indexOf("ms")===-1?1e3:1;return parseFloat(c)*u}function s(a,l){const c=o(a,"transitionDuration"),u=o(a,"transitionDelay"),f=(0,i.default)(a,h=>{h.target===a&&(f(),l(h))},c+u)}t.exports=e.default}(Hh,Hh.exports)),Hh.exports}var Kh={exports:{}},nx;function xV(){return nx||(nx=1,function(t,e){e.__esModule=!0,e.default=r;function r(n){n.offsetHeight}t.exports=e.default}(Kh,Kh.exports)),Kh.exports}var Jh={exports:{}},ed={exports:{}},ix;function D1(){return ix||(ix=1,function(t,e){var r=Et;e.__esModule=!0,e.default=i;var n=r(Of);function i(o){return o&&"setState"in o?n.default.findDOMNode(o):o??null}t.exports=e.default}(ed,ed.exports)),ed.exports}var ox;function _V(){return ox||(ox=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=c(N),i=r(iA),o=r(Bs()),s=r(D1()),a=q;function l(f){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(l=function(p){return p?d:h})(f)}function c(f,h){if(!h&&f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var d=l(h);if(d&&d.has(f))return d.get(f);var p={__proto__:null},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in f)if(m!=="default"&&Object.prototype.hasOwnProperty.call(f,m)){var y=g?Object.getOwnPropertyDescriptor(f,m):null;y&&(y.get||y.set)?Object.defineProperty(p,m,y):p[m]=f[m]}return p.default=f,d&&d.set(f,p),p}const u=n.default.forwardRef(({onEnter:f,onEntering:h,onEntered:d,onExit:p,onExiting:g,onExited:m,addEndListener:y,children:O,childRef:v,...b},w)=>{const _=(0,n.useRef)(null),C=(0,o.default)(_,v),P=B=>{C((0,s.default)(B))},k=B=>D=>{B&&_.current&&B(_.current,D)},x=(0,n.useCallback)(k(f),[f]),E=(0,n.useCallback)(k(h),[h]),R=(0,n.useCallback)(k(d),[d]),I=(0,n.useCallback)(k(p),[p]),F=(0,n.useCallback)(k(g),[g]),H=(0,n.useCallback)(k(m),[m]),M=(0,n.useCallback)(k(y),[y]);return(0,a.jsx)(i.default,{ref:w,...b,onEnter:x,onEntered:R,onEntering:E,onExit:I,onExited:H,onExiting:F,addEndListener:M,nodeRef:_,children:typeof O=="function"?(B,D)=>O(B,{...D,ref:P}):n.default.cloneElement(O,{ref:P})})});e.default=u,t.exports=e.default}(Jh,Jh.exports)),Jh.exports}var sx;function oA(){return sx||(sx=1,function(t,e){var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=h(N),o=i,s=iA,a=r(kV()),l=r(xV()),c=r(_V()),u=q;function f(g){if(typeof WeakMap!="function")return null;var m=new WeakMap,y=new WeakMap;return(f=function(O){return O?y:m})(g)}function h(g,m){if(!m&&g&&g.__esModule)return g;if(g===null||typeof g!="object"&&typeof g!="function")return{default:g};var y=f(m);if(y&&y.has(g))return y.get(g);var O={__proto__:null},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in g)if(b!=="default"&&Object.prototype.hasOwnProperty.call(g,b)){var w=v?Object.getOwnPropertyDescriptor(g,b):null;w&&(w.get||w.set)?Object.defineProperty(O,b,w):O[b]=g[b]}return O.default=g,y&&y.set(g,O),O}const d={[s.ENTERING]:"show",[s.ENTERED]:"show"},p=o.forwardRef(({className:g,children:m,transitionClasses:y={},onEnter:O,...v},b)=>{const w={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...v},_=(0,i.useCallback)((C,P)=>{(0,l.default)(C),O==null||O(C,P)},[O]);return(0,u.jsx)(c.default,{ref:b,addEndListener:a.default,...w,onEnter:_,childRef:m.ref,children:(C,P)=>o.cloneElement(m,{...P,className:(0,n.default)("fade",g,m.props.className,d[C],y[C])})})});p.displayName="Fade",e.default=p,t.exports=e.default}(Gh,Gh.exports)),Gh.exports}var td={exports:{}},ax;function $V(){return ax||(ax=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=l(N),i=r(Jt()),o=Er(),s=q;function a(u){if(typeof WeakMap!="function")return null;var f=new WeakMap,h=new WeakMap;return(a=function(d){return d?h:f})(u)}function l(u,f){if(!f&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var h=a(f);if(h&&h.has(u))return h.get(u);var d={__proto__:null},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in u)if(g!=="default"&&Object.prototype.hasOwnProperty.call(u,g)){var m=p?Object.getOwnPropertyDescriptor(u,g):null;m&&(m.get||m.set)?Object.defineProperty(d,g,m):d[g]=u[g]}return d.default=u,h&&h.set(u,d),d}const c=n.forwardRef(({className:u,bsPrefix:f,as:h="div",...d},p)=>(f=(0,o.useBootstrapPrefix)(f,"modal-body"),(0,s.jsx)(h,{ref:p,className:(0,i.default)(u,f),...d})));c.displayName="ModalBody",e.default=c,t.exports=e.default}(td,td.exports)),td.exports}var rd={exports:{}},lx;function sA(){return lx||(lx=1,function(t,e){"use client";e.__esModule=!0,e.default=void 0;var r=i(N);function n(s){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(n=function(c){return c?l:a})(s)}function i(s,a){if(!a&&s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var l=n(a);if(l&&l.has(s))return l.get(s);var c={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in s)if(f!=="default"&&Object.prototype.hasOwnProperty.call(s,f)){var h=u?Object.getOwnPropertyDescriptor(s,f):null;h&&(h.get||h.set)?Object.defineProperty(c,f,h):c[f]=s[f]}return c.default=s,l&&l.set(s,c),c}const o=r.createContext({onHide(){}});e.default=o,t.exports=e.default}(rd,rd.exports)),rd.exports}var nd={exports:{}},ux;function CV(){return ux||(ux=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=l(N),o=Er(),s=q;function a(u){if(typeof WeakMap!="function")return null;var f=new WeakMap,h=new WeakMap;return(a=function(d){return d?h:f})(u)}function l(u,f){if(!f&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var h=a(f);if(h&&h.has(u))return h.get(u);var d={__proto__:null},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in u)if(g!=="default"&&Object.prototype.hasOwnProperty.call(u,g)){var m=p?Object.getOwnPropertyDescriptor(u,g):null;m&&(m.get||m.set)?Object.defineProperty(d,g,m):d[g]=u[g]}return d.default=u,h&&h.set(u,d),d}const c=i.forwardRef(({bsPrefix:u,className:f,contentClassName:h,centered:d,size:p,fullscreen:g,children:m,scrollable:y,...O},v)=>{u=(0,o.useBootstrapPrefix)(u,"modal");const b=`${u}-dialog`,w=typeof g=="string"?`${u}-fullscreen-${g}`:`${u}-fullscreen`;return(0,s.jsx)("div",{...O,ref:v,className:(0,n.default)(b,f,p&&`${u}-${p}`,d&&`${b}-centered`,y&&`${b}-scrollable`,g&&w),children:(0,s.jsx)("div",{className:(0,n.default)(`${u}-content`,h),children:m})})});c.displayName="ModalDialog",e.default=c,t.exports=e.default}(nd,nd.exports)),nd.exports}var id={exports:{}},cx;function EV(){return cx||(cx=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=l(N),i=r(Jt()),o=Er(),s=q;function a(u){if(typeof WeakMap!="function")return null;var f=new WeakMap,h=new WeakMap;return(a=function(d){return d?h:f})(u)}function l(u,f){if(!f&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var h=a(f);if(h&&h.has(u))return h.get(u);var d={__proto__:null},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in u)if(g!=="default"&&Object.prototype.hasOwnProperty.call(u,g)){var m=p?Object.getOwnPropertyDescriptor(u,g):null;m&&(m.get||m.set)?Object.defineProperty(d,g,m):d[g]=u[g]}return d.default=u,h&&h.set(u,d),d}const c=n.forwardRef(({className:u,bsPrefix:f,as:h="div",...d},p)=>(f=(0,o.useBootstrapPrefix)(f,"modal-footer"),(0,s.jsx)(h,{ref:p,className:(0,i.default)(u,f),...d})));c.displayName="ModalFooter",e.default=c,t.exports=e.default}(id,id.exports)),id.exports}var od={exports:{}},sd={exports:{}},ad={exports:{}},fx;function QV(){return fx||(fx=1,function(t,e){var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Tf()),i=l(N),o=r(Jt()),s=q;function a(f){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(a=function(p){return p?d:h})(f)}function l(f,h){if(!h&&f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var d=a(h);if(d&&d.has(f))return d.get(f);var p={__proto__:null},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in f)if(m!=="default"&&Object.prototype.hasOwnProperty.call(f,m)){var y=g?Object.getOwnPropertyDescriptor(f,m):null;y&&(y.get||y.set)?Object.defineProperty(p,m,y):p[m]=f[m]}return p.default=f,d&&d.set(f,p),p}const c={"aria-label":n.default.string,onClick:n.default.func,variant:n.default.oneOf(["white"])},u=i.forwardRef(({className:f,variant:h,"aria-label":d="Close",...p},g)=>(0,s.jsx)("button",{ref:g,type:"button",className:(0,o.default)("btn-close",h&&`btn-close-${h}`,f),"aria-label":d,...p}));u.displayName="CloseButton",u.propTypes=c,e.default=u,t.exports=e.default}(ad,ad.exports)),ad.exports}var hx;function TV(){return hx||(hx=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=u(N),i=n,o=r(Ws()),s=r(QV()),a=r(sA()),l=q;function c(h){if(typeof WeakMap!="function")return null;var d=new WeakMap,p=new WeakMap;return(c=function(g){return g?p:d})(h)}function u(h,d){if(!d&&h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var p=c(d);if(p&&p.has(h))return p.get(h);var g={__proto__:null},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in h)if(y!=="default"&&Object.prototype.hasOwnProperty.call(h,y)){var O=m?Object.getOwnPropertyDescriptor(h,y):null;O&&(O.get||O.set)?Object.defineProperty(g,y,O):g[y]=h[y]}return g.default=h,p&&p.set(h,g),g}const f=i.forwardRef(({closeLabel:h="Close",closeVariant:d,closeButton:p=!1,onHide:g,children:m,...y},O)=>{const v=(0,n.useContext)(a.default),b=(0,o.default)(()=>{v==null||v.onHide(),g==null||g()});return(0,l.jsxs)("div",{ref:O,...y,children:[m,p&&(0,l.jsx)(s.default,{"aria-label":h,variant:d,onClick:b})]})});e.default=f,t.exports=e.default}(sd,sd.exports)),sd.exports}var dx;function RV(){return dx||(dx=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=c(N),o=Er(),s=r(TV()),a=q;function l(f){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(l=function(p){return p?d:h})(f)}function c(f,h){if(!h&&f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var d=l(h);if(d&&d.has(f))return d.get(f);var p={__proto__:null},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in f)if(m!=="default"&&Object.prototype.hasOwnProperty.call(f,m)){var y=g?Object.getOwnPropertyDescriptor(f,m):null;y&&(y.get||y.set)?Object.defineProperty(p,m,y):p[m]=f[m]}return p.default=f,d&&d.set(f,p),p}const u=i.forwardRef(({bsPrefix:f,className:h,closeLabel:d="Close",closeButton:p=!1,...g},m)=>(f=(0,o.useBootstrapPrefix)(f,"modal-header"),(0,a.jsx)(s.default,{ref:m,...g,className:(0,n.default)(h,f),closeLabel:d,closeButton:p})));u.displayName="ModalHeader",e.default=u,t.exports=e.default}(od,od.exports)),od.exports}var ld={exports:{}},ud={exports:{}},px;function AV(){return px||(px=1,function(t,e){var r=Et;e.__esModule=!0,e.default=void 0;var n=a(N),i=r(Jt()),o=q;function s(c){if(typeof WeakMap!="function")return null;var u=new WeakMap,f=new WeakMap;return(s=function(h){return h?f:u})(c)}function a(c,u){if(!u&&c&&c.__esModule)return c;if(c===null||typeof c!="object"&&typeof c!="function")return{default:c};var f=s(u);if(f&&f.has(c))return f.get(c);var h={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in c)if(p!=="default"&&Object.prototype.hasOwnProperty.call(c,p)){var g=d?Object.getOwnPropertyDescriptor(c,p):null;g&&(g.get||g.set)?Object.defineProperty(h,p,g):h[p]=c[p]}return h.default=c,f&&f.set(c,h),h}var l=c=>n.forwardRef((u,f)=>(0,o.jsx)("div",{...u,ref:f,className:(0,i.default)(u.className,c)}));e.default=l,t.exports=e.default}(ud,ud.exports)),ud.exports}var gx;function MV(){return gx||(gx=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=c(N),i=r(Jt()),o=r(AV()),s=Er(),a=q;function l(h){if(typeof WeakMap!="function")return null;var d=new WeakMap,p=new WeakMap;return(l=function(g){return g?p:d})(h)}function c(h,d){if(!d&&h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var p=l(d);if(p&&p.has(h))return p.get(h);var g={__proto__:null},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in h)if(y!=="default"&&Object.prototype.hasOwnProperty.call(h,y)){var O=m?Object.getOwnPropertyDescriptor(h,y):null;O&&(O.get||O.set)?Object.defineProperty(g,y,O):g[y]=h[y]}return g.default=h,p&&p.set(h,g),g}const u=(0,o.default)("h4"),f=n.forwardRef(({className:h,bsPrefix:d,as:p=u,...g},m)=>(d=(0,s.useBootstrapPrefix)(d,"modal-title"),(0,a.jsx)(p,{ref:m,className:(0,i.default)(h,d),...g})));f.displayName="ModalTitle",e.default=f,t.exports=e.default}(ld,ld.exports)),ld.exports}(function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=r(E4),o=r(qg),s=r(Zg),a=r(R4),l=r(j4),c=r(FR()),u=r(Ws()),f=r(Bs()),h=r(E1()),d=r(YR),p=R(N),g=p,m=r(uV()),y=SV(),O=r(oA()),v=r($V()),b=r(sA()),w=r(CV()),_=r(EV()),C=r(RV()),P=r(MV()),k=Er(),x=q;function E(M){if(typeof WeakMap!="function")return null;var B=new WeakMap,D=new WeakMap;return(E=function(X){return X?D:B})(M)}function R(M,B){if(!B&&M&&M.__esModule)return M;if(M===null||typeof M!="object"&&typeof M!="function")return{default:M};var D=E(B);if(D&&D.has(M))return D.get(M);var X={__proto__:null},G=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var se in M)if(se!=="default"&&Object.prototype.hasOwnProperty.call(M,se)){var ce=G?Object.getOwnPropertyDescriptor(M,se):null;ce&&(ce.get||ce.set)?Object.defineProperty(X,se,ce):X[se]=M[se]}return X.default=M,D&&D.set(M,X),X}function I(M){return(0,x.jsx)(O.default,{...M,timeout:null})}function F(M){return(0,x.jsx)(O.default,{...M,timeout:null})}const H=g.forwardRef(({bsPrefix:M,className:B,style:D,dialogClassName:X,contentClassName:G,children:se,dialogAs:ce=w.default,"data-bs-theme":U,"aria-labelledby":K,"aria-describedby":oe,"aria-label":Re,show:T=!1,animation:Z=!0,backdrop:V=!0,keyboard:ne=!0,onEscapeKeyDown:fe,onShow:ge,onHide:he,container:we,autoFocus:Ae=!0,enforceFocus:it=!0,restoreFocus:kt=!0,restoreFocusOptions:gr,onEntered:Ft,onExit:er,onExiting:xn,onEnter:Pr,onEntering:$,onExited:te,backdropClassName:pe,manager:$e,...ke},Te)=>{const[tt,nt]=(0,p.useState)({}),[de,Qe]=(0,p.useState)(!1),xe=(0,p.useRef)(!1),Ce=(0,p.useRef)(!1),Ze=(0,p.useRef)(null),[Be,lt]=(0,c.default)(),ve=(0,f.default)(Te,lt),Xe=(0,u.default)(he),Ot=(0,k.useIsRTL)();M=(0,k.useBootstrapPrefix)(M,"modal");const ze=(0,p.useMemo)(()=>({onHide:Xe}),[Xe]);function ut(){return $e||(0,y.getSharedManager)({isRTL:Ot})}function Rt(be){if(!o.default)return;const ft=ut().getScrollbarWidth()>0,dt=be.scrollHeight>(0,s.default)(be).documentElement.clientHeight;nt({paddingRight:ft&&!dt?(0,l.default)():void 0,paddingLeft:!ft&&dt?(0,l.default)():void 0})}const Gt=(0,u.default)(()=>{Be&&Rt(Be.dialog)});(0,h.default)(()=>{(0,a.default)(window,"resize",Gt),Ze.current==null||Ze.current()});const Lt=()=>{xe.current=!0},Ut=be=>{xe.current&&Be&&be.target===Be.dialog&&(Ce.current=!0),xe.current=!1},Tr=()=>{Qe(!0),Ze.current=(0,d.default)(Be.dialog,()=>{Qe(!1)})},kr=be=>{be.target===be.currentTarget&&Tr()},qn=be=>{if(V==="static"){kr(be);return}if(Ce.current||be.target!==be.currentTarget){Ce.current=!1;return}he==null||he()},Dr=be=>{ne?fe==null||fe(be):(be.preventDefault(),V==="static"&&Tr())},Ir=(be,ft)=>{be&&Rt(be),Pr==null||Pr(be,ft)},Wr=be=>{Ze.current==null||Ze.current(),er==null||er(be)},bt=(be,ft)=>{$==null||$(be,ft),(0,i.default)(window,"resize",Gt)},Le=be=>{be&&(be.style.display=""),te==null||te(be),(0,a.default)(window,"resize",Gt)},Ge=(0,p.useCallback)(be=>(0,x.jsx)("div",{...be,className:(0,n.default)(`${M}-backdrop`,pe,!Z&&"show")}),[Z,pe,M]),Je={...D,...tt};Je.display="block";const De=be=>(0,x.jsx)("div",{role:"dialog",...be,style:Je,className:(0,n.default)(B,M,de&&`${M}-static`,!Z&&"show"),onClick:V?qn:void 0,onMouseUp:Ut,"data-bs-theme":U,"aria-label":Re,"aria-labelledby":K,"aria-describedby":oe,children:(0,x.jsx)(ce,{...ke,onMouseDown:Lt,className:X,contentClassName:G,children:se})});return(0,x.jsx)(b.default.Provider,{value:ze,children:(0,x.jsx)(m.default,{show:T,ref:ve,backdrop:V,container:we,keyboard:!0,autoFocus:Ae,enforceFocus:it,restoreFocus:kt,restoreFocusOptions:gr,onEscapeKeyDown:Dr,onShow:ge,onHide:he,onEnter:Ir,onEntering:bt,onEntered:Ft,onExit:Wr,onExiting:xn,onExited:Le,manager:ut(),transition:Z?I:void 0,backdropTransition:Z?F:void 0,renderBackdrop:Ge,renderDialog:De})})});H.displayName="Modal",e.default=Object.assign(H,{Body:v.default,Header:C.default,Title:P.default,Footer:_.default,Dialog:w.default,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),t.exports=e.default})(gv,gv.exports);var jV=gv.exports;const fr=Pi(jV);var mv={exports:{}},cd={},Ox;function DV(){if(Ox)return cd;Ox=1,cd.__esModule=!0,cd.default=s;var t=N,e=n(A1()),r=n(E1());function n(a){return a&&a.__esModule?a:{default:a}}const i=2**31-1;function o(a,l,c){const u=c-Date.now();a.current=u<=i?setTimeout(l,u):setTimeout(()=>o(a,l,c),i)}function s(){const a=(0,e.default)(),l=(0,t.useRef)();return(0,r.default)(()=>clearTimeout(l.current)),(0,t.useMemo)(()=>{const c=()=>clearTimeout(l.current);function u(f,h=0){a()&&(c(),h<=i?l.current=setTimeout(f,h):o(l,f,Date.now()+h))}return{set:u,clear:c,handleRef:l}},[])}return cd}var qV=function(t,e,r,n,i,o,s,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,i,o,s,a],u=0;l=new Error(e.replace(/%s/g,function(){return c[u++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},ZV=qV;const NV=Pi(ZV);var IV=function(){};function WV(t,e){var r={};return Object.keys(t).forEach(function(n){r[Dl(n)]=IV}),r}function mx(t,e){return t[e]!==void 0}function Dl(t){return"default"+t.charAt(0).toUpperCase()+t.substr(1)}function BV(t){return!!t&&(typeof t!="function"||t.prototype&&t.prototype.isReactComponent)}function LV(t){var e=VV(t,"string");return typeof e=="symbol"?e:String(e)}function VV(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function aA(t,e,r){var n=N.useRef(t!==void 0),i=N.useState(e),o=i[0],s=i[1],a=t!==void 0,l=n.current;return n.current=a,!a&&l&&o!==e&&s(e),[a?t:o,N.useCallback(function(c){for(var u=arguments.length,f=new Array(u>1?u-1:0),h=1;h<u;h++)f[h-1]=arguments[h];r&&r.apply(void 0,[c].concat(f)),s(c)},[r])]}function XV(t,e){return Object.keys(e).reduce(function(r,n){var i,o=r,s=o[Dl(n)],a=o[n],l=j1(o,[Dl(n),n].map(LV)),c=e[n],u=aA(a,s,t[c]),f=u[0],h=u[1];return qr({},l,(i={},i[n]=f,i[c]=h,i))},t)}function lA(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function uA(t){function e(r){var n=this.constructor.getDerivedStateFromProps(t,r);return n??null}this.setState(e.bind(this))}function cA(t,e){try{var r=this.props,n=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}lA.__suppressDeprecationWarning=!0;uA.__suppressDeprecationWarning=!0;cA.__suppressDeprecationWarning=!0;function FV(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function")return t;var r=null,n=null,i=null;if(typeof e.componentWillMount=="function"?r="componentWillMount":typeof e.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof e.componentWillReceiveProps=="function"?n="componentWillReceiveProps":typeof e.UNSAFE_componentWillReceiveProps=="function"&&(n="UNSAFE_componentWillReceiveProps"),typeof e.componentWillUpdate=="function"?i="componentWillUpdate":typeof e.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),r!==null||n!==null||i!==null){var o=t.displayName||t.name,s=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
124
|
+
|
|
125
|
+
`+o+" uses "+s+" but also contains the following legacy lifecycles:"+(r!==null?`
|
|
126
|
+
`+r:"")+(n!==null?`
|
|
127
|
+
`+n:"")+(i!==null?`
|
|
128
|
+
`+i:"")+`
|
|
129
|
+
|
|
130
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
131
|
+
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof t.getDerivedStateFromProps=="function"&&(e.componentWillMount=lA,e.componentWillReceiveProps=uA),typeof e.getSnapshotBeforeUpdate=="function"){if(typeof e.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=cA;var a=e.componentDidUpdate;e.componentDidUpdate=function(c,u,f){var h=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:f;a.call(this,c,u,h)}}return t}var UV="/Users/jquense/src/uncontrollable/src/uncontrollable.js";function fA(t,e,r){r===void 0&&(r=[]);var n=t.displayName||t.name||"Component",i=BV(t),o=Object.keys(e),s=o.map(Dl);i||!r.length||NV(!1);var a=function(c){rA(u,c);function u(){for(var h,d=arguments.length,p=new Array(d),g=0;g<d;g++)p[g]=arguments[g];h=c.call.apply(c,[this].concat(p))||this,h.handlers=Object.create(null),o.forEach(function(y){var O=e[y],v=function(w){if(h.props[O]){var _;h._notifying=!0;for(var C=arguments.length,P=new Array(C>1?C-1:0),k=1;k<C;k++)P[k-1]=arguments[k];(_=h.props)[O].apply(_,[w].concat(P)),h._notifying=!1}h.unmounted||h.setState(function(x){var E,R=x.values;return{values:qr(Object.create(null),R,(E={},E[y]=w,E))}})};h.handlers[O]=v}),r.length&&(h.attachRef=function(y){h.inner=y});var m=Object.create(null);return o.forEach(function(y){m[y]=h.props[Dl(y)]}),h.state={values:m,prevProps:{}},h}var f=u.prototype;return f.shouldComponentUpdate=function(){return!this._notifying},u.getDerivedStateFromProps=function(d,p){var g=p.values,m=p.prevProps,y={values:qr(Object.create(null),g),prevProps:{}};return o.forEach(function(O){y.prevProps[O]=d[O],!mx(d,O)&&mx(m,O)&&(y.values[O]=d[Dl(O)])}),y},f.componentWillUnmount=function(){this.unmounted=!0},f.render=function(){var d=this,p=this.props,g=p.innerRef,m=j1(p,["innerRef"]);s.forEach(function(O){delete m[O]});var y={};return o.forEach(function(O){var v=d.props[O];y[O]=v!==void 0?v:d.state.values[O]}),Di.createElement(t,qr({},m,y,this.handlers,{ref:g||this.attachRef}))},u}(Di.Component);FV(a),a.displayName="Uncontrolled("+n+")",a.propTypes=qr({innerRef:function(){}},WV(e)),r.forEach(function(c){a.prototype[c]=function(){var f;return(f=this.inner)[c].apply(f,arguments)}});var l=a;return Di.forwardRef&&(l=Di.forwardRef(function(c,u){return Di.createElement(a,qr({},c,{innerRef:u,__source:{fileName:UV,lineNumber:128},__self:this}))}),l.propTypes=a.propTypes),l.ControlledComponent=t,l.deferControlTo=function(c,u,f){return u===void 0&&(u={}),fA(c,qr({},e,u),f)},l}const YV=Object.freeze(Object.defineProperty({__proto__:null,uncontrollable:fA,useUncontrolled:XV,useUncontrolledProp:aA},Symbol.toStringTag,{value:"Module"})),zV=Pn(YV);var fd={exports:{}},Wu={},Bu={},HO={},yx;function GV(){if(yx)return HO;yx=1;var t=Object.prototype.hasOwnProperty;function e(n,i,o){for(o of n.keys())if(r(o,i))return o}function r(n,i){var o,s,a;if(n===i)return!0;if(n&&i&&(o=n.constructor)===i.constructor){if(o===Date)return n.getTime()===i.getTime();if(o===RegExp)return n.toString()===i.toString();if(o===Array){if((s=n.length)===i.length)for(;s--&&r(n[s],i[s]););return s===-1}if(o===Set){if(n.size!==i.size)return!1;for(s of n)if(a=s,a&&typeof a=="object"&&(a=e(i,a),!a)||!i.has(a))return!1;return!0}if(o===Map){if(n.size!==i.size)return!1;for(s of n)if(a=s[0],a&&typeof a=="object"&&(a=e(i,a),!a)||!r(s[1],i.get(a)))return!1;return!0}if(o===ArrayBuffer)n=new Uint8Array(n),i=new Uint8Array(i);else if(o===DataView){if((s=n.byteLength)===i.byteLength)for(;s--&&n.getInt8(s)===i.getInt8(s););return s===-1}if(ArrayBuffer.isView(n)){if((s=n.byteLength)===i.byteLength)for(;s--&&n[s]===i[s];);return s===-1}if(!o||typeof n=="object"){s=0;for(o in n)if(t.call(n,o)&&++s&&!t.call(i,o)||!(o in i)||!r(n[o],i[o]))return!1;return Object.keys(i).length===s}}return n!==n&&i!==i}return HO.dequal=r,HO}var Lu={},vx;function HV(){if(vx)return Lu;vx=1,Lu.__esModule=!0,Lu.default=void 0;var t=N,e=r(A1());function r(o){return o&&o.__esModule?o:{default:o}}function n(o){const s=(0,e.default)();return[o[0],(0,t.useCallback)(a=>{if(s())return o[1](a)},[s,o[1]])]}var i=n;return Lu.default=i,Lu}var hd={},bx;function KV(){if(bx)return hd;bx=1;var t="top",e="bottom",r="right",n="left",i="auto",o=[t,e,r,n],s="start",a="end",l="clippingParents",c="viewport",u="popper",f="reference",h=o.reduce(function(W,L){return W.concat([L+"-"+s,L+"-"+a])},[]),d=[].concat(o,[i]).reduce(function(W,L){return W.concat([L,L+"-"+s,L+"-"+a])},[]),p="beforeRead",g="read",m="afterRead",y="beforeMain",O="main",v="afterMain",b="beforeWrite",w="write",_="afterWrite",C=[p,g,m,y,O,v,b,w,_];function P(W){return W.split("-")[0]}function k(W){if(W==null)return window;if(W.toString()!=="[object Window]"){var L=W.ownerDocument;return L&&L.defaultView||window}return W}function x(W){var L=k(W).Element;return W instanceof L||W instanceof Element}function E(W){var L=k(W).HTMLElement;return W instanceof L||W instanceof HTMLElement}function R(W){if(typeof ShadowRoot>"u")return!1;var L=k(W).ShadowRoot;return W instanceof L||W instanceof ShadowRoot}var I=Math.max,F=Math.min,H=Math.round;function M(){var W=navigator.userAgentData;return W!=null&&W.brands?W.brands.map(function(L){return L.brand+"/"+L.version}).join(" "):navigator.userAgent}function B(){return!/^((?!chrome|android).)*safari/i.test(M())}function D(W,L,z){L===void 0&&(L=!1),z===void 0&&(z=!1);var ue=W.getBoundingClientRect(),J=1,me=1;L&&E(W)&&(J=W.offsetWidth>0&&H(ue.width)/W.offsetWidth||1,me=W.offsetHeight>0&&H(ue.height)/W.offsetHeight||1);var Me=x(W)?k(W):window,ye=Me.visualViewport,Pe=!B()&&z,rt=(ue.left+(Pe&&ye?ye.offsetLeft:0))/J,qe=(ue.top+(Pe&&ye?ye.offsetTop:0))/me,$t=ue.width/J,Vt=ue.height/me;return{width:$t,height:Vt,top:qe,right:rt+$t,bottom:qe+Vt,left:rt,x:rt,y:qe}}function X(W){var L=D(W),z=W.offsetWidth,ue=W.offsetHeight;return Math.abs(L.width-z)<=1&&(z=L.width),Math.abs(L.height-ue)<=1&&(ue=L.height),{x:W.offsetLeft,y:W.offsetTop,width:z,height:ue}}function G(W,L){var z=L.getRootNode&&L.getRootNode();if(W.contains(L))return!0;if(z&&R(z)){var ue=L;do{if(ue&&W.isSameNode(ue))return!0;ue=ue.parentNode||ue.host}while(ue)}return!1}function se(W){return W?(W.nodeName||"").toLowerCase():null}function ce(W){return k(W).getComputedStyle(W)}function U(W){return["table","td","th"].indexOf(se(W))>=0}function K(W){return((x(W)?W.ownerDocument:W.document)||window.document).documentElement}function oe(W){return se(W)==="html"?W:W.assignedSlot||W.parentNode||(R(W)?W.host:null)||K(W)}function Re(W){return!E(W)||ce(W).position==="fixed"?null:W.offsetParent}function T(W){var L=/firefox/i.test(M()),z=/Trident/i.test(M());if(z&&E(W)){var ue=ce(W);if(ue.position==="fixed")return null}var J=oe(W);for(R(J)&&(J=J.host);E(J)&&["html","body"].indexOf(se(J))<0;){var me=ce(J);if(me.transform!=="none"||me.perspective!=="none"||me.contain==="paint"||["transform","perspective"].indexOf(me.willChange)!==-1||L&&me.willChange==="filter"||L&&me.filter&&me.filter!=="none")return J;J=J.parentNode}return null}function Z(W){for(var L=k(W),z=Re(W);z&&U(z)&&ce(z).position==="static";)z=Re(z);return z&&(se(z)==="html"||se(z)==="body"&&ce(z).position==="static")?L:z||T(W)||L}function V(W){return["top","bottom"].indexOf(W)>=0?"x":"y"}function ne(W,L,z){return I(W,F(L,z))}function fe(W,L,z){var ue=ne(W,L,z);return ue>z?z:ue}function ge(){return{top:0,right:0,bottom:0,left:0}}function he(W){return Object.assign({},ge(),W)}function we(W,L){return L.reduce(function(z,ue){return z[ue]=W,z},{})}var Ae=function(L,z){return L=typeof L=="function"?L(Object.assign({},z.rects,{placement:z.placement})):L,he(typeof L!="number"?L:we(L,o))};function it(W){var L,z=W.state,ue=W.name,J=W.options,me=z.elements.arrow,Me=z.modifiersData.popperOffsets,ye=P(z.placement),Pe=V(ye),rt=[n,r].indexOf(ye)>=0,qe=rt?"height":"width";if(!(!me||!Me)){var $t=Ae(J.padding,z),Vt=X(me),ot=Pe==="y"?t:n,St=Pe==="y"?e:r,vt=z.rects.reference[qe]+z.rects.reference[Pe]-Me[Pe]-z.rects.popper[qe],yt=Me[Pe]-z.rects.reference[Pe],Pt=Z(me),mr=Pt?Pe==="y"?Pt.clientHeight||0:Pt.clientWidth||0:0,lr=vt/2-yt/2,wt=$t[ot],Xt=mr-Vt[qe]-$t[St],It=mr/2-Vt[qe]/2+lr,yr=ne(wt,It,Xt),Br=Pe;z.modifiersData[ue]=(L={},L[Br]=yr,L.centerOffset=yr-It,L)}}function kt(W){var L=W.state,z=W.options,ue=z.element,J=ue===void 0?"[data-popper-arrow]":ue;J!=null&&(typeof J=="string"&&(J=L.elements.popper.querySelector(J),!J)||G(L.elements.popper,J)&&(L.elements.arrow=J))}var gr={name:"arrow",enabled:!0,phase:"main",fn:it,effect:kt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ft(W){return W.split("-")[1]}var er={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xn(W){var L=W.x,z=W.y,ue=window,J=ue.devicePixelRatio||1;return{x:H(L*J)/J||0,y:H(z*J)/J||0}}function Pr(W){var L,z=W.popper,ue=W.popperRect,J=W.placement,me=W.variation,Me=W.offsets,ye=W.position,Pe=W.gpuAcceleration,rt=W.adaptive,qe=W.roundOffsets,$t=W.isFixed,Vt=Me.x,ot=Vt===void 0?0:Vt,St=Me.y,vt=St===void 0?0:St,yt=typeof qe=="function"?qe({x:ot,y:vt}):{x:ot,y:vt};ot=yt.x,vt=yt.y;var Pt=Me.hasOwnProperty("x"),mr=Me.hasOwnProperty("y"),lr=n,wt=t,Xt=window;if(rt){var It=Z(z),yr="clientHeight",Br="clientWidth";if(It===k(z)&&(It=K(z),ce(It).position!=="static"&&ye==="absolute"&&(yr="scrollHeight",Br="scrollWidth")),It=It,J===t||(J===n||J===r)&&me===a){wt=e;var Ar=$t&&It===Xt&&Xt.visualViewport?Xt.visualViewport.height:It[yr];vt-=Ar-ue.height,vt*=Pe?1:-1}if(J===n||(J===t||J===e)&&me===a){lr=r;var xr=$t&&It===Xt&&Xt.visualViewport?Xt.visualViewport.width:It[Br];ot-=xr-ue.width,ot*=Pe?1:-1}}var Lr=Object.assign({position:ye},rt&&er),Yn=qe===!0?xn({x:ot,y:vt}):{x:ot,y:vt};if(ot=Yn.x,vt=Yn.y,Pe){var Jr;return Object.assign({},Lr,(Jr={},Jr[wt]=mr?"0":"",Jr[lr]=Pt?"0":"",Jr.transform=(Xt.devicePixelRatio||1)<=1?"translate("+ot+"px, "+vt+"px)":"translate3d("+ot+"px, "+vt+"px, 0)",Jr))}return Object.assign({},Lr,(L={},L[wt]=mr?vt+"px":"",L[lr]=Pt?ot+"px":"",L.transform="",L))}function $(W){var L=W.state,z=W.options,ue=z.gpuAcceleration,J=ue===void 0?!0:ue,me=z.adaptive,Me=me===void 0?!0:me,ye=z.roundOffsets,Pe=ye===void 0?!0:ye,rt={placement:P(L.placement),variation:Ft(L.placement),popper:L.elements.popper,popperRect:L.rects.popper,gpuAcceleration:J,isFixed:L.options.strategy==="fixed"};L.modifiersData.popperOffsets!=null&&(L.styles.popper=Object.assign({},L.styles.popper,Pr(Object.assign({},rt,{offsets:L.modifiersData.popperOffsets,position:L.options.strategy,adaptive:Me,roundOffsets:Pe})))),L.modifiersData.arrow!=null&&(L.styles.arrow=Object.assign({},L.styles.arrow,Pr(Object.assign({},rt,{offsets:L.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:Pe})))),L.attributes.popper=Object.assign({},L.attributes.popper,{"data-popper-placement":L.placement})}var te={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:$,data:{}},pe={passive:!0};function $e(W){var L=W.state,z=W.instance,ue=W.options,J=ue.scroll,me=J===void 0?!0:J,Me=ue.resize,ye=Me===void 0?!0:Me,Pe=k(L.elements.popper),rt=[].concat(L.scrollParents.reference,L.scrollParents.popper);return me&&rt.forEach(function(qe){qe.addEventListener("scroll",z.update,pe)}),ye&&Pe.addEventListener("resize",z.update,pe),function(){me&&rt.forEach(function(qe){qe.removeEventListener("scroll",z.update,pe)}),ye&&Pe.removeEventListener("resize",z.update,pe)}}var ke={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:$e,data:{}},Te={left:"right",right:"left",bottom:"top",top:"bottom"};function tt(W){return W.replace(/left|right|bottom|top/g,function(L){return Te[L]})}var nt={start:"end",end:"start"};function de(W){return W.replace(/start|end/g,function(L){return nt[L]})}function Qe(W){var L=k(W),z=L.pageXOffset,ue=L.pageYOffset;return{scrollLeft:z,scrollTop:ue}}function xe(W){return D(K(W)).left+Qe(W).scrollLeft}function Ce(W,L){var z=k(W),ue=K(W),J=z.visualViewport,me=ue.clientWidth,Me=ue.clientHeight,ye=0,Pe=0;if(J){me=J.width,Me=J.height;var rt=B();(rt||!rt&&L==="fixed")&&(ye=J.offsetLeft,Pe=J.offsetTop)}return{width:me,height:Me,x:ye+xe(W),y:Pe}}function Ze(W){var L,z=K(W),ue=Qe(W),J=(L=W.ownerDocument)==null?void 0:L.body,me=I(z.scrollWidth,z.clientWidth,J?J.scrollWidth:0,J?J.clientWidth:0),Me=I(z.scrollHeight,z.clientHeight,J?J.scrollHeight:0,J?J.clientHeight:0),ye=-ue.scrollLeft+xe(W),Pe=-ue.scrollTop;return ce(J||z).direction==="rtl"&&(ye+=I(z.clientWidth,J?J.clientWidth:0)-me),{width:me,height:Me,x:ye,y:Pe}}function Be(W){var L=ce(W),z=L.overflow,ue=L.overflowX,J=L.overflowY;return/auto|scroll|overlay|hidden/.test(z+J+ue)}function lt(W){return["html","body","#document"].indexOf(se(W))>=0?W.ownerDocument.body:E(W)&&Be(W)?W:lt(oe(W))}function ve(W,L){var z;L===void 0&&(L=[]);var ue=lt(W),J=ue===((z=W.ownerDocument)==null?void 0:z.body),me=k(ue),Me=J?[me].concat(me.visualViewport||[],Be(ue)?ue:[]):ue,ye=L.concat(Me);return J?ye:ye.concat(ve(oe(Me)))}function Xe(W){return Object.assign({},W,{left:W.x,top:W.y,right:W.x+W.width,bottom:W.y+W.height})}function Ot(W,L){var z=D(W,!1,L==="fixed");return z.top=z.top+W.clientTop,z.left=z.left+W.clientLeft,z.bottom=z.top+W.clientHeight,z.right=z.left+W.clientWidth,z.width=W.clientWidth,z.height=W.clientHeight,z.x=z.left,z.y=z.top,z}function ze(W,L,z){return L===c?Xe(Ce(W,z)):x(L)?Ot(L,z):Xe(Ze(K(W)))}function ut(W){var L=ve(oe(W)),z=["absolute","fixed"].indexOf(ce(W).position)>=0,ue=z&&E(W)?Z(W):W;return x(ue)?L.filter(function(J){return x(J)&&G(J,ue)&&se(J)!=="body"}):[]}function Rt(W,L,z,ue){var J=L==="clippingParents"?ut(W):[].concat(L),me=[].concat(J,[z]),Me=me[0],ye=me.reduce(function(Pe,rt){var qe=ze(W,rt,ue);return Pe.top=I(qe.top,Pe.top),Pe.right=F(qe.right,Pe.right),Pe.bottom=F(qe.bottom,Pe.bottom),Pe.left=I(qe.left,Pe.left),Pe},ze(W,Me,ue));return ye.width=ye.right-ye.left,ye.height=ye.bottom-ye.top,ye.x=ye.left,ye.y=ye.top,ye}function Gt(W){var L=W.reference,z=W.element,ue=W.placement,J=ue?P(ue):null,me=ue?Ft(ue):null,Me=L.x+L.width/2-z.width/2,ye=L.y+L.height/2-z.height/2,Pe;switch(J){case t:Pe={x:Me,y:L.y-z.height};break;case e:Pe={x:Me,y:L.y+L.height};break;case r:Pe={x:L.x+L.width,y:ye};break;case n:Pe={x:L.x-z.width,y:ye};break;default:Pe={x:L.x,y:L.y}}var rt=J?V(J):null;if(rt!=null){var qe=rt==="y"?"height":"width";switch(me){case s:Pe[rt]=Pe[rt]-(L[qe]/2-z[qe]/2);break;case a:Pe[rt]=Pe[rt]+(L[qe]/2-z[qe]/2);break}}return Pe}function Lt(W,L){L===void 0&&(L={});var z=L,ue=z.placement,J=ue===void 0?W.placement:ue,me=z.strategy,Me=me===void 0?W.strategy:me,ye=z.boundary,Pe=ye===void 0?l:ye,rt=z.rootBoundary,qe=rt===void 0?c:rt,$t=z.elementContext,Vt=$t===void 0?u:$t,ot=z.altBoundary,St=ot===void 0?!1:ot,vt=z.padding,yt=vt===void 0?0:vt,Pt=he(typeof yt!="number"?yt:we(yt,o)),mr=Vt===u?f:u,lr=W.rects.popper,wt=W.elements[St?mr:Vt],Xt=Rt(x(wt)?wt:wt.contextElement||K(W.elements.popper),Pe,qe,Me),It=D(W.elements.reference),yr=Gt({reference:It,element:lr,strategy:"absolute",placement:J}),Br=Xe(Object.assign({},lr,yr)),Ar=Vt===u?Br:It,xr={top:Xt.top-Ar.top+Pt.top,bottom:Ar.bottom-Xt.bottom+Pt.bottom,left:Xt.left-Ar.left+Pt.left,right:Ar.right-Xt.right+Pt.right},Lr=W.modifiersData.offset;if(Vt===u&&Lr){var Yn=Lr[J];Object.keys(xr).forEach(function(Jr){var si=[r,e].indexOf(Jr)>=0?1:-1,ai=[t,e].indexOf(Jr)>=0?"y":"x";xr[Jr]+=Yn[ai]*si})}return xr}function Ut(W,L){L===void 0&&(L={});var z=L,ue=z.placement,J=z.boundary,me=z.rootBoundary,Me=z.padding,ye=z.flipVariations,Pe=z.allowedAutoPlacements,rt=Pe===void 0?d:Pe,qe=Ft(ue),$t=qe?ye?h:h.filter(function(St){return Ft(St)===qe}):o,Vt=$t.filter(function(St){return rt.indexOf(St)>=0});Vt.length===0&&(Vt=$t);var ot=Vt.reduce(function(St,vt){return St[vt]=Lt(W,{placement:vt,boundary:J,rootBoundary:me,padding:Me})[P(vt)],St},{});return Object.keys(ot).sort(function(St,vt){return ot[St]-ot[vt]})}function Tr(W){if(P(W)===i)return[];var L=tt(W);return[de(W),L,de(L)]}function kr(W){var L=W.state,z=W.options,ue=W.name;if(!L.modifiersData[ue]._skip){for(var J=z.mainAxis,me=J===void 0?!0:J,Me=z.altAxis,ye=Me===void 0?!0:Me,Pe=z.fallbackPlacements,rt=z.padding,qe=z.boundary,$t=z.rootBoundary,Vt=z.altBoundary,ot=z.flipVariations,St=ot===void 0?!0:ot,vt=z.allowedAutoPlacements,yt=L.options.placement,Pt=P(yt),mr=Pt===yt,lr=Pe||(mr||!St?[tt(yt)]:Tr(yt)),wt=[yt].concat(lr).reduce(function(mo,li){return mo.concat(P(li)===i?Ut(L,{placement:li,boundary:qe,rootBoundary:$t,padding:rt,flipVariations:St,allowedAutoPlacements:vt}):li)},[]),Xt=L.rects.reference,It=L.rects.popper,yr=new Map,Br=!0,Ar=wt[0],xr=0;xr<wt.length;xr++){var Lr=wt[xr],Yn=P(Lr),Jr=Ft(Lr)===s,si=[t,e].indexOf(Yn)>=0,ai=si?"width":"height",pn=Lt(L,{placement:Lr,boundary:qe,rootBoundary:$t,altBoundary:Vt,padding:rt}),Cn=si?Jr?r:n:Jr?e:t;Xt[ai]>It[ai]&&(Cn=tt(Cn));var Aa=tt(Cn),Xi=[];if(me&&Xi.push(pn[Yn]<=0),ye&&Xi.push(pn[Cn]<=0,pn[Aa]<=0),Xi.every(function(mo){return mo})){Ar=Lr,Br=!1;break}yr.set(Lr,Xi)}if(Br)for(var Ma=St?3:1,ja=function(li){var Bo=wt.find(function(yo){var vo=yr.get(yo);if(vo)return vo.slice(0,li).every(function(Da){return Da})});if(Bo)return Ar=Bo,"break"},Ls=Ma;Ls>0;Ls--){var Vs=ja(Ls);if(Vs==="break")break}L.placement!==Ar&&(L.modifiersData[ue]._skip=!0,L.placement=Ar,L.reset=!0)}}var qn={name:"flip",enabled:!0,phase:"main",fn:kr,requiresIfExists:["offset"],data:{_skip:!1}};function Dr(W,L,z){return z===void 0&&(z={x:0,y:0}),{top:W.top-L.height-z.y,right:W.right-L.width+z.x,bottom:W.bottom-L.height+z.y,left:W.left-L.width-z.x}}function Ir(W){return[t,r,e,n].some(function(L){return W[L]>=0})}function Wr(W){var L=W.state,z=W.name,ue=L.rects.reference,J=L.rects.popper,me=L.modifiersData.preventOverflow,Me=Lt(L,{elementContext:"reference"}),ye=Lt(L,{altBoundary:!0}),Pe=Dr(Me,ue),rt=Dr(ye,J,me),qe=Ir(Pe),$t=Ir(rt);L.modifiersData[z]={referenceClippingOffsets:Pe,popperEscapeOffsets:rt,isReferenceHidden:qe,hasPopperEscaped:$t},L.attributes.popper=Object.assign({},L.attributes.popper,{"data-popper-reference-hidden":qe,"data-popper-escaped":$t})}var bt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Wr};function Le(W,L,z){var ue=P(W),J=[n,t].indexOf(ue)>=0?-1:1,me=typeof z=="function"?z(Object.assign({},L,{placement:W})):z,Me=me[0],ye=me[1];return Me=Me||0,ye=(ye||0)*J,[n,r].indexOf(ue)>=0?{x:ye,y:Me}:{x:Me,y:ye}}function Ge(W){var L=W.state,z=W.options,ue=W.name,J=z.offset,me=J===void 0?[0,0]:J,Me=d.reduce(function(qe,$t){return qe[$t]=Le($t,L.rects,me),qe},{}),ye=Me[L.placement],Pe=ye.x,rt=ye.y;L.modifiersData.popperOffsets!=null&&(L.modifiersData.popperOffsets.x+=Pe,L.modifiersData.popperOffsets.y+=rt),L.modifiersData[ue]=Me}var Je={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ge};function De(W){var L=W.state,z=W.name;L.modifiersData[z]=Gt({reference:L.rects.reference,element:L.rects.popper,strategy:"absolute",placement:L.placement})}var be={name:"popperOffsets",enabled:!0,phase:"read",fn:De,data:{}};function ft(W){return W==="x"?"y":"x"}function dt(W){var L=W.state,z=W.options,ue=W.name,J=z.mainAxis,me=J===void 0?!0:J,Me=z.altAxis,ye=Me===void 0?!1:Me,Pe=z.boundary,rt=z.rootBoundary,qe=z.altBoundary,$t=z.padding,Vt=z.tether,ot=Vt===void 0?!0:Vt,St=z.tetherOffset,vt=St===void 0?0:St,yt=Lt(L,{boundary:Pe,rootBoundary:rt,padding:$t,altBoundary:qe}),Pt=P(L.placement),mr=Ft(L.placement),lr=!mr,wt=V(Pt),Xt=ft(wt),It=L.modifiersData.popperOffsets,yr=L.rects.reference,Br=L.rects.popper,Ar=typeof vt=="function"?vt(Object.assign({},L.rects,{placement:L.placement})):vt,xr=typeof Ar=="number"?{mainAxis:Ar,altAxis:Ar}:Object.assign({mainAxis:0,altAxis:0},Ar),Lr=L.modifiersData.offset?L.modifiersData.offset[L.placement]:null,Yn={x:0,y:0};if(It){if(me){var Jr,si=wt==="y"?t:n,ai=wt==="y"?e:r,pn=wt==="y"?"height":"width",Cn=It[wt],Aa=Cn+yt[si],Xi=Cn-yt[ai],Ma=ot?-Br[pn]/2:0,ja=mr===s?yr[pn]:Br[pn],Ls=mr===s?-Br[pn]:-yr[pn],Vs=L.elements.arrow,mo=ot&&Vs?X(Vs):{width:0,height:0},li=L.modifiersData["arrow#persistent"]?L.modifiersData["arrow#persistent"].padding:ge(),Bo=li[si],yo=li[ai],vo=ne(0,yr[pn],mo[pn]),Da=lr?yr[pn]/2-Ma-vo-Bo-xr.mainAxis:ja-vo-Bo-xr.mainAxis,Rf=lr?-yr[pn]/2+Ma+vo+yo+xr.mainAxis:Ls+vo+yo+xr.mainAxis,du=L.elements.arrow&&Z(L.elements.arrow),qa=du?wt==="y"?du.clientTop||0:du.clientLeft||0:0,Af=(Jr=Lr==null?void 0:Lr[wt])!=null?Jr:0,Za=Cn+Da-Af-qa,Ig=Cn+Rf-Af,Xs=ne(ot?F(Aa,Za):Aa,Cn,ot?I(Xi,Ig):Xi);It[wt]=Xs,Yn[wt]=Xs-Cn}if(ye){var Mf,jf=wt==="x"?t:n,Df=wt==="x"?e:r,bo=It[Xt],So=Xt==="y"?"height":"width",pu=bo+yt[jf],gu=bo-yt[Df],Na=[t,n].indexOf(Pt)!==-1,qf=(Mf=Lr==null?void 0:Lr[Xt])!=null?Mf:0,Ou=Na?pu:bo-yr[So]-Br[So]-qf+xr.altAxis,mu=Na?bo+yr[So]+Br[So]-qf-xr.altAxis:gu,Zf=ot&&Na?fe(Ou,bo,mu):ne(ot?Ou:pu,bo,ot?mu:gu);It[Xt]=Zf,Yn[Xt]=Zf-bo}L.modifiersData[ue]=Yn}}var xt={name:"preventOverflow",enabled:!0,phase:"main",fn:dt,requiresIfExists:["offset"]};function Ht(W){return{scrollLeft:W.scrollLeft,scrollTop:W.scrollTop}}function ir(W){return W===k(W)||!E(W)?Qe(W):Ht(W)}function Yt(W){var L=W.getBoundingClientRect(),z=H(L.width)/W.offsetWidth||1,ue=H(L.height)/W.offsetHeight||1;return z!==1||ue!==1}function Or(W,L,z){z===void 0&&(z=!1);var ue=E(L),J=E(L)&&Yt(L),me=K(L),Me=D(W,J,z),ye={scrollLeft:0,scrollTop:0},Pe={x:0,y:0};return(ue||!ue&&!z)&&((se(L)!=="body"||Be(me))&&(ye=ir(L)),E(L)?(Pe=D(L,!0),Pe.x+=L.clientLeft,Pe.y+=L.clientTop):me&&(Pe.x=xe(me))),{x:Me.left+ye.scrollLeft-Pe.x,y:Me.top+ye.scrollTop-Pe.y,width:Me.width,height:Me.height}}function mt(W){var L=new Map,z=new Set,ue=[];W.forEach(function(me){L.set(me.name,me)});function J(me){z.add(me.name);var Me=[].concat(me.requires||[],me.requiresIfExists||[]);Me.forEach(function(ye){if(!z.has(ye)){var Pe=L.get(ye);Pe&&J(Pe)}}),ue.push(me)}return W.forEach(function(me){z.has(me.name)||J(me)}),ue}function ct(W){var L=mt(W);return C.reduce(function(z,ue){return z.concat(L.filter(function(J){return J.phase===ue}))},[])}function Ue(W){var L;return function(){return L||(L=new Promise(function(z){Promise.resolve().then(function(){L=void 0,z(W())})})),L}}function _t(W){var L=W.reduce(function(z,ue){var J=z[ue.name];return z[ue.name]=J?Object.assign({},J,ue,{options:Object.assign({},J.options,ue.options),data:Object.assign({},J.data,ue.data)}):ue,z},{});return Object.keys(L).map(function(z){return L[z]})}var Rr={placement:"bottom",modifiers:[],strategy:"absolute"};function Zn(){for(var W=arguments.length,L=new Array(W),z=0;z<W;z++)L[z]=arguments[z];return!L.some(function(ue){return!(ue&&typeof ue.getBoundingClientRect=="function")})}function _n(W){W===void 0&&(W={});var L=W,z=L.defaultModifiers,ue=z===void 0?[]:z,J=L.defaultOptions,me=J===void 0?Rr:J;return function(ye,Pe,rt){rt===void 0&&(rt=me);var qe={placement:"bottom",orderedModifiers:[],options:Object.assign({},Rr,me),modifiersData:{},elements:{reference:ye,popper:Pe},attributes:{},styles:{}},$t=[],Vt=!1,ot={state:qe,setOptions:function(Pt){var mr=typeof Pt=="function"?Pt(qe.options):Pt;vt(),qe.options=Object.assign({},me,qe.options,mr),qe.scrollParents={reference:x(ye)?ve(ye):ye.contextElement?ve(ye.contextElement):[],popper:ve(Pe)};var lr=ct(_t([].concat(ue,qe.options.modifiers)));return qe.orderedModifiers=lr.filter(function(wt){return wt.enabled}),St(),ot.update()},forceUpdate:function(){if(!Vt){var Pt=qe.elements,mr=Pt.reference,lr=Pt.popper;if(Zn(mr,lr)){qe.rects={reference:Or(mr,Z(lr),qe.options.strategy==="fixed"),popper:X(lr)},qe.reset=!1,qe.placement=qe.options.placement,qe.orderedModifiers.forEach(function(xr){return qe.modifiersData[xr.name]=Object.assign({},xr.data)});for(var wt=0;wt<qe.orderedModifiers.length;wt++){if(qe.reset===!0){qe.reset=!1,wt=-1;continue}var Xt=qe.orderedModifiers[wt],It=Xt.fn,yr=Xt.options,Br=yr===void 0?{}:yr,Ar=Xt.name;typeof It=="function"&&(qe=It({state:qe,options:Br,name:Ar,instance:ot})||qe)}}}},update:Ue(function(){return new Promise(function(yt){ot.forceUpdate(),yt(qe)})}),destroy:function(){vt(),Vt=!0}};if(!Zn(ye,Pe))return ot;ot.setOptions(rt).then(function(yt){!Vt&&rt.onFirstUpdate&&rt.onFirstUpdate(yt)});function St(){qe.orderedModifiers.forEach(function(yt){var Pt=yt.name,mr=yt.options,lr=mr===void 0?{}:mr,wt=yt.effect;if(typeof wt=="function"){var Xt=wt({state:qe,name:Pt,instance:ot,options:lr}),It=function(){};$t.push(Xt||It)}})}function vt(){$t.forEach(function(yt){return yt()}),$t=[]}return ot}}const $n=_n({defaultModifiers:[bt,be,te,ke,Je,qn,xt,gr]});return hd.createPopper=$n,hd.placements=d,hd}var Sx;function JV(){if(Sx)return Bu;Sx=1,Bu.__esModule=!0,Bu.default=void 0;var t=N,e=GV(),r=o(HV()),n=KV();const i=["enabled","placement","strategy","modifiers"];function o(h){return h&&h.__esModule?h:{default:h}}function s(h,d){if(h==null)return{};var p={},g=Object.keys(h),m,y;for(y=0;y<g.length;y++)m=g[y],!(d.indexOf(m)>=0)&&(p[m]=h[m]);return p}const a={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},l={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:h})=>()=>{const{reference:d,popper:p}=h.elements;if("removeAttribute"in d){const g=(d.getAttribute("aria-describedby")||"").split(",").filter(m=>m.trim()!==p.id);g.length?d.setAttribute("aria-describedby",g.join(",")):d.removeAttribute("aria-describedby")}},fn:({state:h})=>{var d;const{popper:p,reference:g}=h.elements,m=(d=p.getAttribute("role"))==null?void 0:d.toLowerCase();if(p.id&&m==="tooltip"&&"setAttribute"in g){const y=g.getAttribute("aria-describedby");if(y&&y.split(",").indexOf(p.id)!==-1)return;g.setAttribute("aria-describedby",y?`${y},${p.id}`:p.id)}}},c=[];function u(h,d,p={}){let{enabled:g=!0,placement:m="bottom",strategy:y="absolute",modifiers:O=c}=p,v=s(p,i);const b=(0,t.useRef)(O),w=(0,t.useRef)(),_=(0,t.useCallback)(()=>{var R;(R=w.current)==null||R.update()},[]),C=(0,t.useCallback)(()=>{var R;(R=w.current)==null||R.forceUpdate()},[]),[P,k]=(0,r.default)((0,t.useState)({placement:m,update:_,forceUpdate:C,attributes:{},styles:{popper:{},arrow:{}}})),x=(0,t.useMemo)(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:R})=>{const I={},F={};Object.keys(R.elements).forEach(H=>{I[H]=R.styles[H],F[H]=R.attributes[H]}),k({state:R,styles:I,attributes:F,update:_,forceUpdate:C,placement:R.placement})}}),[_,C,k]),E=(0,t.useMemo)(()=>((0,e.dequal)(b.current,O)||(b.current=O),b.current),[O]);return(0,t.useEffect)(()=>{!w.current||!g||w.current.setOptions({placement:m,strategy:y,modifiers:[...E,x,a]})},[y,m,x,g,E]),(0,t.useEffect)(()=>{if(!(!g||h==null||d==null))return w.current=(0,n.createPopper)(h,d,Object.assign({},v,{placement:m,strategy:y,modifiers:[...E,l,x]})),()=>{w.current!=null&&(w.current.destroy(),w.current=void 0,k(R=>Object.assign({},R,{attributes:{},styles:{popper:{}}})))}},[g,h,d]),P}var f=u;return Bu.default=f,Bu}var Vu={},Hs={},wx;function eX(){if(wx)return Hs;wx=1,Hs.__esModule=!0,Hs.default=Hs.getRefTarget=void 0;var t=s(T1),e=s(R1),r=s(Zg),n=N,i=s(Ws()),o=s(Dg());function s(p){return p&&p.__esModule?p:{default:p}}const a=()=>{};function l(p){return p.button===0}function c(p){return!!(p.metaKey||p.altKey||p.ctrlKey||p.shiftKey)}const u=p=>p&&("current"in p?p.current:p);Hs.getRefTarget=u;const f={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function h(p,g=a,{disabled:m,clickTrigger:y="click"}={}){const O=(0,n.useRef)(!1),v=(0,n.useRef)(!1),b=(0,n.useCallback)(C=>{const P=u(p);(0,o.default)(!!P,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),O.current=!P||c(C)||!l(C)||!!(0,t.default)(P,C.target)||v.current,v.current=!1},[p]),w=(0,i.default)(C=>{const P=u(p);P&&(0,t.default)(P,C.target)&&(v.current=!0)}),_=(0,i.default)(C=>{O.current||g(C)});(0,n.useEffect)(()=>{var C,P;if(m||p==null)return;const k=(0,r.default)(u(p)),x=k.defaultView||window;let E=(C=x.event)!=null?C:(P=x.parent)==null?void 0:P.event,R=null;f[y]&&(R=(0,e.default)(k,f[y],w,!0));const I=(0,e.default)(k,y,b,!0),F=(0,e.default)(k,y,M=>{if(M===E){E=void 0;return}_(M)});let H=[];return"ontouchstart"in k.documentElement&&(H=[].slice.call(k.body.children).map(M=>(0,e.default)(M,"mousemove",a))),()=>{R==null||R(),I(),F(),H.forEach(M=>M())}},[p,m,y,b,w,_])}var d=h;return Hs.default=d,Hs}var Px;function tX(){if(Px)return Vu;Px=1,Vu.__esModule=!0,Vu.default=void 0;var t=l(R1),e=l(Zg),r=N,n=l(Ws()),i=a(eX()),o=eA();function s(h){if(typeof WeakMap!="function")return null;var d=new WeakMap,p=new WeakMap;return(s=function(g){return g?p:d})(h)}function a(h,d){if(!d&&h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var p=s(d);if(p&&p.has(h))return p.get(h);var g={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in h)if(y!=="default"&&Object.prototype.hasOwnProperty.call(h,y)){var O=m?Object.getOwnPropertyDescriptor(h,y):null;O&&(O.get||O.set)?Object.defineProperty(g,y,O):g[y]=h[y]}return g.default=h,p&&p.set(h,g),g}function l(h){return h&&h.__esModule?h:{default:h}}const c=()=>{};function u(h,d,{disabled:p,clickTrigger:g}={}){const m=d||c;(0,i.default)(h,m,{disabled:p,clickTrigger:g});const y=(0,n.default)(O=>{(0,o.isEscKey)(O)&&m(O)});(0,r.useEffect)(()=>{if(p||h==null)return;const O=(0,e.default)((0,i.getRefTarget)(h));let v=(O.defaultView||window).event;const b=(0,t.default)(O,"keyup",w=>{if(w===v){v=void 0;return}y(w)});return()=>{b()}},[h,p,y])}var f=u;return Vu.default=f,Vu}var el={},kx;function rX(){if(kx)return el;kx=1,el.__esModule=!0,el.toModifierMap=t,el.toModifierArray=e,el.default=r;function t(n){const i={};return Array.isArray(n)?(n==null||n.forEach(o=>{i[o.name]=o}),i):n||i}function e(n={}){return Array.isArray(n)?n:Object.keys(n).map(i=>(n[i].name=i,n[i]))}function r({enabled:n,enableEvents:i,placement:o,flip:s,offset:a,fixed:l,containerPadding:c,arrowElement:u,popperConfig:f={}}){var h,d,p,g,m;const y=t(f.modifiers);return Object.assign({},f,{placement:o,enabled:n,strategy:l?"fixed":f.strategy,modifiers:e(Object.assign({},y,{eventListeners:{enabled:i,options:(h=y.eventListeners)==null?void 0:h.options},preventOverflow:Object.assign({},y.preventOverflow,{options:c?Object.assign({padding:c},(d=y.preventOverflow)==null?void 0:d.options):(p=y.preventOverflow)==null?void 0:p.options}),offset:{options:Object.assign({offset:a},(g=y.offset)==null?void 0:g.options)},arrow:Object.assign({},y.arrow,{enabled:!!u,options:Object.assign({},(m=y.arrow)==null?void 0:m.options,{element:u})}),flip:Object.assign({enabled:!!s},y.flip)}))})}return el}var xx;function nX(){if(xx)return Wu;xx=1,Wu.__esModule=!0,Wu.default=void 0;var t=f(N),e=c(Of),r=c(FR()),n=c(Bs()),i=c(JV()),o=c(tX()),s=c(HR()),a=c(rX()),l=JR();function c(p){return p&&p.__esModule?p:{default:p}}function u(p){if(typeof WeakMap!="function")return null;var g=new WeakMap,m=new WeakMap;return(u=function(y){return y?m:g})(p)}function f(p,g){if(!g&&p&&p.__esModule)return p;if(p===null||typeof p!="object"&&typeof p!="function")return{default:p};var m=u(g);if(m&&m.has(p))return m.get(p);var y={},O=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in p)if(v!=="default"&&Object.prototype.hasOwnProperty.call(p,v)){var b=O?Object.getOwnPropertyDescriptor(p,v):null;b&&(b.get||b.set)?Object.defineProperty(y,v,b):y[v]=p[v]}return y.default=p,m&&m.set(p,y),y}const h=t.forwardRef((p,g)=>{const{flip:m,offset:y,placement:O,containerPadding:v,popperConfig:b={},transition:w,runTransition:_}=p,[C,P]=(0,r.default)(),[k,x]=(0,r.default)(),E=(0,n.default)(P,g),R=(0,s.default)(p.container),I=(0,s.default)(p.target),[F,H]=(0,t.useState)(!p.show),M=(0,i.default)(I,C,(0,a.default)({placement:O,enableEvents:!!p.show,containerPadding:v||5,flip:m,offset:y,arrowElement:k,popperConfig:b}));p.show&&F&&H(!1);const B=(...oe)=>{H(!0),p.onExited&&p.onExited(...oe)},D=p.show||!F;if((0,o.default)(C,p.onHide,{disabled:!p.rootClose||p.rootCloseDisabled,clickTrigger:p.rootCloseEvent}),!D)return null;const{onExit:X,onExiting:G,onEnter:se,onEntering:ce,onEntered:U}=p;let K=p.children(Object.assign({},M.attributes.popper,{style:M.styles.popper,ref:E}),{popper:M,placement:O,show:!!p.show,arrowProps:Object.assign({},M.attributes.arrow,{style:M.styles.arrow,ref:x})});return K=(0,l.renderTransition)(w,_,{in:!!p.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:K,onExit:X,onExiting:G,onExited:B,onEnter:se,onEntering:ce,onEntered:U}),R?e.default.createPortal(K,R):null});h.displayName="Overlay";var d=h;return Wu.default=d,Wu}var dd={exports:{}};const iX=Pn(cV);var pd={exports:{}},gd={exports:{}},_x;function oX(){return _x||(_x=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=l(N),i=r(Jt()),o=Er(),s=q;function a(u){if(typeof WeakMap!="function")return null;var f=new WeakMap,h=new WeakMap;return(a=function(d){return d?h:f})(u)}function l(u,f){if(!f&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var h=a(f);if(h&&h.has(u))return h.get(u);var d={__proto__:null},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in u)if(g!=="default"&&Object.prototype.hasOwnProperty.call(u,g)){var m=p?Object.getOwnPropertyDescriptor(u,g):null;m&&(m.get||m.set)?Object.defineProperty(d,g,m):d[g]=u[g]}return d.default=u,h&&h.set(u,d),d}const c=n.forwardRef(({className:u,bsPrefix:f,as:h="div",...d},p)=>(f=(0,o.useBootstrapPrefix)(f,"popover-header"),(0,s.jsx)(h,{ref:p,className:(0,i.default)(u,f),...d})));c.displayName="PopoverHeader",e.default=c,t.exports=e.default}(gd,gd.exports)),gd.exports}var Od={exports:{}},$x;function sX(){return $x||($x=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=l(N),i=r(Jt()),o=Er(),s=q;function a(u){if(typeof WeakMap!="function")return null;var f=new WeakMap,h=new WeakMap;return(a=function(d){return d?h:f})(u)}function l(u,f){if(!f&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var h=a(f);if(h&&h.has(u))return h.get(u);var d={__proto__:null},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in u)if(g!=="default"&&Object.prototype.hasOwnProperty.call(u,g)){var m=p?Object.getOwnPropertyDescriptor(u,g):null;m&&(m.get||m.set)?Object.defineProperty(d,g,m):d[g]=u[g]}return d.default=u,h&&h.set(u,d),d}const c=n.forwardRef(({className:u,bsPrefix:f,as:h="div",...d},p)=>(f=(0,o.useBootstrapPrefix)(f,"popover-body"),(0,s.jsx)(h,{ref:p,className:(0,i.default)(u,f),...d})));c.displayName="PopoverBody",e.default=c,t.exports=e.default}(Od,Od.exports)),Od.exports}var tl={},Cx;function hA(){if(Cx)return tl;Cx=1,tl.__esModule=!0,tl.BsPrefixComponent=void 0,tl.getOverlayDirection=i;var t=r(N);function e(o){if(typeof WeakMap!="function")return null;var s=new WeakMap,a=new WeakMap;return(e=function(l){return l?a:s})(o)}function r(o,s){if(!s&&o&&o.__esModule)return o;if(o===null||typeof o!="object"&&typeof o!="function")return{default:o};var a=e(s);if(a&&a.has(o))return a.get(o);var l={__proto__:null},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in o)if(u!=="default"&&Object.prototype.hasOwnProperty.call(o,u)){var f=c?Object.getOwnPropertyDescriptor(o,u):null;f&&(f.get||f.set)?Object.defineProperty(l,u,f):l[u]=o[u]}return l.default=o,a&&a.set(o,l),l}class n extends t.Component{}tl.BsPrefixComponent=n;function i(o,s){let a=o;return o==="left"?a=s?"end":"start":o==="right"&&(a=s?"start":"end"),a}return tl}var md={exports:{}},Ex;function dA(){return Ex||(Ex=1,function(t,e){e.__esModule=!0,e.default=r;function r(n="absolute"){return{position:n,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}t.exports=e.default}(md,md.exports)),md.exports}var Qx;function aX(){return Qx||(Qx=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=h(N),o=Er(),s=r(oX()),a=r(sX()),l=hA(),c=r(dA()),u=q;function f(p){if(typeof WeakMap!="function")return null;var g=new WeakMap,m=new WeakMap;return(f=function(y){return y?m:g})(p)}function h(p,g){if(!g&&p&&p.__esModule)return p;if(p===null||typeof p!="object"&&typeof p!="function")return{default:p};var m=f(g);if(m&&m.has(p))return m.get(p);var y={__proto__:null},O=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in p)if(v!=="default"&&Object.prototype.hasOwnProperty.call(p,v)){var b=O?Object.getOwnPropertyDescriptor(p,v):null;b&&(b.get||b.set)?Object.defineProperty(y,v,b):y[v]=p[v]}return y.default=p,m&&m.set(p,y),y}const d=i.forwardRef(({bsPrefix:p,placement:g="right",className:m,style:y,children:O,body:v,arrowProps:b,hasDoneInitialMeasure:w,popper:_,show:C,...P},k)=>{const x=(0,o.useBootstrapPrefix)(p,"popover"),E=(0,o.useIsRTL)(),[R]=(g==null?void 0:g.split("-"))||[],I=(0,l.getOverlayDirection)(R,E);let F=y;return C&&!w&&(F={...y,...(0,c.default)(_==null?void 0:_.strategy)}),(0,u.jsxs)("div",{ref:k,role:"tooltip",style:F,"x-placement":R,className:(0,n.default)(m,x,R&&`bs-popover-${I}`),...P,children:[(0,u.jsx)("div",{className:"popover-arrow",...b}),v?(0,u.jsx)(a.default,{children:O}):O]})});e.default=Object.assign(d,{Header:s.default,Body:a.default,POPPER_OFFSET:[0,8]}),t.exports=e.default}(pd,pd.exports)),pd.exports}var yv={exports:{}};(function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(Jt()),i=u(N),o=Er(),s=hA(),a=r(dA()),l=q;function c(h){if(typeof WeakMap!="function")return null;var d=new WeakMap,p=new WeakMap;return(c=function(g){return g?p:d})(h)}function u(h,d){if(!d&&h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var p=c(d);if(p&&p.has(h))return p.get(h);var g={__proto__:null},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in h)if(y!=="default"&&Object.prototype.hasOwnProperty.call(h,y)){var O=m?Object.getOwnPropertyDescriptor(h,y):null;O&&(O.get||O.set)?Object.defineProperty(g,y,O):g[y]=h[y]}return g.default=h,p&&p.set(h,g),g}const f=i.forwardRef(({bsPrefix:h,placement:d="right",className:p,style:g,children:m,arrowProps:y,hasDoneInitialMeasure:O,popper:v,show:b,...w},_)=>{h=(0,o.useBootstrapPrefix)(h,"tooltip");const C=(0,o.useIsRTL)(),[P]=(d==null?void 0:d.split("-"))||[],k=(0,s.getOverlayDirection)(P,C);let x=g;return b&&!O&&(x={...g,...(0,a.default)(v==null?void 0:v.strategy)}),(0,l.jsxs)("div",{ref:_,style:x,role:"tooltip","x-placement":P,className:(0,n.default)(p,h,`bs-tooltip-${k}`),...w,children:[(0,l.jsx)("div",{className:"tooltip-arrow",...y}),(0,l.jsx)("div",{className:`${h}-inner`,children:m})]})});f.displayName="Tooltip",e.default=Object.assign(f,{TOOLTIP_OFFSET:[0,6]}),t.exports=e.default})(yv,yv.exports);var pA=yv.exports;const _o=Pi(pA);var Tx;function lX(){return Tx||(Tx=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=l;var n=N,i=r(iX),o=Er(),s=r(aX()),a=r(pA);function l(c){const u=(0,n.useRef)(null),f=(0,o.useBootstrapPrefix)(void 0,"popover"),h=(0,o.useBootstrapPrefix)(void 0,"tooltip"),d=(0,n.useMemo)(()=>({name:"offset",options:{offset:()=>{if(c)return c;if(u.current){if((0,i.default)(u.current,f))return s.default.POPPER_OFFSET;if((0,i.default)(u.current,h))return a.default.TOOLTIP_OFFSET}return[0,0]}}}),[c,f,h]);return[u,[d]]}t.exports=e.default}(dd,dd.exports)),dd.exports}var Rx;function uX(){return Rx||(Rx=1,function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=g(N),i=n,o=r(Jt()),s=r(nX()),a=r(Ws()),l=r(KR()),c=r(Bs()),u=r(lX()),f=r(oA()),h=r(D1()),d=q;function p(O){if(typeof WeakMap!="function")return null;var v=new WeakMap,b=new WeakMap;return(p=function(w){return w?b:v})(O)}function g(O,v){if(!v&&O&&O.__esModule)return O;if(O===null||typeof O!="object"&&typeof O!="function")return{default:O};var b=p(v);if(b&&b.has(O))return b.get(O);var w={__proto__:null},_=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in O)if(C!=="default"&&Object.prototype.hasOwnProperty.call(O,C)){var P=_?Object.getOwnPropertyDescriptor(O,C):null;P&&(P.get||P.set)?Object.defineProperty(w,C,P):w[C]=O[C]}return w.default=O,b&&b.set(O,w),w}function m(O,v){const{ref:b}=O,{ref:w}=v;O.ref=b.__wrapped||(b.__wrapped=_=>b((0,h.default)(_))),v.ref=w.__wrapped||(w.__wrapped=_=>w((0,h.default)(_)))}const y=i.forwardRef(({children:O,transition:v=f.default,popperConfig:b={},rootClose:w=!1,placement:_="top",show:C=!1,...P},k)=>{const x=(0,n.useRef)({}),[E,R]=(0,n.useState)(null),[I,F]=(0,u.default)(P.offset),H=(0,c.default)(k,I),M=v===!0?f.default:v||void 0,B=(0,a.default)(D=>{R(D),b==null||b.onFirstUpdate==null||b.onFirstUpdate(D)});return(0,l.default)(()=>{E&&P.target&&(x.current.scheduleUpdate==null||x.current.scheduleUpdate())},[E,P.target]),(0,n.useEffect)(()=>{C||R(null)},[C]),(0,d.jsx)(s.default,{...P,ref:H,popperConfig:{...b,modifiers:F.concat(b.modifiers||[]),onFirstUpdate:B},transition:M,rootClose:w,placement:_,show:C,children:(D,{arrowProps:X,popper:G,show:se})=>{var ce,U;m(D,X);const K=G==null?void 0:G.placement,oe=Object.assign(x.current,{state:G==null?void 0:G.state,scheduleUpdate:G==null?void 0:G.update,placement:K,outOfBoundaries:(G==null||(ce=G.state)==null||(U=ce.modifiersData.hide)==null?void 0:U.isReferenceHidden)||!1,strategy:b.strategy}),Re=!!E;return typeof O=="function"?O({...D,placement:K,show:se,...!v&&se&&{className:"show"},popper:oe,arrowProps:X,hasDoneInitialMeasure:Re}):i.cloneElement(O,{...D,placement:K,arrowProps:X,popper:oe,hasDoneInitialMeasure:Re,className:(0,o.default)(O.props.className,!v&&se&&"show"),style:{...O.props.style,...D.style}})}})});y.displayName="Overlay",e.default=y,t.exports=e.default}(fd,fd.exports)),fd.exports}(function(t,e){"use client";var r=Et;e.__esModule=!0,e.default=void 0;var n=r(T1),i=r(Tf()),o=p(N),s=o,a=r(DV());r(Dg());var l=zV,c=r(Bs()),u=r(uX()),f=r(D1()),h=q;function d(O){if(typeof WeakMap!="function")return null;var v=new WeakMap,b=new WeakMap;return(d=function(w){return w?b:v})(O)}function p(O,v){if(!v&&O&&O.__esModule)return O;if(O===null||typeof O!="object"&&typeof O!="function")return{default:O};var b=d(v);if(b&&b.has(O))return b.get(O);var w={__proto__:null},_=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in O)if(C!=="default"&&Object.prototype.hasOwnProperty.call(O,C)){var P=_?Object.getOwnPropertyDescriptor(O,C):null;P&&(P.get||P.set)?Object.defineProperty(w,C,P):w[C]=O[C]}return w.default=O,b&&b.set(O,w),w}function g(O){return O&&typeof O=="object"?O:{show:O,hide:O}}function m(O,v,b){const[w]=v,_=w.currentTarget,C=w.relatedTarget||w.nativeEvent[b];(!C||C!==_)&&!(0,n.default)(_,C)&&O(...v)}i.default.oneOf(["click","hover","focus"]);const y=({trigger:O=["hover","focus"],overlay:v,children:b,popperConfig:w={},show:_,defaultShow:C=!1,onToggle:P,delay:k,placement:x,flip:E=x&&x.indexOf("auto")!==-1,...R})=>{const I=(0,o.useRef)(null),F=(0,c.default)(I,b.ref),H=(0,a.default)(),M=(0,o.useRef)(""),[B,D]=(0,l.useUncontrolledProp)(_,C,P),X=g(k),{onFocus:G,onBlur:se,onClick:ce}=typeof b!="function"?s.Children.only(b).props:{},U=he=>{F((0,f.default)(he))},K=(0,o.useCallback)(()=>{if(H.clear(),M.current="show",!X.show){D(!0);return}H.set(()=>{M.current==="show"&&D(!0)},X.show)},[X.show,D,H]),oe=(0,o.useCallback)(()=>{if(H.clear(),M.current="hide",!X.hide){D(!1);return}H.set(()=>{M.current==="hide"&&D(!1)},X.hide)},[X.hide,D,H]),Re=(0,o.useCallback)((...he)=>{K(),G==null||G(...he)},[K,G]),T=(0,o.useCallback)((...he)=>{oe(),se==null||se(...he)},[oe,se]),Z=(0,o.useCallback)((...he)=>{D(!B),ce==null||ce(...he)},[ce,D,B]),V=(0,o.useCallback)((...he)=>{m(K,he,"fromElement")},[K]),ne=(0,o.useCallback)((...he)=>{m(oe,he,"toElement")},[oe]),fe=O==null?[]:[].concat(O),ge={ref:U};return fe.indexOf("click")!==-1&&(ge.onClick=Z),fe.indexOf("focus")!==-1&&(ge.onFocus=Re,ge.onBlur=T),fe.indexOf("hover")!==-1&&(ge.onMouseOver=V,ge.onMouseOut=ne),(0,h.jsxs)(h.Fragment,{children:[typeof b=="function"?b(ge):(0,o.cloneElement)(b,ge),(0,h.jsx)(u.default,{...R,show:B,onHide:oe,flip:E,placement:x,popperConfig:w,target:I.current,children:v})]})};e.default=y,t.exports=e.default})(mv,mv.exports);var cX=mv.exports;const $o=Pi(cX),fX=["Roboto Mono","Inconsolata","Source Code Pro","Ubuntu Mono","JetBrains Mono","Fira Code"],hX=["16px","18px","20px","24px"],dX=({enableUsernameField:t=!0})=>{const{isSettingsOpen:e,closeSettings:r,theme:n,setTheme:i,username:o,setUsername:s}=N.useContext(Hr),a=N.useCallback(m=>{i(m.target.value)},[]),[l,c]=N.useState("Roboto Mono"),[u,f]=N.useState("16px");N.useEffect(()=>{if(typeof window<"u"){const m=window.localStorage.getItem("vzcodeSelectedFont"),y=window.localStorage.getItem("vzcodeSelectedFontSize");m!==null&&c(m),y!==null&&f(y)}},[]);const h=N.useCallback(m=>{const y=m.target.value;localStorage.setItem("vzcodeSelectedFont",y),c(y)},[]),d=N.useCallback(m=>{const y=m.target.value;localStorage.setItem("vzcodeSelectedFontSize",y),f(y)},[]);N.useEffect(()=>{document.body.style.setProperty("--vzcode-font-family",l)},[l]),N.useEffect(()=>{document.body.style.setProperty("--vzcode-font-size",u)},[u]);const p=N.useRef(null),g=N.useCallback(()=>{var m;s(((m=p.current)==null?void 0:m.value)||"")},[s]);return N.useEffect(()=>{if(e){const m=y=>{y.key==="Enter"&&r()};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}}},[e,r]),e?q.jsxs(fr,{className:"vz-settings",show:e,onHide:r,animation:!1,children:[q.jsx(fr.Header,{closeButton:!0,children:q.jsx(fr.Title,{children:"Editor Settings"})}),q.jsxs(fr.Body,{children:[t?q.jsxs(br.Group,{className:"mb-3",controlId:"formFork",children:[q.jsx(br.Label,{children:"Username"}),q.jsx(br.Control,{type:"text",ref:p,onChange:g,placeholder:"Enter username",value:o}),q.jsx(br.Text,{className:"text-muted",children:"Enter a username to be displayed on your cursor"})]}):null,q.jsxs(br.Group,{className:"mb-3",controlId:"formFork",children:[q.jsx(br.Label,{children:"Theme"}),q.jsx("select",{className:"form-select",value:n,onChange:a,children:rR.map(({label:m})=>q.jsx("option",{value:m,children:m},m))}),q.jsx(br.Text,{className:"text-muted",children:"Select a color theme for the editor"})]}),q.jsxs(br.Group,{className:"mb-3",controlId:"formFork",children:[q.jsx(br.Label,{children:"Font"}),q.jsx("select",{className:"form-select",onChange:h,value:l,children:fX.map(m=>q.jsx("option",{value:m,children:m},m))}),q.jsx(br.Text,{className:"text-muted",children:"Select font for the editor"})]}),q.jsxs(br.Group,{className:"mb-3",controlId:"formFork",children:[q.jsx(br.Label,{children:"Font Size"}),q.jsx("select",{className:"form-select",onChange:d,value:u,children:hX.map(m=>q.jsx("option",{value:m,children:m},m))}),q.jsx(br.Text,{className:"text-muted",children:"Select a font size for the editor"})]})]}),q.jsx(fr.Footer,{children:q.jsx(tu,{variant:"primary",onClick:r,children:"Done"})})]}):null},pX=({enableUsernameField:t=!0})=>{const{isDocOpen:e,closeDoc:r,setTheme:n,setUsername:i}=N.useContext(Hr);return N.useCallback(o=>{n(o.target.value)},[]),e?q.jsxs(fr,{className:"vz-settings",show:e,onHide:r,animation:!1,children:[q.jsx(fr.Header,{closeButton:!0,children:q.jsx(fr.Title,{children:"Keyboard Shortcuts"})}),q.jsxs(fr.Body,{className:"pt-1",children:[q.jsx(br.Group,{className:"mb-3",children:q.jsx(br.Text,{className:"text-muted",children:"Keyboard shortcuts and interactive widgets for quick actions"})}),q.jsx(br.Group,{children:q.jsxs("ul",{children:[q.jsxs("li",{children:[q.jsx("strong",{children:"Ctrl + s"})," or"," ",q.jsx("strong",{children:"Shift + Enter"})," ",q.jsx("br",{}),q.jsx("span",{children:"Run and format code"})]}),q.jsxs("li",{children:[q.jsx("strong",{children:"Alt + drag on a number"}),q.jsx("br",{}),q.jsx("span",{children:"Modify the number by dragging left or right"})]}),q.jsxs("li",{children:[q.jsx("strong",{children:"Alt + click on a hex color"}),q.jsx("br",{}),q.jsx("span",{children:"Open a color picker to modify the color"})]}),q.jsxs("li",{children:[q.jsx("strong",{children:"Alt + w"})," ",q.jsx("br",{}),q.jsx("span",{children:"Close the current tab"})]}),q.jsxs("li",{children:[q.jsx("strong",{children:"Alt + n"})," ",q.jsx("br",{}),q.jsx("span",{children:"Open the create file modal"})]}),q.jsxs("li",{children:[q.jsx("strong",{children:"Alt + Page Up"})," ",q.jsx("br",{}),q.jsx("span",{children:"Change the active tab to the previous one"})]}),q.jsxs("li",{children:[q.jsx("strong",{children:"Alt + Page Down"})," ",q.jsx("br",{}),q.jsx("span",{children:"Change the active tab to the next one"})]}),q.jsxs("li",{children:[q.jsx("strong",{children:"Most VSCode Shortcuts"})," ",q.jsx("br",{}),"See VSCode docs:"," ",q.jsx("a",{href:"https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf",target:"_blank",children:"Windows"}),","," ",q.jsx("a",{href:"https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf",target:"_blank",children:"MacOS"}),","," ",q.jsx("a",{href:"https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf",target:"_blank",children:"Linux"})]})]})})]}),q.jsx(fr.Footer,{children:q.jsx(tu,{variant:"primary",onClick:r,children:"Done"})})]}):null},gX=t=>{const e={name:"files"};for(const r of Object.keys(t)){const n=t[r],i=n.name.split("/"),o=i.length;let s=e;for(let a=0;a<o-1;a++){let l;const c=i[a];if(s.children)for(let u=0;u<s.children.length;u++){const f=s.children[u];if(f.name===c){l=f;break}}l||(l={name:i[a],path:i.slice(0,a+1).join("/")},(s.children||(s.children=[])).push(l)),s=l}n.text!==null&&(s.children||(s.children=[])).push({name:i[o-1],file:n,fileId:r})}return e},gA=t=>(t.children&&(t.children.sort((e,r)=>{const n=e.file?1:0,i=r.file?1:0;return n-i||e.name.localeCompare(r.name)}),t.children.forEach(gA)),t),OX=()=>q.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[q.jsx("path",{d:"M9.8132 15.9038L9 18.75L8.1868 15.9038C7.75968 14.4089 6.59112 13.2403 5.09619 12.8132L2.25 12L5.09619 11.1868C6.59113 10.7597 7.75968 9.59112 8.1868 8.09619L9 5.25L9.8132 8.09619C10.2403 9.59113 11.4089 10.7597 12.9038 11.1868L15.75 12L12.9038 12.8132C11.4089 13.2403 10.2403 14.4089 9.8132 15.9038Z"}),q.jsx("path",{d:"M18.2589 8.71454L18 9.75L17.7411 8.71454C17.4388 7.50533 16.4947 6.56117 15.2855 6.25887L14.25 6L15.2855 5.74113C16.4947 5.43883 17.4388 4.49467 17.7411 3.28546L18 2.25L18.2589 3.28546C18.5612 4.49467 19.5053 5.43883 20.7145 5.74113L21.75 6L20.7145 6.25887C19.5053 6.56117 18.5612 7.50533 18.2589 8.71454Z"}),q.jsx("path",{d:"M16.8942 20.5673L16.5 21.75L16.1058 20.5673C15.8818 19.8954 15.3546 19.3682 14.6827 19.1442L13.5 18.75L14.6827 18.3558C15.3546 18.1318 15.8818 17.6046 16.1058 16.9327L16.5 15.75L16.8942 16.9327C17.1182 17.6046 17.6454 18.1318 18.3173 18.3558L19.5 18.75L18.3173 19.1442C17.6454 19.3682 17.1182 19.8954 16.8942 20.5673Z"})]}),mX=()=>q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:q.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"})}),yX=()=>q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:q.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),vX=()=>q.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[q.jsx("path",{d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 0 1 0 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 0 1 0-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281Z"}),q.jsx("path",{d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]}),OA=()=>q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:q.jsx("path",{d:"M6 18L18 6M6 6L18 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),bX=()=>q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:q.jsx("path",{fill:"none",stroke:"currentColor",d:"M14.7404 9L14.3942 18M9.60577 18L9.25962 9M19.2276 5.79057C19.5696 5.84221 19.9104 5.89747 20.25 5.95629M19.2276 5.79057L18.1598 19.6726C18.0696 20.8448 17.0921 21.75 15.9164 21.75H8.08357C6.90786 21.75 5.93037 20.8448 5.8402 19.6726L4.77235 5.79057M19.2276 5.79057C18.0812 5.61744 16.9215 5.48485 15.75 5.39432M3.75 5.95629C4.08957 5.89747 4.43037 5.84221 4.77235 5.79057M4.77235 5.79057C5.91878 5.61744 7.07849 5.48485 8.25 5.39432M15.75 5.39432V4.47819C15.75 3.29882 14.8393 2.31423 13.6606 2.27652C13.1092 2.25889 12.5556 2.25 12 2.25C11.4444 2.25 10.8908 2.25889 10.3394 2.27652C9.16065 2.31423 8.25 3.29882 8.25 4.47819V5.39432M15.75 5.39432C14.5126 5.2987 13.262 5.25 12 5.25C10.738 5.25 9.48744 5.2987 8.25 5.39432",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),SX=()=>q.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:q.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 12.75c1.148 0 2.278.08 3.383.237 1.037.146 1.866.966 1.866 2.013 0 3.728-2.35 6.75-5.25 6.75S6.75 18.728 6.75 15c0-1.046.83-1.867 1.866-2.013A24.204 24.204 0 0 1 12 12.75Zm0 0c2.883 0 5.647.508 8.207 1.44a23.91 23.91 0 0 1-1.152 6.06M12 12.75c-2.883 0-5.647.508-8.208 1.44.125 2.104.52 4.136 1.153 6.06M12 12.75a2.25 2.25 0 0 0 2.248-2.354M12 12.75a2.25 2.25 0 0 1-2.248-2.354M12 8.25c.995 0 1.971-.08 2.922-.236.403-.066.74-.358.795-.762a3.778 3.778 0 0 0-.399-2.25M12 8.25c-.995 0-1.97-.08-2.922-.236-.402-.066-.74-.358-.795-.762a3.734 3.734 0 0 1 .4-2.253M12 8.25a2.25 2.25 0 0 0-2.248 2.146M12 8.25a2.25 2.25 0 0 1 2.248 2.146M8.683 5a6.032 6.032 0 0 1-1.155-1.002c.07-.63.27-1.222.574-1.747m.581 2.749A3.75 3.75 0 0 1 15.318 5m0 0c.427-.283.815-.62 1.155-.999a4.471 4.471 0 0 0-.575-1.752M4.921 6a24.048 24.048 0 0 0-.392 3.314c1.668.546 3.416.914 5.223 1.082M19.08 6c.205 1.08.337 2.187.392 3.314a23.882 23.882 0 0 1-5.223 1.082"})}),q1=()=>q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:q.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),wX=({height:t=16,fill:e="currentcolor"})=>q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,viewBox:"4 4 16 16",children:q.jsx("path",{stroke:e,fill:"none",d:"M8 17l9-5-9-5v10z",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),PX=()=>q.jsx("svg",{width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:q.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"})}),kX=()=>q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:q.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"})}),xX=({show:t,onClose:e,onConfirm:r,isDirectory:n,name:i})=>{const o=N.useCallback(s=>{s.key==="Enter"&&r()},[r]);return N.useEffect(()=>(t?window.addEventListener("keydown",o):window.removeEventListener("keydown",o),()=>{window.removeEventListener("keydown",o)}),[t,o]),q.jsxs(fr,{show:t,onHide:e,centered:!0,children:[q.jsx(fr.Header,{closeButton:!0,onClick:e,children:q.jsxs(fr.Title,{children:["Delete ",n?"Directory":"File"]})}),q.jsx(fr.Body,{children:q.jsxs("p",{children:["This will delete the"," ",n?"directory":"file"," ",q.jsx("strong",{children:i}),"."]})}),q.jsxs(fr.Footer,{children:[q.jsx(tu,{variant:"secondary",type:"button",onClick:e,children:"Cancel"}),q.jsx(tu,{variant:"primary",onClick:r,children:"Delete"})]})]})},_X=!0,mA=({id:t,name:e,children:r,handleClick:n,handleDoubleClick:i,handleRenameClick:o,handleDeleteClick:s,isDirectory:a=!1,isActive:l=!1,renameFileTooltipText:c=a?"Rename Directory":"Rename File",deleteFileTooltipText:u=a?"Delete Directory":"Delete File"})=>{const{hoveredItemId:f,setHoveredItemId:h}=N.useContext(Hr),d=f===t,p=N.useCallback(H=>{h(H?t:null)},[t,h]),[g,m]=N.useState(!1),[y,O]=N.useState(""),[v,b]=N.useState(!1),w=N.useRef(null),_=N.useCallback(H=>{H.key==="Escape"?m(!1):H.key==="Enter"&&w.current.blur()},[]),C=N.useCallback(()=>{m(!1),w.current.value.trim()===""?b(!0):o(w.current.value)},[o]),P=N.useCallback(H=>{H.stopPropagation(),m(!g),O(e)},[e,g]);N.useEffect(()=>{g&&w.current.focus()},[g]);const k=N.useCallback(H=>{H.stopPropagation(),b(!0)},[]),x=N.useCallback(()=>{b(!1)},[]),E=N.useCallback(H=>{H==null||H.stopPropagation(),b(!1),s()},[s]),R=N.useCallback(()=>{p(!0)},[]),I=N.useCallback(()=>{p(!1)},[]),F=N.useCallback(()=>{O(w.current.value)},[]);return q.jsxs("div",{className:`file-or-directory user-select-none ${l?"active-file":""}`,onClick:g?null:n,onDoubleClick:g||!i?null:i,onMouseEnter:R,onMouseLeave:I,children:[q.jsx("div",{className:"name",children:g?q.jsxs(q.Fragment,{children:[q.jsx("i",{className:"file-icon",children:q.jsx(q1,{})}),q.jsx("input",{className:"rename-input",ref:w,type:"text","aria-label":"Field name",value:y,onKeyDown:_,onBlur:C,onChange:F})]}):r}),d&&!g?q.jsxs("div",{className:"utils",style:{position:"relative"},children:[!a||_X?q.jsx($o,{placement:"top",overlay:q.jsx(_o,{id:"rename-file-tooltip",children:c}),children:q.jsx("i",{onClick:P,className:"icon-button icon-button-dark",children:q.jsx(mX,{})})}):null,q.jsx($o,{placement:"top",overlay:q.jsx(_o,{id:"delete-file-tooltip",children:u}),children:q.jsx("i",{onClick:k,className:"icon-button icon-button-dark",children:q.jsx(bX,{})})})]}):null,v&&q.jsx(xX,{show:v,onClose:x,onConfirm:E,isDirectory:a,name:e})]})},$X=({name:t,path:e,children:r,handleFileClick:n,handleFileDoubleClick:i})=>{const{renameDirectory:o,deleteDirectory:s,isDirectoryOpen:a,toggleDirectory:l}=N.useContext(Hr),c=N.useCallback(()=>{l(e)},[l,e]),u=N.useCallback(()=>{s(e)},[s,e]),f=N.useCallback(d=>{o(e,t,d)},[o,e,t]),h=N.useMemo(()=>a(e),[a,e]);return q.jsxs(q.Fragment,{children:[q.jsxs(mA,{id:e,name:t,handleClick:c,handleDeleteClick:u,handleRenameClick:f,isDirectory:!0,children:[q.jsx("div",{className:"arrow-wrapper",style:{transform:`rotate(${h?90:0}deg)`},children:q.jsx(wX,{})}),t]}),r&&h?q.jsx("div",{className:"indentation",children:r.map(d=>{const{fileId:p}=d,{path:g}=d;return q.jsx(yA,{entity:d,handleFileClick:n,handleFileDoubleClick:i},p||g)})}):null]})},CX=({name:t,fileId:e,handleFileClick:r,handleFileDoubleClick:n,isActive:i})=>{const{renameFile:o,deleteFile:s}=N.useContext(Hr),a=N.useCallback(()=>{r(e)},[e,r]),l=N.useCallback(()=>{n(e)},[e,n]),c=N.useCallback(()=>{s(e)},[e,s]),u=N.useCallback(f=>{o(e,f)},[e,o]);return q.jsxs(mA,{id:e,name:t,handleClick:a,handleDoubleClick:l,handleDeleteClick:c,handleRenameClick:u,isActive:i,children:[q.jsx("i",{className:"file-icon",children:q.jsx(q1,{})}),t]})},yA=({entity:t,handleFileClick:e,handleFileDoubleClick:r})=>{const{activeFileId:n}=N.useContext(Hr),{name:i,file:o,fileId:s}=t,{path:a,children:l}=t;return o?q.jsx(CX,{fileId:s,name:i,handleFileClick:e,handleFileDoubleClick:r,isActive:s===n}):q.jsx($X,{name:i,path:a,children:l,handleFileClick:e,handleFileDoubleClick:r})},EX=()=>{const[t,e]=N.useState(!1),{createFile:r}=N.useContext(Hr),n=N.useCallback(a=>{a.preventDefault(),a.stopPropagation(),e(!0)},[]),i=N.useCallback(a=>{a.preventDefault(),a.stopPropagation(),t||e(!0)},[t]),o=N.useCallback(a=>{a.preventDefault(),a.stopPropagation(),e(!1)},[]),s=N.useCallback(a=>{a.preventDefault(),a.stopPropagation(),e(!1);const l=a.dataTransfer.items,c=(f,h)=>{f.isFile?f.file(d=>{const p=new FileReader;p.onload=g=>{const m=g.target.result;r(`${h}${d.name}`,m)},p.readAsText(d)}):f.isDirectory&&f.createReader().readEntries(p=>{const g=`${h}${f.name}/`;for(const m of p)c(m,g)})};Array.from(l).forEach(f=>{const h=f.webkitGetAsEntry();h&&c(h,"")})},[r]);return{isDragOver:t,handleDragEnter:n,handleDragOver:i,handleDragLeave:o,handleDrop:s}},QX=({createFileTooltipText:t="New File",createDirTooltipText:e="New Directory",openSettingsTooltipText:r="Open Settings",openKeyboardShortcuts:n="Keyboard Shortcuts",reportBugTooltipText:i="Report Bug"})=>{const{files:o,openTab:s,setIsSettingsOpen:a,setIsDocOpen:l,handleOpenCreateFileModal:c,handleOpenCreateDirModal:u,connected:f,sidebarRef:h}=N.useContext(Hr),d=N.useMemo(()=>o?gA(gX(o)):null,[o]),p=N.useCallback(()=>{l(!0)},[]),g=N.useCallback(()=>{a(!0)},[]),{sidebarWidth:m}=N.useContext(kg),y=N.useCallback(k=>{s({fileId:k,isTransient:!0})},[s]),O=N.useCallback(k=>{s({fileId:k,isTransient:!1})},[s]),v=d&&d.children&&d.children.length>0,{isDragOver:b,handleDragEnter:w,handleDragOver:_,handleDragLeave:C,handleDrop:P}=EX();return q.jsxs("div",{className:"vz-sidebar",style:{width:m+"px"},onDragEnter:w,onDragOver:_,onDragLeave:C,onDrop:P,children:[q.jsxs("div",{className:"files",ref:h,tabIndex:-1,children:[q.jsxs("div",{className:"full-box",children:[q.jsx("div",{className:"sidebar-section-hint",children:"Files"}),q.jsxs("div",{className:"sidebar-section-buttons",children:[q.jsx($o,{placement:"right",overlay:q.jsx(_o,{id:"open-keyboard-shortcuts",children:n}),children:q.jsx("i",{onClick:p,className:"icon-button icon-button-dark",children:q.jsx(kX,{})})}),q.jsx($o,{placement:"right",overlay:q.jsx(_o,{id:"report-bug-tooltip",children:i}),children:q.jsx("a",{href:"https://github.com/vizhub-core/vzcode/issues/new",target:"_blank",rel:"noopener noreferrer",children:q.jsx("i",{className:"icon-button icon-button-dark",children:q.jsx(SX,{})})})}),q.jsx($o,{placement:"left",overlay:q.jsx(_o,{id:"open-settings-tooltip",children:r}),children:q.jsx("i",{onClick:g,className:"icon-button icon-button-dark",children:q.jsx(vX,{})})}),q.jsx($o,{placement:"left",overlay:q.jsx(_o,{id:"create-file-tooltip",children:t}),children:q.jsx("i",{onClick:c,className:"icon-button icon-button-dark",children:q.jsx(yX,{})})}),q.jsx($o,{placement:"left",overlay:q.jsx(_o,{id:"create-dir-tooltip",children:e}),children:q.jsx("i",{onClick:u,className:"icon-button icon-button-dark",children:q.jsx(q1,{})})})]})]}),b?q.jsx("div",{className:"empty",children:q.jsx("div",{className:"empty-text",children:"Drop files here!"})}):v?d.children.map(k=>{const{fileId:x}=k,{path:E}=k,R=x||E;return q.jsx(yA,{entity:k,handleFileClick:y,handleFileDoubleClick:O},R)}):q.jsx("div",{className:"empty",children:q.jsx("div",{className:"empty-text",children:`It looks like you don't have any files yet! Click the "Create file" button above to create your first file.`})})]}),q.jsxs("div",{className:"connection-status",children:[f?"Connected":"Connection Lost",q.jsx("div",{className:"connection",children:q.jsx("div",{className:`connection-status-indicator ${f?"connected":"disconnected"}`})})]})]})},TX=({initialFileName:t=""})=>{const[e,r]=N.useState(t),n=N.useRef(null),{files:i,isCreateFileModalOpen:o,handleCloseCreateFileModal:s,handleCreateFileClick:a}=N.useContext(Hr);N.useEffect(()=>{o&&n.current&&n.current.focus()},[o]);const l=N.useCallback(h=>{r(h.target.value)},[]),c=N.useCallback(()=>{a(e),r("")},[e,a]),u=N.useCallback(h=>{let d;d=/^[a-zA-Z0-9](?:[a-zA-Z0-9 ./+=_-]*[a-zA-Z0-9])?$/.test(h);for(const g in i)h===i[g].name&&(d=!1);return d},[i]),f=N.useCallback(h=>{h.key==="Enter"&&u(e)&&(h.ctrlKey||h.shiftKey||!h.altKey&&!h.metaKey)&&c()},[c,u,e]);return o?q.jsxs(fr,{show:o,onHide:s,animation:!1,onKeyDown:f,children:[q.jsx(fr.Header,{closeButton:!0,children:q.jsx(fr.Title,{children:"Create File"})}),q.jsx(fr.Body,{children:q.jsxs(br.Group,{className:"mb-3",controlId:"fileName",children:[q.jsx(br.Label,{children:"File Name"}),q.jsx(br.Control,{type:"text",value:e,onChange:l,ref:n,spellCheck:"false"}),q.jsx(br.Text,{className:"text-muted",children:"Enter the name for your file"})]})}),q.jsx(fr.Footer,{children:q.jsx(tu,{variant:"primary",onClick:c,disabled:!u(e),children:"Create File"})})]}):null},RX=({initialFileName:t=""})=>{const[e,r]=N.useState(t),n=N.useRef(null),{files:i,isCreateDirModalOpen:o,handleCloseCreateDirModal:s,handleCreateDirClick:a}=N.useContext(Hr);N.useEffect(()=>{o&&n.current&&n.current.focus()},[o]);const l=N.useCallback(h=>{r(h.target.value)},[]),c=N.useCallback(()=>{a(e),r("")},[e,a]),u=N.useCallback(h=>{let d;d=/^[a-zA-Z0-9](?:[a-zA-Z0-9 ./+=_-]*[a-zA-Z0-9])?$/.test(h);for(const g in i)h+"/"===i[g].name&&(d=!1);return d},[i]),f=N.useCallback(h=>{h.key==="Enter"&&u(e)&&(h.ctrlKey||h.shiftKey||!h.altKey&&!h.metaKey)&&c()},[c,u,e]);return o?q.jsxs(fr,{show:o,onHide:s,animation:!1,onKeyDown:f,children:[q.jsx(fr.Header,{closeButton:!0,children:q.jsx(fr.Title,{children:"Create Directory"})}),q.jsx(fr.Body,{children:q.jsxs(br.Group,{className:"mb-3",controlId:"fileName",children:[q.jsx(br.Label,{children:"Directory Name"}),q.jsx(br.Control,{type:"text",value:e,onChange:l,ref:n,spellCheck:"false"}),q.jsx(br.Text,{className:"text-muted",children:"Enter the name for your file"})]})}),q.jsx(fr.Footer,{children:q.jsx(tu,{variant:"primary",onClick:c,disabled:!u(e),children:"Create Directory"})})]}):null},AX=({enableUsernameField:t=!0})=>q.jsxs("div",{className:"left",children:[q.jsx(QX,{}),q.jsx(dX,{enableUsernameField:t}),q.jsx(pX,{enableUsernameField:t}),q.jsx(TX,{}),q.jsx(RX,{})]}),MX=t=>{const e=t.split("/");return e.length===1?e[e.length-1]:e[e.length-2]+"/"+e[e.length-1]},jX=({fileId:t,isTransient:e,isActive:r,setActiveFileId:n,openTab:i,closeTabs:o,fileName:s})=>{const a=N.useCallback(f=>{f.stopPropagation(),o([t])},[o,t]),l=N.useMemo(()=>MX(s),[s]),c=N.useCallback(()=>{n(t)},[t,n]),u=N.useCallback(()=>{i({fileId:t})},[t,i]);return q.jsxs("div",{className:`tab user-select-none ${r?"active":""} ${e?"transient":""}`,onClick:c,onDoubleClick:u,children:[l,q.jsx("i",{className:"icon-button icon-button-dark",onClick:a,children:q.jsx(OA,{})})]})},DX=()=>{const{files:t,activeFileId:e,setActiveFileId:r,tabList:n,openTab:i,closeTabs:o}=N.useContext(Hr);return q.jsx("div",{className:"vz-tab-list",children:t&&n.filter(s=>s.fileId in t).map(s=>q.jsx(jX,{fileId:s.fileId,isTransient:s.isTransient,isActive:s.fileId===e,setActiveFileId:r,openTab:i,closeTabs:o,fileName:t[s.fileId].name},s.fileId))})};var Ax={};class zp{constructor(e,r,n,i,o,s,a,l,c,u=0,f){this.p=e,this.stack=r,this.state=n,this.reducePos=i,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,r)=>r%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,r,n=0){let i=e.parser.context;return new zp(e,[],r,n,n,0,[],0,i?new Mx(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,r){this.stack.push(this.state,r,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var r;let n=e>>19,i=e&65535,{parser:o}=this.p,s=o.dynamicPrecedence(i);if(s&&(this.score+=s),n==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,4,!0),this.reduceContext(i,this.reducePos);return}let a=this.stack.length-(n-1)*3-(e&262144?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from,c=this.reducePos-l;c>=2e3&&!(!((r=this.p.parser.nodeSet.types[i])===null||r===void 0)&&r.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=c));let u=a?this.stack[a-1]:0,f=this.bufferBase+this.buffer.length-u;if(i<o.minRepeatTerm||e&131072){let h=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,l,h,f+4,!0)}if(e&262144)this.state=this.stack[a];else{let h=this.stack[a-3];this.state=o.getGoto(h,i,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(i,l)}storeNode(e,r,n,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,a=this.buffer.length;if(a==0&&s.parent&&(a=s.bufferBase-s.parent.bufferBase,s=s.parent),a>0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(r==n)return;if(s.buffer[a-2]>=r){s.buffer[a-2]=n;return}}}if(!o||this.pos==n)this.buffer.push(e,r,n,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>n;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=e,this.buffer[s+1]=r,this.buffer[s+2]=n,this.buffer[s+3]=i}}shift(e,r,n,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(r,n),r<=this.p.parser.maxNode&&this.buffer.push(r,n,i,4);else{let o=e,{parser:s}=this.p;(i>this.pos||r<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,n),this.shiftContext(r,n),r<=s.maxNode&&this.buffer.push(r,n,i,4)}}apply(e,r,n,i){e&65536?this.reduce(e):this.shift(e,r,n,i)}useNode(e,r){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(r,i),this.buffer.push(n,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,r=e.buffer.length;for(;r>0&&e.buffer[r-2]>e.reducePos;)r-=4;let n=e.buffer.slice(r),i=e.bufferBase+r;for(;e&&i==e.bufferBase;)e=e.parent;return new zp(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,r){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,r,4),this.storeNode(0,this.pos,r,n?8:4),this.pos=this.reducePos=r,this.score-=190}canShift(e){for(let r=new qX(this);;){let n=this.p.parser.stateSlot(r.state,4)||this.p.parser.hasAction(r.state,e);if(n==0)return!1;if(!(n&65536))return!0;r.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let r=this.p.parser.nextStates(this.state);if(r.length>8||this.stack.length>=120){let i=[];for(let o=0,s;o<r.length;o+=2)(s=r[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(r[o],s);if(this.stack.length<120)for(let o=0;i.length<8&&o<r.length;o+=2){let s=r[o+1];i.some((a,l)=>l&1&&a==s)||i.push(r[o],s)}r=i}let n=[];for(let i=0;i<r.length&&n.length<4;i+=2){let o=r[i+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(r[i],this.pos),s.reducePos=this.pos,s.score-=200,n.push(s)}return n}forceReduce(){let{parser:e}=this.p,r=e.stateSlot(this.state,5);if(!(r&65536))return!1;if(!e.validAction(this.state,r)){let n=r>>19,i=r&65535,o=this.stack.length-n*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;r=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(r),!0}findForcedReduction(){let{parser:e}=this.p,r=[],n=(i,o)=>{if(!r.includes(i))return r.push(i),e.allActions(i,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let l=s&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=n(s,o+1);if(a!=null)return a}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let r=0;r<this.stack.length;r+=3)if(this.stack[r]!=e.stack[r])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,r){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(r)))}reduceContext(e,r){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(r)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let r=new Mx(this.curContext.tracker,e);r.hash!=this.curContext.hash&&this.emitContext(),this.curContext=r}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Mx{constructor(e,r){this.tracker=e,this.context=r,this.hash=e.strict?e.hash(r):0}}class qX{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let r=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],r,!0);this.state=i}}class Gp{constructor(e,r,n){this.stack=e,this.pos=r,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,r=e.bufferBase+e.buffer.length){return new Gp(e,r,r-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Gp(this.stack,this.pos,this.index)}}function oc(t,e=Uint16Array){if(typeof t!="string")return t;let r=null;for(let n=0,i=0;n<t.length;){let o=0;for(;;){let s=t.charCodeAt(n++),a=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}r?r[i++]=o:r=new e(o)}return r}class Gd{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const jx=new Gd;class ZX{constructor(e,r){this.input=e,this.ranges=r,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=jx,this.rangeIndex=0,this.pos=this.chunkPos=r[0].from,this.range=r[0],this.end=r[r.length-1].to,this.readNext()}resolveOffset(e,r){let n=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<n.from;){if(!i)return null;let s=this.ranges[--i];o-=n.from-s.to,n=s}for(;r<0?o>n.to:o>=n.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];o+=s.from-n.to,n=s}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let r of this.ranges)if(r.to>e)return Math.max(e,r.from);return this.end}peek(e){let r=this.chunkOff+e,n,i;if(r>=0&&r<this.chunk.length)n=this.pos+e,i=this.chunk.charCodeAt(r);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(n=o,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let s=this.rangeIndex,a=this.range;for(;a.to<=n;)a=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-n)),i=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),i}acceptToken(e,r=0){let n=r?this.resolveOffset(r,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,r){this.token.value=e,this.token.end=r}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:r}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=r,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),r=this.pos+e.length;this.chunk=r>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,r){if(r?(this.token=r,r.start=e,r.lookAhead=e+1,r.value=r.extended=-1):this.token=jx,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,r){if(e>=this.chunkPos&&r<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,r-this.chunkPos);if(e>=this.chunk2Pos&&r<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,r-this.chunk2Pos);if(e>=this.range.from&&r<=this.range.to)return this.input.read(e,r);let n="";for(let i of this.ranges){if(i.from>=r)break;i.to>e&&(n+=this.input.read(Math.max(i.from,e),Math.min(i.to,r)))}return n}}class ql{constructor(e,r){this.data=e,this.id=r}token(e,r){let{parser:n}=r.p;vA(this.data,e,r,this.id,n.data,n.tokenPrecTable)}}ql.prototype.contextual=ql.prototype.fallback=ql.prototype.extend=!1;class Hp{constructor(e,r,n){this.precTable=r,this.elseToken=n,this.data=typeof e=="string"?oc(e):e}token(e,r){let n=e.pos,i=0;for(;;){let o=e.next<0,s=e.resolveOffset(1,1);if(vA(this.data,e,r,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,s==null)break;e.reset(s,e.token)}i&&(e.reset(n,e.token),e.acceptToken(this.elseToken,i))}}Hp.prototype.contextual=ql.prototype.fallback=ql.prototype.extend=!1;class kn{constructor(e,r={}){this.token=e,this.contextual=!!r.contextual,this.fallback=!!r.fallback,this.extend=!!r.extend}}function vA(t,e,r,n,i,o){let s=0,a=1<<n,{dialect:l}=r.p.parser;e:for(;a&t[s];){let c=t[s+1];for(let d=s+3;d<c;d+=2)if((t[d+1]&a)>0){let p=t[d];if(l.allows(p)&&(e.token.value==-1||e.token.value==p||NX(p,e.token.value,i,o))){e.acceptToken(p);break}}let u=e.next,f=0,h=t[s+2];if(e.next<0&&h>f&&t[c+h*3-3]==65535){s=t[c+h*3-1];continue e}for(;f<h;){let d=f+h>>1,p=c+d+(d<<1),g=t[p],m=t[p+1]||65536;if(u<g)h=d;else if(u>=m)f=d+1;else{s=t[p+2],e.advance();continue e}}break}}function Dx(t,e,r){for(let n=e,i;(i=t[n])!=65535;n++)if(i==r)return n-e;return-1}function NX(t,e,r,n){let i=Dx(r,n,e);return i<0||Dx(r,n,t)<i}const Gn=typeof process<"u"&&Ax&&/\bparse\b/.test(Ax.LOG);let KO=null;function qx(t,e,r){let n=t.cursor(sr.IncludeAnonymous);for(n.moveTo(e);;)if(!(r<0?n.childBefore(e):n.childAfter(e)))for(;;){if((r<0?n.to<e:n.from>e)&&!n.type.isError)return r<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(t.length,Math.max(n.from+1,e+25));if(r<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return r<0?0:t.length}}let IX=class{constructor(e,r){this.fragments=e,this.nodeSet=r,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?qx(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?qx(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let r=this.trees.length-1;if(r<0)return this.nextFragment(),null;let n=this.trees[r],i=this.index[r];if(i==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=n.children[i],s=this.start[r]+n.positions[i];if(s>e)return this.nextStart=s,null;if(o instanceof zt){if(s==e){if(s<this.safeFrom)return null;let a=s+o.length;if(a<=this.safeTo){let l=o.prop(gt.lookAhead);if(!l||a+l<this.fragment.to)return o}}this.index[r]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[r]++,this.nextStart=s+o.length}}};class WX{constructor(e,r){this.stream=r,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new Gd)}getActions(e){let r=0,n=null,{parser:i}=e.p,{tokenizers:o}=i,s=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<o.length;c++){if(!(1<<c&s))continue;let u=o[c],f=this.tokens[c];if(!(n&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=s||f.context!=a)&&(this.updateCachedToken(f,u,e),f.mask=s,f.context=a),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let h=r;if(f.extended>-1&&(r=this.addActions(e,f.extended,f.end,r)),r=this.addActions(e,f.value,f.end,r),!u.extend&&(n=f,r>h))break}}for(;this.actions.length>r;)this.actions.pop();return l&&e.setLookAhead(l),!n&&e.pos==this.stream.end&&(n=new Gd,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,r=this.addActions(e,n.value,n.end,r)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let r=new Gd,{pos:n,p:i}=e;return r.start=n,r.end=Math.min(n+1,i.stream.end),r.value=n==i.stream.end?i.parser.eofTerm:0,r}updateCachedToken(e,r,n){let i=this.stream.clipPos(n.pos);if(r.token(this.stream.reset(i,e),n),e.value>-1){let{parser:o}=n.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let a=o.specializers[s](this.stream.read(e.start,e.end),n);if(a>=0&&n.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,r,n,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=r,this.actions[i++]=n,i}addActions(e,r,n,i){let{state:o}=e,{parser:s}=e.p,{data:a}=s;for(let l=0;l<2;l++)for(let c=s.stateSlot(o,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=xo(a,c+2);else{i==0&&a[c+1]==2&&(i=this.putAction(xo(a,c+2),r,n,i));break}a[c]==r&&(i=this.putAction(xo(a,c+1),r,n,i))}return i}}class BX{constructor(e,r,n,i){this.parser=e,this.input=r,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new ZX(r,i),this.tokens=new WX(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[zp.start(this,e.top[0],o)],this.fragments=n.length&&this.stream.end-o>e.bufferLength*4?new IX(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,r=this.minStackPos,n=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let a=e[s];for(;;){if(this.tokens.mainToken=null,a.pos>r)n.push(a);else{if(this.advanceStack(a,n,e))continue;{i||(i=[],o=[]),i.push(a);let l=this.tokens.getMainToken(a);o.push(l.value,l.end)}}break}}if(!n.length){let s=i&&VX(i);if(s)return Gn&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw Gn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,n);if(s)return Gn&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(n.length>s)for(n.sort((a,l)=>l.score-a.score);n.length>s;)n.pop();n.some(a=>a.reducePos>r)&&this.recovering--}else if(n.length>1){e:for(let s=0;s<n.length-1;s++){let a=n[s];for(let l=s+1;l<n.length;l++){let c=n[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)n.splice(l--,1);else{n.splice(s--,1);continue e}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let s=1;s<n.length;s++)n[s].pos<this.minStackPos&&(this.minStackPos=n[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,r,n){let i=e.pos,{parser:o}=this,s=Gn?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let h=this.parser.nodeSet.types[f.type.id]==f.type?o.getGoto(e.state,f.type.id):-1;if(h>-1&&f.length&&(!c||(f.prop(gt.contextHash)||0)==u))return e.useNode(f,h),Gn&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(f.type.id)})`),!0;if(!(f instanceof zt)||f.children.length==0||f.positions[0]>0)break;let d=f.children[0];if(d instanceof zt&&f.positions[0]==0)f=d;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),Gn&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let u=l[c++],f=l[c++],h=l[c++],d=c==l.length||!n,p=d?e:e.split(),g=this.tokens.mainToken;if(p.apply(u,f,g?g.start:p.pos,h),Gn&&console.log(s+this.stackID(p)+` (via ${u&65536?`reduce of ${o.getName(u&65535)}`:"shift"} for ${o.getName(f)} @ ${i}${p==e?"":", split"})`),d)return!0;p.pos>i?r.push(p):n.push(p)}return!1}advanceFully(e,r){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Zx(e,r),!0}}runRecovery(e,r,n){let i=null,o=!1;for(let s=0;s<e.length;s++){let a=e[s],l=r[s<<1],c=r[(s<<1)+1],u=Gn?this.stackID(a)+" -> ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),Gn&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let f=a.split(),h=u;for(let d=0;f.forceReduce()&&d<10&&(Gn&&console.log(h+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));d++)Gn&&(h=this.stackID(f)+" -> ");for(let d of a.recoverByInsert(l))Gn&&console.log(u+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,n);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),Gn&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),Zx(a,n)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),zt.build({buffer:Gp.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let r=(KO||(KO=new WeakMap)).get(e);return r||KO.set(e,r=String.fromCodePoint(this.nextStackID++)),r+e}}function Zx(t,e){for(let r=0;r<e.length;r++){let n=e[r];if(n.pos==t.pos&&n.sameState(t)){e[r].score<t.score&&(e[r]=t);return}}e.push(t)}class LX{constructor(e,r,n){this.source=e,this.flags=r,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}}const JO=t=>t;class Z1{constructor(e){this.start=e.start,this.shift=e.shift||JO,this.reduce=e.reduce||JO,this.reuse=e.reuse||JO,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Ts extends X0{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let r=e.nodeNames.split(" ");this.minRepeatTerm=r.length;for(let a=0;a<e.repeatNodeCount;a++)r.push("");let n=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<r.length;a++)i.push([]);function o(a,l,c){i[a].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=gt[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)o(u,l,a[c++]);else{let f=a[c+-u];for(let h=-u;h>0;h--)o(a[c++],l,f);c++}}}this.nodeSet=new Sf(r.map((a,l)=>Gr.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:n.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=AQ;let s=oc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(Nx),this.states=oc(e.states,Uint32Array),this.data=oc(e.stateData),this.goto=oc(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new ql(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,r,n){let i=new BX(this,e,r,n);for(let o of this.wrappers)i=o(i,e,r,n);return i}getGoto(e,r,n=!1){let i=this.goto;if(r>=i[0])return-1;for(let o=i[r+1];;){let s=i[o++],a=s&1,l=i[o++];if(a&&n)return l;for(let c=o+(s>>1);o<c;o++)if(i[o]==e)return l;if(a)return-1}}hasAction(e,r){let n=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),s;;o+=3){if((s=n[o])==65535)if(n[o+1]==1)s=n[o=xo(n,o+2)];else{if(n[o+1]==2)return xo(n,o+2);break}if(s==r||s==0)return xo(n,o+1)}return 0}stateSlot(e,r){return this.states[e*6+r]}stateFlag(e,r){return(this.stateSlot(e,0)&r)>0}validAction(e,r){return!!this.allActions(e,n=>n==r?!0:null)}allActions(e,r){let n=this.stateSlot(e,4),i=n?r(n):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=xo(this.data,o+2);else break;i=r(xo(this.data,o+1))}return i}nextStates(e){let r=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=xo(this.data,n+2);else break;if(!(this.data[n+2]&1)){let i=this.data[n+1];r.some((o,s)=>s&1&&o==i)||r.push(this.data[n],i)}}return r}configure(e){let r=Object.assign(Object.create(Ts.prototype),this);if(e.props&&(r.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);r.top=n}return e.tokenizers&&(r.tokenizers=this.tokenizers.map(n=>{let i=e.tokenizers.find(o=>o.from==n);return i?i.to:n})),e.specializers&&(r.specializers=this.specializers.slice(),r.specializerSpecs=this.specializerSpecs.map((n,i)=>{let o=e.specializers.find(a=>a.from==n.external);if(!o)return n;let s=Object.assign(Object.assign({},n),{external:o.to});return r.specializers[i]=Nx(s),s})),e.contextTracker&&(r.context=e.contextTracker),e.dialect&&(r.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(r.strict=e.strict),e.wrap&&(r.wrappers=r.wrappers.concat(e.wrap)),e.bufferLength!=null&&(r.bufferLength=e.bufferLength),r}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let r=this.dynamicPrecedences;return r==null?0:r[e]||0}parseDialect(e){let r=Object.keys(this.dialects),n=r.map(()=>!1);if(e)for(let o of e.split(" ")){let s=r.indexOf(o);s>=0&&(n[s]=!0)}let i=null;for(let o=0;o<r.length;o++)if(!n[o])for(let s=this.dialects[r[o]],a;(a=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new LX(e,n,i)}static deserialize(e){return new Ts(e)}}function xo(t,e){return t[e]|t[e+1]<<16}function VX(t){let e=null;for(let r of t){let n=r.p.stoppedAt;(r.pos==r.p.stream.end||n!=null&&r.pos>n)&&r.p.parser.stateFlag(r.state,2)&&(!e||e.score<r.score)&&(e=r)}return e}function Nx(t){if(t.external){let e=t.extend?1:0;return(r,n)=>t.external(r,n)<<1|e}return t.get}const XX=309,Ix=1,FX=2,UX=3,YX=310,zX=312,GX=313,HX=4,KX=5,JX=0,vv=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],bA=125,e8=59,bv=47,t8=42,r8=43,n8=45,i8=60,o8=44,s8=new Z1({start:!1,shift(t,e){return e==HX||e==KX||e==zX?t:e==GX},strict:!1}),a8=new kn((t,e)=>{let{next:r}=t;(r==bA||r==-1||e.context)&&t.acceptToken(YX)},{contextual:!0,fallback:!0}),l8=new kn((t,e)=>{let{next:r}=t,n;vv.indexOf(r)>-1||r==bv&&((n=t.peek(1))==bv||n==t8)||r!=bA&&r!=e8&&r!=-1&&!e.context&&t.acceptToken(XX)},{contextual:!0}),u8=new kn((t,e)=>{let{next:r}=t;if((r==r8||r==n8)&&(t.advance(),r==t.next)){t.advance();let n=!e.context&&e.canShift(Ix);t.acceptToken(n?Ix:FX)}},{contextual:!0});function em(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const c8=new kn((t,e)=>{if(t.next!=i8||!e.dialectEnabled(JX)||(t.advance(),t.next==bv))return;let r=0;for(;vv.indexOf(t.next)>-1;)t.advance(),r++;if(em(t.next,!0)){for(t.advance(),r++;em(t.next,!1);)t.advance(),r++;for(;vv.indexOf(t.next)>-1;)t.advance(),r++;if(t.next==o8)return;for(let n=0;;n++){if(n==7){if(!em(t.next,!0))return;break}if(t.next!="extends".charCodeAt(n))break;t.advance(),r++}}t.acceptToken(UX,-r)}),f8=js({"get set async static":S.modifier,"for while do if else switch try catch finally return throw break continue default case":S.controlKeyword,"in of await yield void typeof delete instanceof":S.operatorKeyword,"let var const using function class extends":S.definitionKeyword,"import export from":S.moduleKeyword,"with debugger as new":S.keyword,TemplateString:S.special(S.string),super:S.atom,BooleanLiteral:S.bool,this:S.self,null:S.null,Star:S.modifier,VariableName:S.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":S.function(S.variableName),VariableDefinition:S.definition(S.variableName),Label:S.labelName,PropertyName:S.propertyName,PrivatePropertyName:S.special(S.propertyName),"CallExpression/MemberExpression/PropertyName":S.function(S.propertyName),"FunctionDeclaration/VariableDefinition":S.function(S.definition(S.variableName)),"ClassDeclaration/VariableDefinition":S.definition(S.className),PropertyDefinition:S.definition(S.propertyName),PrivatePropertyDefinition:S.definition(S.special(S.propertyName)),UpdateOp:S.updateOperator,"LineComment Hashbang":S.lineComment,BlockComment:S.blockComment,Number:S.number,String:S.string,Escape:S.escape,ArithOp:S.arithmeticOperator,LogicOp:S.logicOperator,BitOp:S.bitwiseOperator,CompareOp:S.compareOperator,RegExp:S.regexp,Equals:S.definitionOperator,Arrow:S.function(S.punctuation),": Spread":S.punctuation,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace,"InterpolationStart InterpolationEnd":S.special(S.brace),".":S.derefOperator,", ;":S.separator,"@":S.meta,TypeName:S.typeName,TypeDefinition:S.definition(S.typeName),"type enum interface implements namespace module declare":S.definitionKeyword,"abstract global Privacy readonly override":S.modifier,"is keyof unique infer":S.operatorKeyword,JSXAttributeValue:S.attributeValue,JSXText:S.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":S.angleBracket,"JSXIdentifier JSXNameSpacedName":S.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":S.attributeName,"JSXBuiltin/JSXIdentifier":S.standard(S.tagName)}),h8={__proto__:null,export:18,as:23,from:31,default:34,async:39,function:40,extends:52,this:56,true:64,false:64,null:76,void:80,typeof:84,super:102,new:136,delete:152,yield:161,await:165,class:170,public:227,private:227,protected:227,readonly:229,instanceof:248,satisfies:251,in:252,const:254,import:286,keyof:339,unique:343,infer:349,is:385,abstract:405,implements:407,type:409,let:412,var:414,using:417,interface:423,enum:427,namespace:433,module:435,declare:439,global:443,for:462,of:471,while:474,with:478,do:482,if:486,else:488,switch:492,case:498,try:504,catch:508,finally:512,return:516,throw:520,break:524,continue:528,debugger:532},d8={__proto__:null,async:123,get:125,set:127,declare:187,public:189,private:189,protected:189,static:191,abstract:193,override:195,readonly:201,accessor:203,new:389},p8={__proto__:null,"<":143},SA=Ts.deserialize({version:14,states:"$<UO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ08SO'#ChO+RO!bO'#CiO+aO#tO'#CiO+oO?MpO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DyO0fQ^O'#EROOQ07b'#EZ'#EZO1PQWO'#EWOOQO'#El'#ElOOQO'#Ie'#IeO1XQWO'#GmO1dQWO'#EkO1iQWO'#EkO3kQ08SO'#JiO6[Q08SO'#JjO6xQWO'#FZO6}Q&jO'#FqOOQ07b'#Fc'#FcO7YO,YO'#FcO7hQ7[O'#FxO9UQWO'#FwOOQ07b'#Jj'#JjOOQ07`'#Ji'#JiO9ZQWO'#GqOOQU'#KU'#KUO9fQWO'#IRO9kQ07hO'#ISOOQU'#JW'#JWOOQU'#IW'#IWQ`Q^OOO`Q^OOO%[Q^O'#DqO9sQ^O'#D}O9zQ^O'#EPO9aQWO'#GmO:RQ7[O'#CnO:aQWO'#EjO:lQWO'#EuO:qQ7[O'#FbO;`QWO'#GmOOQO'#KV'#KVO;eQWO'#KVO;sQWO'#GuO;sQWO'#GvO;sQWO'#GxO9aQWO'#G{O<jQWO'#HOO>RQWO'#CdO>cQWO'#H[O>kQWO'#HbO>kQWO'#HdO`Q^O'#HfO>kQWO'#HhO>kQWO'#HkO>pQWO'#HqO>uQ07iO'#HwO%[Q^O'#HyO?QQ07iO'#H{O?]Q07iO'#H}O9kQ07hO'#IPO?hQ08SO'#ChO@jQ`O'#DiQOQWOOO%[Q^O'#EPOAQQWO'#ESO:RQ7[O'#EjOA]QWO'#EjOAhQpO'#FbOOQU'#Cf'#CfOOQ07`'#Dn'#DnOOQ07`'#Jm'#JmO%[Q^O'#JmOOQO'#Jq'#JqOO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[5]S'Q!e-QQ'f!rS'p!u!xS'r!y5_S,}'R'YS-i'g'hQ-k'iQ2b-WR2p-jR(t#wR(w#xQ!fQT-X'Z-Y]!qQ!r'Z-Y1[5]Q#o]R'd:dT#jZ%bS#iZ%bS%hm,dU(a#g#h#kS-}(b(cQ.R(dQ0c+TQ2u.OU2v.P.Q.SS6c2w2xR8h6d`#]W#V#Y%e'}(W+Q-xr#fZm#g#h#k%b(b(c(d+T.O.P.Q.S2w2x6dQ1q,dQ2X,zQ6Q2PQ8`6RT;w'S+RT#`W%eS#_W%eS(O#V(WS(T#Y+QS-P'S+RT-s'}-xT'X!e%fQ$kfR)s$pT)h$k)iR3r.zT*X$x*ZR*a${Q0g+]Q2z.ZQ5`1^Q6h3OQ7z5cQ8k6gQ9Y7yQ9l8jQ9}9[Q:V9nQ:[:OR:_:WnqOXst!Z#c%j&m&o&p&r,h,m1w1zQ&g!VR,]&dtmOXst!U!V!Z#c%j&d&m&o&p&r,h,m1w1zR,d&jT%im,dR1W+|R,[&bQ&Q|R+t&RR+j%{T&k!W&nT&l!W&nT1y,m1z",nodeNames:"⚠ ArithOp ArithOp JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:371,context:s8,nodeProps:[["isolate",-8,4,5,13,33,35,48,50,52,""],["group",-26,8,16,18,65,201,205,209,210,212,215,218,228,230,236,238,240,242,245,251,257,259,261,263,265,267,268,"Statement",-32,12,13,28,31,32,38,48,51,52,54,59,67,75,79,81,83,84,106,107,116,117,134,137,139,140,141,142,144,145,164,165,167,"Expression",-23,27,29,33,37,39,41,168,170,172,173,175,176,177,179,180,181,183,184,185,195,197,199,200,"Type",-3,87,99,105,"ClassItem"],["openedBy",22,"<",34,"InterpolationStart",53,"[",57,"{",72,"(",157,"JSXStartCloseTag"],["closedBy",23,">",36,"InterpolationEnd",47,"]",58,"}",73,")",162,"JSXEndTag"]],propSources:[f8],skippedNodes:[0,4,5,271],repeatNodeCount:37,tokenData:"$Fj(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#8g!R![#:v![!]#Gv!]!^#IS!^!_#J^!_!`#Ns!`!a$#_!a!b$(l!b!c$,k!c!}Er!}#O$-u#O#P$/P#P#Q$4h#Q#R$5r#R#SEr#S#T$7P#T#o$8Z#o#p$<k#p#q$=a#q#r$>q#r#s$?}#s$f%Z$f$g+g$g#BYEr#BY#BZ$AX#BZ$ISEr$IS$I_$AX$I_$I|Er$I|$I}$Dd$I}$JO$Dd$JO$JTEr$JT$JU$AX$JU$KVEr$KV$KW$AX$KW&FUEr&FU&FV$AX&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$AX?HUOEr(n%d_$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$f&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$f&j(R!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(R!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$f&j(OpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)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dynamicPrecedences:{69:1,79:1,81:1,165:1,193:1},specialized:[{term:319,get:t=>h8[t]||-1},{term:334,get:t=>d8[t]||-1},{term:70,get:t=>p8[t]||-1}],tokenPrec:14638}),wA=[Nn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Nn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Nn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Nn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Nn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Nn(`try {
|
|
132
|
+
\${}
|
|
133
|
+
} catch (\${error}) {
|
|
134
|
+
\${}
|
|
135
|
+
}`,{label:"try",detail:"/ catch block",type:"keyword"}),Nn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Nn(`if (\${}) {
|
|
136
|
+
\${}
|
|
137
|
+
} else {
|
|
138
|
+
\${}
|
|
139
|
+
}`,{label:"if",detail:"/ else block",type:"keyword"}),Nn(`class \${name} {
|
|
140
|
+
constructor(\${params}) {
|
|
141
|
+
\${}
|
|
142
|
+
}
|
|
143
|
+
}`,{label:"class",detail:"definition",type:"keyword"}),Nn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Nn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],g8=wA.concat([Nn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Nn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Nn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Wx=new qQ,PA=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Xu(t){return(e,r)=>{let n=e.node.getChild("VariableDefinition");return n&&r(n,t),!0}}const O8=["FunctionDeclaration"],m8={FunctionDeclaration:Xu("function"),ClassDeclaration:Xu("class"),ClassExpression:()=>!0,EnumDeclaration:Xu("constant"),TypeAliasDeclaration:Xu("type"),NamespaceDeclaration:Xu("namespace"),VariableDefinition(t,e){t.matchContext(O8)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function kA(t,e){let r=Wx.get(e);if(r)return r;let n=[],i=!0;function o(s,a){let l=t.sliceString(s.from,s.to);n.push({label:l,type:a})}return e.cursor(sr.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let a=m8[s.name];if(a&&a(s,o)||PA.has(s.name))return!1}else if(s.to-s.from>8192){for(let a of kA(t,s.node))n.push(a);return!1}}),Wx.set(e,n),n}const Bx=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,xA=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function y8(t){let e=pr(t.state).resolveInner(t.pos,-1);if(xA.indexOf(e.name)>-1)return null;let r=e.name=="VariableName"||e.to-e.from<20&&Bx.test(t.state.sliceDoc(e.from,e.to));if(!r&&!t.explicit)return null;let n=[];for(let i=e;i;i=i.parent)PA.has(i.name)&&(n=n.concat(kA(t.state.doc,i)));return{options:n,from:r?e.from:t.pos,validFor:Bx}}const Ni=Qs.define({name:"javascript",parser:SA.configure({props:[Ta.add({IfStatement:Rl({except:/^\s*({|else\b)/}),TryStatement:Rl({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:bN,SwitchBody:t=>{let e=t.textAfter,r=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return t.baseIndent+(r?0:n?1:2)*t.unit},Block:vN({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Rl({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),Ds.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":H0,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),_A={test:t=>/^JSX/.test(t.name),facet:U0({commentTokens:{block:{open:"{/*",close:"*/}"}}})},N1=Ni.configure({dialect:"ts"},"typescript"),$A=Ni.configure({dialect:"jsx",props:[Y0.add(t=>t.isTop?[_A]:void 0)]}),CA=Ni.configure({dialect:"jsx ts",props:[Y0.add(t=>t.isTop?[_A]:void 0)]},"typescript");let EA=t=>({label:t,type:"keyword"});const QA="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(EA),v8=QA.concat(["declare","implements","private","protected","public"].map(EA));function I1(t={}){let e=t.jsx?t.typescript?CA:$A:t.typescript?N1:Ni,r=t.typescript?g8.concat(v8):wA.concat(QA);return new Ca(e,[Ni.data.of({autocomplete:nB(xA,ZT(r))}),Ni.data.of({autocomplete:y8}),t.jsx?w8:[]])}function b8(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function Lx(t,e,r=t.length){for(let n=e==null?void 0:e.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return t.sliceString(n.from,Math.min(n.to,r));return""}const S8=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),w8=Ee.inputHandler.of((t,e,r,n,i)=>{if((S8?t.composing:t.compositionStarted)||t.state.readOnly||e!=r||n!=">"&&n!="/"||!Ni.isActiveAt(t.state,e,-1))return!1;let o=i(),{state:s}=o,a=s.changeByRange(l=>{var c;let{head:u}=l,f=pr(s).resolveInner(u-1,-1),h;if(f.name=="JSXStartTag"&&(f=f.parent),!(s.doc.sliceString(u-1,u)!=n||f.name=="JSXAttributeValue"&&f.to>u)){if(n==">"&&f.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:"</>"}};if(n=="/"&&f.name=="JSXStartCloseTag"){let d=f.parent,p=d.parent;if(p&&d.from==u-2&&((h=Lx(s.doc,p.firstChild,u))||((c=p.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let g=`${h}>`;return{range:le.cursor(u+g.length,-1),changes:{from:u,insert:g}}}}else if(n==">"){let d=b8(f);if(d&&d.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(s.doc.sliceString(u,u+2))&&(h=Lx(s.doc,d,u)))return{range:l,changes:{from:u,insert:`</${h}>`}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([o,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),P8=99,Vx=1,k8=100,x8=101,Xx=2,TA=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],_8=58,$8=40,RA=95,C8=91,Hd=45,E8=46,Q8=35,T8=37,R8=38,A8=92,M8=10;function sf(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function AA(t){return t>=48&&t<=57}const j8=new kn((t,e)=>{for(let r=!1,n=0,i=0;;i++){let{next:o}=t;if(sf(o)||o==Hd||o==RA||r&&AA(o))!r&&(o!=Hd||i>0)&&(r=!0),n===i&&o==Hd&&n++,t.advance();else if(o==A8&&t.peek(1)!=M8)t.advance(),t.next>-1&&t.advance(),r=!0;else{r&&t.acceptToken(o==$8?k8:n==2&&e.canShift(Xx)?Xx:x8);break}}}),D8=new kn(t=>{if(TA.includes(t.peek(-1))){let{next:e}=t;(sf(e)||e==RA||e==Q8||e==E8||e==C8||e==_8&&sf(t.peek(1))||e==Hd||e==R8)&&t.acceptToken(P8)}}),q8=new kn(t=>{if(!TA.includes(t.peek(-1))){let{next:e}=t;if(e==T8&&(t.advance(),t.acceptToken(Vx)),sf(e)){do t.advance();while(sf(t.next)||AA(t.next));t.acceptToken(Vx)}}}),Z8=js({"AtKeyword import charset namespace keyframes media supports":S.definitionKeyword,"from to selector":S.keyword,NamespaceName:S.namespace,KeyframeName:S.labelName,KeyframeRangeName:S.operatorKeyword,TagName:S.tagName,ClassName:S.className,PseudoClassName:S.constant(S.className),IdName:S.labelName,"FeatureName PropertyName":S.propertyName,AttributeName:S.attributeName,NumberLiteral:S.number,KeywordQuery:S.keyword,UnaryQueryOp:S.operatorKeyword,"CallTag ValueName":S.atom,VariableName:S.variableName,Callee:S.operatorKeyword,Unit:S.unit,"UniversalSelector NestingSelector":S.definitionOperator,MatchOp:S.compareOperator,"ChildOp SiblingOp, LogicOp":S.logicOperator,BinOp:S.arithmeticOperator,Important:S.modifier,Comment:S.blockComment,ColorLiteral:S.color,"ParenthesizedContent StringLiteral":S.string,":":S.punctuation,"PseudoOp #":S.derefOperator,"; ,":S.separator,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace}),N8={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},I8={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},W8={__proto__:null,not:132,only:132},B8=Ts.deserialize({version:14,states:":^QYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#El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PWR!{rQ!RXR!|sQxUQ!wpQ#i!cQ#o!jQ#p!kQ${$eR%X$zSgPwQ!phQ#r!nR$l#sZfPhw!n#sa!b[`a!V!^!`#d#eR#b!^R!g^R!i_R#n!iS$e#m$fR%V$yV$c#m$f$yQ!rjR#v!rQdOShPwU!ldh#sR#s!nQ$P#SU$p$P$v%SQ$v$YR%S$qQ#_!ZR$W#_Q$r$PR%T$rQpUS!vp$nR$n#|Q$j#qR%P$jQ!ogS#t!o#uR#u!pQ#f!_R$^#fQ$f#mR$|$fQ$z$eR%W$z_cOPdhw!n#s^UOPdhw!n#sQ!uoQ!}tQ#OuQ#PvQ#|#RR$_#hR$Q#SQ!VZQ!d]Q#V!TQ#q!m[$O#S$P$Y$q$v%SQ$R#UQ$T#XS$h#q$jQ$m#zR%O$iR#}#RQiPR#QwQ!c[Q!kaR#Y!VU!_[a!VQ!j`Q#c!^Q#g!`Q$[#dR$]#e",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent ] [ LineNames LineName , PseudoClassName ArgList IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",maxTerm:117,nodeProps:[["isolate",-2,3,24,""],["openedBy",17,"(",32,"[",50,"{"],["closedBy",18,")",33,"]",51,"}"]],propSources:[Z8],skippedNodes:[0,3,87],repeatNodeCount:11,tokenData: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;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[D8,q8,j8,1,2,3,4,new Hp("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:t=>N8[t]||-1},{term:58,get:t=>I8[t]||-1},{term:101,get:t=>W8[t]||-1}],tokenPrec:1200});let tm=null;function rm(){if(!tm&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],r=new Set;for(let n in t)n!="cssText"&&n!="cssFloat"&&typeof t[n]=="string"&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),r.has(n)||(e.push(n),r.add(n)));tm=e.sort().map(n=>({type:"property",label:n}))}return tm||[]}const Fx=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),Ux=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),L8=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),Vo=/^(\w[\w-]*|-\w[\w-]*|)$/,V8=/^-(-[\w-]*)?$/;function X8(t,e){var r;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let n=(r=t.parent)===null||r===void 0?void 0:r.firstChild;return(n==null?void 0:n.name)!="Callee"?!1:e.sliceString(n.from,n.to)=="var"}const Yx=new qQ,F8=["Declaration"];function U8(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function MA(t,e,r){if(e.to-e.from>4096){let n=Yx.get(e);if(n)return n;let i=[],o=new Set,s=e.cursor(sr.IncludeAnonymous);if(s.firstChild())do for(let a of MA(t,s.node,r))o.has(a.label)||(o.add(a.label),i.push(a));while(s.nextSibling());return Yx.set(e,i),i}else{let n=[],i=new Set;return e.cursor().iterate(o=>{var s;if(r(o)&&o.matchContext(F8)&&((s=o.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let a=t.sliceString(o.from,o.to);i.has(a)||(i.add(a),n.push({label:a,type:"variable"}))}}),n}}const Y8=t=>e=>{let{state:r,pos:n}=e,i=pr(r).resolveInner(n,-1),o=i.type.isError&&i.from==i.to-1&&r.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(o||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:rm(),validFor:Vo};if(i.name=="ValueName")return{from:i.from,options:Ux,validFor:Vo};if(i.name=="PseudoClassName")return{from:i.from,options:Fx,validFor:Vo};if(t(i)||(e.explicit||o)&&X8(i,r.doc))return{from:t(i)||o?i.from:n,options:MA(r.doc,U8(i),t),validFor:V8};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:rm(),validFor:Vo};return{from:i.from,options:L8,validFor:Vo}}if(!e.explicit)return null;let s=i.resolve(n),a=s.childBefore(n);return a&&a.name==":"&&s.name=="PseudoClassSelector"?{from:n,options:Fx,validFor:Vo}:a&&a.name==":"&&s.name=="Declaration"||s.name=="ArgList"?{from:n,options:Ux,validFor:Vo}:s.name=="Block"||s.name=="Styles"?{from:n,options:rm(),validFor:Vo}:null},z8=Y8(t=>t.name=="VariableName"),af=Qs.define({name:"css",parser:B8.configure({props:[Ta.add({Declaration:Rl()}),Ds.add({"Block KeyframeList":H0})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function W1(){return new Ca(af,af.data.of({autocomplete:z8}))}const G8=54,H8=1,K8=55,J8=2,eF=56,tF=3,zx=4,rF=5,Kp=6,jA=7,DA=8,qA=9,ZA=10,nF=11,iF=12,oF=13,nm=57,sF=14,Gx=58,NA=20,aF=22,IA=23,lF=24,Sv=26,WA=27,uF=28,cF=31,fF=34,hF=36,dF=37,pF=0,gF=1,OF={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},mF={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Hx={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function yF(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function BA(t){return t==9||t==10||t==13||t==32}let Kx=null,Jx=null,e_=0;function wv(t,e){let r=t.pos+e;if(e_==r&&Jx==t)return Kx;let n=t.peek(e);for(;BA(n);)n=t.peek(++e);let i="";for(;yF(n);)i+=String.fromCharCode(n),n=t.peek(++e);return Jx=t,e_=r,Kx=i?i.toLowerCase():n==vF||n==bF?void 0:null}const LA=60,Jp=62,B1=47,vF=63,bF=33,SF=45;function t_(t,e){this.name=t,this.parent=e,this.hash=e?e.hash:0;for(let r=0;r<t.length;r++)this.hash+=(this.hash<<4)+t.charCodeAt(r)+(t.charCodeAt(r)<<8)}const wF=[Kp,ZA,jA,DA,qA],PF=new Z1({start:null,shift(t,e,r,n){return wF.indexOf(e)>-1?new t_(wv(n,1)||"",t):t},reduce(t,e){return e==NA&&t?t.parent:t},reuse(t,e,r,n){let i=e.type.id;return i==Kp||i==hF?new t_(wv(n,1)||"",t):t},hash(t){return t?t.hash:0},strict:!1}),kF=new kn((t,e)=>{if(t.next!=LA){t.next<0&&e.context&&t.acceptToken(nm);return}t.advance();let r=t.next==B1;r&&t.advance();let n=wv(t,0);if(n===void 0)return;if(!n)return t.acceptToken(r?sF:Kp);let i=e.context?e.context.name:null;if(r){if(n==i)return t.acceptToken(nF);if(i&&mF[i])return t.acceptToken(nm,-2);if(e.dialectEnabled(pF))return t.acceptToken(iF);for(let o=e.context;o;o=o.parent)if(o.name==n)return;t.acceptToken(oF)}else{if(n=="script")return t.acceptToken(jA);if(n=="style")return t.acceptToken(DA);if(n=="textarea")return t.acceptToken(qA);if(OF.hasOwnProperty(n))return t.acceptToken(ZA);i&&Hx[i]&&Hx[i][n]?t.acceptToken(nm,-1):t.acceptToken(Kp)}},{contextual:!0}),xF=new kn(t=>{for(let e=0,r=0;;r++){if(t.next<0){r&&t.acceptToken(Gx);break}if(t.next==SF)e++;else if(t.next==Jp&&e>=2){r>=3&&t.acceptToken(Gx,-2);break}else e=0;t.advance()}});function _F(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const $F=new kn((t,e)=>{if(t.next==B1&&t.peek(1)==Jp){let r=e.dialectEnabled(gF)||_F(e.context);t.acceptToken(r?rF:zx,2)}else t.next==Jp&&t.acceptToken(zx,1)});function L1(t,e,r){let n=2+t.length;return new kn(i=>{for(let o=0,s=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(e);break}if(o==0&&i.next==LA||o==1&&i.next==B1||o>=2&&o<n&&i.next==t.charCodeAt(o-2))o++,s++;else if((o==2||o==n)&&BA(i.next))s++;else if(o==n&&i.next==Jp){a>s?i.acceptToken(e,-s):i.acceptToken(r,-(s-2));break}else if((i.next==10||i.next==13)&&a){i.acceptToken(e,1);break}else o=s=0;i.advance()}})}const CF=L1("script",G8,H8),EF=L1("style",K8,J8),QF=L1("textarea",eF,tF),TF=js({"Text RawText":S.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":S.angleBracket,TagName:S.tagName,"MismatchedCloseTag/TagName":[S.tagName,S.invalid],AttributeName:S.attributeName,"AttributeValue UnquotedAttributeValue":S.attributeValue,Is:S.definitionOperator,"EntityReference CharacterReference":S.character,Comment:S.blockComment,ProcessingInst:S.processingInstruction,DoctypeDecl:S.documentMeta}),RF=Ts.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`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O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:PF,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,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=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[CF,EF,QF,$F,kF,xF,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:509},tokenPrec:511});function VA(t,e){let r=Object.create(null);for(let n of t.getChildren(IA)){let i=n.getChild(lF),o=n.getChild(Sv)||n.getChild(WA);i&&(r[e.read(i.from,i.to)]=o?o.type.id==Sv?e.read(o.from+1,o.to-1):e.read(o.from,o.to):"")}return r}function r_(t,e){let r=t.getChild(aF);return r?e.read(r.from,r.to):" "}function im(t,e,r){let n;for(let i of r)if(!i.attrs||i.attrs(n||(n=VA(t.node.parent.firstChild,e))))return{parser:i.parser};return null}function XA(t=[],e=[]){let r=[],n=[],i=[],o=[];for(let a of t)(a.tag=="script"?r:a.tag=="style"?n:a.tag=="textarea"?i:o).push(a);let s=e.length?Object.create(null):null;for(let a of e)(s[a.name]||(s[a.name]=[])).push(a);return F0((a,l)=>{let c=a.type.id;if(c==uF)return im(a,l,r);if(c==cF)return im(a,l,n);if(c==fF)return im(a,l,i);if(c==NA&&o.length){let u=a.node,f=u.firstChild,h=f&&r_(f,l),d;if(h){for(let p of o)if(p.tag==h&&(!p.attrs||p.attrs(d||(d=VA(u,l))))){let g=u.lastChild,m=g.type.id==dF?g.from:u.to;if(m>f.to)return{parser:p.parser,overlay:[{from:f.to,to:m}]}}}}if(s&&c==IA){let u=a.node,f;if(f=u.firstChild){let h=s[l.read(f.from,f.to)];if(h)for(let d of h){if(d.tagName&&d.tagName!=r_(u.parent,l))continue;let p=u.lastChild;if(p.type.id==Sv){let g=p.from+1,m=p.lastChild,y=p.to-(m&&m.isError?0:1);if(y>g)return{parser:d.parser,overlay:[{from:g,to:y}]}}else if(p.type.id==WA)return{parser:d.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Fu=["_blank","_self","_top","_parent"],om=["ascii","utf-8","utf-16","latin1","latin1"],sm=["get","post","put","delete"],am=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Hn=["true","false"],et={},AF={a:{attrs:{href:null,ping:null,type:null,media:null,target:Fu,hreflang:null}},abbr:et,address:et,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:et,aside:et,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:et,base:{attrs:{href:null,target:Fu}},bdi:et,bdo:et,blockquote:{attrs:{cite:null}},body:et,br:et,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:am,formmethod:sm,formnovalidate:["novalidate"],formtarget:Fu,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:et,center:et,cite:et,code:et,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:et,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:et,div:et,dl:et,dt:et,em:et,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:et,figure:et,footer:et,form:{attrs:{action:null,name:null,"accept-charset":om,autocomplete:["on","off"],enctype:am,method:sm,novalidate:["novalidate"],target:Fu}},h1:et,h2:et,h3:et,h4:et,h5:et,h6:et,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:et,hgroup:et,hr:et,html:{attrs:{manifest:null}},i:et,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:am,formmethod:sm,formnovalidate:["novalidate"],formtarget:Fu,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:et,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:et,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:et,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:om,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:et,noscript:et,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:et,param:{attrs:{name:null,value:null}},pre:et,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:et,rt:et,ruby:et,samp:et,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:om}},section:et,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:et,source:{attrs:{src:null,type:null,media:null}},span:et,strong:et,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:et,summary:et,sup:et,table:et,tbody:et,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:et,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:et,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:et,time:{attrs:{datetime:null}},title:et,tr:et,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:et,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:et},FA={accesskey:null,class:null,contenteditable:Hn,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Hn,autocorrect:Hn,autocapitalize:Hn,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Hn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Hn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Hn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Hn,"aria-hidden":Hn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Hn,"aria-multiselectable":Hn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Hn,"aria-relevant":null,"aria-required":Hn,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},UA="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of UA)FA[t]=null;class lf{constructor(e,r){this.tags=Object.assign(Object.assign({},AF),e),this.globalAttrs=Object.assign(Object.assign({},FA),r),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}lf.default=new lf;function ru(t,e,r=t.length){if(!e)return"";let n=e.firstChild,i=n&&n.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,r)):""}function nu(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function YA(t,e,r){let n=r.tags[ru(t,nu(e))];return(n==null?void 0:n.children)||r.allTags}function V1(t,e){let r=[];for(let n=nu(e);n&&!n.type.isTop;n=nu(n.parent)){let i=ru(t,n);if(i&&n.lastChild.name=="CloseTag")break;i&&r.indexOf(i)<0&&(e.name=="EndTag"||e.from>=n.firstChild.to)&&r.push(i)}return r}const zA=/^[:\-\.\w\u00b7-\uffff]*$/;function n_(t,e,r,n,i){let o=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",s=nu(r,!0);return{from:n,to:i,options:YA(t.doc,s,e).map(a=>({label:a,type:"type"})).concat(V1(t.doc,r).map((a,l)=>({label:"/"+a,apply:"/"+a+o,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function i_(t,e,r,n){let i=/\s*>/.test(t.sliceDoc(n,n+5))?"":">";return{from:r,to:n,options:V1(t.doc,e).map((o,s)=>({label:o,apply:o+i,type:"type",boost:99-s})),validFor:zA}}function MF(t,e,r,n){let i=[],o=0;for(let s of YA(t.doc,r,e))i.push({label:"<"+s,type:"type"});for(let s of V1(t.doc,r))i.push({label:"</"+s+">",type:"type",boost:99-o++});return{from:n,to:n,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function jF(t,e,r,n,i){let o=nu(r),s=o?e.tags[ru(t.doc,o)]:null,a=s&&s.attrs?Object.keys(s.attrs):[],l=s&&s.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:n,to:i,options:l.map(c=>({label:c,type:"property"})),validFor:zA}}function DF(t,e,r,n,i){var o;let s=(o=r.parent)===null||o===void 0?void 0:o.getChild("AttributeName"),a=[],l;if(s){let c=t.sliceDoc(s.from,s.to),u=e.globalAttrs[c];if(!u){let f=nu(r),h=f?e.tags[ru(t.doc,f)]:null;u=(h==null?void 0:h.attrs)&&h.attrs[c]}if(u){let f=t.sliceDoc(n,i).toLowerCase(),h='"',d='"';/^['"]/.test(f)?(l=f[0]=='"'?/^[^"]*$/:/^[^']*$/,h="",d=t.sliceDoc(i,i+1)==f[0]?"":f[0],f=f.slice(1),n++):l=/^[^\s<>='"]*$/;for(let p of u)a.push({label:p,apply:h+p+d,type:"constant"})}}return{from:n,to:i,options:a,validFor:l}}function GA(t,e){let{state:r,pos:n}=e,i=pr(r).resolveInner(n,-1),o=i.resolve(n);for(let s=n,a;o==i&&(a=i.childBefore(s));){let l=a.lastChild;if(!l||!l.type.isError||l.from<l.to)break;o=i=a,s=l.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?i_(r,i,i.from,n):n_(r,t,i,i.from,n):i.name=="StartTag"?n_(r,t,i,n,n):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?i_(r,i,n,n):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?jF(r,t,i,i.name=="AttributeName"?i.from:n,n):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?DF(r,t,i,i.name=="Is"?n:i.from,n):e.explicit&&(o.name=="Element"||o.name=="Text"||o.name=="Document")?MF(r,t,i,n):null}function HA(t){return GA(lf.default,t)}function qF(t){let{extraTags:e,extraGlobalAttributes:r}=t,n=r||e?new lf(e,r):lf.default;return i=>GA(n,i)}const ZF=Ni.parser.configure({top:"SingleExpression"}),KA=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:N1.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:$A.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:CA.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:ZF},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Ni.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:af.parser}],JA=[{name:"style",parser:af.parser.configure({top:"Styles"})}].concat(UA.map(t=>({name:t,parser:Ni.parser}))),e2=Qs.define({name:"html",parser:RF.configure({props:[Ta.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,r;for(let n=t.node;;){let i=n.lastChild;if(!i||i.name!="Element"||i.to!=n.to)break;e=n=i}return e&&!((r=e.lastChild)&&(r.name=="CloseTag"||r.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),Ds.add({Element(t){let e=t.firstChild,r=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:r.name=="CloseTag"?r.from:t.to}}}),rT.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Kd=e2.configure({wrap:XA(KA,JA)});function t2(t={}){let e="",r;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(r=XA((t.nestedLanguages||[]).concat(KA),(t.nestedAttributes||[]).concat(JA)));let n=r?e2.configure({wrap:r,dialect:e}):e?Kd.configure({dialect:e}):Kd;return new Ca(n,[Kd.data.of({autocomplete:qF(t)}),t.autoCloseTags!==!1?NF:[],I1().support,W1().support])}const o_=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),NF=Ee.inputHandler.of((t,e,r,n,i)=>{if(t.composing||t.state.readOnly||e!=r||n!=">"&&n!="/"||!Kd.isActiveAt(t.state,e,-1))return!1;let o=i(),{state:s}=o,a=s.changeByRange(l=>{var c,u,f;let h=s.doc.sliceString(l.from-1,l.to)==n,{head:d}=l,p=pr(s).resolveInner(d,-1),g;if(h&&n==">"&&p.name=="EndTag"){let m=p.parent;if(((u=(c=m.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(g=ru(s.doc,m.parent,d))&&!o_.has(g)){let y=d+(s.doc.sliceString(d,d+1)===">"?1:0),O=`</${g}>`;return{range:l,changes:{from:d,to:y,insert:O}}}}else if(h&&n=="/"&&p.name=="IncompleteCloseTag"){let m=p.parent;if(p.from==d-2&&((f=m.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(g=ru(s.doc,m,d))&&!o_.has(g)){let y=d+(s.doc.sliceString(d,d+1)===">"?1:0),O=`${g}>`;return{range:le.cursor(d+O.length,-1),changes:{from:d,to:y,insert:O}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([o,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),IF=145,WF=1,BF=146,LF=2,VF=147,XF=3,eg=4,r2=5,n2=6,i2=7,o2=8,FF=9,UF=11,lm=148,YF=12,s_=149,Pv=13,Jd=14,zF=67,GF=110,HF=113,KF=116,JF=118,eU={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},tU={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},a_={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function rU(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function s2(t){return t==9||t==10||t==13||t==32}let l_=null,u_=null,c_=0;function kv(t,e){let r=t.pos+e;if(c_==r&&u_==t)return l_;let n=t.peek(e);for(;s2(n);)n=t.peek(++e);let i="";for(;rU(n);)i+=String.fromCharCode(n),n=t.peek(++e);return u_=t,c_=r,l_=i?i.toLowerCase():n==iU||n==oU?void 0:null}const a2=60,nU=62,l2=47,iU=63,oU=33;function f_(t,e){this.name=t,this.parent=e,this.hash=e?e.hash:0;for(let r=0;r<t.length;r++)this.hash+=(this.hash<<4)+t.charCodeAt(r)+(t.charCodeAt(r)<<8)}const sU=[eg,o2,r2,n2,i2],aU=new Z1({start:null,shift(t,e,r,n){return sU.indexOf(e)>-1?new f_(kv(n,1)||"",t):t},reduce(t,e){return e==zF&&t?t.parent:t},reuse(t,e,r,n){let i=e.type.id;return i==eg||i==JF?new f_(kv(n,1)||"",t):t},hash(t){return t?t.hash:0},strict:!1}),lU=new kn((t,e)=>{if(t.next!=a2){t.next<0&&e.context&&t.acceptToken(lm);return}t.advance();let r=t.next==l2;r&&t.advance();let n=kv(t,0);if(n===void 0)return;if(!n)return t.acceptToken(r?YF:eg);let i=e.context?e.context.name:null;if(r){if(n==i)return t.acceptToken(FF);if(i&&tU[i])return t.acceptToken(lm,-2);for(let o=e.context;o;o=o.parent)if(o.name==n)return;t.acceptToken(UF)}else{if(n=="script")return t.acceptToken(r2);if(n=="style")return t.acceptToken(n2);if(n=="textarea")return t.acceptToken(i2);if(eU.hasOwnProperty(n))return t.acceptToken(o2);i&&a_[i]&&a_[i][n]?t.acceptToken(lm,-1):t.acceptToken(eg)}},{contextual:!0});function X1(t,e,r){let n=2+t.length;return new kn(i=>{for(let o=0,s=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(e);break}if(o==0&&i.next==a2||o==1&&i.next==l2||o>=2&&o<n&&i.next==t.charCodeAt(o-2))o++,s++;else if((o==2||o==n)&&s2(i.next))s++;else if(o==n&&i.next==nU){a>s?i.acceptToken(e,-s):i.acceptToken(r,-(s-2));break}else if((i.next==10||i.next==13)&&a){i.acceptToken(e,1);break}else o=s=0;i.advance()}})}const uU=X1("script",IF,WF),cU=X1("style",BF,LF),fU=X1("textarea",VF,XF),hU=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],u2=40,tg=41,c2=91,rg=93,f2=123,ng=125,dU=44,pU=58,gU=35,OU=64,sc=47,mU=62,yU=45,h_=34,d_=39,vU=92,bU=10,p_=42,g_=96,h2=[pU,gU,OU,sc],SU=new kn(t=>{for(let e=0,r=0;;r++){if(t.next<0){r&&t.acceptToken(s_);break}if(t.next==yU)e++;else if(t.next==mU&&e>=2){r>3&&t.acceptToken(s_,-2);break}else e=0;t.advance()}});function d2(t){let e=!1,r=null,n=!1;return()=>e?n?(n=!1,!0):t.next===vU?(n=!0,!0):((r==="double"&&t.next===h_||r==="single"&&t.next===d_||r==="template"&&t.next===g_)&&(e=!1,r=null),!0):t.next===h_?(e=!0,r="double",!0):t.next===d_?(e=!0,r="single",!0):t.next===g_?(e=!0,r="template",!0):!1}function p2(t){let e=!1,r=!1;return()=>e?(t.next===bU&&(e=!1),!0):r?(t.next===p_&&t.peek(1)===sc&&(r=!1),!0):t.next===sc&&t.peek(1)===sc?(e=!0,!0):t.next===sc&&t.peek(1)===p_?(r=!0,!0):!1}const wU=new kn(t=>{if(h2.includes(t.next))return;const e=p2(t),r=d2(t);let n=[];const i=o=>{const s=n.lastIndexOf(o);if(s!==-1)for(;n.length>s;)n.pop()};for(let o=0;;o++){if(t.next<0){o>0&&t.acceptToken(Pv);break}if(e()||r()){t.advance();continue}if(n.length===0&&(t.next===ng||t.next===tg||t.next===rg)){t.acceptToken(Pv);break}switch(t.next){case u2:n.push("(");break;case tg:i("(");break;case c2:n.push("[");break;case rg:i("[");break;case f2:n.push("{");break;case ng:i("{");break}t.advance()}}),PU=new kn(t=>{if(h2.includes(t.peek(0)))return;const e=p2(t),r=d2(t);let n=[];const i=o=>{const s=n.lastIndexOf(o);if(s!==-1)for(;n.length>s;)n.pop()};for(let o=0;;o++){if(t.next<0){o>0&&t.acceptToken(Jd);break}if(e()||r()){t.advance();continue}if(n.length===0&&(t.next===ng||t.next===tg||t.next===rg||t.next===dU)){t.acceptToken(Jd);break}switch(t.next){case u2:n.push("(");break;case tg:i("(");break;case c2:n.push("[");break;case rg:i("[");break;case f2:n.push("{");break;case ng:i("{");break}if(o!==0&&n.length===0&&hU.includes(t.next)){t.acceptToken(Jd);break}t.advance()}}),kU=js({"Text RawText":S.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":S.angleBracket,TagName:S.tagName,"MismatchedCloseTag/TagName":[S.tagName,S.invalid],AttributeName:S.attributeName,UnquotedAttributeValue:S.attributeValue,"DoubleQuote SingleQuote AttributeValueContent":S.attributeValue,Is:S.definitionOperator,"EntityReference CharacterReference":S.character,Comment:S.blockComment,ProcessingInst:S.processingInstruction,DoctypeDecl:S.documentMeta,"{ }":S.bracket,"[ ]":S.squareBracket,"( )":S.paren,"| , :":S.punctuation,"...":S.derefOperator,ComponentName:S.className,SvelteElementNamespace:S.namespace,SvelteElementType:S.tagName,StyleAttributeName:S.propertyName,BlockType:S.controlKeyword,BlockPrefix:S.typeOperator,"UnknownBlock/BlockType":S.invalid,UnknownBlockContent:S.invalid,"if then catch":S.controlKeyword,as:S.definitionOperator,Variable:S.variableName,Modifier:S.modifier,DirectlyInterpolatedAttributeValue:S.attributeValue,"DirectiveOn/DirectiveName":S.controlKeyword,"DirectiveOn/DirectiveTarget":S.typeName,"DirectiveUse/DirectiveName":S.controlKeyword,"DirectiveUse/DirectiveTarget":S.function(S.variableName),"DirectiveBind/DirectiveName":S.controlKeyword,"DirectiveBind/DirectiveTarget":S.variableName,"DirectiveLet/DirectiveName":S.definitionKeyword,"DirectiveLet/DirectiveTarget":S.definition(S.variableName),"DirectiveTransition/DirectiveName":S.operatorKeyword,"DirectiveTransition/DirectiveTarget":S.function(S.variableName),"DirectiveIn/DirectiveName":S.operatorKeyword,"DirectiveIn/DirectiveTarget":S.function(S.variableName),"DirectiveOut/DirectiveName":S.operatorKeyword,"DirectiveOut/DirectiveTarget":S.function(S.variableName),"DirectiveAnimate/DirectiveName":S.operatorKeyword,"DirectiveAnimate/DirectiveTarget":S.function(S.variableName),"DirectiveClass/DirectiveName":S.attributeName,"DirectiveClass/DirectiveTarget":S.variableName,"DirectiveStyle/DirectiveName":S.attributeName,"DirectiveStyle/DirectiveTarget":S.propertyName}),xU={__proto__:null,"#":41,":":51,"/":59,"@":109},_U={__proto__:null,if:44,else:52,each:64,await:82,then:90,catch:94,key:102,html:110,debug:114,const:118},$U={__proto__:null,if:54,as:66,then:84,catch:86},CU={__proto__:null,on:313,bind:317,let:319,class:321,style:323,use:325,transition:327,in:329,out:331,animate:333},EU={__proto__:null,svelte:243},QU=Ts.deserialize({version:14,states:"DxQVO#|OOO!ZO#|O'#ClO#[O#|O'#CzO$]O#|O'#DTO%^O#|O'#D_O&_Q'[O'#DjO&mQ&jO'#DrO&rQ&jO'#EpO&wQ&jO'#EsO&|Q&jO'#EvO'XQ&jO'#E|O'^OXO'#DqO'iOYO'#DqO'tO[O'#DqO)TO#|O'#DqOOOW'#Dq'#DqO)[O&zO'#FOO&|Q&jO'#FQO&|Q&jO'#FROOOW'#Fj'#FjOOOW'#FT'#FTQVO#|OOOOOW'#FU'#FUO!ZO#|O,59WOOOW,59W,59WO)uQ'[O'#DjO#[O#|O,59fOOOW,59f,59fO)|Q'[O'#DjOOOW'#FV'#FVO$]O#|O,59oOOOW,59o,59oO*fQ'[O'#DjOOOW'#FW'#FWO%^O#|O,59yOOOW,59y,59yO*mQ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nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag LongExpression ShortExpression Document IfBlock IfBlockOpen { BlockPrefix BlockPrefix BlockType BlockType } ElseBlock BlockPrefix BlockType if IfBlockClose BlockPrefix EachBlock EachBlockOpen BlockType as ( ) , Variable EachBlockClose AwaitBlock AwaitBlockOpen BlockType then catch ThenBlock BlockType CatchBlock BlockType AwaitBlockClose KeyBlock KeyBlockOpen BlockType KeyBlockClose RawHTMLBlock BlockPrefix BlockType DebugBlock BlockType ConstBlock BlockType Interpolation UnknownBlock UnknownBlockContent Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName DirectlyInterpolatedAttribute DirectlyInterpolatedAttributeValue SpreadInterpolatedAttribute ... Directive DirectiveOn DirectiveName AttributeName DirectiveTarget DirectiveBind DirectiveName DirectiveLet DirectiveName DirectiveClass DirectiveName DirectiveStyle DirectiveName DirectiveUse DirectiveName DirectiveTransition DirectiveName DirectiveIn DirectiveName DirectiveOut DirectiveName DirectiveAnimate DirectiveName | Modifier Is AttributeValue DoubleQuote AttributeValueContent SingleQuote AttributeValueContent UnquotedAttributeValue StyleAttribute StyleAttributeName Attribute EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag ComponentName SvelteElementName SvelteElementNamespace SvelteElementType CloseTag SelfClosingTag SelfClosingEndTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:172,context:aU,nodeProps:[["closedBy",-10,1,2,3,5,6,7,8,9,10,11,"EndTag",4,"EndTag SelfClosingEndTag",17,"IfBlockClose",18,"}",31,"EachBlockClose",34,"(",40,"AwaitBlockClose",48,"AwaitBlockOpen",50,"KeyBlockClose",-4,68,112,115,118,"CloseTag",101,'"',103,"'"],["group",-10,12,60,64,65,66,67,126,127,128,129,"Entity",-4,16,30,39,49,"Block Entity",-4,17,31,40,50,"BlockOpen",-3,24,44,46,"BlockInline",-4,28,38,48,52,"BlockClose",-4,53,56,58,61,"BlockInline Entity",63,"Entity TextContent",-3,110,113,116,"TextContent Entity"],["openedBy",23,"{",28,"IfBlockOpen",35,")",38,"EachBlockOpen",52,"KeyBlockOpen",101,'"',103,"'",109,"StartTag StartCloseTag",-4,111,114,117,123,"OpenTag",125,"StartTag"]],propSources:[kU],skippedNodes:[0],repeatNodeCount:13,tokenData:"&8h$IRR!dOX%aXY/TYZ/TZ[%a[]1{]^/T^p%apq/Tqr2yrsEastF_tuHxuv2yvw!)[wx#,nxy#-lyz#0Vz|2y|}#2p}!O#5Z!O!P#Kk!P!Q$%S!Q![2y![!]$'{!]!^2y!^!_$)u!_!`%'{!`!a%({!a!b2y!b!cF_!c!}%){!}#R2y#R#S%AU#S#T&%m#T#o&'m#o#p&1P#p#q&1d#q#r&3[#r#s2y#s$f%a$f$g2y$g%WHx%W%o%AU%o%pHx%p&a%AU&a&bHx&b1p%AU1p4UHx4U4d%AU4d4eHx4e$IS%AU$IS$I`Hx$I`$Ib%AU$Ib$KhHx$Kh%#t%AU%#t&/xHx&/x&Et%AU&Et&FVHx&FV;'S%AU;'S;:j&5p;:j;=`&5v<%l?&rHx?&r?Ah%AU?Ah?BY&5|?BY?Mn%AU?MnO&5|$3X%ng!aP#]7[$mMh$o!LQ!``OX'VXZ(wZ['V[^(w^p'Vpq(wqr'Vrs(wsv'Vvw*}wx(wx!^'V!^!_)q!_!a(w!a#S'V#S#T(w#T#o'V#o#p*}#p#q'V#q#r-b#r;'S'V;'S;=`.}<%lO'V7m'`g!aP#]7[!``OX'VXZ(wZ['V[^(w^p'Vpq(wqr'Vrs(wsv'Vvw*}wx(wx!^'V!^!_)q!_!a(w!a#S'V#S#T(w#T#o'V#o#p*}#p#q'V#q#r-b#r;'S'V;'S;=`.}<%lO'Va)OZ!aP!``Ov(wvw)qw!^(w!^!_)q!_#o(w#o#p)q#p#q(w#q#r*Y#r;'S(w;'S;=`*w<%lO(w`)vS!``O#q)q#r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U(t,e){let r=Object.create(null);for(let n of t.firstChild.getChildren("Attribute")){let i=n.getChild("AttributeName"),o=n.getChild("AttributeValue")||n.getChild("UnquotedAttributeValue");i&&(r[e.read(i.from,i.to)]=o?o.name=="AttributeValue"?e.read(o.from+1,o.to-1):e.read(o.from,o.to):"")}return r}function um(t,e,r){let n;for(let i of r)if(!i.attrs||i.attrs(n||(n=TU(t.node.parent,e))))return{parser:i.parser};return null}const O_=SA.configure({top:"SingleExpression"});function RU(t){let e=[],r=[],n=[];for(let i of t){let o=i.tag=="script"?e:i.tag=="style"?r:i.tag=="textarea"?n:null;if(!o)throw new RangeError("Only script, style, and textarea tags can host nested parsers");o.push(i)}return F0((i,o)=>{let s=i.type.id;return s===Pv?{parser:O_}:s===Jd?{parser:O_}:s===GF?um(i,o,e):s===HF?um(i,o,r):s===KF?um(i,o,n):null})}const AU=[{tag:"script",attrs:t=>t.type==="text/typescript"||t.lang==="ts",parser:N1.parser},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Ni.parser},{tag:"style",attrs(t){return(!t.lang||t.lang==="css"||t.lang==="scss")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css|scss)$/i.test(t.type))},parser:af.parser}],g2=Qs.define({parser:QU.configure({wrap:RU(AU),props:[Ta.add({Element:t=>{let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},Block:t=>{const e=t.node,r=t.textAfter.trim();if(r.startsWith("{/")){const i=e.name;return i==="IfBlock"&&r.startsWith("{/if")||i==="EachBlock"&&r.startsWith("{/each")||i==="AwaitBlock"&&r.startsWith("{/await")||i==="KeyBlock"&&r.startsWith("{/key")?t.lineIndent(t.node.from):null}if(e.name==="IfBlock"||e.name==="EachBlock"){if(r.startsWith("{:else"))return t.lineIndent(e.from)}else if(e.name==="AwaitBlock"&&(r.startsWith("{:then")||r.startsWith("{:catch")))return t.lineIndent(e.from);let n=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+n[0].length?t.continue():t.lineIndent(t.node.from)+(n[2]?0:t.unit)},"BlockOpen BlockClose BlockInline":t=>t.column(t.node.from)+t.unit,"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document:t=>{if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,r;for(let n=t.node;;){let i=n.lastChild;if(!i||i.name!="Element"||i.to!=n.to)break;e=n=i}return e&&!((r=e.lastChild)&&(r.name==="CloseTag"||r.name==="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),Ds.add({Block:t=>{const e=`${t.name}Open`,r=`${t.name}Close`,n=t.firstChild,i=t.lastChild;return!n||n.name!==e?null:{from:n.to,to:(i==null?void 0:i.name)===r?i.from:t.to}},Element:t=>{let e=t.firstChild,r=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:r.name==="CloseTag"?r.from:t.to}}})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*((<\/\w+\W)|(\{:(else|then|catch))|(\{\/(if|each|await|key)))$/,wordChars:"-._",autocomplete:HA}});function MU(){return new Ca(g2,[I1().support,W1().support,jU])}function m_(t,e,r=t.length){if(!e)return"";let n=e.firstChild,i=n&&(n.getChild("TagName")||n.getChild("ComponentName")||n.getChild("SvelteElementName"));return i?t.sliceString(i.from,Math.min(i.to,r)):""}const jU=Ee.inputHandler.of((t,e,r,n)=>{if(t.composing||t.state.readOnly||e!=r||n!=">"&&n!="/"||!g2.isActiveAt(t.state,e,-1))return!1;let{state:i}=t,o=i.changeByRange(s=>{var a,l,c;let{head:u}=s,f=pr(i).resolveInner(u,-1),h;if((f.name==="TagName"||f.name==="ComponentName"||f.name==="SvelteElementName"||f.name==="StartTag")&&(f=f.parent),n===">"&&f.name==="OpenTag"){if(((l=(a=f.parent)===null||a===void 0?void 0:a.lastChild)===null||l===void 0?void 0:l.name)!="CloseTag"&&(h=m_(i.doc,f.parent,u))){let d=t.state.doc.sliceString(u,u+1)===">",p=`${d?"":">"}</${h}>`;return{range:le.cursor(u+1),changes:{from:u+(d?1:0),insert:p}}}}else if(n==="/"&&f.name==="OpenTag"){let d=f.parent,p=d==null?void 0:d.parent;if(d.from==u-1&&((c=p.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(h=m_(i.doc,p,u))){let g=t.state.doc.sliceString(u,u+1)===">",m=`/${h}${g?"":">"}`,y=u+m.length+(g?1:0);return{range:le.cursor(y),changes:{from:u,insert:m}}}}return{range:s}});return o.changes.empty?!1:(t.dispatch(o,{userEvent:"input.type",scrollIntoView:!0}),!0)}),DU=js({String:S.string,Number:S.number,"True False":S.bool,PropertyName:S.propertyName,Null:S.null,",":S.separator,"[ ]":S.squareBracket,"{ }":S.brace}),qU=Ts.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[DU],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),ZU=Qs.define({name:"json",parser:qU.configure({props:[Ta.add({Object:Rl({except:/^\s*\}/}),Array:Rl({except:/^\s*\]/})}),Ds.add({"Object Array":H0})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function NU(){return new Ca(ZU)}class ig{static create(e,r,n,i,o){let s=i+(i<<8)+e+(r<<4)|0;return new ig(e,r,n,s,o,[],[])}constructor(e,r,n,i,o,s,a){this.type=e,this.value=r,this.from=n,this.hash=i,this.end=o,this.children=s,this.positions=a,this.hashProp=[[gt.contextHash,i]]}addChild(e,r){e.prop(gt.contextHash)!=this.hash&&(e=new zt(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new zt(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(i,o,s)=>new zt(Gr.none,i,o,s,this.hashProp)})}}var _e;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(_e||(_e={}));class IU{constructor(e,r){this.start=e,this.content=r,this.marks=[],this.parsers=[]}}class WU{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return wc(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,r=0,n=0){for(let i=r;i<e;i++)n+=this.text.charCodeAt(i)==9?4-n%4:1;return n}findColumn(e){let r=0;for(let n=0;r<this.text.length&&n<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return r}scrub(){if(!this.baseIndent)return this.text;let e="";for(let r=0;r<this.basePos;r++)e+=" ";return e+this.text.slice(this.basePos)}}function y_(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==_e.OrderedList?Y1:U1)(r,e,!1);return n>0&&(t.type!=_e.BulletList||F1(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}const O2={[_e.Blockquote](t,e,r){return r.next!=62?!1:(r.markers.push(jt(_e.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(_i(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0)},[_e.ListItem](t,e,r){return r.indent<r.baseIndent+t.value&&r.next>-1?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[_e.OrderedList]:y_,[_e.BulletList]:y_,[_e.Document](){return!0}};function _i(t){return t==32||t==9||t==10||t==13}function wc(t,e=0){for(;e<t.length&&_i(t.charCodeAt(e));)e++;return e}function v_(t,e,r){for(;e>r&&_i(t.charCodeAt(e-1));)e--;return e}function m2(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function y2(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function F1(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let i=t.pos+1;i<t.text.length;i++){let o=t.text.charCodeAt(i);if(o==t.next)n++;else if(!_i(o))return-1}return r&&t.next==45&&S2(t)>-1&&t.depth==e.stack.length||n<3?-1:1}function v2(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function U1(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||_i(t.text.charCodeAt(t.pos+1)))&&(!r||v2(e,_e.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function Y1(t,e,r){let n=t.pos,i=t.next;for(;i>=48&&i<=57;){n++;if(n==t.text.length)return-1;i=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||i!=46&&i!=41||n<t.text.length-1&&!_i(t.text.charCodeAt(n+1))||r&&!v2(e,_e.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function b2(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let r=e-t.pos;return r>6?-1:r}function S2(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&_i(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}const xv=/^[ \t]*$/,w2=/-->/,P2=/\?>/,_v=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,w2],[/^\s*<\?/,P2],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?: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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,xv],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,xv]];function k2(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let i=0,o=_v.length-(r?1:0);i<o;i++)if(_v[i][0].test(n))return i;return-1}function b_(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.countIndent(t.skipSpace(e),e,r);return n>=r+5?r+1:n}function Ks(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==_e.CodeText?t[n].to=r:t.push(jt(_e.CodeText,e,r))}const yd={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),i=t.lineStart+n,o=t.lineStart+e.text.length,s=[],a=[];for(Ks(s,i,o);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){Ks(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<r)break;{if(a.length){for(let c of a)c.type==_e.CodeText?Ks(s,c.from,c.to):s.push(c);a=[]}Ks(s,t.lineStart-1,t.lineStart);for(let c of e.markers)s.push(c);o=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<o&&Ks(s,l,o)}}return a.length&&(a=a.filter(l=>l.type!=_e.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(s,-i).finish(_e.CodeBlock,o-i),i),!0},FencedCode(t,e){let r=m2(e);if(r<0)return!1;let n=t.lineStart+e.pos,i=e.next,o=r-e.pos,s=e.skipSpace(r),a=v_(e.text,e.text.length,s),l=[jt(_e.CodeMark,n,n+o)];s<a&&l.push(jt(_e.CodeInfo,t.lineStart+s,t.lineStart+a));for(let c=!0;t.nextLine()&&e.depth>=t.stack.length;c=!1){let u=e.pos;if(e.indent-e.baseIndent<4)for(;u<e.text.length&&e.text.charCodeAt(u)==i;)u++;if(u-e.pos>=o&&e.skipSpace(u)==e.text.length){for(let f of e.markers)l.push(f);l.push(jt(_e.CodeMark,t.lineStart+e.pos,t.lineStart+u)),t.nextLine();break}else{c||Ks(l,t.lineStart-1,t.lineStart);for(let d of e.markers)l.push(d);let f=t.lineStart+e.basePos,h=t.lineStart+e.text.length;f<h&&Ks(l,f,h)}}return t.addNode(t.buffer.writeElements(l,-n).finish(_e.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=y2(e);return r<0?!1:(t.startContext(_e.Blockquote,e.pos),t.addNode(_e.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(F1(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode(_e.HorizontalRule,r),!0},BulletList(t,e){let r=U1(e,t,!1);if(r<0)return!1;t.block.type!=_e.BulletList&&t.startContext(_e.BulletList,e.basePos,e.next);let n=b_(e,e.pos+1);return t.startContext(_e.ListItem,e.basePos,n-e.baseIndent),t.addNode(_e.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},OrderedList(t,e){let r=Y1(e,t,!1);if(r<0)return!1;t.block.type!=_e.OrderedList&&t.startContext(_e.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=b_(e,e.pos+r);return t.startContext(_e.ListItem,e.basePos,n-e.baseIndent),t.addNode(_e.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},ATXHeading(t,e){let r=b2(e);if(r<0)return!1;let n=e.pos,i=t.lineStart+n,o=v_(e.text,e.text.length,n),s=o;for(;s>n&&e.text.charCodeAt(s-1)==e.next;)s--;(s==o||s==n||!_i(e.text.charCodeAt(s-1)))&&(s=e.text.length);let a=t.buffer.write(_e.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,s),i+r+1),-i);s<e.text.length&&a.write(_e.HeaderMark,s-n,o-n);let l=a.finish(_e.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,i),!0},HTMLBlock(t,e){let r=k2(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,i=_v[r][1],o=[],s=i!=xv;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){s=!1;break}for(let c of e.markers)o.push(c)}s&&t.nextLine();let a=i==w2?_e.CommentBlock:i==P2?_e.ProcessingInstructionBlock:_e.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(o,-n).finish(a,l-n),n),!0},SetextHeading:void 0};class BU{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,r,n){if(this.stage==-1)return!1;let i=n.content+`
|
|
144
|
+
`+r.scrub(),o=this.advance(i);return o>-1&&o<i.length?this.complete(e,n,o):!1}finish(e,r){return(this.stage==2||this.stage==3)&&wc(r.content,this.pos)==r.content.length?this.complete(e,r,r.content.length):!1}complete(e,r,n){return e.addLeafElement(r,jt(_e.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(A2(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(jt(_e.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(T2(e,wc(e,this.pos),this.start)))return-1}else if(this.stage==2){let r=wc(e,this.pos),n=0;if(r>this.pos){let i=R2(e,r,this.start);if(i){let o=cm(e,i.to-this.start);o>0&&(this.nextStage(i),n=o)}}return n||(n=cm(e,this.pos)),n>0&&n<e.length?n:-1}else return cm(e,this.pos)}}}function cm(t,e){for(;e<t.length;e++){let r=t.charCodeAt(e);if(r==10)break;if(!_i(r))return-1}return e}class LU{nextLine(e,r,n){let i=r.depth<e.stack.length?-1:S2(r),o=r.next;if(i<0)return!1;let s=jt(_e.HeaderMark,e.lineStart+r.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(n,jt(o==61?_e.SetextHeading1:_e.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),s])),!0}finish(){return!1}}const VU={LinkReference(t,e){return e.content.charCodeAt(0)==91?new BU(e):null},SetextHeading(){return new LU}},XU=[(t,e)=>b2(e)>=0,(t,e)=>m2(e)>=0,(t,e)=>y2(e)>=0,(t,e)=>U1(e,t,!0)>=0,(t,e)=>Y1(e,t,!0)>=0,(t,e)=>F1(e,t,!0)>=0,(t,e)=>k2(e,t,!0)>=0],FU={text:"",end:0};class UU{constructor(e,r,n,i){this.parser=e,this.input=r,this.ranges=i,this.line=new WU,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=ig.create(_e.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new HU(n,r):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!i||e.markers[n].from<i.end);){let o=e.markers[n++];this.addNode(o.type,o.from,o.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let i=n(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let r=new IU(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let i=n(this,r);i&&r.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,r))break e}for(let n of r.parsers)if(n.nextLine(this,e,r))return null;r.content+=`
|
|
145
|
+
`+e.scrub();for(let n of e.markers)r.marks.push(n)}return this.finishLeaf(r),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let r=this.fragments.takeNodes(this);return r?(this.absoluteLineStart+=r,this.lineStart=M2(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let r=FU;if(r.end=e,e>=this.to)r.text="";else if(r.text=this.lineChunkAt(e),r.end+=r.text.length,this.ranges.length>1){let n=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<r.end;){i++;let o=this.ranges[i].from,s=this.lineChunkAt(o);r.end=o+s.length,r.text=r.text.slice(0,this.ranges[i-1].to-n)+s,n=r.end-r.text.length}}return r}readLine(){let{line:e}=this,{text:r,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(r);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],o=this.parser.skipContextMarkup[i.type];if(!o)throw new Error("Unhandled block context "+_e[i.type]);if(!o(i,this,e))break;e.forward()}}lineChunkAt(e){let r=this.input.chunk(e),n;if(this.input.lineChunks)n=r==`
|
|
146
|
+
`?"":r;else{let i=r.indexOf(`
|
|
147
|
+
`);n=i<0?r:r.slice(0,i)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,r,n=0){this.block=ig.create(e,n,this.lineStart+r,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,r,n=0){this.startContext(this.parser.getNodeType(e),r,n)}addNode(e,r,n){typeof e=="number"&&(e=new zt(this.parser.nodeSet.types[e],iu,iu,(n??this.prevLineEnd())-r)),this.block.addChild(e,r-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,r){this.addNode(this.buffer.writeElements(Cv(r.children,e.marks),-r.from).finish(r.type,r.to-r.from),r.from)}finishContext(){let e=this.stack.pop(),r=this.stack[this.stack.length-1];r.addChild(e.toTree(this.parser.nodeSet),e.from-r.from),this.block=r}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?x2(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let r=Cv(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(r,-e.start).finish(_e.Paragraph,e.content.length),e.start)}elt(e,r,n,i){return typeof e=="string"?jt(this.parser.getNodeType(e),r,n,i):new C2(e,r)}get buffer(){return new $2(this.parser.nodeSet)}}function x2(t,e,r,n,i){let o=t[e].to,s=[],a=[],l=r.from+n;function c(u,f){for(;f?u>=o:u>o;){let h=t[e+1].from-o;n+=h,u+=h,e++,o=t[e].to}}for(let u=r.firstChild;u;u=u.nextSibling){c(u.from+n,!0);let f=u.from+n,h,d=i.get(u.tree);d?h=d:u.to+n>o?(h=x2(t,e,u,n,i),c(u.to+n,!1)):h=u.toTree(),s.push(h),a.push(f-l)}return c(r.to+n,!1),new zt(r.type,s,a,r.to+n-l,r.tree?r.tree.propValues:void 0)}class Ng extends X0{constructor(e,r,n,i,o,s,a,l,c){super(),this.nodeSet=e,this.blockParsers=r,this.leafBlockParsers=n,this.blockNames=i,this.endLeafBlock=o,this.skipContextMarkup=s,this.inlineParsers=a,this.inlineNames=l,this.wrappers=c,this.nodeTypes=Object.create(null);for(let u of e.types)this.nodeTypes[u.name]=u.id}createParse(e,r,n){let i=new UU(this,e,r,n);for(let o of this.wrappers)i=o(i,e,r,n);return i}configure(e){let r=$v(e);if(!r)return this;let{nodeSet:n,skipContextMarkup:i}=this,o=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),c=this.inlineNames.slice(),u=this.endLeafBlock.slice(),f=this.wrappers;if(Uu(r.defineNodes)){i=Object.assign({},i);let h=n.types.slice(),d;for(let p of r.defineNodes){let{name:g,block:m,composite:y,style:O}=typeof p=="string"?{name:p}:p;if(h.some(w=>w.name==g))continue;y&&(i[h.length]=(w,_,C)=>y(_,C,w.value));let v=h.length,b=y?["Block","BlockContext"]:m?v>=_e.ATXHeading1&&v<=_e.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;h.push(Gr.define({id:v,name:g,props:b&&[[gt.group,b]]})),O&&(d||(d={}),Array.isArray(O)||O instanceof Mi?d[g]=O:Object.assign(d,O))}n=new Sf(h),d&&(n=n.extend(js(d)))}if(Uu(r.props)&&(n=n.extend(...r.props)),Uu(r.remove))for(let h of r.remove){let d=this.blockNames.indexOf(h),p=this.inlineNames.indexOf(h);d>-1&&(o[d]=s[d]=void 0),p>-1&&(l[p]=void 0)}if(Uu(r.parseBlock))for(let h of r.parseBlock){let d=a.indexOf(h.name);if(d>-1)o[d]=h.parse,s[d]=h.leaf;else{let p=h.before?vd(a,h.before):h.after?vd(a,h.after)+1:a.length-1;o.splice(p,0,h.parse),s.splice(p,0,h.leaf),a.splice(p,0,h.name)}h.endLeaf&&u.push(h.endLeaf)}if(Uu(r.parseInline))for(let h of r.parseInline){let d=c.indexOf(h.name);if(d>-1)l[d]=h.parse;else{let p=h.before?vd(c,h.before):h.after?vd(c,h.after)+1:c.length-1;l.splice(p,0,h.parse),c.splice(p,0,h.name)}}return r.wrap&&(f=f.concat(r.wrap)),new Ng(n,o,s,a,u,i,l,c,f)}getNodeType(e){let r=this.nodeTypes[e];if(r==null)throw new RangeError(`Unknown node type '${e}'`);return r}parseInline(e,r){let n=new zU(this,e,r);e:for(let i=r;i<n.end;){let o=n.char(i);for(let s of this.inlineParsers)if(s){let a=s(n,o,i);if(a>=0){i=a;continue e}}i++}return n.resolveMarkers(0)}}function Uu(t){return t!=null&&t.length>0}function $v(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=$v(t[0]);if(t.length==1)return e;let r=$v(t.slice(1));if(!r||!e)return e||r;let n=(s,a)=>(s||iu).concat(a||iu),i=e.wrap,o=r.wrap;return{props:n(e.props,r.props),defineNodes:n(e.defineNodes,r.defineNodes),parseBlock:n(e.parseBlock,r.parseBlock),parseInline:n(e.parseInline,r.parseInline),remove:n(e.remove,r.remove),wrap:i?o?(s,a,l,c)=>i(o(s,a,l,c),a,l,c):i:o}}function vd(t,e){let r=t.indexOf(e);if(r<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return r}let _2=[Gr.none];for(let t=1,e;e=_e[t];t++)_2[t]=Gr.define({id:t,name:e,props:t>=_e.Escape?[]:[[gt.group,t in O2?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const iu=[];class $2{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,r,n,i=0){return this.content.push(e,r,n,4+i*4),this}writeElements(e,r=0){for(let n of e)n.writeTo(this,r);return this}finish(e,r){return zt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:r})}}let uf=class{constructor(e,r,n,i=iu){this.type=e,this.from=r,this.to=n,this.children=i}writeTo(e,r){let n=e.content.length;e.writeElements(this.children,r),e.content.push(this.type,this.from+r,this.to+r,e.content.length+4-n)}toTree(e){return new $2(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class C2{constructor(e,r){this.tree=e,this.from=r}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return iu}writeTo(e,r){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+r,this.to+r,-1)}toTree(){return this.tree}}function jt(t,e,r,n){return new uf(t,e,r,n)}const E2={resolve:"Emphasis",mark:"EmphasisMark"},Q2={resolve:"Emphasis",mark:"EmphasisMark"},Yu={},S_={};class ji{constructor(e,r,n,i){this.type=e,this.from=r,this.to=n,this.side=i}}const w_="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let cf=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{cf=new RegExp("[\\p{Pc}|\\p{Pd}|\\p{Pe}|\\p{Pf}|\\p{Pi}|\\p{Po}|\\p{Ps}]","u")}catch{}const fm={Escape(t,e,r){if(e!=92||r==t.end-1)return-1;let n=t.char(r+1);for(let i=0;i<w_.length;i++)if(w_.charCodeAt(i)==n)return t.append(jt(_e.Escape,r,r+2));return-1},Entity(t,e,r){if(e!=38)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(r+1,r+31));return n?t.append(jt(_e.Entity,r,r+1+n[0].length)):-1},InlineCode(t,e,r){if(e!=96||r&&t.char(r-1)==96)return-1;let n=r+1;for(;n<t.end&&t.char(n)==96;)n++;let i=n-r,o=0;for(;n<t.end;n++)if(t.char(n)==96){if(o++,o==i&&t.char(n+1)!=96)return t.append(jt(_e.InlineCode,r,n+1,[jt(_e.CodeMark,r,r+i),jt(_e.CodeMark,n+1-i,n+1)]))}else o=0;return-1},HTMLTag(t,e,r){if(e!=60||r==t.end-1)return-1;let n=t.slice(r+1,t.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(n);if(i)return t.append(jt(_e.Autolink,r,r+1+i[0].length,[jt(_e.LinkMark,r,r+1),jt(_e.URL,r+1,r+i[0].length),jt(_e.LinkMark,r+i[0].length,r+1+i[0].length)]));let o=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(n);if(o)return t.append(jt(_e.Comment,r,r+1+o[0].length));let s=/^\?[^]*?\?>/.exec(n);if(s)return t.append(jt(_e.ProcessingInstruction,r,r+1+s[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);return a?t.append(jt(_e.HTMLTag,r,r+1+a[0].length)):-1},Emphasis(t,e,r){if(e!=95&&e!=42)return-1;let n=r+1;for(;t.char(n)==e;)n++;let i=t.slice(r-1,r),o=t.slice(n,n+1),s=cf.test(i),a=cf.test(o),l=/\s|^$/.test(i),c=/\s|^$/.test(o),u=!c&&(!a||l||s),f=!l&&(!s||c||a),h=u&&(e==42||!f||s),d=f&&(e==42||!u||a);return t.append(new ji(e==95?E2:Q2,r,n,(h?1:0)|(d?2:0)))},HardBreak(t,e,r){if(e==92&&t.char(r+1)==10)return t.append(jt(_e.HardBreak,r,r+2));if(e==32){let n=r+1;for(;t.char(n)==32;)n++;if(t.char(n)==10&&n>=r+2)return t.append(jt(_e.HardBreak,r,n+1))}return-1},Link(t,e,r){return e==91?t.append(new ji(Yu,r,r+1,1)):-1},Image(t,e,r){return e==33&&t.char(r+1)==91?t.append(new ji(S_,r,r+2,1)):-1},LinkEnd(t,e,r){if(e!=93)return-1;for(let n=t.parts.length-1;n>=0;n--){let i=t.parts[n];if(i instanceof ji&&(i.type==Yu||i.type==S_)){if(!i.side||t.skipSpace(i.to)==r&&!/[(\[]/.test(t.slice(r+1,r+2)))return t.parts[n]=null,-1;let o=t.takeContent(n),s=t.parts[n]=YU(t,o,i.type==Yu?_e.Link:_e.Image,i.from,r+1);if(i.type==Yu)for(let a=0;a<n;a++){let l=t.parts[a];l instanceof ji&&l.type==Yu&&(l.side=0)}return s.to}}return-1}};function YU(t,e,r,n,i){let{text:o}=t,s=t.char(i),a=i;if(e.unshift(jt(_e.LinkMark,n,n+(r==_e.Image?2:1))),e.push(jt(_e.LinkMark,i-1,i)),s==40){let l=t.skipSpace(i+1),c=T2(o,l-t.offset,t.offset),u;c&&(l=t.skipSpace(c.to),l!=c.to&&(u=R2(o,l-t.offset,t.offset),u&&(l=t.skipSpace(u.to)))),t.char(l)==41&&(e.push(jt(_e.LinkMark,i,i+1)),a=l+1,c&&e.push(c),u&&e.push(u),e.push(jt(_e.LinkMark,l,a)))}else if(s==91){let l=A2(o,i-t.offset,t.offset,!1);l&&(e.push(l),a=l.to)}return jt(r,n,a,e)}function T2(t,e,r){if(t.charCodeAt(e)==60){for(let i=e+1;i<t.length;i++){let o=t.charCodeAt(i);if(o==62)return jt(_e.URL,e+r,i+1+r);if(o==60||o==10)return!1}return null}else{let i=0,o=e;for(let s=!1;o<t.length;o++){let a=t.charCodeAt(o);if(_i(a))break;if(s)s=!1;else if(a==40)i++;else if(a==41){if(!i)break;i--}else a==92&&(s=!0)}return o>e?jt(_e.URL,e+r,o+r):o==t.length?null:!1}}function R2(t,e,r){let n=t.charCodeAt(e);if(n!=39&&n!=34&&n!=40)return!1;let i=n==40?41:n;for(let o=e+1,s=!1;o<t.length;o++){let a=t.charCodeAt(o);if(s)s=!1;else{if(a==i)return jt(_e.LinkTitle,e+r,o+1+r);a==92&&(s=!0)}}return null}function A2(t,e,r,n){for(let i=!1,o=e+1,s=Math.min(t.length,o+999);o<s;o++){let a=t.charCodeAt(o);if(i)i=!1;else{if(a==93)return n?!1:jt(_e.LinkLabel,e+r,o+1+r);if(n&&!_i(a)&&(n=!1),a==91)return!1;a==92&&(i=!0)}}return null}class zU{constructor(e,r,n){this.parser=e,this.text=r,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,r){return this.text.slice(e-this.offset,r-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,r,n,i,o){return this.append(new ji(e,r,n,(i?1:0)|(o?2:0)))}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n<this.parts.length;n++){let i=this.parts[n];if(!(i instanceof ji&&i.type.resolve&&i.side&2))continue;let o=i.type==E2||i.type==Q2,s=i.to-i.from,a,l=n-1;for(;l>=e;l--){let g=this.parts[l];if(g instanceof ji&&g.side&1&&g.type==i.type&&!(o&&(i.side&1||g.side&2)&&(g.to-g.from+s)%3==0&&((g.to-g.from)%3||s%3))){a=g;break}}if(!a)continue;let c=i.type.resolve,u=[],f=a.from,h=i.to;if(o){let g=Math.min(2,a.to-a.from,s);f=a.to-g,h=i.from+g,c=g==1?"Emphasis":"StrongEmphasis"}a.type.mark&&u.push(this.elt(a.type.mark,f,a.to));for(let g=l+1;g<n;g++)this.parts[g]instanceof uf&&u.push(this.parts[g]),this.parts[g]=null;i.type.mark&&u.push(this.elt(i.type.mark,i.from,h));let d=this.elt(c,f,h,u);this.parts[l]=o&&a.from!=f?new ji(a.type,a.from,f,a.side):null,(this.parts[n]=o&&i.to!=h?new ji(i.type,h,i.to,i.side):null)?this.parts.splice(n,0,d):this.parts[n]=d}let r=[];for(let n=e;n<this.parts.length;n++){let i=this.parts[n];i instanceof uf&&r.push(i)}return r}findOpeningDelimiter(e){for(let r=this.parts.length-1;r>=0;r--){let n=this.parts[r];if(n instanceof ji&&n.type==e)return r}return null}takeContent(e){let r=this.resolveMarkers(e);return this.parts.length=e,r}skipSpace(e){return wc(this.text,e-this.offset)+this.offset}elt(e,r,n,i){return typeof e=="string"?jt(this.parser.getNodeType(e),r,n,i):new C2(e,r)}}function Cv(t,e){if(!e.length)return t;if(!t.length)return e;let r=t.slice(),n=0;for(let i of e){for(;n<r.length&&r[n].to<i.to;)n++;if(n<r.length&&r[n].from<i.from){let o=r[n];o instanceof uf&&(r[n]=new uf(o.type,o.from,o.to,Cv(o.children,[i])))}else r.splice(n++,0,i)}return r}const GU=[_e.CodeBlock,_e.ListItem,_e.OrderedList,_e.BulletList];class HU{constructor(e,r){this.fragments=e,this.input=r,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,r){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let o=this.fragment.to;for(;o>0&&this.input.read(o-1,o)!=`
|
|
148
|
+
`;)o--;this.fragmentEnd=o?o-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let i=e+this.fragment.offset;for(;n.to<=i;)if(!n.parent())return!1;for(;;){if(n.from>=i)return this.fragment.from<=r;if(!n.childAfter(i))return!1}}matches(e){let r=this.cursor.tree;return r&&r.prop(gt.contextHash)==e}takeNodes(e){let r=this.cursor,n=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),o=e.absoluteLineStart,s=o,a=e.block.children.length,l=s,c=a;for(;;){if(r.to-n>i){if(r.type.isAnonymous&&r.firstChild())continue;break}let u=M2(r.from-n,e.ranges);if(r.to-n<=e.ranges[e.rangeI].to)e.addNode(r.tree,u);else{let f=new zt(e.parser.nodeSet.types[_e.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,r.tree),e.addNode(f,u)}if(r.type.is("Block")&&(GU.indexOf(r.type.id)<0?(s=r.to-n,a=e.block.children.length):(s=l,a=c,l=r.to-n,c=e.block.children.length)),!r.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return s-o}}function M2(t,e){let r=t;for(let n=1;n<e.length;n++){let i=e[n-1].to,o=e[n].from;i<t&&(r-=o-i)}return r}const KU=js({"Blockquote/...":S.quote,HorizontalRule:S.contentSeparator,"ATXHeading1/... SetextHeading1/...":S.heading1,"ATXHeading2/... SetextHeading2/...":S.heading2,"ATXHeading3/...":S.heading3,"ATXHeading4/...":S.heading4,"ATXHeading5/...":S.heading5,"ATXHeading6/...":S.heading6,"Comment CommentBlock":S.comment,Escape:S.escape,Entity:S.character,"Emphasis/...":S.emphasis,"StrongEmphasis/...":S.strong,"Link/... Image/...":S.link,"OrderedList/... BulletList/...":S.list,"BlockQuote/...":S.quote,"InlineCode CodeText":S.monospace,"URL Autolink":S.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":S.processingInstruction,"CodeInfo LinkLabel":S.labelName,LinkTitle:S.string,Paragraph:S.content}),JU=new Ng(new Sf(_2).extend(KU),Object.keys(yd).map(t=>yd[t]),Object.keys(yd).map(t=>VU[t]),Object.keys(yd),XU,O2,Object.keys(fm).map(t=>fm[t]),Object.keys(fm),[]);function eY(t,e,r){let n=[];for(let i=t.firstChild,o=e;;i=i.nextSibling){let s=i?i.from:r;if(s>o&&n.push({from:o,to:s}),!i)break;o=i.to}return n}function tY(t){let{codeParser:e,htmlParser:r}=t;return{wrap:F0((i,o)=>{let s=i.type.id;if(e&&(s==_e.CodeBlock||s==_e.FencedCode)){let a="";if(s==_e.FencedCode){let c=i.node.getChild(_e.CodeInfo);c&&(a=o.read(c.from,c.to))}let l=e(a);if(l)return{parser:l,overlay:c=>c.type.id==_e.CodeText}}else if(r&&(s==_e.HTMLBlock||s==_e.HTMLTag))return{parser:r,overlay:eY(i.node,i.from,i.to)};return null})}}const rY={resolve:"Strikethrough",mark:"StrikethroughMark"},nY={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":S.strikethrough}},{name:"StrikethroughMark",style:S.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,r){if(e!=126||t.char(r+1)!=126||t.char(r+2)==126)return-1;let n=t.slice(r-1,r),i=t.slice(r+2,r+3),o=/\s|^$/.test(n),s=/\s|^$/.test(i),a=cf.test(n),l=cf.test(i);return t.addDelimiter(rY,r,r+2,!s&&(!l||o||a),!o&&(!a||s||l))},after:"Emphasis"}]};function Pc(t,e,r=0,n,i=0){let o=0,s=!0,a=-1,l=-1,c=!1,u=()=>{n.push(t.elt("TableCell",i+a,i+l,t.parser.parseInline(e.slice(a,l),i+a)))};for(let f=r;f<e.length;f++){let h=e.charCodeAt(f);h==124&&!c?((!s||a>-1)&&o++,s=!1,n&&(a>-1&&u(),n.push(t.elt("TableDelimiter",f+i,f+i+1))),a=l=-1):(c||h!=32&&h!=9)&&(a<0&&(a=f),l=f+1),c=!c&&h==92}return a>-1&&(o++,n&&u()),o}function P_(t,e){for(let r=e;r<t.length;r++){let n=t.charCodeAt(r);if(n==124)return!0;n==92&&r++}return!1}const j2=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class k_{constructor(){this.rows=null}nextLine(e,r,n){if(this.rows==null){this.rows=!1;let i;if((r.next==45||r.next==58||r.next==124)&&j2.test(i=r.text.slice(r.pos))){let o=[];Pc(e,n.content,0,o,n.start)==Pc(e,i,r.pos)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,o),e.elt("TableDelimiter",e.lineStart+r.pos,e.lineStart+r.text.length)])}}else if(this.rows){let i=[];Pc(e,r.text,r.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+r.pos,e.lineStart+r.text.length,i))}return!1}finish(e,r){return this.rows?(e.addLeafElement(r,e.elt("Table",r.start,r.start+r.content.length,this.rows)),!0):!1}}const iY={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":S.heading}},"TableRow",{name:"TableCell",style:S.content},{name:"TableDelimiter",style:S.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return P_(e.content,0)?new k_:null},endLeaf(t,e,r){if(r.parsers.some(i=>i instanceof k_)||!P_(e.text,e.basePos))return!1;let n=t.scanLine(t.absoluteLineEnd+1).text;return j2.test(n)&&Pc(t,e.text,e.basePos)==Pc(t,n,e.basePos)},before:"SetextHeading"}]};class oY{nextLine(){return!1}finish(e,r){return e.addLeafElement(r,e.elt("Task",r.start,r.start+r.content.length,[e.elt("TaskMarker",r.start,r.start+3),...e.parser.parseInline(r.content.slice(3),r.start+3)])),!0}}const sY={defineNodes:[{name:"Task",block:!0,style:S.list},{name:"TaskMarker",style:S.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new oY:null},after:"SetextHeading"}]},x_=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,__=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,aY=/[\w-]+\.[\w-]+($|\/)/,$_=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,C_=/\/[a-zA-Z\d@.]+/gy;function E_(t,e,r,n){let i=0;for(let o=e;o<r;o++)t[o]==n&&i++;return i}function lY(t,e){__.lastIndex=e;let r=__.exec(t);if(!r||aY.exec(r[0])[0].indexOf("_")>-1)return-1;let n=e+r[0].length;for(;;){let i=t[n-1],o;if(/[?!.,:*_~]/.test(i)||i==")"&&E_(t,e,n,")")>E_(t,e,n,"("))n--;else if(i==";"&&(o=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,n))))n=e+o.index;else break}return n}function Q_(t,e){$_.lastIndex=e;let r=$_.exec(t);if(!r)return-1;let n=r[0][r[0].length-1];return n=="_"||n=="-"?-1:e+r[0].length-(n=="."?1:0)}const uY={parseInline:[{name:"Autolink",parse(t,e,r){let n=r-t.offset;x_.lastIndex=n;let i=x_.exec(t.text),o=-1;return!i||(i[1]||i[2]?o=lY(t.text,n+i[0].length):i[3]?o=Q_(t.text,n):(o=Q_(t.text,n+i[0].length),o>-1&&i[0]=="xmpp:"&&(C_.lastIndex=o,i=C_.exec(t.text),i&&(o=i.index+i[0].length))),o<0)?-1:(t.addElement(t.elt("URL",r,o+t.offset)),o+t.offset)}}]},cY=[iY,sY,nY,uY];function D2(t,e,r){return(n,i,o)=>{if(i!=t||n.char(o+1)==t)return-1;let s=[n.elt(r,o,o+1)];for(let a=o+1;a<n.end;a++){let l=n.char(a);if(l==t)return n.addElement(n.elt(e,o,a+1,s.concat(n.elt(r,a,a+1))));if(l==92&&s.push(n.elt("Escape",a,a+++2)),_i(l))break}return-1}}const fY={defineNodes:[{name:"Superscript",style:S.special(S.content)},{name:"SuperscriptMark",style:S.processingInstruction}],parseInline:[{name:"Superscript",parse:D2(94,"Superscript","SuperscriptMark")}]},hY={defineNodes:[{name:"Subscript",style:S.special(S.content)},{name:"SubscriptMark",style:S.processingInstruction}],parseInline:[{name:"Subscript",parse:D2(126,"Subscript","SubscriptMark")}]},dY={defineNodes:[{name:"Emoji",style:S.character}],parseInline:[{name:"Emoji",parse(t,e,r){let n;return e!=58||!(n=/^[a-zA-Z_0-9]+:/.exec(t.slice(r+1,t.end)))?-1:t.addElement(t.elt("Emoji",r,r+1+n[0].length))}}]},q2=U0({commentTokens:{block:{open:"<!--",close:"-->"}}}),Z2=new gt,N2=JU.configure({props:[Ds.add(t=>!t.is("Block")||t.is("Document")||Ev(t)!=null||pY(t)?void 0:(e,r)=>({from:r.doc.lineAt(e.from).to,to:e.to})),Z2.add(Ev),Ta.add({Document:()=>null}),fa.add({Document:q2})]});function Ev(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function pY(t){return t.name=="OrderedList"||t.name=="BulletList"}function gY(t,e){let r=t;for(;;){let n=r.nextSibling,i;if(!n||(i=Ev(n.type))!=null&&i<=e)break;r=n}return r.to}const OY=VQ.of((t,e,r)=>{for(let n=pr(t).resolveInner(r,-1);n&&!(n.from<e);n=n.parent){let i=n.type.prop(Z2);if(i==null)continue;let o=gY(n,i);if(o>r)return{from:r,to:o}}return null});function z1(t){return new Oi(q2,t,[OY],"markdown")}const mY=z1(N2),yY=N2.configure([cY,hY,fY,dY,{props:[Ds.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),I2=z1(yY);function vY(t,e){return r=>{if(r&&t){let n=null;if(r=/\S*/.exec(r)[0],typeof t=="function"?n=t(r):n=Mp.matchLanguageName(t,r,!0),n instanceof Mp)return n.support?n.support.language.parser:Kc.getSkippingParser(n.load());if(n)return n.parser}return e?e.parser:null}}class bd{constructor(e,r,n,i,o,s,a){this.node=e,this.from=r,this.to=n,this.spaceBefore=i,this.spaceAfter=o,this.type=s,this.item=a}blank(e,r=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length<e;)n+=" ";return n}else{for(let i=this.to-this.from-n.length-this.spaceAfter.length;i>0;i--)n+=" ";return n+(r?this.spaceAfter:"")}}marker(e,r){let n=this.node.name=="OrderedList"?String(+B2(this.item,e)[2]+r):"";return this.spaceBefore+n+this.type+this.spaceAfter}}function W2(t,e){let r=[];for(let i=t;i&&i.name!="Document";i=i.parent)(i.name=="ListItem"||i.name=="Blockquote"||i.name=="FencedCode")&&r.push(i);let n=[];for(let i=r.length-1;i>=0;i--){let o=r[i],s,a=e.lineAt(o.from),l=o.from-a.from;if(o.name=="FencedCode")n.push(new bd(o,l,l,"","","",null));else if(o.name=="Blockquote"&&(s=/^ *>( ?)/.exec(a.text.slice(l))))n.push(new bd(o,l,l+s[0].length,"",s[1],">",null));else if(o.name=="ListItem"&&o.parent.name=="OrderedList"&&(s=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let c=s[3],u=s[0].length;c.length>=4&&(c=c.slice(0,c.length-4),u-=4),n.push(new bd(o.parent,l,l+u,s[1],c,s[2],o))}else if(o.name=="ListItem"&&o.parent.name=="BulletList"&&(s=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let c=s[4],u=s[0].length;c.length>4&&(c=c.slice(0,c.length-4),u-=4);let f=s[2];s[3]&&(f+=s[3].replace(/[xX]/," ")),n.push(new bd(o.parent,l,l+u,s[1],c,f,o))}}return n}function B2(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function hm(t,e,r,n=0){for(let i=-1,o=t;;){if(o.name=="ListItem"){let a=B2(o,e),l=+a[2];if(i>=0){if(l!=i+1)return;r.push({from:o.from+a[1].length,to:o.from+a[0].length,insert:String(i+2+n)})}i=l}let s=o.nextSibling;if(!s)break;o=s}}function G1(t,e){let r=/^[ \t]*/.exec(t)[0].length;if(!r||e.facet(wf)!=" ")return t;let n=Wi(t,4,r),i="";for(let o=n;o>0;)o>=4?(i+=" ",o-=4):(i+=" ",o--);return i+t.slice(r)}const bY=({state:t,dispatch:e})=>{let r=pr(t),{doc:n}=t,i=null,o=t.changeByRange(s=>{if(!s.empty||!I2.isActiveAt(t,s.from))return i={range:s};let a=s.from,l=n.lineAt(a),c=W2(r.resolveInner(a,-1),n);for(;c.length&&c[c.length-1].from>a-l.from;)c.pop();if(!c.length)return i={range:s};let u=c[c.length-1];if(u.to-u.spaceAfter.length>a-l.from)return i={range:s};let f=a>=u.to-u.spaceAfter.length&&!/\S/.test(l.text.slice(u.to));if(u.item&&f){let m=u.node.firstChild,y=u.node.getChild("ListItem","ListItem");if(m.to>=a||y&&y.to<a||l.from>0&&!/[^\s>]/.test(n.lineAt(l.from-1).text)){let O=c.length>1?c[c.length-2]:null,v,b="";O&&O.item?(v=l.from+O.from,b=O.marker(n,1)):v=l.from+(O?O.to:0);let w=[{from:v,to:a,insert:b}];return u.node.name=="OrderedList"&&hm(u.item,n,w,-2),O&&O.node.name=="OrderedList"&&hm(O.item,n,w),{range:le.cursor(v+b.length),changes:w}}else{let O=R_(c,t,l);return{range:le.cursor(a+O.length+1),changes:{from:l.from,insert:O+t.lineBreak}}}}if(u.node.name=="Blockquote"&&f&&l.from){let m=n.lineAt(l.from-1),y=/>\s*$/.exec(m.text);if(y&&y.index==u.from){let O=t.changes([{from:m.from+y.index,to:m.to},{from:l.from+u.from,to:l.to}]);return{range:s.map(O),changes:O}}}let h=[];u.node.name=="OrderedList"&&hm(u.item,n,h);let d=u.item&&u.item.from<l.from,p="";if(!d||/^[\s\d.)\-+*>]*/.exec(l.text)[0].length>=u.to)for(let m=0,y=c.length-1;m<=y;m++)p+=m==y&&!d?c[m].marker(n,1):c[m].blank(m<y?Wi(l.text,4,c[m+1].from)-p.length:null);let g=a;for(;g>l.from&&/\s/.test(l.text.charAt(g-l.from-1));)g--;return p=G1(p,t),SY(u.node,t.doc)&&(p=R_(c,t,l)+t.lineBreak+p),h.push({from:g,to:a,insert:t.lineBreak+p}),{range:le.cursor(g+p.length+1),changes:h}});return i?!1:(e(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)};function T_(t){return t.name=="QuoteMark"||t.name=="ListMark"}function SY(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let r=t.firstChild,n=t.getChild("ListItem","ListItem");if(!n)return!1;let i=e.lineAt(r.to),o=e.lineAt(n.from),s=/^[\s>]*$/.test(i.text);return i.number+(s?0:1)<o.number}function R_(t,e,r){let n="";for(let i=0,o=t.length-2;i<=o;i++)n+=t[i].blank(i<o?Wi(r.text,4,t[i+1].from)-n.length:null,i<o);return G1(n,e)}function wY(t,e){let r=t.resolveInner(e,-1),n=e;T_(r)&&(n=r.from,r=r.parent);for(let i;i=r.childBefore(n);)if(T_(i))n=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")r=i.lastChild,n=r.to;else break;return r}const PY=({state:t,dispatch:e})=>{let r=pr(t),n=null,i=t.changeByRange(o=>{let s=o.from,{doc:a}=t;if(o.empty&&I2.isActiveAt(t,o.from)){let l=a.lineAt(s),c=W2(wY(r,s),a);if(c.length){let u=c[c.length-1],f=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(s-l.from>f&&!/\S/.test(l.text.slice(f,s-l.from)))return{range:le.cursor(l.from+f),changes:{from:l.from+f,to:s}};if(s-l.from==f&&(!u.item||l.from<=u.item.from||!/\S/.test(l.text.slice(0,u.to)))){let h=l.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(l.text.slice(u.from,u.to))){let d=u.blank(Wi(l.text,4,u.to)-Wi(l.text,4,u.from));return h==l.from&&(d=G1(d,t)),{range:le.cursor(h+d.length),changes:{from:h,to:l.from+u.to,insert:d}}}if(h<s)return{range:le.cursor(h),changes:{from:h,to:s}}}}}return n={range:o}});return n?!1:(e(t.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},kY=[{key:"Enter",run:bY},{key:"Backspace",run:PY}],Qv=t2({matchClosingTags:!1});function xY(t={}){let{codeLanguages:e,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:i}=mY,completeHTMLTags:o=!0}=t;if(!(i instanceof Ng))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let s=t.extensions?[t.extensions]:[],a=[Qv.support],l;r instanceof Ca?(a.push(r.support),l=r.language):r&&(l=r);let c=e||l?vY(e,l):void 0;s.push(tY({codeParser:c,htmlParser:Qv.language.parser})),n&&a.push(Io.high(vf.of(kY)));let u=z1(i.configure(s));return o&&a.push(u.data.of({autocomplete:_Y})),new Ca(u,a)}function _Y(t){let{state:e,pos:r}=t,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(r-25,r));if(!n)return null;let i=pr(e).resolveInner(r,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:r-n[0].length,to:r,options:$Y(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let dm=null;function $Y(){if(dm)return dm;let t=HA(new l1(Dt.create({extensions:Qv}),0,!0));return dm=t?t.options:[]}const A_=(t,e,r,n,i)=>{let o=[],s=0;return e.iterChanges((a,l,c,u,f)=>{const h=r.sliceString(a,l,`
|
|
149
|
+
`),d=f.sliceString(0,f.length,`
|
|
150
|
+
`);h&&o.push(i.remove(a+s,h)),d&&o.push(i.insert(a+s,d)),s+=d.length,s-=h.length}),o=o.reduce(i.type.compose),n.editOp(t,"text-unicode",o)},M_=t=>{const e=[];for(const r of t){const{es:n}=r;if(n!==void 0){let i=0;for(let o=0;o<n.length;o++){const s=n[o];if(typeof s=="number")i+=s;else if(typeof s=="string")if(n[o+1]&&typeof n[o+1]=="object"&&n[o+1].d!==void 0){let a=typeof n[o+1].d=="number"?n[o+1].d:n[o+1].d.length;e.push({from:i,to:i+a,insert:s}),i+=a,o++}else e.push({from:i,to:i,insert:s});else s&&s.d!==void 0&&(typeof s.d=="number"?(e.push({from:i,to:i+s.d}),i+=s.d):typeof s.d=="string"&&(e.push({from:i,to:i+s.d.length}),i+=s.d.length))}}}return e},CY=(t,e)=>{if(!t||!e)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},EY=({shareDBDoc:t,path:e=[],json1:r,textUnicode:n,debug:i=!1})=>nr.fromClass(class{constructor(o){this.view=o,this.handleOp=s=>{if(this.lock||!Array.isArray(s))return;this.lock=!0;const a=Array.isArray(s[0])?s:[s];for(const l of a)CY(l,e)&&(i&&(console.log("Received op from ShareDB"),console.log(" op: "+JSON.stringify(l)),console.log(" generated changes: "+JSON.stringify(M_(l)))),o.dispatch({changes:M_(l)}));this.lock=!1},t.on("op",this.handleOp)}update(o){!this.lock&&o.docChanged&&(this.lock=!0,i&&(console.log("Received change from CodeMirror"),console.log(" changes:"+JSON.stringify(o.changes.toJSON())),console.log(" iterChanges:"),o.changes.iterChanges((s,a,l,c,u)=>{console.log(" "+JSON.stringify({fromA:s,toA:a,fromB:l,toB:c,inserted:u.sliceString(0,u.length,`
|
|
151
|
+
`)}))}),console.log(" generated json1 op: "+JSON.stringify(A_(e,o.changes,o.startState.doc,r,n)))),t.submitOp(A_(e,o.changes,o.startState.doc,r,n)),this.lock=!1)}destroy(){t.off("op",this.handleOp)}});function QY(t,e=t.state){const r=new Set;for(const{from:n,to:i}of t.visibleRanges){let o=n;for(;o<=i;){const s=e.doc.lineAt(o);r.has(s)||r.add(s),o=s.to+1}}return r}function Tv(t){const e=t.selection.main.head;return t.doc.lineAt(e)}function j_(t,e){let r=0;e:for(let n=0;n<t.length;n++)switch(t[n]){case" ":{r+=1;continue e}case" ":{r+=e-r%e;continue e}case"\r":continue e;default:break e}return r}const og=Ie.define({combine(t){return Vi(t,{highlightActiveBlock:!0,hideFirstIndent:!1,markerType:"fullScope",thickness:1})}});class TY{constructor(e,r,n,i){this.lines=e,this.state=r,this.map=new Map,this.unitWidth=n,this.markerType=i;for(const o of this.lines)this.add(o);this.state.facet(og).highlightActiveBlock&&this.findAndSetActiveLines()}has(e){return this.map.has(typeof e=="number"?e:e.number)}get(e){const r=this.map.get(typeof e=="number"?e:e.number);if(!r)throw new Error("Line not found in indentation map");return r}set(e,r,n){const i=!e.text.trim().length,o={line:e,col:r,level:n,empty:i};return this.map.set(o.line.number,o),o}add(e){if(this.has(e))return this.get(e);if(!e.length||!e.text.trim().length){if(e.number===1)return this.set(e,0,0);if(e.number===this.state.doc.lines){const s=this.closestNonEmpty(e,-1);return this.set(e,0,s.level)}const i=this.closestNonEmpty(e,-1),o=this.closestNonEmpty(e,1);return i.level>=o.level&&this.markerType!=="codeOnly"?this.set(e,0,i.level):i.empty&&i.level===0&&o.level!==0?this.set(e,0,0):o.level>i.level?this.set(e,0,i.level+1):this.set(e,0,o.level)}const r=j_(e.text,this.state.tabSize),n=Math.floor(r/this.unitWidth);return this.set(e,r,n)}closestNonEmpty(e,r){let n=e.number+r;for(;r===-1?n>=1:n<=this.state.doc.lines;){if(this.has(n)){const s=this.get(n);if(!s.empty)return s}const o=this.state.doc.line(n);if(o.text.trim().length){const s=j_(o.text,this.state.tabSize),a=Math.floor(s/this.unitWidth);return this.set(o,s,a)}n+=r}const i=this.state.doc.line(r===-1?1:this.state.doc.lines);return this.set(i,0,0)}findAndSetActiveLines(){const e=Tv(this.state);if(!this.has(e))return;let r=this.get(e);if(this.has(r.line.number+1)){const o=this.get(r.line.number+1);o.level>r.level&&(r=o)}if(this.has(r.line.number-1)){const o=this.get(r.line.number-1);o.level>r.level&&(r=o)}if(r.level===0)return;r.active=r.level;let n,i;for(n=r.line.number;n>1;n--){if(!this.has(n-1))continue;const o=this.get(n-1);if(o.level<r.level)break;o.active=r.level}for(i=r.line.number;i<this.state.doc.lines;i++){if(!this.has(i+1))continue;const o=this.get(i+1);if(o.level<r.level)break;o.active=r.level}}}function RY(t){const e={light:"#F0F1F2",dark:"#2B3245",activeLight:"#E4E5E6",activeDark:"#3C445C"};let r=e;return t&&(r=Object.assign(Object.assign({},e),t)),Ee.baseTheme({"&light":{"--indent-marker-bg-color":r.light,"--indent-marker-active-bg-color":r.activeLight},"&dark":{"--indent-marker-bg-color":r.dark,"--indent-marker-active-bg-color":r.activeDark},".cm-line":{position:"relative"},".cm-indent-markers::before":{content:'""',position:"absolute",top:0,left:"2px",right:0,bottom:0,background:"var(--indent-markers)",pointerEvents:"none",zIndex:"-1"}})}function Sd(t,e,r,n,i){return`${`repeating-linear-gradient(to right, var(${t}) 0 ${e}px, transparent ${e}px ${r}ch)`} ${n*r}.5ch/calc(${r*i}ch - 1px) no-repeat`}function AY(t,e,r,n,i){const{level:o,active:s}=t;if(i=i??n,r&&o===0)return[];const a=r?1:0,l=[];if(s!==void 0){const c=s-a-1;c>0&&l.push(Sd("--indent-marker-bg-color",n,e,a,c)),l.push(Sd("--indent-marker-active-bg-color",i,e,s-1,1)),s!==o&&l.push(Sd("--indent-marker-bg-color",n,e,s,o-s))}else l.push(Sd("--indent-marker-bg-color",n,e,a,o-a));return l.join(",")}class MY{constructor(e){this.view=e,this.unitWidth=Hl(e.state),this.currentLineNumber=Tv(e.state).number,this.generate(e.state)}update(e){const r=Hl(e.state),n=r!==this.unitWidth;n&&(this.unitWidth=r);const i=Tv(e.state).number,o=i!==this.currentLineNumber;this.currentLineNumber=i;const s=e.state.facet(og).highlightActiveBlock&&o;(e.docChanged||e.viewportChanged||n||s)&&this.generate(e.state)}generate(e){const r=new ks,n=QY(this.view,e),{hideFirstIndent:i,markerType:o,thickness:s,activeThickness:a}=e.facet(og),l=new TY(n,e,this.unitWidth,o);for(const c of n){const u=l.get(c.number);if(!(u!=null&&u.level))continue;const f=AY(u,this.unitWidth,i,s,a);r.add(c.from,c.from,Ne.line({class:"cm-indent-markers",attributes:{style:`--indent-markers: ${f}`}}))}this.decorations=r.finish()}}function jY(t={}){return[og.of(t),RY(t.colors),nr.fromClass(MY,{decorations:e=>e.decorations})]}const L2=t=>e=>{const r=t==="down";let n=e.state.selection;for(const i of n.ranges)n=n.addRange(e.moveVertically(i,r));return e.dispatch({selection:n}),!0},DY=L2("up"),qY=L2("down"),ZY=t=>{let e=null;for(const r of t.state.selection.ranges)if(!r.empty)for(let n=r.from;n<=r.to;){const i=t.state.doc.lineAt(n),o=Math.min(i.to,r.to);e?e=e.addRange(le.range(o,o)):e=le.single(o),n=i.to+1}return e?(t.dispatch({selection:e}),!0):!1},NY=[{key:"Ctrl-Space",run:BT},{key:"Escape",run:LT},{key:"ArrowDown",run:fs(!0)},{key:"ArrowUp",run:fs(!1)},{key:"PageDown",run:fs(!0,"page")},{key:"PageUp",run:fs(!1,"page")},{key:"Enter",run:rv},{key:"Tab",run:rv},{key:"Mod-f",run:DT,scope:"editor search-panel"},{key:"Escape",run:qT,scope:"editor search-panel"},{key:"Alt-Enter",run:RT,scope:"editor search-panel"},{key:"Mod-Alt-Enter",run:AT,scope:"editor search-panel"},{key:"Ctrl-g",run:AW},{key:"Mod-d",run:VW,preventDefault:!0},{key:"Shift-Mod-l",run:KW},{key:"Enter",run:oP,shift:oP},{key:"ArrowLeft",run:Zw,shift:Vw,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:uW,shift:gW},{key:"ArrowRight",run:Nw,shift:Xw,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:cW,shift:OW},{key:"ArrowUp",run:Iw,shift:Fw,preventDefault:!0},{key:"ArrowDown",run:Ww,shift:Uw,preventDefault:!0},{key:"Home",run:Lw,shift:Hw},{mac:"Cmd-ArrowLeft",run:Lw,shift:Hw},{key:"Mod-Home",run:Kw,shift:eP},{mac:"Cmd-ArrowUp",run:Kw,shift:eP},{key:"PageUp",run:RO,shift:Yw},{mac:"Ctrl-ArrowUp",run:RO,shift:Yw},{key:"PageDown",run:AO,shift:zw},{mac:"Ctrl-ArrowDown",run:AO,shift:zw},{key:"End",run:Bw,shift:Gw},{mac:"Cmd-ArrowRight",run:Bw,shift:Gw},{key:"Mod-Alt-ArrowUp",linux:"Shift-Alt-ArrowUp",run:DY,preventDefault:!0},{key:"Mod-Alt-ArrowDown",linux:"Shift-Alt-ArrowDown",run:qY,preventDefault:!0},{key:"Shift-Alt-i",run:ZY},{key:"Mod-End",run:Jw,shift:tP},{mac:"Cmd-ArrowDown",run:Jw,shift:tP},{key:"Mod-a",run:vW},{key:"Backspace",run:NB},{key:"Backspace",run:MO,shift:MO},{key:"Delete",run:rP},{key:"Mod-Backspace",mac:"Alt-Backspace",run:nP},{key:"Mod-Delete",mac:"Alt-Delete",run:SW},{mac:"Mod-Backspace",run:wW},{mac:"Mod-Delete",run:iP},{mac:"Ctrl-b",run:Zw,shift:Vw,preventDefault:!0},{mac:"Ctrl-f",run:Nw,shift:Xw},{mac:"Ctrl-p",run:Iw,shift:Fw},{mac:"Ctrl-n",run:Ww,shift:Uw},{mac:"Ctrl-a",run:fW,shift:mW},{mac:"Ctrl-e",run:hW,shift:yW},{mac:"Ctrl-d",run:rP},{mac:"Ctrl-h",run:MO},{mac:"Ctrl-k",run:iP},{mac:"Ctrl-Alt-h",run:nP},{mac:"Ctrl-o",run:PW},{mac:"Ctrl-t",run:kW},{mac:"Ctrl-v",run:AO},{mac:"Alt-v",run:RO},{key:"Shift-Mod-k",run:EW},{key:"Alt-ArrowDown",run:_W},{key:"Alt-ArrowUp",run:xW},{win:"Shift-Alt-ArrowDown",mac:"Shift-Alt-ArrowDown",run:CW},{win:"Shift-Alt-ArrowUp",mac:"Shift-Alt-ArrowUp",run:$W},{key:"Mod-l",run:bW,preventDefault:!0},{key:"Shift-Mod-\\",run:pW},{key:"Tab",run:sP,shift:aP,preventDefault:!0},{key:"Mod-[",run:aP},{key:"Mod-]",run:sP},{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:_N},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:$N},{key:"Mod-k Mod-0",run:CN},{key:"Mod-k Mod-j",run:EN},{key:"Mod-k Mod-c",run:UI},{key:"Mod-k Mod-u",run:YI},{key:"Mod-/",run:XI},{key:"Shift-Alt-a",run:zI},{key:"Mod-z",run:lT,preventDefault:!0},{key:"Mod-y",run:Ky,preventDefault:!0},{key:"Mod-Shift-z",run:Ky,preventDefault:!0},{key:"Mod-u",run:rW,preventDefault:!0},{key:"Mod-Shift-m",run:e7},{key:"F8",run:t7}],IY=({path:t,localPresence:e,usernameRef:r})=>Ee.updateListener.of(n=>{if(n.selectionSet){const i=n.state.selection.ranges[0],{from:o,to:s}=i,a={start:[...t,o],end:[...t,s],username:r.current};e.submit(a,l=>{if(l)throw l})}});var ht=function(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r},We=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},Xo,ta,Qi,ol,ac,Hi,Ki,Ji,eo,to,ro,no,io,ra,sl,Fo,ep,Uo;const WY=function(t){var e=131,r=137,n=0;t+="x";var i=Math.floor(9007199254740991/r);for(let o=0;o<t.length;o++)n>i&&(n=Math.floor(n/r)),n=n*e+t.charCodeAt(o);return n},Ye="0123456789abcdef".split(""),BY=[-2147483648,8388608,32768,128],Ei=[24,16,8,0],wd=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],tn=[];class LY{constructor(e=!1,r=!1){Xo.set(this,void 0),ta.set(this,void 0),Qi.set(this,void 0),ol.set(this,void 0),ac.set(this,void 0),Hi.set(this,void 0),Ki.set(this,void 0),Ji.set(this,void 0),eo.set(this,void 0),to.set(this,void 0),ro.set(this,void 0),no.set(this,void 0),io.set(this,void 0),ra.set(this,void 0),sl.set(this,void 0),Fo.set(this,void 0),ep.set(this,0),Uo.set(this,void 0),this.init(e,r)}init(e,r){r?(tn[0]=tn[16]=tn[1]=tn[2]=tn[3]=tn[4]=tn[5]=tn[6]=tn[7]=tn[8]=tn[9]=tn[10]=tn[11]=tn[12]=tn[13]=tn[14]=tn[15]=0,ht(this,ta,tn)):ht(this,ta,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),e?(ht(this,Hi,3238371032),ht(this,Ki,914150663),ht(this,Ji,812702999),ht(this,eo,4144912697),ht(this,to,4290775857),ht(this,ro,1750603025),ht(this,no,1694076839),ht(this,io,3204075428)):(ht(this,Hi,1779033703),ht(this,Ki,3144134277),ht(this,Ji,1013904242),ht(this,eo,2773480762),ht(this,to,1359893119),ht(this,ro,2600822924),ht(this,no,528734635),ht(this,io,1541459225)),ht(this,Xo,ht(this,Uo,ht(this,Qi,ht(this,sl,0)))),ht(this,ol,ht(this,ra,!1)),ht(this,ac,!0),ht(this,Fo,e)}update(e){if(We(this,ol))return this;let r;e instanceof ArrayBuffer?r=new Uint8Array(e):r=e;let n=0;const i=r.length,o=We(this,ta);for(;n<i;){let s;if(We(this,ra)&&(ht(this,ra,!1),o[0]=We(this,Xo),o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),typeof r!="string")for(s=We(this,Uo);n<i&&s<64;++n)o[s>>2]|=r[n]<<Ei[s++&3];else for(s=We(this,Uo);n<i&&s<64;++n){let a=r.charCodeAt(n);a<128?o[s>>2]|=a<<Ei[s++&3]:a<2048?(o[s>>2]|=(192|a>>6)<<Ei[s++&3],o[s>>2]|=(128|a&63)<<Ei[s++&3]):a<55296||a>=57344?(o[s>>2]|=(224|a>>12)<<Ei[s++&3],o[s>>2]|=(128|a>>6&63)<<Ei[s++&3],o[s>>2]|=(128|a&63)<<Ei[s++&3]):(a=65536+((a&1023)<<10|r.charCodeAt(++n)&1023),o[s>>2]|=(240|a>>18)<<Ei[s++&3],o[s>>2]|=(128|a>>12&63)<<Ei[s++&3],o[s>>2]|=(128|a>>6&63)<<Ei[s++&3],o[s>>2]|=(128|a&63)<<Ei[s++&3])}ht(this,ep,s),ht(this,Qi,We(this,Qi)+(s-We(this,Uo))),s>=64?(ht(this,Xo,o[16]),ht(this,Uo,s-64),this.hash(),ht(this,ra,!0)):ht(this,Uo,s)}return We(this,Qi)>4294967295&&(ht(this,sl,We(this,sl)+(We(this,Qi)/4294967296<<0)),ht(this,Qi,We(this,Qi)%4294967296)),this}finalize(){if(We(this,ol))return;ht(this,ol,!0);const e=We(this,ta),r=We(this,ep);e[16]=We(this,Xo),e[r>>2]|=BY[r&3],ht(this,Xo,e[16]),r>=56&&(We(this,ra)||this.hash(),e[0]=We(this,Xo),e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=We(this,sl)<<3|We(this,Qi)>>>29,e[15]=We(this,Qi)<<3,this.hash()}hash(){let e=We(this,Hi),r=We(this,Ki),n=We(this,Ji),i=We(this,eo),o=We(this,to),s=We(this,ro),a=We(this,no),l=We(this,io);const c=We(this,ta);let u,f,h,d,p,g,m,y,O,v;for(let b=16;b<64;++b)d=c[b-15],u=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,d=c[b-2],f=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,c[b]=c[b-16]+u+c[b-7]+f<<0;v=r&n;for(let b=0;b<64;b+=4)We(this,ac)?(We(this,Fo)?(m=300032,d=c[0]-1413257819,l=d-150054599<<0,i=d+24177077<<0):(m=704751109,d=c[0]-210244248,l=d-1521486534<<0,i=d+143694565<<0),ht(this,ac,!1)):(u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),f=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),m=e&r,h=m^e&n^v,g=o&s^~o&a,d=l+f+g+wd[b]+c[b],p=u+h,l=i+d<<0,i=d+p<<0),u=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),f=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7),y=i&e,h=y^i&r^m,g=l&o^~l&s,d=a+f+g+wd[b+1]+c[b+1],p=u+h,a=n+d<<0,n=d+p<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),f=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),O=n&i,h=O^n&e^y,g=a&l^~a&o,d=s+f+g+wd[b+2]+c[b+2],p=u+h,s=r+d<<0,r=d+p<<0,u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),f=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),v=r&n,h=v^r&i^O,g=s&a^~s&l,d=o+f+g+wd[b+3]+c[b+3],p=u+h,o=e+d<<0,e=d+p<<0;ht(this,Hi,We(this,Hi)+e<<0),ht(this,Ki,We(this,Ki)+r<<0),ht(this,Ji,We(this,Ji)+n<<0),ht(this,eo,We(this,eo)+i<<0),ht(this,to,We(this,to)+o<<0),ht(this,ro,We(this,ro)+s<<0),ht(this,no,We(this,no)+a<<0),ht(this,io,We(this,io)+l<<0)}hex(){this.finalize();const e=We(this,Hi),r=We(this,Ki),n=We(this,Ji),i=We(this,eo),o=We(this,to),s=We(this,ro),a=We(this,no),l=We(this,io);let c=Ye[e>>28&15]+Ye[e>>24&15]+Ye[e>>20&15]+Ye[e>>16&15]+Ye[e>>12&15]+Ye[e>>8&15]+Ye[e>>4&15]+Ye[e&15]+Ye[r>>28&15]+Ye[r>>24&15]+Ye[r>>20&15]+Ye[r>>16&15]+Ye[r>>12&15]+Ye[r>>8&15]+Ye[r>>4&15]+Ye[r&15]+Ye[n>>28&15]+Ye[n>>24&15]+Ye[n>>20&15]+Ye[n>>16&15]+Ye[n>>12&15]+Ye[n>>8&15]+Ye[n>>4&15]+Ye[n&15]+Ye[i>>28&15]+Ye[i>>24&15]+Ye[i>>20&15]+Ye[i>>16&15]+Ye[i>>12&15]+Ye[i>>8&15]+Ye[i>>4&15]+Ye[i&15]+Ye[o>>28&15]+Ye[o>>24&15]+Ye[o>>20&15]+Ye[o>>16&15]+Ye[o>>12&15]+Ye[o>>8&15]+Ye[o>>4&15]+Ye[o&15]+Ye[s>>28&15]+Ye[s>>24&15]+Ye[s>>20&15]+Ye[s>>16&15]+Ye[s>>12&15]+Ye[s>>8&15]+Ye[s>>4&15]+Ye[s&15]+Ye[a>>28&15]+Ye[a>>24&15]+Ye[a>>20&15]+Ye[a>>16&15]+Ye[a>>12&15]+Ye[a>>8&15]+Ye[a>>4&15]+Ye[a&15];return We(this,Fo)||(c+=Ye[l>>28&15]+Ye[l>>24&15]+Ye[l>>20&15]+Ye[l>>16&15]+Ye[l>>12&15]+Ye[l>>8&15]+Ye[l>>4&15]+Ye[l&15]),c}toString(){return this.hex()}digest(){this.finalize();const e=We(this,Hi),r=We(this,Ki),n=We(this,Ji),i=We(this,eo),o=We(this,to),s=We(this,ro),a=We(this,no),l=We(this,io),c=[e>>24&255,e>>16&255,e>>8&255,e&255,r>>24&255,r>>16&255,r>>8&255,r&255,n>>24&255,n>>16&255,n>>8&255,n&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255,s>>24&255,s>>16&255,s>>8&255,s&255,a>>24&255,a>>16&255,a>>8&255,a&255];return We(this,Fo)||c.push(l>>24&255,l>>16&255,l>>8&255,l&255),c}array(){return this.digest()}arrayBuffer(){this.finalize();const e=new ArrayBuffer(We(this,Fo)?28:32),r=new DataView(e);return r.setUint32(0,We(this,Hi)),r.setUint32(4,We(this,Ki)),r.setUint32(8,We(this,Ji)),r.setUint32(12,We(this,eo)),r.setUint32(16,We(this,to)),r.setUint32(20,We(this,ro)),r.setUint32(24,We(this,no)),We(this,Fo)||r.setUint32(28,We(this,io)),e}}Xo=new WeakMap,ta=new WeakMap,Qi=new WeakMap,ol=new WeakMap,ac=new WeakMap,Hi=new WeakMap,Ki=new WeakMap,Ji=new WeakMap,eo=new WeakMap,to=new WeakMap,ro=new WeakMap,no=new WeakMap,io=new WeakMap,ra=new WeakMap,sl=new WeakMap,Fo=new WeakMap,ep=new WeakMap,Uo=new WeakMap;function VY(t){const e=new LY;return e.update(t),parseInt(e.hex().substring(0,8),16)}const XY=function(t){var e="#";return t.forEach(function(r){r<16&&(e+=0),e+=r.toString(16)}),e},FY=function(t,e,r){t/=360;var n=r<.5?r*(1+e):r+e-r*e,i=2*r-n;return[t+1/3,t,t-1/3].map(function(o){return o<0&&o++,o>1&&o--,o<1/6?o=i+(n-i)*6*o:o<.5?o=n:o<2/3?o=i+(n-i)*6*(2/3-o):o=i,Math.round(o*255)})};class UY{constructor(e={}){const[r,n]=[e.lightness,e.saturation].map(function(i){return i=i!==void 0?i:[.35,.5,.65],Array.isArray(i)?i.concat():[i]});this.L=r,this.S=n,typeof e.hue=="number"&&(e.hue={min:e.hue,max:e.hue}),typeof e.hue=="object"&&!Array.isArray(e.hue)&&(e.hue=[e.hue]),typeof e.hue>"u"&&(e.hue=[]),this.hueRanges=e.hue.map(function(i){return{min:typeof i.min>"u"?0:i.min,max:typeof i.max>"u"?360:i.max}}),this.hash=VY,typeof e.hash=="function"&&(this.hash=e.hash),e.hash==="bkdr"&&(this.hash=WY)}hsl(e){var r,n,i,o=this.hash(e),s=727;if(this.hueRanges.length){const a=this.hueRanges[o%this.hueRanges.length];r=o/this.hueRanges.length%s*(a.max-a.min)/s+a.min}else r=o%359;return o=Math.ceil(o/360),n=this.S[o%this.S.length],o=Math.ceil(o/this.S.length),i=this.L[o%this.L.length],[r,n,i]}rgb(e){var r=this.hsl(e);return FY.apply(this,r)}hex(e){var r=this.rgb(e);return XY(r)}}const YY=({path:t,docPresence:e})=>[nr.fromClass(class{constructor(r){this.cursorPosition={},this.decorations=qt.of([]);const n={};r.dom.addEventListener("scroll",()=>{this.scrollToCursor(r)}),e.on("receive",(i,o)=>{debug&&console.log(`Received presence for id ${i}`,o),o&&GY(t,o)?n[i]=o:delete n[i];const s=[];for(const a of Object.keys(n)){const l=n[a],{start:c,end:u}=l,f=c[c.length-1],h=u[u.length-1],d=new UY({lightness:.75}).rgb(a),{username:p}=l;s.push({from:f,to:f,value:Ne.widget({side:-1,block:!1,widget:new HY(""+Math.random(),d,p)})}),f!==h&&s.push({from:f,to:h,value:Ne.mark({class:"cm-json1-presence",attributes:{style:`
|
|
152
|
+
background-color: rgba(${d}, 0.75);
|
|
153
|
+
mix-blend-mode: luminosity;
|
|
154
|
+
`}})}),r.state.doc.length>=f&&(this.cursorPosition[a]=f)}this.decorations=Ne.set(s,!0),setTimeout(()=>{r.dispatch({annotations:[zY.of(!0)]})},0),this.scrollToCursor(r)})}scrollToCursor(r){for(const n in this.cursorPosition){const i=this.cursorPosition[n];r.dispatch({effects:Ee.scrollIntoView(i)})}}},{decorations:r=>r.decorations}),KY],zY=Oo.define(),GY=(t,e)=>{for(let r=0;r<t.length;r++)if(t[r]!==e.start[r])return!1;return!0};class HY extends ki{constructor(e,r,n){super(),this.id=e,this.color=r,this.username=n}eq(e){return e.id===this.id}toDOM(){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className="cm-json1-presence";const r=document.createElement("div");e.appendChild(r),r.style.borderLeft=`1px solid rgba(${this.color})`;const n=document.createElement("div");return n.className="remote-cursor-username",n.style.top="-20px",n.style.height="20px",n.style.width=`${this.username.length*12}px`,n.style.backgroundColor=`rgba(${this.color})`,n.style.color="black",n.appendChild(document.createTextNode(this.username)),e.appendChild(n),this.timeout=window.setTimeout(()=>{n.style.opacity="0.3"},2e3),e}ignoreEvent(){return!1}}const KY=Ee.baseTheme({".cm-json1-presence":{position:"relative"},".cm-json1-presence > div":{position:"absolute",top:"0",bottom:"0",left:"0",right:"0"}}),V2=Kr.define({create:()=>null,update:(t,e)=>{for(const r of e.effects)if(r.is(Rv))return r.value;if(!t)return null;if(!e.changes.empty){const r=e.changes.mapPos(t.pos,-1,Yr.TrackDel),n=e.changes.mapPos(t.pos+t.text.length,-1,Yr.TrackDel);return r===null||n===null||e.newDoc.sliceString(r,n)!==t.text?null:Object.assign(Object.assign({},t),{pos:r})}return t},provide:t=>[Ee.decorations.from(t,e=>{if(!e)return Ne.none;const r=e.pos,n=e.pos+e.text.length,i=e.rule.className;return Ne.set(JY({className:i}).range(r,n))}),Ee.contentAttributes.from(t,e=>!e||!e.rule.cursor?{style:""}:{style:`cursor: ${e.rule.cursor}`})]}),Rv=pt.define(),JY=t=>{var e;return Ne.mark({class:`cm-interact ${(e=t==null?void 0:t.className)!==null&&e!==void 0?e:""}`})},e6=Ee.theme({".cm-interact":{background:"rgba(128, 128, 255, 0.2)",borderRadius:"4px"}}),X2=Ie.define(),F2=Ie.define({combine:t=>t[t.length-1]}),t6=nr.define(t=>({target:null,dragging:!1,mouseX:0,mouseY:0,getMatch(){const e=t.state.facet(X2),r=t.posAtCoords({x:this.mouseX,y:this.mouseY});if(!r)return null;const n=t.state.doc.lineAt(r),i=r-n.from;let o=null;for(const s of e)for(const a of n.text.matchAll(s.regexp)){if(a.index===void 0)continue;const l=a[0];if(!l)continue;const c=a.index,u=a.index+l.length;i<c||i>u||(!o||l.length<o.text.length)&&(o={rule:s,pos:n.from+c,text:l})}return o},updateText(e){return r=>{t.dispatch({effects:Rv.of(Object.assign(Object.assign({},e),{text:r})),changes:{from:e.pos,to:e.pos+e.text.length,insert:r}})}},setTarget(e){this.target=e,t.dispatch({effects:Rv.of(e)})},isModKeyDown(e){const r=t.state.facet(F2),n=!!window.navigator&&window.navigator.userAgent.includes("Macintosh");switch(r){case"alt":return e.altKey;case"shift":return e.shiftKey;case"ctrl":return e.ctrlKey;case"meta":return e.metaKey;case"mod":return n?e.metaKey:e.ctrlKey}throw new Error(`Invalid mod key: ${r}`)},update(e){const r=e.state.field(V2,!1);r!==void 0&&this.target!==r&&(this.target=r,r===null&&this.endDrag())},startDrag(e){this.dragging||this.target&&(this.dragging=!0,this.target.rule.onDragStart&&this.target.rule.onDragStart(this.target.text,this.updateText(this.target),e))},endDrag(){var e;this.dragging&&(this.dragging=!1,!((e=this.target)===null||e===void 0)&&e.rule.onDragEnd&&this.target.rule.onDragEnd(this.target.text,this.updateText(this.target)))}}),{eventHandlers:{mousedown(t,e){this.isModKeyDown(t)&&this.target&&(t.preventDefault(),this.target.rule.onClick&&this.target.rule.onClick(this.target.text,r=>{this.target&&this.updateText(this.target)(r)},t),this.target.rule.onDrag&&this.startDrag(t))},mousemove(t,e){if(this.mouseX=t.clientX,this.mouseY=t.clientY,!this.isModKeyDown(t)){this.target&&this.setTarget(null);return}this.target&&this.dragging?this.target.rule.onDrag&&this.target.rule.onDrag(this.target.text,this.updateText(this.target),t):this.setTarget(this.getMatch())},mouseup(t,e){this.endDrag(),this.target&&!this.isModKeyDown(t)&&this.setTarget(null),this.isModKeyDown(t)&&this.setTarget(this.getMatch())},mouseleave(t,e){this.endDrag(),this.target&&this.setTarget(null)},keydown(t,e){!this.target&&this.isModKeyDown(t)&&this.setTarget(this.getMatch())},keyup(t,e){this.target&&!this.isModKeyDown(t)&&(this.endDrag(),this.setTarget(null))}}}),r6=(t={})=>{var e,r;return[V2,e6,t6,F2.of((e=t.key)!==null&&e!==void 0?e:"alt"),((r=t.rules)!==null&&r!==void 0?r:[]).map(n=>X2.of(n))]},n6=/https?:\/\/[^\s'")]*([^\s'",;.]|\([^\s'")]*\)|\b)/g,i6={regexp:n6,cursor:"pointer",onClick:t=>{window.open(t)}},U2=/#[0-9A-Fa-f]{6}/g,o6=t=>({regexp:U2,cursor:"pointer",onClick(e,r){const n=e,i=document.createElement("input");i.type="color",i.value=n.toLowerCase();const o=n.toUpperCase()===n,s=a=>{const l=a.target;l.value&&r(o?l.value.toUpperCase():l.value),t&&t()};i.addEventListener("input",s),i.click()}}),s6=new RegExp("(?<!\\#)-?\\b\\d+\\.?\\d*\\b","g"),a6=t=>({regexp:s6,cursor:"ew-resize",onDrag:(e,r,n)=>{const i=Number(e)+n.movementX;isNaN(i)||(r(i.toString()),t&&t())}}),l6=/true|false/g,u6=t=>({regexp:l6,cursor:"pointer",onClick:(e,r)=>{r(e==="true"?"false":"true"),t&&t()}}),c6=t=>({regexp:/vec2\(-?\b\d+\.?\d*\b\s*(,\s*-?\b\d+\.?\d*\b)?\)/g,cursor:"move",onDrag:(e,r,n)=>{var a,l;const i=/vec2\((?<x>-?\b\d+\.?\d*\b)\s*(,\s*(?<y>-?\b\d+\.?\d*\b))?\)/.exec(e),o=Number((a=i==null?void 0:i.groups)==null?void 0:a.x);let s=Number((l=i==null?void 0:i.groups)==null?void 0:l.y);isNaN(o)||(isNaN(s)&&(s=o),r(`vec2(${o+n.movementX}, ${s-n.movementY})`),t&&t())}});let sa=null;const f6=t=>({regexp:/rotate\(-?\d*\.?\d*\)/g,cursor:"move",onDragStart(e,r,n){sa={x:n.clientX,y:n.clientY}},onDrag(e,r,n){if(sa==null)return;const i=Math.round(Math.atan2(sa.y-n.clientY,n.clientX-sa.x)*180/Math.PI);r(`rotate(${i})`);const o=new CustomEvent("updateRotateDrag",{detail:i});document.dispatchEvent(o),t&&t()},onDragEnd(){sa=null}}),h6=nr.fromClass(class{constructor(t){this.view=t,this.textPosition=null,this.rotation=0,document.addEventListener("updateRotateDrag",e=>{this.textPosition=this.view.posAtCoords(sa,!1),this.rotation=e.detail})}},{decorations:t=>sa===null?Ne.none:Ne.set([{from:t.textPosition,to:t.textPosition,value:Ne.widget({side:-1,widget:new d6(t.rotation)})}])});class d6 extends ki{constructor(e){super(),this.angle=e}toDOM(e){const r=document.createElement("div");r.setAttribute("style","width:20px;height:20px"),r.className="color-circle-parent";const n=document.createElementNS("http://www.w3.org/2000/svg","svg"),i=document.createElementNS("http://www.w3.org/2000/svg","circle");i.setAttributeNS(null,"fill","#808080"),i.setAttributeNS(null,"r","5"),i.setAttributeNS(null,"cx","5"),i.setAttributeNS(null,"cy","5");const o=document.createElementNS("http://www.w3.org/2000/svg","line");return o.setAttributeNS(null,"x1","10"),o.setAttributeNS(null,"x2","5"),o.setAttributeNS(null,"y1","5"),o.setAttributeNS(null,"y2","5"),o.setAttributeNS(null,"stroke","black"),o.setAttributeNS(null,"transform",`rotate(${360-this.angle},5,5)`),n.setAttributeNS(null,"viewBox","0 0 10 10"),n.setAttributeNS(null,"width","20"),n.setAttributeNS(null,"height","20"),n.appendChild(i),n.appendChild(o),r.appendChild(n),r}ignoreEvent(){return!1}}const p6=t=>({regexp:/\[[ x]\]/g,cursor:"pointer",onClick:(e,r)=>{r(e==="[ ]"?"[x]":"[ ]"),t&&t()}}),g6=Ee.baseTheme({".color-circle-parent":{display:"inline-block",cursor:"inherit"}});class O6 extends ki{constructor(e){super(),this.color=e}eq(e){return e.color===this.color}toDOM(){const e=document.createElement("div"),r=20,n=14;e.setAttribute("style",`width:${r}px;height:${r}px`),e.className="color-circle-parent";const i=document.createElementNS("http://www.w3.org/2000/svg","svg"),o=document.createElementNS("http://www.w3.org/2000/svg","circle");return o.setAttributeNS(null,"fill",this.color.replace(/["']/g,"")),o.setAttributeNS(null,"stroke","white"),o.setAttributeNS(null,"stroke-width","0.75"),o.setAttributeNS(null,"r",""+n/2),o.setAttributeNS(null,"cx",""+r/2),o.setAttributeNS(null,"cy",""+(r/2-1)),i.setAttributeNS(null,"width",""+r),i.setAttributeNS(null,"height",""+r),i.appendChild(o),e.appendChild(i),e}ignoreEvent(){return!1}}const m6=[nr.fromClass(class{constructor(t){this.decorations=qt.of([]),this.view=t}},{decorations:t=>{const e=[],r=t.view.state.doc.iter();let n=r.next(),i=0;for(;!n.done;){if(n.value===`
|
|
155
|
+
`){i++,n=r.next();continue}const o=n.value.matchAll(U2);let s=o.next();for(;!s.done;){const a=s.value;a.index+=i,e.push(a),s=o.next()}i+=n.value.length,n=r.next()}return Ne.set(e.map(o=>({from:o.index+7,to:o.index+7,value:Ne.widget({side:-1,widget:new O6(o[0])})})))}}),g6],y6=({onInteract:t,customInteractRules:e})=>{const r=[o6(t),a6(t),p6(t),u6(t),c6(t),f6(t),i6];return e&&r.push(...e),r6({rules:r})},H1=()=>(Math.random()+"").slice(2),v6=({typeScriptWorker:t,fileName:e})=>async n=>{const i=H1(),o=n.state.doc.toString(),s={event:"autocomplete-request",fileName:e,fileContent:o,position:n.pos,requestId:i},a=o[n.pos-1];if(['"',"'",";","(",")","{",","," ","=","<",">"].includes(a))return{from:n.pos,options:[]};t.postMessage(s);const l=await new Promise(f=>{t.onmessage=h=>{const d=h.data,{event:p,requestId:g,completions:m}=d;p==="post-completions"&&g===g&&f(m)}});if(!l)return{from:n.pos,options:[]};const c=n.matchBefore(/\w*/).from,u=n.matchBefore(/\w*/).text;return u&&(l.entries=l.entries.filter(f=>f.name.startsWith(u))),{from:n.pos,options:l.entries.map(f=>({label:f.name,apply:h=>{const d=n.pos+f.name.length-u.length;h.dispatch({changes:{from:c,to:n.pos,insert:f.name},selection:{anchor:d,head:d}})}}))}},b6=({typeScriptWorker:t,fileName:e,shareDBDoc:r,fileId:n,allowGlobals:i})=>async()=>{const o=H1(),s=r.data.files[n].text,a={event:"lint-request",fileName:e,fileContent:s,requestId:o,allowGlobals:i};return t.postMessage(a),await new Promise(c=>{t.onmessage=u=>{const f=u.data,{event:h,requestId:d,tsErrors:p}=f;h==="post-error-linter"&&d===d&&c(p)}})},S6=[NZ(),BZ(),lZ(),tW(),Hq(),rZ(),Dt.allowMultipleSelections.of(!0),wN(),e1(DN,{fallback:!0}),LN(),DB(),GT({defaultKeymap:!1}),bZ(),PZ(),pZ(),DW()];function w6(){return["red","orange","yellow","green"]}const P6=nr.fromClass(class{constructor(t){this.decorations=this.getBracketDecorations(t)}update(t){(t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.getBracketDecorations(t.view))}getBracketDecorations(t){const{doc:e}=t.state,r=[],n=[],i=w6();for(let o=0;o<e.length;o+=1){const s=e.sliceString(o,o+1);if(s==="("||s==="["||s==="{")n.push({type:s,from:o});else if(s===")"||s==="]"||s==="}"){const a=n.pop();if(a&&a.type===this.getMatchingBracket(s)){const l=i[n.length%i.length];r.push(Ne.mark({class:`rainbow-bracket-${l}`}).range(a.from,a.from+1),Ne.mark({class:`rainbow-bracket-${l}`}).range(o,o+1))}}}return r.sort((o,s)=>o.from-s.from||o.startSide-s.startSide),Ne.set(r)}getMatchingBracket(t){switch(t){case")":return"(";case"]":return"[";case"}":return"{";default:return null}}},{decorations:t=>t.decorations});function k6(){return[P6,Ee.baseTheme({".rainbow-bracket-red":{color:"white"},".rainbow-bracket-red > span":{color:"white"},".rainbow-bracket-orange":{color:"#FFFFB2"},".rainbow-bracket-orange > span":{color:"#FFFFB2"},".rainbow-bracket-yellow":{color:"#FFB2DA"},".rainbow-bracket-yellow > span":{color:"#FFB2DA"},".rainbow-bracket-green":{color:"#B2FFB2"},".rainbow-bracket-green > span":{color:"#B2FFB2"}})]}const x6=!0,Pd=()=>I1({jsx:!0,typescript:!0}),_6={json:NU,tsx:Pd,js:Pd,jsx:Pd,ts:Pd,html:t2,css:W1,md:xY,svelte:MU},D_=(t,e)=>{let r=t;for(const n of e){if(!r)return;r=r[n]}return r},$6=({fileId:t,shareDBDoc:e,content:r,filesPath:n,localPresence:i,docPresence:o,theme:s,onInteract:a,editorCache:l,usernameRef:c,typeScriptWorker:u,customInteractRules:f,allowGlobals:h})=>{if(l.has(t))return l.get(t);const d=[...n,t,"text"],p=[...n,t,"name"],g=D_(r,d),m=D_(r,p),y=m.split(".").pop();let O=new Fl;const v=[];e?(v.push(EY({shareDBDoc:e,path:d,json1:$0,textUnicode:tE})),i&&v.push(IY({path:d,localPresence:i,usernameRef:c})),o&&v.push(YY({path:d,docPresence:o}))):v.push(Ee.editable.of(!1)),v.push(m6),v.push(S6),v.push(O.of(nR[s].value));const b=new Fl,_=(k=>{const x=_6[k];return x?x():void 0})(y);_?v.push(b.of(_)):v.push(b.of([])),v.push(y6({onInteract:a,customInteractRules:f})),v.push(h6),v.push(GT({override:[v6({typeScriptWorker:u,fileName:m})]})),e&&x6&&v.push(n7(b6({typeScriptWorker:u,fileName:m,shareDBDoc:e,fileId:t,allowGlobals:h}))),v.push(jY({colors:{light:"#4d586b",dark:"#4d586b",activeLight:"#8e949f",activeDark:"#8e949f"}})),v.push(vf.of(NY.map(k=>(k.key==="Enter"&&delete k.shift,k)))),v.push(k6());const P={editor:new Ee({state:Dt.create({doc:g,extensions:v})}),themeCompartment:O};return l.set(t,P),P},q_=["files"],C6=({customInteractRules:t,allowGlobals:e})=>{const{activeFileId:r,shareDBDoc:n,content:i,submitOperation:o,localPresence:s,docPresence:a,username:l,editorCache:c,editorWantsFocus:u,editorNoLongerWantsFocus:f,typeScriptWorker:h,theme:d,codeEditorRef:p}=N.useContext(Hr),g=p,m=N.useRef(null),y=N.useCallback(()=>{m.current?clearTimeout(m.current):o(b=>({...b,isInteracting:!0})),m.current=setTimeout(()=>{m.current=null,o(({isInteracting:b,...w})=>w)},800)},[o]),O=N.useRef(l);O.current=l;const v=N.useMemo(()=>$6({fileId:r,shareDBDoc:n,content:i,filesPath:q_,localPresence:s,docPresence:a,theme:d,onInteract:y,editorCache:c,usernameRef:O,typeScriptWorker:h,customInteractRules:t,allowGlobals:e}),[r,n,q_,s,a,d,y,c,O,h]);return N.useLayoutEffect(()=>{if(g.current&&i)return g.current.appendChild(v.editor.dom),v.editor.scrollDOM.scrollTo({top:v.scrollPosition??0}),()=>{v.scrollPosition=v.editor.scrollDOM.scrollTop,g.current.removeChild(v.editor.dom)}},[n,v]),N.useLayoutEffect(()=>{u&&(v.editor.focus(),f())},[u,v,f]),q.jsx("div",{className:"vz-code-editor",ref:g,tabIndex:-1})},E6=({errorMessage:t,content:e})=>{const[r,n]=N.useState(!0);N.useEffect(()=>{t!==null&&n(!0)},[t]);const i=N.useCallback(()=>{n(!1)},[]);return N.useEffect(()=>{const o=s=>{s.key==="Escape"&&i()};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0)}},[i]),r&&t!==null?q.jsxs("div",{className:"vz-code-error-overlay",children:[q.jsx("pre",{children:t}),q.jsx("i",{className:"icon-button icon-button-dark error-dismiss-button",onClick:i,children:q.jsx(OA,{})})]}):null},Z_=t=>{const[e]=t.split("-");return parseInt(e,36)},Q6=(t,e)=>{const r=Z_(t),n=Z_(e);return r>n},T6=(t,e,r,n)=>{r.current.has(t)?r.current.set(t,e):(r.current.set(t,e),n(i=>[...i,{user:e,join:!0,presenceId:t}]))},R6=(t,e,r)=>{const n=e.current.get(t);n&&(e.current.delete(t),r(i=>[...i,{user:n,join:!1,presenceId:t}]))},A6=({docPresence:t,localPresence:e})=>{const[r,n]=N.useState([]),i=N.useRef(new Map);return N.useEffect(()=>{if(t){const o=(s,a)=>{var c;const l=a!==null;if(Q6(s,e.presenceId)){if(l){const f=(c=t.remotePresences[s])==null?void 0:c.username;T6(s,f,i,n)}else R6(s,i,n);const u=setTimeout(()=>{n(f=>f.slice(1))},5e3);return()=>{clearTimeout(u)}}};return t.on("receive",o),()=>{t.off("receive",o)}}},[t,e]),r.length>0?q.jsx("div",{className:"vz-notification",children:r.map(({user:o,join:s,presenceId:a})=>q.jsx("div",{className:"vz-notification-item",children:s?`${o} has joined the session.`:`${o} has left the session.`},a))}):null},M6=100,j6=2e3,D6=(t,e=!0)=>{var i,o;const r=(i=t.name)==null?void 0:i.substring(0,M6).trim(),n=(e?(o=t.text)==null?void 0:o.substring(0,j6):t.text).trim();return["`"+r+"`:","```",n,"```"].join(`
|
|
156
|
+
`)},q6="/ai-assist",Z6=async({view:t,shareDBDoc:e,fileId:r,tabList:n,aiAssistEndpoint:i=q6,aiAssistOptions:o={},aiStreamId:s})=>{const a=e.data.files[r].name,l=t.state.sliceDoc(0,t.state.selection.main.from),c=t.state.sliceDoc(t.state.selection.main.to),u=l+"<FILL_ME>"+c,f={name:a,text:u},h=t.state.selection.main.to;let d=D6(f,!1);const g=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...o,inputText:d,fileId:r,insertionCursor:h,aiStreamId:s})})).json();g.error&&console.error("[startAIAssist] error from server:",g.error)},N6=[{x:40,y:0,r:4},{x:28.28,y:28.28,r:4.85},{x:0,y:40,r:5.71},{x:-28.29,y:28.28,r:6.57},{x:-40,y:0,r:7.42},{x:-28.29,y:-28.29,r:8.28},{x:-.01,y:-40,r:9.14},{x:28.28,y:-28.29,r:10}],I6=({height:t=40,fill:e="currentcolor",fadeIn:r=!0})=>{const[n,i]=N.useState(!1);return N.useEffect(()=>{i(!0)},[]),n&&q.jsx("div",{className:`vh-spinner${r?" fade-in":""}`,children:q.jsx("svg",{height:t,viewBox:"0 0 100 100",style:{opacity:1},children:q.jsx("g",{transform:"translate(50, 50)",fill:e,children:q.jsx("g",{className:"vh-spinner-dots",children:N6.map(({x:o,y:s,r:a},l)=>q.jsx("circle",{cx:o,cy:s,r:a},l))})})})})},W6=({aiAssistEndpoint:t,aiAssistOptions:e,aiAssistTooltipText:r="Start AI Assist",aiAssistClickOverride:n})=>{const{shareDBDoc:i,activeFileId:o,tabList:s,editorCache:a}=N.useContext(Hr),[l,c]=N.useState(null),{runPrettierRef:u,runCodeRef:f}=N.useContext(Hr),h=N.useCallback(async()=>{if(!(l!==null)){const g=H1();c(g),await Z6({view:a.get(o).editor,shareDBDoc:i,fileId:o,tabList:s,aiStreamId:g,aiAssistEndpoint:t,aiAssistOptions:e}),await new Promise(O=>setTimeout(O,1e3));const m=u.current;m!==null&&m();const y=f.current;y!==null&&y(),c(O=>O===g?null:O)}},[o,l]),d=l===null;return q.jsx("div",{className:"vz-code-ai-assist-widget",children:l?q.jsx(I6,{}):d&&q.jsx($o,{placement:"left",overlay:q.jsx(_o,{id:"ai-assist-widget-tooltip",children:r}),children:q.jsx("i",{className:"icon-button icon-button-dark",onClick:n||h,children:q.jsx(OX,{})})})})},B6=({runCodeWidgetTooltipText:t=q.jsxs(q.Fragment,{children:[q.jsx("strong",{children:"Run Code"}),q.jsx("div",{children:"(Shift + Enter or Ctrl + s)"})]})})=>{const{runCodeRef:e,runPrettierRef:r}=N.useContext(Hr),[n,i]=N.useState(!1),o=N.useCallback(()=>{i(!0);const s=r.current;s!==null&&s();const a=e.current;a!==null&&a(),setTimeout(()=>i(!1),1e3)},[]);return q.jsx("div",{className:"vz-code-run-code-widget",children:q.jsx($o,{placement:"left",overlay:q.jsx(_o,{id:"run-code-widget-tooltip",children:t}),children:q.jsx("i",{className:`icon-button icon-button-dark ${n?"rotate-icon":""}`,onClick:o,children:q.jsx(PX,{})})})})},L6=({enableAIAssist:t=!0,aiAssistEndpoint:e,aiAssistOptions:r,aiAssistTooltipText:n,aiAssistClickOverride:i,customInteractRules:o,allowGlobals:s=!1})=>{const{codeEditorWidth:a}=N.useContext(kg),{content:l,localPresence:c,docPresence:u,activeFileId:f,errorMessage:h}=N.useContext(Hr),[d,p]=N.useState(!1);return N.useEffect(()=>{p(!0)},[]),f!==null?q.jsxs("div",{className:"middle",style:{width:a+"px"},children:[q.jsx(DX,{}),d&&l&&f&&q.jsx(C6,{customInteractRules:o,allowGlobals:s}),d&&t&&l&&f?q.jsx(W6,{aiAssistEndpoint:e,aiAssistOptions:r,aiAssistTooltipText:n,aiAssistClickOverride:i}):null,q.jsx(B6,{}),q.jsx(E6,{errorMessage:h,content:l}),q.jsx(A6,{docPresence:u,localPresence:c})]}):null},V6=()=>q.jsx("div",{className:"right",children:null}),X6=new _5,F6=new $5;JC.types.register($0.type);const{Connection:U6}=JC,Y6=window.location.protocol==="https:"?"wss://":"ws://",z6=new WebSocket(Y6+window.location.host+"/ws"),G6=new U6(z6),H6=()=>{const{username:t}=N.useContext(Hr);return r3(t),null};function K6(){const{shareDBDoc:t,content:e,localPresence:r,docPresence:n,submitOperation:i,connected:o}=u4({connection:G6}),s=t3();return q.jsx(R5,{children:q.jsxs(G7,{content:e,shareDBDoc:t,submitOperation:i,localPresence:r,docPresence:n,prettierWorker:X6,typeScriptWorker:F6,initialUsername:s,connected:o,children:[q.jsxs("div",{className:"app",children:[q.jsx(AX,{}),q.jsx(L6,{allowGlobals:!0}),q.jsx(V6,{}),q.jsx(DP,{side:"left"}),q.jsx(DP,{side:"right"})]}),q.jsx(H6,{})]})})}HC(document.getElementById("root")).render(q.jsx(I7,{children:q.jsx(K6,{})}));
|