@semiont/cli 0.4.17 → 0.4.19
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/cli.mjs +14 -42
- package/dist/frontend/dist/assets/{CookiePreferences-BDtMuCT2.js → CookiePreferences-BBb5XMuG.js} +2 -2
- package/dist/frontend/dist/assets/{CookiePreferences-BDtMuCT2.js.map → CookiePreferences-BBb5XMuG.js.map} +1 -1
- package/dist/frontend/dist/assets/{PdfAnnotationCanvas.client-CHDCGQBR-CuWwI0uw.js → PdfAnnotationCanvas.client-CHDCGQBR-mCGxablw.js} +2 -2
- package/dist/frontend/dist/assets/{PdfAnnotationCanvas.client-CHDCGQBR-CuWwI0uw.js.map → PdfAnnotationCanvas.client-CHDCGQBR-mCGxablw.js.map} +1 -1
- package/dist/frontend/dist/assets/ToolbarPanels-CfaOVIc9.js +2 -0
- package/dist/frontend/dist/assets/ToolbarPanels-CfaOVIc9.js.map +1 -0
- package/dist/frontend/dist/assets/{client-w-_FzMWW.js → client-CWwdB0xQ.js} +2 -2
- package/dist/frontend/dist/assets/{client-w-_FzMWW.js.map → client-CWwdB0xQ.js.map} +1 -1
- package/dist/frontend/dist/assets/{client-so55bcfy.js → client-Cgz-uiSd.js} +2 -2
- package/dist/frontend/dist/assets/{client-so55bcfy.js.map → client-Cgz-uiSd.js.map} +1 -1
- package/dist/frontend/dist/assets/{client-mCvsMrtH.js → client-D3W9xTBT.js} +2 -2
- package/dist/frontend/dist/assets/{client-mCvsMrtH.js.map → client-D3W9xTBT.js.map} +1 -1
- package/dist/frontend/dist/assets/{client-Dwyu_mF1.js → client-DeL0szs5.js} +2 -2
- package/dist/frontend/dist/assets/{client-Dwyu_mF1.js.map → client-DeL0szs5.js.map} +1 -1
- package/dist/frontend/dist/assets/index-C5oI0kaf.js +161 -0
- package/dist/frontend/dist/assets/index-C5oI0kaf.js.map +1 -0
- package/dist/frontend/dist/assets/layout-B_JLc3yI.js +2 -0
- package/dist/frontend/dist/assets/{layout-Cmn1yGWi.js.map → layout-B_JLc3yI.js.map} +1 -1
- package/dist/frontend/dist/assets/layout-DJI7aibW.js +2 -0
- package/dist/frontend/dist/assets/{layout-B3hxaRnF.js.map → layout-DJI7aibW.js.map} +1 -1
- package/dist/frontend/dist/assets/{layout-CsUwTEip.js → layout-DXY8hCsB.js} +2 -2
- package/dist/frontend/dist/assets/{layout-CsUwTEip.js.map → layout-DXY8hCsB.js.map} +1 -1
- package/dist/frontend/dist/assets/layout-VBQ97DvJ.js +2 -0
- package/dist/frontend/dist/assets/{layout-DXjUb5pL.js.map → layout-VBQ97DvJ.js.map} +1 -1
- package/dist/frontend/dist/assets/{not-found-C46rJTS0.js → not-found-BKG2_Fv3.js} +2 -2
- package/dist/frontend/dist/assets/{not-found-C46rJTS0.js.map → not-found-BKG2_Fv3.js.map} +1 -1
- package/dist/frontend/dist/assets/page-8OrS1-4-.js +2 -0
- package/dist/frontend/dist/assets/page-8OrS1-4-.js.map +1 -0
- package/dist/frontend/dist/assets/{page-BCTRI-5h.js → page-B4Qu9WPd.js} +2 -2
- package/dist/frontend/dist/assets/{page-BCTRI-5h.js.map → page-B4Qu9WPd.js.map} +1 -1
- package/dist/frontend/dist/assets/page-BNJp__R7.js +2 -0
- package/dist/frontend/dist/assets/{page-cHW-gnyq.js.map → page-BNJp__R7.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-DhkdSv3o.js → page-BRTi-f95.js} +2 -2
- package/dist/frontend/dist/assets/{page-DhkdSv3o.js.map → page-BRTi-f95.js.map} +1 -1
- package/dist/frontend/dist/assets/page-BSB8GP79.js +2 -0
- package/dist/frontend/dist/assets/{page-BSaAdGF1.js.map → page-BSB8GP79.js.map} +1 -1
- package/dist/frontend/dist/assets/page-Bx8QAzic.js +2 -0
- package/dist/frontend/dist/assets/{page-jAWX9Yq4.js.map → page-Bx8QAzic.js.map} +1 -1
- package/dist/frontend/dist/assets/page-CDSGl6uY.js +2 -0
- package/dist/frontend/dist/assets/{page-Bs0NV-OR.js.map → page-CDSGl6uY.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-C9LRjfKm.js → page-CJLuuiG8.js} +2 -2
- package/dist/frontend/dist/assets/{page-C9LRjfKm.js.map → page-CJLuuiG8.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-DKA-wyMy.js → page-CyFJt2nP.js} +2 -2
- package/dist/frontend/dist/assets/{page-DKA-wyMy.js.map → page-CyFJt2nP.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-sOV813bU.js → page-D1q6VB02.js} +2 -2
- package/dist/frontend/dist/assets/{page-sOV813bU.js.map → page-D1q6VB02.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-B3Uq31BP.js → page-D3THDsqd.js} +2 -2
- package/dist/frontend/dist/assets/{page-B3Uq31BP.js.map → page-D3THDsqd.js.map} +1 -1
- package/dist/frontend/dist/assets/page-DCxg1lHk.js +2 -0
- package/dist/frontend/dist/assets/{page-DWvAfkY1.js.map → page-DCxg1lHk.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-DCPEscX2.js → page-DbwQv5n_.js} +2 -2
- package/dist/frontend/dist/assets/{page-DCPEscX2.js.map → page-DbwQv5n_.js.map} +1 -1
- package/dist/frontend/dist/assets/page-DddZ9Yxm.js +2 -0
- package/dist/frontend/dist/assets/{page-Cz0qvcvG.js.map → page-DddZ9Yxm.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-Df3S4CSz.js → page-DzoXV-AN.js} +2 -2
- package/dist/frontend/dist/assets/{page-Df3S4CSz.js.map → page-DzoXV-AN.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-DlBB3Xru.js → page-IgGNB4a9.js} +2 -2
- package/dist/frontend/dist/assets/{page-DlBB3Xru.js.map → page-IgGNB4a9.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-DqbPyuN1.js → page-aKPxuWo3.js} +2 -2
- package/dist/frontend/dist/assets/{page-DqbPyuN1.js.map → page-aKPxuWo3.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-DjY64aaC.js → page-jxC42AIR.js} +2 -2
- package/dist/frontend/dist/assets/{page-DjY64aaC.js.map → page-jxC42AIR.js.map} +1 -1
- package/dist/frontend/dist/assets/{privacy-BCxizJzS.js → privacy-BAxopuZI.js} +2 -2
- package/dist/frontend/dist/assets/{privacy-BCxizJzS.js.map → privacy-BAxopuZI.js.map} +1 -1
- package/dist/frontend/dist/assets/{routing-C43HVxNw.js → routing-Cm_oCwum.js} +2 -2
- package/dist/frontend/dist/assets/{routing-C43HVxNw.js.map → routing-Cm_oCwum.js.map} +1 -1
- package/dist/frontend/dist/assets/{routing-swMLj8Z8.js → routing-rYtBowvy.js} +2 -2
- package/dist/frontend/dist/assets/{routing-swMLj8Z8.js.map → routing-rYtBowvy.js.map} +1 -1
- package/dist/frontend/dist/index.html +1 -1
- package/dist/frontend/dist/messages/ar.json +2 -1
- package/dist/frontend/dist/messages/bn.json +2 -1
- package/dist/frontend/dist/messages/cs.json +2 -1
- package/dist/frontend/dist/messages/da.json +2 -1
- package/dist/frontend/dist/messages/de.json +2 -1
- package/dist/frontend/dist/messages/el.json +2 -1
- package/dist/frontend/dist/messages/en.json +2 -1
- package/dist/frontend/dist/messages/es.json +2 -1
- package/dist/frontend/dist/messages/fa.json +2 -1
- package/dist/frontend/dist/messages/fi.json +2 -1
- package/dist/frontend/dist/messages/fr.json +2 -1
- package/dist/frontend/dist/messages/he.json +2 -1
- package/dist/frontend/dist/messages/hi.json +2 -1
- package/dist/frontend/dist/messages/id.json +2 -1
- package/dist/frontend/dist/messages/it.json +2 -1
- package/dist/frontend/dist/messages/ja.json +2 -1
- package/dist/frontend/dist/messages/ko.json +2 -1
- package/dist/frontend/dist/messages/ms.json +2 -1
- package/dist/frontend/dist/messages/nl.json +2 -1
- package/dist/frontend/dist/messages/no.json +2 -1
- package/dist/frontend/dist/messages/pl.json +2 -1
- package/dist/frontend/dist/messages/pt.json +2 -1
- package/dist/frontend/dist/messages/ro.json +2 -1
- package/dist/frontend/dist/messages/sv.json +2 -1
- package/dist/frontend/dist/messages/th.json +2 -1
- package/dist/frontend/dist/messages/tr.json +2 -1
- package/dist/frontend/dist/messages/uk.json +2 -1
- package/dist/frontend/dist/messages/vi.json +2 -1
- package/dist/frontend/dist/messages/zh.json +2 -1
- package/dist/frontend/package.json +1 -1
- package/package.json +7 -7
- package/dist/frontend/dist/assets/ToolbarPanels-mrjx6GSA.js +0 -2
- package/dist/frontend/dist/assets/ToolbarPanels-mrjx6GSA.js.map +0 -1
- package/dist/frontend/dist/assets/index-CqzrFNnV.js +0 -159
- package/dist/frontend/dist/assets/index-CqzrFNnV.js.map +0 -1
- package/dist/frontend/dist/assets/layout-B3hxaRnF.js +0 -2
- package/dist/frontend/dist/assets/layout-Cmn1yGWi.js +0 -2
- package/dist/frontend/dist/assets/layout-DXjUb5pL.js +0 -2
- package/dist/frontend/dist/assets/page-BSaAdGF1.js +0 -2
- package/dist/frontend/dist/assets/page-BjvkLuU3.js +0 -2
- package/dist/frontend/dist/assets/page-BjvkLuU3.js.map +0 -1
- package/dist/frontend/dist/assets/page-Bs0NV-OR.js +0 -2
- package/dist/frontend/dist/assets/page-Cz0qvcvG.js +0 -2
- package/dist/frontend/dist/assets/page-DWvAfkY1.js +0 -2
- package/dist/frontend/dist/assets/page-cHW-gnyq.js +0 -2
- package/dist/frontend/dist/assets/page-jAWX9Yq4.js +0 -2
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-ponyfill-D2ngVqWO.js","assets/vendor-DJo4KD8w.js","assets/PdfAnnotationCanvas.client-CHDCGQBR-mCGxablw.js","assets/query-B6BuIB0M.js","assets/i18n-BbpF47i1.js","assets/layout-DXY8hCsB.js","assets/privacy-BAxopuZI.js","assets/routing-Cm_oCwum.js","assets/page-DzoXV-AN.js","assets/page-aKPxuWo3.js","assets/CookiePreferences-BBb5XMuG.js","assets/XMarkIcon-KMKD47CF.js","assets/routing-rYtBowvy.js","assets/page-BRTi-f95.js","assets/page-D3THDsqd.js","assets/page-BNJp__R7.js","assets/page-IgGNB4a9.js","assets/page-DbwQv5n_.js","assets/page-CyFJt2nP.js","assets/layout-VBQ97DvJ.js","assets/ToolbarPanels-CfaOVIc9.js","assets/ChevronLeftIcon-BLyRNZuL.js","assets/StreamStatusContext-BNiTXRfJ.js","assets/page-D1q6VB02.js","assets/page-8OrS1-4-.js","assets/page-B4Qu9WPd.js","assets/page-DddZ9Yxm.js","assets/layout-DJI7aibW.js","assets/ArrowsRightLeftIcon-BzLgl5o9.js","assets/CommandLineIcon-Ba4gpk8e.js","assets/page-CDSGl6uY.js","assets/client-CWwdB0xQ.js","assets/client-DeL0szs5.js","assets/client-D3W9xTBT.js","assets/page-Bx8QAzic.js","assets/layout-B_JLc3yI.js","assets/page-CJLuuiG8.js","assets/page-jxC42AIR.js","assets/page-DCxg1lHk.js","assets/page-BSB8GP79.js","assets/client-Cgz-uiSd.js","assets/not-found-BKG2_Fv3.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Ez=Object.defineProperty;var O1=e=>{throw TypeError(e)};var Az=(e,t,n)=>t in e?Ez(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Me=(e,t,n)=>Az(e,typeof t!="symbol"?t+"":t,n),fO=(e,t,n)=>t.has(e)||O1("Cannot "+n);var ce=(e,t,n)=>(fO(e,t,"read from private field"),n?n.call(e):t.get(e)),Gi=(e,t,n)=>t.has(e)?O1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ai=(e,t,n,r)=>(fO(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),yt=(e,t,n)=>(fO(e,t,"access private method"),n);var b1=(e,t,n,r)=>({set _(i){Ai(e,t,i,n)},get _(){return ce(e,t,r)}});import{j as g,u as kc,c as Yn,d as Dn}from"./query-B6BuIB0M.js";import{e as OE,f as Qz,g as bE,r as _,R as ue,h as No,t as y1,c as Pz,i as Nz,j as jt,N as yE,b as Rz,a as Mz,B as Lz}from"./vendor-DJo4KD8w.js";import{i as Dz,a as zz,u as qz}from"./i18n-BbpF47i1.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var hO={exports:{}},Du={},mO={exports:{}},pO={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* scheduler.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var S1;function Iz(){return S1||(S1=1,(function(e){function t(I,L){var $=I.length;I.push(L);e:for(;0<$;){var ne=$-1>>>1,z=I[ne];if(0<i(z,L))I[ne]=L,I[$]=z,$=ne;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var L=I[0],$=I.pop();if($!==L){I[0]=$;e:for(var ne=0,z=I.length,G=z>>>1;ne<G;){var re=2*(ne+1)-1,R=I[re],me=re+1,Se=I[me];if(0>i(R,$))me<z&&0>i(Se,R)?(I[ne]=Se,I[me]=$,ne=me):(I[ne]=R,I[re]=$,ne=re);else if(me<z&&0>i(Se,$))I[ne]=Se,I[me]=$,ne=me;else break e}}return L}function i(I,L){var $=I.sortIndex-L.sortIndex;return $!==0?$:I.id-L.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],f=1,m=null,p=3,O=!1,b=!1,S=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function E(I){for(var L=n(d);L!==null;){if(L.callback===null)r(d);else if(L.startTime<=I)r(d),L.sortIndex=L.expirationTime,t(c,L);else break;L=n(d)}}function Q(I){if(S=!1,E(I),!b)if(n(c)!==null)b=!0,A||(A=!0,Z());else{var L=n(d);L!==null&&H(Q,L.startTime-I)}}var A=!1,N=-1,D=5,q=-1;function P(){return w?!0:!(e.unstable_now()-q<D)}function V(){if(w=!1,A){var I=e.unstable_now();q=I;var L=!0;try{e:{b=!1,S&&(S=!1,j(N),N=-1),O=!0;var $=p;try{t:{for(E(I),m=n(c);m!==null&&!(m.expirationTime>I&&P());){var ne=m.callback;if(typeof ne=="function"){m.callback=null,p=m.priorityLevel;var z=ne(m.expirationTime<=I);if(I=e.unstable_now(),typeof z=="function"){m.callback=z,E(I),L=!0;break t}m===n(c)&&r(c),E(I)}else r(c);m=n(c)}if(m!==null)L=!0;else{var G=n(d);G!==null&&H(Q,G.startTime-I),L=!1}}break e}finally{m=null,p=$,O=!1}L=void 0}}finally{L?Z():A=!1}}}var Z;if(typeof T=="function")Z=function(){T(V)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,X=Y.port2;Y.port1.onmessage=V,Z=function(){X.postMessage(null)}}else Z=function(){k(V,0)};function H(I,L){N=k(function(){I(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(I){switch(p){case 1:case 2:case 3:var L=3;break;default:L=p}var $=p;p=L;try{return I()}finally{p=$}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(I,L){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var $=p;p=I;try{return L()}finally{p=$}},e.unstable_scheduleCallback=function(I,L,$){var ne=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?ne+$:ne):$=ne,I){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=$+z,I={id:f++,callback:L,priorityLevel:I,startTime:$,expirationTime:z,sortIndex:-1},$>ne?(I.sortIndex=$,t(d,I),n(c)===null&&I===n(d)&&(S?(j(N),N=-1):S=!0,H(Q,$-ne))):(I.sortIndex=z,t(c,I),b||O||(b=!0,A||(A=!0,Z()))),I},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(I){var L=p;return function(){var $=p;p=L;try{return I.apply(this,arguments)}finally{p=$}}}})(pO)),pO}var x1;function Xz(){return x1||(x1=1,mO.exports=Iz()),mO.exports}/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-dom-client.production.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var _1;function Zz(){if(_1)return Du;_1=1;var e=Xz(),t=OE(),n=Qz();function r(o){var u="https://react.dev/errors/"+o;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+o+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function a(o){var u=o,h=o;if(o.alternate)for(;u.return;)u=u.return;else{o=u;do u=o,(u.flags&4098)!==0&&(h=u.return),o=u.return;while(o)}return u.tag===3?h:null}function s(o){if(o.tag===13){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function l(o){if(o.tag===31){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function c(o){if(a(o)!==o)throw Error(r(188))}function d(o){var u=o.alternate;if(!u){if(u=a(o),u===null)throw Error(r(188));return u!==o?null:o}for(var h=o,v=u;;){var y=h.return;if(y===null)break;var x=y.alternate;if(x===null){if(v=y.return,v!==null){h=v;continue}break}if(y.child===x.child){for(x=y.child;x;){if(x===h)return c(y),o;if(x===v)return c(y),u;x=x.sibling}throw Error(r(188))}if(h.return!==v.return)h=y,v=x;else{for(var C=!1,M=y.child;M;){if(M===h){C=!0,h=y,v=x;break}if(M===v){C=!0,v=y,h=x;break}M=M.sibling}if(!C){for(M=x.child;M;){if(M===h){C=!0,h=x,v=y;break}if(M===v){C=!0,v=x,h=y;break}M=M.sibling}if(!C)throw Error(r(189))}}if(h.alternate!==v)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?o:u}function f(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o;for(o=o.child;o!==null;){if(u=f(o),u!==null)return u;o=o.sibling}return null}var m=Object.assign,p=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),T=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function Z(o){return o===null||typeof o!="object"?null:(o=V&&o[V]||o["@@iterator"],typeof o=="function"?o:null)}var Y=Symbol.for("react.client.reference");function X(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===Y?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case S:return"Fragment";case k:return"Profiler";case w:return"StrictMode";case Q:return"Suspense";case A:return"SuspenseList";case q:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case b:return"Portal";case T:return o.displayName||"Context";case j:return(o._context.displayName||"Context")+".Consumer";case E:var u=o.render;return o=o.displayName,o||(o=u.displayName||u.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case N:return u=o.displayName||null,u!==null?u:X(o.type)||"Memo";case D:u=o._payload,o=o._init;try{return X(o(u))}catch{}}return null}var H=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},ne=[],z=-1;function G(o){return{current:o}}function re(o){0>z||(o.current=ne[z],ne[z]=null,z--)}function R(o,u){z++,ne[z]=o.current,o.current=u}var me=G(null),Se=G(null),ve=G(null),Xe=G(null);function qe(o,u){switch(R(ve,u),R(Se,o),R(me,null),u.nodeType){case 9:case 11:o=(o=u.documentElement)&&(o=o.namespaceURI)?Xk(o):0;break;default:if(o=u.tagName,u=u.namespaceURI)u=Xk(u),o=Zk(u,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}re(me),R(me,o)}function Pe(){re(me),re(Se),re(ve)}function Oe(o){o.memoizedState!==null&&R(Xe,o);var u=me.current,h=Zk(u,o.type);u!==h&&(R(Se,o),R(me,h))}function Ve(o){Se.current===o&&(re(me),re(Se)),Xe.current===o&&(re(Xe),Nu._currentValue=$)}var we,Ze;function Fe(o){if(we===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);we=u&&u[1]||"",Ze=-1<h.stack.indexOf(`
|
|
19
|
+
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
20
|
+
`+we+o+Ze}var ft=!1;function Rt(o,u){if(!o||ft)return"";ft=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(u){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(ie){var te=ie}Reflect.construct(o,[],le)}else{try{le.call()}catch(ie){te=ie}o.call(le.prototype)}}else{try{throw Error()}catch(ie){te=ie}(le=o())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(ie){if(ie&&te&&typeof ie.stack=="string")return[ie.stack,te.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=v.DetermineComponentFrameRoot(),C=x[0],M=x[1];if(C&&M){var F=C.split(`
|
|
21
|
+
`),ee=M.split(`
|
|
22
|
+
`);for(y=v=0;v<F.length&&!F[v].includes("DetermineComponentFrameRoot");)v++;for(;y<ee.length&&!ee[y].includes("DetermineComponentFrameRoot");)y++;if(v===F.length||y===ee.length)for(v=F.length-1,y=ee.length-1;1<=v&&0<=y&&F[v]!==ee[y];)y--;for(;1<=v&&0<=y;v--,y--)if(F[v]!==ee[y]){if(v!==1||y!==1)do if(v--,y--,0>y||F[v]!==ee[y]){var se=`
|
|
23
|
+
`+F[v].replace(" at new "," at ");return o.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",o.displayName)),se}while(1<=v&&0<=y);break}}}finally{ft=!1,Error.prepareStackTrace=h}return(h=o?o.displayName||o.name:"")?Fe(h):""}function mn(o,u){switch(o.tag){case 26:case 27:case 5:return Fe(o.type);case 16:return Fe("Lazy");case 13:return o.child!==u&&u!==null?Fe("Suspense Fallback"):Fe("Suspense");case 19:return Fe("SuspenseList");case 0:case 15:return Rt(o.type,!1);case 11:return Rt(o.type.render,!1);case 1:return Rt(o.type,!0);case 31:return Fe("Activity");default:return""}}function ke(o){try{var u="",h=null;do u+=mn(o,h),h=o,o=o.return;while(o);return u}catch(v){return`
|
|
24
|
+
Error generating stack: `+v.message+`
|
|
25
|
+
`+v.stack}}var de=Object.prototype.hasOwnProperty,Ue=e.unstable_scheduleCallback,ht=e.unstable_cancelCallback,Tt=e.unstable_shouldYield,Ot=e.unstable_requestPaint,bt=e.unstable_now,Si=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,fe=e.unstable_UserBlockingPriority,je=e.unstable_NormalPriority,Be=e.unstable_LowPriority,Je=e.unstable_IdlePriority,Ct=e.log,un=e.unstable_setDisableYieldValue,Ht=null,Mt=null;function Gt(o){if(typeof Ct=="function"&&un(o),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(Ht,o)}catch{}}var rt=Math.clz32?Math.clz32:ba,Wn=Math.log,pn=Math.LN2;function ba(o){return o>>>=0,o===0?32:31-(Wn(o)/pn|0)|0}var $r=256,Wr=262144,Lt=4194304;function Dt(o){var u=o&42;if(u!==0)return u;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Kt(o,u,h){var v=o.pendingLanes;if(v===0)return 0;var y=0,x=o.suspendedLanes,C=o.pingedLanes;o=o.warmLanes;var M=v&134217727;return M!==0?(v=M&~x,v!==0?y=Dt(v):(C&=M,C!==0?y=Dt(C):h||(h=M&~o,h!==0&&(y=Dt(h))))):(M=v&~x,M!==0?y=Dt(M):C!==0?y=Dt(C):h||(h=v&~o,h!==0&&(y=Dt(h)))),y===0?0:u!==0&&u!==y&&(u&x)===0&&(x=y&-y,h=u&-u,x>=h||x===32&&(h&4194048)!==0)?u:y}function gn(o,u){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&u)===0}function vn(o,u){switch(o){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rn(){var o=Lt;return Lt<<=1,(Lt&62914560)===0&&(Lt=4194304),o}function On(o){for(var u=[],h=0;31>h;h++)u.push(o);return u}function Pn(o,u){o.pendingLanes|=u,u!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Yt(o,u,h,v,y,x){var C=o.pendingLanes;o.pendingLanes=h,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=h,o.entangledLanes&=h,o.errorRecoveryDisabledLanes&=h,o.shellSuspendCounter=0;var M=o.entanglements,F=o.expirationTimes,ee=o.hiddenUpdates;for(h=C&~h;0<h;){var se=31-rt(h),le=1<<se;M[se]=0,F[se]=-1;var te=ee[se];if(te!==null)for(ee[se]=null,se=0;se<te.length;se++){var ie=te[se];ie!==null&&(ie.lane&=-536870913)}h&=~le}v!==0&&Nn(o,v,0),x!==0&&y===0&&o.tag!==0&&(o.suspendedLanes|=x&~(C&~u))}function Nn(o,u,h){o.pendingLanes|=u,o.suspendedLanes&=~u;var v=31-rt(u);o.entangledLanes|=u,o.entanglements[v]=o.entanglements[v]|1073741824|h&261930}function bn(o,u){var h=o.entangledLanes|=u;for(o=o.entanglements;h;){var v=31-rt(h),y=1<<v;y&u|o[v]&u&&(o[v]|=u),h&=~y}}function Rn(o,u){var h=u&-u;return h=(h&42)!==0?1:yn(h),(h&(o.suspendedLanes|u))!==0?0:h}function yn(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function or(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function Xn(){var o=L.p;return o!==0?o:(o=window.event,o===void 0?32:d1(o.type))}function lr(o,u){var h=L.p;try{return L.p=o,u()}finally{L.p=h}}var Mn=Math.random().toString(36).slice(2),tn="__reactFiber$"+Mn,Sn="__reactProps$"+Mn,Hr="__reactContainer$"+Mn,ya="__reactEvents$"+Mn,Re="__reactListeners$"+Mn,it="__reactHandles$"+Mn,cr="__reactResources$"+Mn,Hn="__reactMarker$"+Mn;function Sa(o){delete o[tn],delete o[Sn],delete o[ya],delete o[Re],delete o[it]}function Gr(o){var u=o[tn];if(u)return u;for(var h=o.parentNode;h;){if(u=h[Hr]||h[tn]){if(h=u.alternate,u.child!==null||h!==null&&h.child!==null)for(o=Wk(o);o!==null;){if(h=o[tn])return h;o=Wk(o)}return u}o=h,h=o.parentNode}return null}function Bi(o){if(o=o[tn]||o[Hr]){var u=o.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return o}return null}function xa(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o.stateNode;throw Error(r(33))}function Vi(o){var u=o[cr];return u||(u=o[cr]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function an(o){o[Hn]=!0}var al=new Set,sl={};function xi(o,u){Ui(o,u),Ui(o+"Capture",u)}function Ui(o,u){for(sl[o]=u,o=0;o<u.length;o++)al.add(u[o])}var Zc=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),jf={},Tf={};function cg(o){return de.call(Tf,o)?!0:de.call(jf,o)?!1:Zc.test(o)?Tf[o]=!0:(jf[o]=!0,!1)}function ol(o,u,h){if(cg(u))if(h===null)o.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":o.removeAttribute(u);return;case"boolean":var v=u.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){o.removeAttribute(u);return}}o.setAttribute(u,""+h)}}function ll(o,u,h){if(h===null)o.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttribute(u,""+h)}}function _i(o,u,h,v){if(v===null)o.removeAttribute(h);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(h);return}o.setAttributeNS(u,h,""+v)}}function vr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Cf(o){var u=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function ug(o,u,h){var v=Object.getOwnPropertyDescriptor(o.constructor.prototype,u);if(!o.hasOwnProperty(u)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var y=v.get,x=v.set;return Object.defineProperty(o,u,{configurable:!0,get:function(){return y.call(this)},set:function(C){h=""+C,x.call(this,C)}}),Object.defineProperty(o,u,{enumerable:v.enumerable}),{getValue:function(){return h},setValue:function(C){h=""+C},stopTracking:function(){o._valueTracker=null,delete o[u]}}}}function Bc(o){if(!o._valueTracker){var u=Cf(o)?"checked":"value";o._valueTracker=ug(o,u,""+o[u])}}function Ef(o){if(!o)return!1;var u=o._valueTracker;if(!u)return!0;var h=u.getValue(),v="";return o&&(v=Cf(o)?o.checked?"true":"false":o.value),o=v,o!==h?(u.setValue(o),!0):!1}function cl(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var dg=/[\n"\\]/g;function Or(o){return o.replace(dg,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Vc(o,u,h,v,y,x,C,M){o.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?o.type=C:o.removeAttribute("type"),u!=null?C==="number"?(u===0&&o.value===""||o.value!=u)&&(o.value=""+vr(u)):o.value!==""+vr(u)&&(o.value=""+vr(u)):C!=="submit"&&C!=="reset"||o.removeAttribute("value"),u!=null?Uc(o,C,vr(u)):h!=null?Uc(o,C,vr(h)):v!=null&&o.removeAttribute("value"),y==null&&x!=null&&(o.defaultChecked=!!x),y!=null&&(o.checked=y&&typeof y!="function"&&typeof y!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?o.name=""+vr(M):o.removeAttribute("name")}function Af(o,u,h,v,y,x,C,M){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(o.type=x),u!=null||h!=null){if(!(x!=="submit"&&x!=="reset"||u!=null)){Bc(o);return}h=h!=null?""+vr(h):"",u=u!=null?""+vr(u):h,M||u===o.value||(o.value=u),o.defaultValue=u}v=v??y,v=typeof v!="function"&&typeof v!="symbol"&&!!v,o.checked=M?o.checked:!!v,o.defaultChecked=!!v,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(o.name=C),Bc(o)}function Uc(o,u,h){u==="number"&&cl(o.ownerDocument)===o||o.defaultValue===""+h||(o.defaultValue=""+h)}function ns(o,u,h,v){if(o=o.options,u){u={};for(var y=0;y<h.length;y++)u["$"+h[y]]=!0;for(h=0;h<o.length;h++)y=u.hasOwnProperty("$"+o[h].value),o[h].selected!==y&&(o[h].selected=y),y&&v&&(o[h].defaultSelected=!0)}else{for(h=""+vr(h),u=null,y=0;y<o.length;y++){if(o[y].value===h){o[y].selected=!0,v&&(o[y].defaultSelected=!0);return}u!==null||o[y].disabled||(u=o[y])}u!==null&&(u.selected=!0)}}function Qf(o,u,h){if(u!=null&&(u=""+vr(u),u!==o.value&&(o.value=u),h==null)){o.defaultValue!==u&&(o.defaultValue=u);return}o.defaultValue=h!=null?""+vr(h):""}function Pf(o,u,h,v){if(u==null){if(v!=null){if(h!=null)throw Error(r(92));if(H(v)){if(1<v.length)throw Error(r(93));v=v[0]}h=v}h==null&&(h=""),u=h}h=vr(u),o.defaultValue=h,v=o.textContent,v===h&&v!==""&&v!==null&&(o.value=v),Bc(o)}function rs(o,u){if(u){var h=o.firstChild;if(h&&h===o.lastChild&&h.nodeType===3){h.nodeValue=u;return}}o.textContent=u}var fg=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Nf(o,u,h){var v=u.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?v?o.setProperty(u,""):u==="float"?o.cssFloat="":o[u]="":v?o.setProperty(u,h):typeof h!="number"||h===0||fg.has(u)?u==="float"?o.cssFloat=h:o[u]=(""+h).trim():o[u]=h+"px"}function Rf(o,u,h){if(u!=null&&typeof u!="object")throw Error(r(62));if(o=o.style,h!=null){for(var v in h)!h.hasOwnProperty(v)||u!=null&&u.hasOwnProperty(v)||(v.indexOf("--")===0?o.setProperty(v,""):v==="float"?o.cssFloat="":o[v]="");for(var y in u)v=u[y],u.hasOwnProperty(y)&&h[y]!==v&&Nf(o,y,v)}else for(var x in u)u.hasOwnProperty(x)&&Nf(o,x,u[x])}function Yc(o){if(o.indexOf("-")===-1)return!1;switch(o){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 hg=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),mg=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ul(o){return mg.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function wi(){}var Fc=null;function $c(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var is=null,as=null;function Mf(o){var u=Bi(o);if(u&&(o=u.stateNode)){var h=o[Sn]||null;e:switch(o=u.stateNode,u.type){case"input":if(Vc(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),u=h.name,h.type==="radio"&&u!=null){for(h=o;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+Or(""+u)+'"][type="radio"]'),u=0;u<h.length;u++){var v=h[u];if(v!==o&&v.form===o.form){var y=v[Sn]||null;if(!y)throw Error(r(90));Vc(v,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(u=0;u<h.length;u++)v=h[u],v.form===o.form&&Ef(v)}break e;case"textarea":Qf(o,h.value,h.defaultValue);break e;case"select":u=h.value,u!=null&&ns(o,!!h.multiple,u,!1)}}}var Wc=!1;function Lf(o,u,h){if(Wc)return o(u,h);Wc=!0;try{var v=o(u);return v}finally{if(Wc=!1,(is!==null||as!==null)&&(yh(),is&&(u=is,o=as,as=is=null,Mf(u),o)))for(u=0;u<o.length;u++)Mf(o[u])}}function io(o,u){var h=o.stateNode;if(h===null)return null;var v=h[Sn]||null;if(v===null)return null;h=v[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(o=o.type,v=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!v;break e;default:o=!1}if(o)return null;if(h&&typeof h!="function")throw Error(r(231,u,typeof h));return h}var ki=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hc=!1;if(ki)try{var ao={};Object.defineProperty(ao,"passive",{get:function(){Hc=!0}}),window.addEventListener("test",ao,ao),window.removeEventListener("test",ao,ao)}catch{Hc=!1}var Yi=null,Gc=null,dl=null;function Df(){if(dl)return dl;var o,u=Gc,h=u.length,v,y="value"in Yi?Yi.value:Yi.textContent,x=y.length;for(o=0;o<h&&u[o]===y[o];o++);var C=h-o;for(v=1;v<=C&&u[h-v]===y[x-v];v++);return dl=y.slice(o,1<v?1-v:void 0)}function fl(o){var u=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&u===13&&(o=13)):o=u,o===10&&(o=13),32<=o||o===13?o:0}function hl(){return!0}function zf(){return!1}function Gn(o){function u(h,v,y,x,C){this._reactName=h,this._targetInst=y,this.type=v,this.nativeEvent=x,this.target=C,this.currentTarget=null;for(var M in o)o.hasOwnProperty(M)&&(h=o[M],this[M]=h?h(x):x[M]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?hl:zf,this.isPropagationStopped=zf,this}return m(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=hl)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=hl)},persist:function(){},isPersistent:hl}),u}var _a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ml=Gn(_a),so=m({},_a,{view:0,detail:0}),pg=Gn(so),Kc,Jc,oo,pl=m({},so,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vg,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==oo&&(oo&&o.type==="mousemove"?(Kc=o.screenX-oo.screenX,Jc=o.screenY-oo.screenY):Jc=Kc=0,oo=o),Kc)},movementY:function(o){return"movementY"in o?o.movementY:Jc}}),wa=Gn(pl),ss=m({},pl,{dataTransfer:0}),ji=Gn(ss),ka=m({},so,{relatedTarget:0}),gg=Gn(ka),QD=m({},_a,{animationName:0,elapsedTime:0,pseudoElement:0}),PD=Gn(QD),ND=m({},_a,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),RD=Gn(ND),MD=m({},_a,{data:0}),Ux=Gn(MD),LD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DD={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"},zD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qD(o){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(o):(o=zD[o])?!!u[o]:!1}function vg(){return qD}var ID=m({},so,{key:function(o){if(o.key){var u=LD[o.key]||o.key;if(u!=="Unidentified")return u}return o.type==="keypress"?(o=fl(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?DD[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vg,charCode:function(o){return o.type==="keypress"?fl(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?fl(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),XD=Gn(ID),ZD=m({},pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yx=Gn(ZD),BD=m({},so,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vg}),VD=Gn(BD),UD=m({},_a,{propertyName:0,elapsedTime:0,pseudoElement:0}),YD=Gn(UD),FD=m({},pl,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),$D=Gn(FD),WD=m({},_a,{newState:0,oldState:0}),HD=Gn(WD),GD=[9,13,27,32],Og=ki&&"CompositionEvent"in window,eu=null;ki&&"documentMode"in document&&(eu=document.documentMode);var KD=ki&&"TextEvent"in window&&!eu,Fx=ki&&(!Og||eu&&8<eu&&11>=eu),$x=" ",Wx=!1;function Hx(o,u){switch(o){case"keyup":return GD.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gx(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var gl=!1;function JD(o,u){switch(o){case"compositionend":return Gx(u);case"keypress":return u.which!==32?null:(Wx=!0,$x);case"textInput":return o=u.data,o===$x&&Wx?null:o;default:return null}}function e3(o,u){if(gl)return o==="compositionend"||!Og&&Hx(o,u)?(o=Df(),dl=Gc=Yi=null,gl=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return Fx&&u.locale!=="ko"?null:u.data;default:return null}}var t3={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 Kx(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u==="input"?!!t3[o.type]:u==="textarea"}function Jx(o,u,h,v){is?as?as.push(v):as=[v]:is=v,u=Th(u,"onChange"),0<u.length&&(h=new ml("onChange","change",null,h,v),o.push({event:h,listeners:u}))}var tu=null,nu=null;function n3(o){Mk(o,0)}function qf(o){var u=xa(o);if(Ef(u))return o}function e_(o,u){if(o==="change")return u}var t_=!1;if(ki){var bg;if(ki){var yg="oninput"in document;if(!yg){var n_=document.createElement("div");n_.setAttribute("oninput","return;"),yg=typeof n_.oninput=="function"}bg=yg}else bg=!1;t_=bg&&(!document.documentMode||9<document.documentMode)}function r_(){tu&&(tu.detachEvent("onpropertychange",i_),nu=tu=null)}function i_(o){if(o.propertyName==="value"&&qf(nu)){var u=[];Jx(u,nu,o,$c(o)),Lf(n3,u)}}function r3(o,u,h){o==="focusin"?(r_(),tu=u,nu=h,tu.attachEvent("onpropertychange",i_)):o==="focusout"&&r_()}function i3(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return qf(nu)}function a3(o,u){if(o==="click")return qf(u)}function s3(o,u){if(o==="input"||o==="change")return qf(u)}function o3(o,u){return o===u&&(o!==0||1/o===1/u)||o!==o&&u!==u}var Pr=typeof Object.is=="function"?Object.is:o3;function ru(o,u){if(Pr(o,u))return!0;if(typeof o!="object"||o===null||typeof u!="object"||u===null)return!1;var h=Object.keys(o),v=Object.keys(u);if(h.length!==v.length)return!1;for(v=0;v<h.length;v++){var y=h[v];if(!de.call(u,y)||!Pr(o[y],u[y]))return!1}return!0}function a_(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function s_(o,u){var h=a_(o);o=0;for(var v;h;){if(h.nodeType===3){if(v=o+h.textContent.length,o<=u&&v>=u)return{node:h,offset:u-o};o=v}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=a_(h)}}function o_(o,u){return o&&u?o===u?!0:o&&o.nodeType===3?!1:u&&u.nodeType===3?o_(o,u.parentNode):"contains"in o?o.contains(u):o.compareDocumentPosition?!!(o.compareDocumentPosition(u)&16):!1:!1}function l_(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var u=cl(o.document);u instanceof o.HTMLIFrameElement;){try{var h=typeof u.contentWindow.location.href=="string"}catch{h=!1}if(h)o=u.contentWindow;else break;u=cl(o.document)}return u}function Sg(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u&&(u==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||u==="textarea"||o.contentEditable==="true")}var l3=ki&&"documentMode"in document&&11>=document.documentMode,vl=null,xg=null,iu=null,_g=!1;function c_(o,u,h){var v=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;_g||vl==null||vl!==cl(v)||(v=vl,"selectionStart"in v&&Sg(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),iu&&ru(iu,v)||(iu=v,v=Th(xg,"onSelect"),0<v.length&&(u=new ml("onSelect","select",null,u,h),o.push({event:u,listeners:v}),u.target=vl)))}function lo(o,u){var h={};return h[o.toLowerCase()]=u.toLowerCase(),h["Webkit"+o]="webkit"+u,h["Moz"+o]="moz"+u,h}var Ol={animationend:lo("Animation","AnimationEnd"),animationiteration:lo("Animation","AnimationIteration"),animationstart:lo("Animation","AnimationStart"),transitionrun:lo("Transition","TransitionRun"),transitionstart:lo("Transition","TransitionStart"),transitioncancel:lo("Transition","TransitionCancel"),transitionend:lo("Transition","TransitionEnd")},wg={},u_={};ki&&(u_=document.createElement("div").style,"AnimationEvent"in window||(delete Ol.animationend.animation,delete Ol.animationiteration.animation,delete Ol.animationstart.animation),"TransitionEvent"in window||delete Ol.transitionend.transition);function co(o){if(wg[o])return wg[o];if(!Ol[o])return o;var u=Ol[o],h;for(h in u)if(u.hasOwnProperty(h)&&h in u_)return wg[o]=u[h];return o}var d_=co("animationend"),f_=co("animationiteration"),h_=co("animationstart"),c3=co("transitionrun"),u3=co("transitionstart"),d3=co("transitioncancel"),m_=co("transitionend"),p_=new Map,kg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");kg.push("scrollEnd");function Ti(o,u){p_.set(o,u),xi(u,[o])}var If=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Kr=[],bl=0,jg=0;function Xf(){for(var o=bl,u=jg=bl=0;u<o;){var h=Kr[u];Kr[u++]=null;var v=Kr[u];Kr[u++]=null;var y=Kr[u];Kr[u++]=null;var x=Kr[u];if(Kr[u++]=null,v!==null&&y!==null){var C=v.pending;C===null?y.next=y:(y.next=C.next,C.next=y),v.pending=y}x!==0&&g_(h,y,x)}}function Zf(o,u,h,v){Kr[bl++]=o,Kr[bl++]=u,Kr[bl++]=h,Kr[bl++]=v,jg|=v,o.lanes|=v,o=o.alternate,o!==null&&(o.lanes|=v)}function Tg(o,u,h,v){return Zf(o,u,h,v),Bf(o)}function uo(o,u){return Zf(o,null,null,u),Bf(o)}function g_(o,u,h){o.lanes|=h;var v=o.alternate;v!==null&&(v.lanes|=h);for(var y=!1,x=o.return;x!==null;)x.childLanes|=h,v=x.alternate,v!==null&&(v.childLanes|=h),x.tag===22&&(o=x.stateNode,o===null||o._visibility&1||(y=!0)),o=x,x=x.return;return o.tag===3?(x=o.stateNode,y&&u!==null&&(y=31-rt(h),o=x.hiddenUpdates,v=o[y],v===null?o[y]=[u]:v.push(u),u.lane=h|536870912),x):null}function Bf(o){if(50<ju)throw ju=0,Lv=null,Error(r(185));for(var u=o.return;u!==null;)o=u,u=o.return;return o.tag===3?o.stateNode:null}var yl={};function f3(o,u,h,v){this.tag=o,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nr(o,u,h,v){return new f3(o,u,h,v)}function Cg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function ja(o,u){var h=o.alternate;return h===null?(h=Nr(o.tag,u,o.key,o.mode),h.elementType=o.elementType,h.type=o.type,h.stateNode=o.stateNode,h.alternate=o,o.alternate=h):(h.pendingProps=u,h.type=o.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=o.flags&65011712,h.childLanes=o.childLanes,h.lanes=o.lanes,h.child=o.child,h.memoizedProps=o.memoizedProps,h.memoizedState=o.memoizedState,h.updateQueue=o.updateQueue,u=o.dependencies,h.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},h.sibling=o.sibling,h.index=o.index,h.ref=o.ref,h.refCleanup=o.refCleanup,h}function v_(o,u){o.flags&=65011714;var h=o.alternate;return h===null?(o.childLanes=0,o.lanes=u,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=h.childLanes,o.lanes=h.lanes,o.child=h.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=h.memoizedProps,o.memoizedState=h.memoizedState,o.updateQueue=h.updateQueue,o.type=h.type,u=h.dependencies,o.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),o}function Vf(o,u,h,v,y,x){var C=0;if(v=o,typeof o=="function")Cg(o)&&(C=1);else if(typeof o=="string")C=vz(o,h,me.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case q:return o=Nr(31,h,u,y),o.elementType=q,o.lanes=x,o;case S:return fo(h.children,y,x,u);case w:C=8,y|=24;break;case k:return o=Nr(12,h,u,y|2),o.elementType=k,o.lanes=x,o;case Q:return o=Nr(13,h,u,y),o.elementType=Q,o.lanes=x,o;case A:return o=Nr(19,h,u,y),o.elementType=A,o.lanes=x,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case T:C=10;break e;case j:C=9;break e;case E:C=11;break e;case N:C=14;break e;case D:C=16,v=null;break e}C=29,h=Error(r(130,o===null?"null":typeof o,"")),v=null}return u=Nr(C,h,u,y),u.elementType=o,u.type=v,u.lanes=x,u}function fo(o,u,h,v){return o=Nr(7,o,v,u),o.lanes=h,o}function Eg(o,u,h){return o=Nr(6,o,null,u),o.lanes=h,o}function O_(o){var u=Nr(18,null,null,0);return u.stateNode=o,u}function Ag(o,u,h){return u=Nr(4,o.children!==null?o.children:[],o.key,u),u.lanes=h,u.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},u}var b_=new WeakMap;function Jr(o,u){if(typeof o=="object"&&o!==null){var h=b_.get(o);return h!==void 0?h:(u={value:o,source:u,stack:ke(u)},b_.set(o,u),u)}return{value:o,source:u,stack:ke(u)}}var Sl=[],xl=0,Uf=null,au=0,ei=[],ti=0,os=null,Fi=1,$i="";function Ta(o,u){Sl[xl++]=au,Sl[xl++]=Uf,Uf=o,au=u}function y_(o,u,h){ei[ti++]=Fi,ei[ti++]=$i,ei[ti++]=os,os=o;var v=Fi;o=$i;var y=32-rt(v)-1;v&=~(1<<y),h+=1;var x=32-rt(u)+y;if(30<x){var C=y-y%5;x=(v&(1<<C)-1).toString(32),v>>=C,y-=C,Fi=1<<32-rt(u)+y|h<<y|v,$i=x+o}else Fi=1<<x|h<<y|v,$i=o}function Qg(o){o.return!==null&&(Ta(o,1),y_(o,1,0))}function Pg(o){for(;o===Uf;)Uf=Sl[--xl],Sl[xl]=null,au=Sl[--xl],Sl[xl]=null;for(;o===os;)os=ei[--ti],ei[ti]=null,$i=ei[--ti],ei[ti]=null,Fi=ei[--ti],ei[ti]=null}function S_(o,u){ei[ti++]=Fi,ei[ti++]=$i,ei[ti++]=os,Fi=u.id,$i=u.overflow,os=o}var Zn=null,Ft=null,ot=!1,ls=null,ni=!1,Ng=Error(r(519));function cs(o){var u=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw su(Jr(u,o)),Ng}function x_(o){var u=o.stateNode,h=o.type,v=o.memoizedProps;switch(u[tn]=o,u[Sn]=v,h){case"dialog":tt("cancel",u),tt("close",u);break;case"iframe":case"object":case"embed":tt("load",u);break;case"video":case"audio":for(h=0;h<Cu.length;h++)tt(Cu[h],u);break;case"source":tt("error",u);break;case"img":case"image":case"link":tt("error",u),tt("load",u);break;case"details":tt("toggle",u);break;case"input":tt("invalid",u),Af(u,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":tt("invalid",u);break;case"textarea":tt("invalid",u),Pf(u,v.value,v.defaultValue,v.children)}h=v.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||u.textContent===""+h||v.suppressHydrationWarning===!0||qk(u.textContent,h)?(v.popover!=null&&(tt("beforetoggle",u),tt("toggle",u)),v.onScroll!=null&&tt("scroll",u),v.onScrollEnd!=null&&tt("scrollend",u),v.onClick!=null&&(u.onclick=wi),u=!0):u=!1,u||cs(o,!0)}function __(o){for(Zn=o.return;Zn;)switch(Zn.tag){case 5:case 31:case 13:ni=!1;return;case 27:case 3:ni=!0;return;default:Zn=Zn.return}}function _l(o){if(o!==Zn)return!1;if(!ot)return __(o),ot=!0,!1;var u=o.tag,h;if((h=u!==3&&u!==27)&&((h=u===5)&&(h=o.type,h=!(h!=="form"&&h!=="button")||Gv(o.type,o.memoizedProps)),h=!h),h&&Ft&&cs(o),__(o),u===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Ft=$k(o)}else if(u===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Ft=$k(o)}else u===27?(u=Ft,_s(o.type)?(o=nO,nO=null,Ft=o):Ft=u):Ft=Zn?ii(o.stateNode.nextSibling):null;return!0}function ho(){Ft=Zn=null,ot=!1}function Rg(){var o=ls;return o!==null&&(xr===null?xr=o:xr.push.apply(xr,o),ls=null),o}function su(o){ls===null?ls=[o]:ls.push(o)}var Mg=G(null),mo=null,Ca=null;function us(o,u,h){R(Mg,u._currentValue),u._currentValue=h}function Ea(o){o._currentValue=Mg.current,re(Mg)}function Lg(o,u,h){for(;o!==null;){var v=o.alternate;if((o.childLanes&u)!==u?(o.childLanes|=u,v!==null&&(v.childLanes|=u)):v!==null&&(v.childLanes&u)!==u&&(v.childLanes|=u),o===h)break;o=o.return}}function Dg(o,u,h,v){var y=o.child;for(y!==null&&(y.return=o);y!==null;){var x=y.dependencies;if(x!==null){var C=y.child;x=x.firstContext;e:for(;x!==null;){var M=x;x=y;for(var F=0;F<u.length;F++)if(M.context===u[F]){x.lanes|=h,M=x.alternate,M!==null&&(M.lanes|=h),Lg(x.return,h,o),v||(C=null);break e}x=M.next}}else if(y.tag===18){if(C=y.return,C===null)throw Error(r(341));C.lanes|=h,x=C.alternate,x!==null&&(x.lanes|=h),Lg(C,h,o),C=null}else C=y.child;if(C!==null)C.return=y;else for(C=y;C!==null;){if(C===o){C=null;break}if(y=C.sibling,y!==null){y.return=C.return,C=y;break}C=C.return}y=C}}function wl(o,u,h,v){o=null;for(var y=u,x=!1;y!==null;){if(!x){if((y.flags&524288)!==0)x=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var C=y.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var M=y.type;Pr(y.pendingProps.value,C.value)||(o!==null?o.push(M):o=[M])}}else if(y===Xe.current){if(C=y.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(o!==null?o.push(Nu):o=[Nu])}y=y.return}o!==null&&Dg(u,o,h,v),u.flags|=262144}function Yf(o){for(o=o.firstContext;o!==null;){if(!Pr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function po(o){mo=o,Ca=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Bn(o){return w_(mo,o)}function Ff(o,u){return mo===null&&po(o),w_(o,u)}function w_(o,u){var h=u._currentValue;if(u={context:u,memoizedValue:h,next:null},Ca===null){if(o===null)throw Error(r(308));Ca=u,o.dependencies={lanes:0,firstContext:u},o.flags|=524288}else Ca=Ca.next=u;return h}var h3=typeof AbortController<"u"?AbortController:function(){var o=[],u=this.signal={aborted:!1,addEventListener:function(h,v){o.push(v)}};this.abort=function(){u.aborted=!0,o.forEach(function(h){return h()})}},m3=e.unstable_scheduleCallback,p3=e.unstable_NormalPriority,xn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zg(){return{controller:new h3,data:new Map,refCount:0}}function ou(o){o.refCount--,o.refCount===0&&m3(p3,function(){o.controller.abort()})}var lu=null,qg=0,kl=0,jl=null;function g3(o,u){if(lu===null){var h=lu=[];qg=0,kl=Zv(),jl={status:"pending",value:void 0,then:function(v){h.push(v)}}}return qg++,u.then(k_,k_),u}function k_(){if(--qg===0&&lu!==null){jl!==null&&(jl.status="fulfilled");var o=lu;lu=null,kl=0,jl=null;for(var u=0;u<o.length;u++)(0,o[u])()}}function v3(o,u){var h=[],v={status:"pending",value:null,reason:null,then:function(y){h.push(y)}};return o.then(function(){v.status="fulfilled",v.value=u;for(var y=0;y<h.length;y++)(0,h[y])(u)},function(y){for(v.status="rejected",v.reason=y,y=0;y<h.length;y++)(0,h[y])(void 0)}),v}var j_=I.S;I.S=function(o,u){ck=bt(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&g3(o,u),j_!==null&&j_(o,u)};var go=G(null);function Ig(){var o=go.current;return o!==null?o:zt.pooledCache}function $f(o,u){u===null?R(go,go.current):R(go,u.pool)}function T_(){var o=Ig();return o===null?null:{parent:xn._currentValue,pool:o}}var Tl=Error(r(460)),Xg=Error(r(474)),Wf=Error(r(542)),Hf={then:function(){}};function C_(o){return o=o.status,o==="fulfilled"||o==="rejected"}function E_(o,u,h){switch(h=o[h],h===void 0?o.push(u):h!==u&&(u.then(wi,wi),u=h),u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,Q_(o),o;default:if(typeof u.status=="string")u.then(wi,wi);else{if(o=zt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=u,o.status="pending",o.then(function(v){if(u.status==="pending"){var y=u;y.status="fulfilled",y.value=v}},function(v){if(u.status==="pending"){var y=u;y.status="rejected",y.reason=v}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,Q_(o),o}throw Oo=u,Tl}}function vo(o){try{var u=o._init;return u(o._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(Oo=h,Tl):h}}var Oo=null;function A_(){if(Oo===null)throw Error(r(459));var o=Oo;return Oo=null,o}function Q_(o){if(o===Tl||o===Wf)throw Error(r(483))}var Cl=null,cu=0;function Gf(o){var u=cu;return cu+=1,Cl===null&&(Cl=[]),E_(Cl,o,u)}function uu(o,u){u=u.props.ref,o.ref=u!==void 0?u:null}function Kf(o,u){throw u.$$typeof===p?Error(r(525)):(o=Object.prototype.toString.call(u),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":o)))}function P_(o){function u(K,W){if(o){var J=K.deletions;J===null?(K.deletions=[W],K.flags|=16):J.push(W)}}function h(K,W){if(!o)return null;for(;W!==null;)u(K,W),W=W.sibling;return null}function v(K){for(var W=new Map;K!==null;)K.key!==null?W.set(K.key,K):W.set(K.index,K),K=K.sibling;return W}function y(K,W){return K=ja(K,W),K.index=0,K.sibling=null,K}function x(K,W,J){return K.index=J,o?(J=K.alternate,J!==null?(J=J.index,J<W?(K.flags|=67108866,W):J):(K.flags|=67108866,W)):(K.flags|=1048576,W)}function C(K){return o&&K.alternate===null&&(K.flags|=67108866),K}function M(K,W,J,oe){return W===null||W.tag!==6?(W=Eg(J,K.mode,oe),W.return=K,W):(W=y(W,J),W.return=K,W)}function F(K,W,J,oe){var Ne=J.type;return Ne===S?se(K,W,J.props.children,oe,J.key):W!==null&&(W.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===D&&vo(Ne)===W.type)?(W=y(W,J.props),uu(W,J),W.return=K,W):(W=Vf(J.type,J.key,J.props,null,K.mode,oe),uu(W,J),W.return=K,W)}function ee(K,W,J,oe){return W===null||W.tag!==4||W.stateNode.containerInfo!==J.containerInfo||W.stateNode.implementation!==J.implementation?(W=Ag(J,K.mode,oe),W.return=K,W):(W=y(W,J.children||[]),W.return=K,W)}function se(K,W,J,oe,Ne){return W===null||W.tag!==7?(W=fo(J,K.mode,oe,Ne),W.return=K,W):(W=y(W,J),W.return=K,W)}function le(K,W,J){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=Eg(""+W,K.mode,J),W.return=K,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case O:return J=Vf(W.type,W.key,W.props,null,K.mode,J),uu(J,W),J.return=K,J;case b:return W=Ag(W,K.mode,J),W.return=K,W;case D:return W=vo(W),le(K,W,J)}if(H(W)||Z(W))return W=fo(W,K.mode,J,null),W.return=K,W;if(typeof W.then=="function")return le(K,Gf(W),J);if(W.$$typeof===T)return le(K,Ff(K,W),J);Kf(K,W)}return null}function te(K,W,J,oe){var Ne=W!==null?W.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Ne!==null?null:M(K,W,""+J,oe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case O:return J.key===Ne?F(K,W,J,oe):null;case b:return J.key===Ne?ee(K,W,J,oe):null;case D:return J=vo(J),te(K,W,J,oe)}if(H(J)||Z(J))return Ne!==null?null:se(K,W,J,oe,null);if(typeof J.then=="function")return te(K,W,Gf(J),oe);if(J.$$typeof===T)return te(K,W,Ff(K,J),oe);Kf(K,J)}return null}function ie(K,W,J,oe,Ne){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return K=K.get(J)||null,M(W,K,""+oe,Ne);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case O:return K=K.get(oe.key===null?J:oe.key)||null,F(W,K,oe,Ne);case b:return K=K.get(oe.key===null?J:oe.key)||null,ee(W,K,oe,Ne);case D:return oe=vo(oe),ie(K,W,J,oe,Ne)}if(H(oe)||Z(oe))return K=K.get(J)||null,se(W,K,oe,Ne,null);if(typeof oe.then=="function")return ie(K,W,J,Gf(oe),Ne);if(oe.$$typeof===T)return ie(K,W,J,Ff(W,oe),Ne);Kf(W,oe)}return null}function _e(K,W,J,oe){for(var Ne=null,mt=null,Te=W,$e=W=0,st=null;Te!==null&&$e<J.length;$e++){Te.index>$e?(st=Te,Te=null):st=Te.sibling;var pt=te(K,Te,J[$e],oe);if(pt===null){Te===null&&(Te=st);break}o&&Te&&pt.alternate===null&&u(K,Te),W=x(pt,W,$e),mt===null?Ne=pt:mt.sibling=pt,mt=pt,Te=st}if($e===J.length)return h(K,Te),ot&&Ta(K,$e),Ne;if(Te===null){for(;$e<J.length;$e++)Te=le(K,J[$e],oe),Te!==null&&(W=x(Te,W,$e),mt===null?Ne=Te:mt.sibling=Te,mt=Te);return ot&&Ta(K,$e),Ne}for(Te=v(Te);$e<J.length;$e++)st=ie(Te,K,$e,J[$e],oe),st!==null&&(o&&st.alternate!==null&&Te.delete(st.key===null?$e:st.key),W=x(st,W,$e),mt===null?Ne=st:mt.sibling=st,mt=st);return o&&Te.forEach(function(Cs){return u(K,Cs)}),ot&&Ta(K,$e),Ne}function Ie(K,W,J,oe){if(J==null)throw Error(r(151));for(var Ne=null,mt=null,Te=W,$e=W=0,st=null,pt=J.next();Te!==null&&!pt.done;$e++,pt=J.next()){Te.index>$e?(st=Te,Te=null):st=Te.sibling;var Cs=te(K,Te,pt.value,oe);if(Cs===null){Te===null&&(Te=st);break}o&&Te&&Cs.alternate===null&&u(K,Te),W=x(Cs,W,$e),mt===null?Ne=Cs:mt.sibling=Cs,mt=Cs,Te=st}if(pt.done)return h(K,Te),ot&&Ta(K,$e),Ne;if(Te===null){for(;!pt.done;$e++,pt=J.next())pt=le(K,pt.value,oe),pt!==null&&(W=x(pt,W,$e),mt===null?Ne=pt:mt.sibling=pt,mt=pt);return ot&&Ta(K,$e),Ne}for(Te=v(Te);!pt.done;$e++,pt=J.next())pt=ie(Te,K,$e,pt.value,oe),pt!==null&&(o&&pt.alternate!==null&&Te.delete(pt.key===null?$e:pt.key),W=x(pt,W,$e),mt===null?Ne=pt:mt.sibling=pt,mt=pt);return o&&Te.forEach(function(Cz){return u(K,Cz)}),ot&&Ta(K,$e),Ne}function Qt(K,W,J,oe){if(typeof J=="object"&&J!==null&&J.type===S&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case O:e:{for(var Ne=J.key;W!==null;){if(W.key===Ne){if(Ne=J.type,Ne===S){if(W.tag===7){h(K,W.sibling),oe=y(W,J.props.children),oe.return=K,K=oe;break e}}else if(W.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===D&&vo(Ne)===W.type){h(K,W.sibling),oe=y(W,J.props),uu(oe,J),oe.return=K,K=oe;break e}h(K,W);break}else u(K,W);W=W.sibling}J.type===S?(oe=fo(J.props.children,K.mode,oe,J.key),oe.return=K,K=oe):(oe=Vf(J.type,J.key,J.props,null,K.mode,oe),uu(oe,J),oe.return=K,K=oe)}return C(K);case b:e:{for(Ne=J.key;W!==null;){if(W.key===Ne)if(W.tag===4&&W.stateNode.containerInfo===J.containerInfo&&W.stateNode.implementation===J.implementation){h(K,W.sibling),oe=y(W,J.children||[]),oe.return=K,K=oe;break e}else{h(K,W);break}else u(K,W);W=W.sibling}oe=Ag(J,K.mode,oe),oe.return=K,K=oe}return C(K);case D:return J=vo(J),Qt(K,W,J,oe)}if(H(J))return _e(K,W,J,oe);if(Z(J)){if(Ne=Z(J),typeof Ne!="function")throw Error(r(150));return J=Ne.call(J),Ie(K,W,J,oe)}if(typeof J.then=="function")return Qt(K,W,Gf(J),oe);if(J.$$typeof===T)return Qt(K,W,Ff(K,J),oe);Kf(K,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,W!==null&&W.tag===6?(h(K,W.sibling),oe=y(W,J),oe.return=K,K=oe):(h(K,W),oe=Eg(J,K.mode,oe),oe.return=K,K=oe),C(K)):h(K,W)}return function(K,W,J,oe){try{cu=0;var Ne=Qt(K,W,J,oe);return Cl=null,Ne}catch(Te){if(Te===Tl||Te===Wf)throw Te;var mt=Nr(29,Te,null,K.mode);return mt.lanes=oe,mt.return=K,mt}finally{}}}var bo=P_(!0),N_=P_(!1),ds=!1;function Zg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bg(o,u){o=o.updateQueue,u.updateQueue===o&&(u.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function fs(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function hs(o,u,h){var v=o.updateQueue;if(v===null)return null;if(v=v.shared,(vt&2)!==0){var y=v.pending;return y===null?u.next=u:(u.next=y.next,y.next=u),v.pending=u,u=Bf(o),g_(o,null,h),u}return Zf(o,v,u,h),Bf(o)}function du(o,u,h){if(u=u.updateQueue,u!==null&&(u=u.shared,(h&4194048)!==0)){var v=u.lanes;v&=o.pendingLanes,h|=v,u.lanes=h,bn(o,h)}}function Vg(o,u){var h=o.updateQueue,v=o.alternate;if(v!==null&&(v=v.updateQueue,h===v)){var y=null,x=null;if(h=h.firstBaseUpdate,h!==null){do{var C={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};x===null?y=x=C:x=x.next=C,h=h.next}while(h!==null);x===null?y=x=u:x=x.next=u}else y=x=u;h={baseState:v.baseState,firstBaseUpdate:y,lastBaseUpdate:x,shared:v.shared,callbacks:v.callbacks},o.updateQueue=h;return}o=h.lastBaseUpdate,o===null?h.firstBaseUpdate=u:o.next=u,h.lastBaseUpdate=u}var Ug=!1;function fu(){if(Ug){var o=jl;if(o!==null)throw o}}function hu(o,u,h,v){Ug=!1;var y=o.updateQueue;ds=!1;var x=y.firstBaseUpdate,C=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var F=M,ee=F.next;F.next=null,C===null?x=ee:C.next=ee,C=F;var se=o.alternate;se!==null&&(se=se.updateQueue,M=se.lastBaseUpdate,M!==C&&(M===null?se.firstBaseUpdate=ee:M.next=ee,se.lastBaseUpdate=F))}if(x!==null){var le=y.baseState;C=0,se=ee=F=null,M=x;do{var te=M.lane&-536870913,ie=te!==M.lane;if(ie?(at&te)===te:(v&te)===te){te!==0&&te===kl&&(Ug=!0),se!==null&&(se=se.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var _e=o,Ie=M;te=u;var Qt=h;switch(Ie.tag){case 1:if(_e=Ie.payload,typeof _e=="function"){le=_e.call(Qt,le,te);break e}le=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Ie.payload,te=typeof _e=="function"?_e.call(Qt,le,te):_e,te==null)break e;le=m({},le,te);break e;case 2:ds=!0}}te=M.callback,te!==null&&(o.flags|=64,ie&&(o.flags|=8192),ie=y.callbacks,ie===null?y.callbacks=[te]:ie.push(te))}else ie={lane:te,tag:M.tag,payload:M.payload,callback:M.callback,next:null},se===null?(ee=se=ie,F=le):se=se.next=ie,C|=te;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;ie=M,M=ie.next,ie.next=null,y.lastBaseUpdate=ie,y.shared.pending=null}}while(!0);se===null&&(F=le),y.baseState=F,y.firstBaseUpdate=ee,y.lastBaseUpdate=se,x===null&&(y.shared.lanes=0),Os|=C,o.lanes=C,o.memoizedState=le}}function R_(o,u){if(typeof o!="function")throw Error(r(191,o));o.call(u)}function M_(o,u){var h=o.callbacks;if(h!==null)for(o.callbacks=null,o=0;o<h.length;o++)R_(h[o],u)}var El=G(null),Jf=G(0);function L_(o,u){o=za,R(Jf,o),R(El,u),za=o|u.baseLanes}function Yg(){R(Jf,za),R(El,El.current)}function Fg(){za=Jf.current,re(El),re(Jf)}var Rr=G(null),ri=null;function ms(o){var u=o.alternate;R(dn,dn.current&1),R(Rr,o),ri===null&&(u===null||El.current!==null||u.memoizedState!==null)&&(ri=o)}function $g(o){R(dn,dn.current),R(Rr,o),ri===null&&(ri=o)}function D_(o){o.tag===22?(R(dn,dn.current),R(Rr,o),ri===null&&(ri=o)):ps()}function ps(){R(dn,dn.current),R(Rr,Rr.current)}function Mr(o){re(Rr),ri===o&&(ri=null),re(dn)}var dn=G(0);function eh(o){for(var u=o;u!==null;){if(u.tag===13){var h=u.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||eO(h)||tO(h)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Aa=0,Ye=null,Et=null,_n=null,th=!1,Al=!1,yo=!1,nh=0,mu=0,Ql=null,O3=0;function sn(){throw Error(r(321))}function Wg(o,u){if(u===null)return!1;for(var h=0;h<u.length&&h<o.length;h++)if(!Pr(o[h],u[h]))return!1;return!0}function Hg(o,u,h,v,y,x){return Aa=x,Ye=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,I.H=o===null||o.memoizedState===null?yw:dv,yo=!1,x=h(v,y),yo=!1,Al&&(x=q_(u,h,v,y)),z_(o),x}function z_(o){I.H=vu;var u=Et!==null&&Et.next!==null;if(Aa=0,_n=Et=Ye=null,th=!1,mu=0,Ql=null,u)throw Error(r(300));o===null||wn||(o=o.dependencies,o!==null&&Yf(o)&&(wn=!0))}function q_(o,u,h,v){Ye=o;var y=0;do{if(Al&&(Ql=null),mu=0,Al=!1,25<=y)throw Error(r(301));if(y+=1,_n=Et=null,o.updateQueue!=null){var x=o.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}I.H=Sw,x=u(h,v)}while(Al);return x}function b3(){var o=I.H,u=o.useState()[0];return u=typeof u.then=="function"?pu(u):u,o=o.useState()[0],(Et!==null?Et.memoizedState:null)!==o&&(Ye.flags|=1024),u}function Gg(){var o=nh!==0;return nh=0,o}function Kg(o,u,h){u.updateQueue=o.updateQueue,u.flags&=-2053,o.lanes&=~h}function Jg(o){if(th){for(o=o.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}th=!1}Aa=0,_n=Et=Ye=null,Al=!1,mu=nh=0,Ql=null}function ur(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _n===null?Ye.memoizedState=_n=o:_n=_n.next=o,_n}function fn(){if(Et===null){var o=Ye.alternate;o=o!==null?o.memoizedState:null}else o=Et.next;var u=_n===null?Ye.memoizedState:_n.next;if(u!==null)_n=u,Et=o;else{if(o===null)throw Ye.alternate===null?Error(r(467)):Error(r(310));Et=o,o={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},_n===null?Ye.memoizedState=_n=o:_n=_n.next=o}return _n}function rh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pu(o){var u=mu;return mu+=1,Ql===null&&(Ql=[]),o=E_(Ql,o,u),u=Ye,(_n===null?u.memoizedState:_n.next)===null&&(u=u.alternate,I.H=u===null||u.memoizedState===null?yw:dv),o}function ih(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return pu(o);if(o.$$typeof===T)return Bn(o)}throw Error(r(438,String(o)))}function ev(o){var u=null,h=Ye.updateQueue;if(h!==null&&(u=h.memoCache),u==null){var v=Ye.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(u={data:v.data.map(function(y){return y.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),h===null&&(h=rh(),Ye.updateQueue=h),h.memoCache=u,h=u.data[u.index],h===void 0)for(h=u.data[u.index]=Array(o),v=0;v<o;v++)h[v]=P;return u.index++,h}function Qa(o,u){return typeof u=="function"?u(o):u}function ah(o){var u=fn();return tv(u,Et,o)}function tv(o,u,h){var v=o.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=h;var y=o.baseQueue,x=v.pending;if(x!==null){if(y!==null){var C=y.next;y.next=x.next,x.next=C}u.baseQueue=y=x,v.pending=null}if(x=o.baseState,y===null)o.memoizedState=x;else{u=y.next;var M=C=null,F=null,ee=u,se=!1;do{var le=ee.lane&-536870913;if(le!==ee.lane?(at&le)===le:(Aa&le)===le){var te=ee.revertLane;if(te===0)F!==null&&(F=F.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),le===kl&&(se=!0);else if((Aa&te)===te){ee=ee.next,te===kl&&(se=!0);continue}else le={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},F===null?(M=F=le,C=x):F=F.next=le,Ye.lanes|=te,Os|=te;le=ee.action,yo&&h(x,le),x=ee.hasEagerState?ee.eagerState:h(x,le)}else te={lane:le,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},F===null?(M=F=te,C=x):F=F.next=te,Ye.lanes|=le,Os|=le;ee=ee.next}while(ee!==null&&ee!==u);if(F===null?C=x:F.next=M,!Pr(x,o.memoizedState)&&(wn=!0,se&&(h=jl,h!==null)))throw h;o.memoizedState=x,o.baseState=C,o.baseQueue=F,v.lastRenderedState=x}return y===null&&(v.lanes=0),[o.memoizedState,v.dispatch]}function nv(o){var u=fn(),h=u.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=o;var v=h.dispatch,y=h.pending,x=u.memoizedState;if(y!==null){h.pending=null;var C=y=y.next;do x=o(x,C.action),C=C.next;while(C!==y);Pr(x,u.memoizedState)||(wn=!0),u.memoizedState=x,u.baseQueue===null&&(u.baseState=x),h.lastRenderedState=x}return[x,v]}function I_(o,u,h){var v=Ye,y=fn(),x=ot;if(x){if(h===void 0)throw Error(r(407));h=h()}else h=u();var C=!Pr((Et||y).memoizedState,h);if(C&&(y.memoizedState=h,wn=!0),y=y.queue,av(B_.bind(null,v,y,o),[o]),y.getSnapshot!==u||C||_n!==null&&_n.memoizedState.tag&1){if(v.flags|=2048,Pl(9,{destroy:void 0},Z_.bind(null,v,y,h,u),null),zt===null)throw Error(r(349));x||(Aa&127)!==0||X_(v,u,h)}return h}function X_(o,u,h){o.flags|=16384,o={getSnapshot:u,value:h},u=Ye.updateQueue,u===null?(u=rh(),Ye.updateQueue=u,u.stores=[o]):(h=u.stores,h===null?u.stores=[o]:h.push(o))}function Z_(o,u,h,v){u.value=h,u.getSnapshot=v,V_(u)&&U_(o)}function B_(o,u,h){return h(function(){V_(u)&&U_(o)})}function V_(o){var u=o.getSnapshot;o=o.value;try{var h=u();return!Pr(o,h)}catch{return!0}}function U_(o){var u=uo(o,2);u!==null&&_r(u,o,2)}function rv(o){var u=ur();if(typeof o=="function"){var h=o;if(o=h(),yo){Gt(!0);try{h()}finally{Gt(!1)}}}return u.memoizedState=u.baseState=o,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:o},u}function Y_(o,u,h,v){return o.baseState=h,tv(o,Et,typeof v=="function"?v:Qa)}function y3(o,u,h,v,y){if(lh(o))throw Error(r(485));if(o=u.action,o!==null){var x={payload:y,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){x.listeners.push(C)}};I.T!==null?h(!0):x.isTransition=!1,v(x),h=u.pending,h===null?(x.next=u.pending=x,F_(u,x)):(x.next=h.next,u.pending=h.next=x)}}function F_(o,u){var h=u.action,v=u.payload,y=o.state;if(u.isTransition){var x=I.T,C={};I.T=C;try{var M=h(y,v),F=I.S;F!==null&&F(C,M),$_(o,u,M)}catch(ee){iv(o,u,ee)}finally{x!==null&&C.types!==null&&(x.types=C.types),I.T=x}}else try{x=h(y,v),$_(o,u,x)}catch(ee){iv(o,u,ee)}}function $_(o,u,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(v){W_(o,u,v)},function(v){return iv(o,u,v)}):W_(o,u,h)}function W_(o,u,h){u.status="fulfilled",u.value=h,H_(u),o.state=h,u=o.pending,u!==null&&(h=u.next,h===u?o.pending=null:(h=h.next,u.next=h,F_(o,h)))}function iv(o,u,h){var v=o.pending;if(o.pending=null,v!==null){v=v.next;do u.status="rejected",u.reason=h,H_(u),u=u.next;while(u!==v)}o.action=null}function H_(o){o=o.listeners;for(var u=0;u<o.length;u++)(0,o[u])()}function G_(o,u){return u}function K_(o,u){if(ot){var h=zt.formState;if(h!==null){e:{var v=Ye;if(ot){if(Ft){t:{for(var y=Ft,x=ni;y.nodeType!==8;){if(!x){y=null;break t}if(y=ii(y.nextSibling),y===null){y=null;break t}}x=y.data,y=x==="F!"||x==="F"?y:null}if(y){Ft=ii(y.nextSibling),v=y.data==="F!";break e}}cs(v)}v=!1}v&&(u=h[0])}}return h=ur(),h.memoizedState=h.baseState=u,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:G_,lastRenderedState:u},h.queue=v,h=vw.bind(null,Ye,v),v.dispatch=h,v=rv(!1),x=uv.bind(null,Ye,!1,v.queue),v=ur(),y={state:u,dispatch:null,action:o,pending:null},v.queue=y,h=y3.bind(null,Ye,y,x,h),y.dispatch=h,v.memoizedState=o,[u,h,!1]}function J_(o){var u=fn();return ew(u,Et,o)}function ew(o,u,h){if(u=tv(o,u,G_)[0],o=ah(Qa)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var v=pu(u)}catch(C){throw C===Tl?Wf:C}else v=u;u=fn();var y=u.queue,x=y.dispatch;return h!==u.memoizedState&&(Ye.flags|=2048,Pl(9,{destroy:void 0},S3.bind(null,y,h),null)),[v,x,o]}function S3(o,u){o.action=u}function tw(o){var u=fn(),h=Et;if(h!==null)return ew(u,h,o);fn(),u=u.memoizedState,h=fn();var v=h.queue.dispatch;return h.memoizedState=o,[u,v,!1]}function Pl(o,u,h,v){return o={tag:o,create:h,deps:v,inst:u,next:null},u=Ye.updateQueue,u===null&&(u=rh(),Ye.updateQueue=u),h=u.lastEffect,h===null?u.lastEffect=o.next=o:(v=h.next,h.next=o,o.next=v,u.lastEffect=o),o}function nw(){return fn().memoizedState}function sh(o,u,h,v){var y=ur();Ye.flags|=o,y.memoizedState=Pl(1|u,{destroy:void 0},h,v===void 0?null:v)}function oh(o,u,h,v){var y=fn();v=v===void 0?null:v;var x=y.memoizedState.inst;Et!==null&&v!==null&&Wg(v,Et.memoizedState.deps)?y.memoizedState=Pl(u,x,h,v):(Ye.flags|=o,y.memoizedState=Pl(1|u,x,h,v))}function rw(o,u){sh(8390656,8,o,u)}function av(o,u){oh(2048,8,o,u)}function x3(o){Ye.flags|=4;var u=Ye.updateQueue;if(u===null)u=rh(),Ye.updateQueue=u,u.events=[o];else{var h=u.events;h===null?u.events=[o]:h.push(o)}}function iw(o){var u=fn().memoizedState;return x3({ref:u,nextImpl:o}),function(){if((vt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}function aw(o,u){return oh(4,2,o,u)}function sw(o,u){return oh(4,4,o,u)}function ow(o,u){if(typeof u=="function"){o=o();var h=u(o);return function(){typeof h=="function"?h():u(null)}}if(u!=null)return o=o(),u.current=o,function(){u.current=null}}function lw(o,u,h){h=h!=null?h.concat([o]):null,oh(4,4,ow.bind(null,u,o),h)}function sv(){}function cw(o,u){var h=fn();u=u===void 0?null:u;var v=h.memoizedState;return u!==null&&Wg(u,v[1])?v[0]:(h.memoizedState=[o,u],o)}function uw(o,u){var h=fn();u=u===void 0?null:u;var v=h.memoizedState;if(u!==null&&Wg(u,v[1]))return v[0];if(v=o(),yo){Gt(!0);try{o()}finally{Gt(!1)}}return h.memoizedState=[v,u],v}function ov(o,u,h){return h===void 0||(Aa&1073741824)!==0&&(at&261930)===0?o.memoizedState=u:(o.memoizedState=h,o=dk(),Ye.lanes|=o,Os|=o,h)}function dw(o,u,h,v){return Pr(h,u)?h:El.current!==null?(o=ov(o,h,v),Pr(o,u)||(wn=!0),o):(Aa&42)===0||(Aa&1073741824)!==0&&(at&261930)===0?(wn=!0,o.memoizedState=h):(o=dk(),Ye.lanes|=o,Os|=o,u)}function fw(o,u,h,v,y){var x=L.p;L.p=x!==0&&8>x?x:8;var C=I.T,M={};I.T=M,uv(o,!1,u,h);try{var F=y(),ee=I.S;if(ee!==null&&ee(M,F),F!==null&&typeof F=="object"&&typeof F.then=="function"){var se=v3(F,v);gu(o,u,se,zr(o))}else gu(o,u,v,zr(o))}catch(le){gu(o,u,{then:function(){},status:"rejected",reason:le},zr())}finally{L.p=x,C!==null&&M.types!==null&&(C.types=M.types),I.T=C}}function _3(){}function lv(o,u,h,v){if(o.tag!==5)throw Error(r(476));var y=hw(o).queue;fw(o,y,u,$,h===null?_3:function(){return mw(o),h(v)})}function hw(o){var u=o.memoizedState;if(u!==null)return u;u={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:$},next:null};var h={};return u.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:h},next:null},o.memoizedState=u,o=o.alternate,o!==null&&(o.memoizedState=u),u}function mw(o){var u=hw(o);u.next===null&&(u=o.alternate.memoizedState),gu(o,u.next.queue,{},zr())}function cv(){return Bn(Nu)}function pw(){return fn().memoizedState}function gw(){return fn().memoizedState}function w3(o){for(var u=o.return;u!==null;){switch(u.tag){case 24:case 3:var h=zr();o=fs(h);var v=hs(u,o,h);v!==null&&(_r(v,u,h),du(v,u,h)),u={cache:zg()},o.payload=u;return}u=u.return}}function k3(o,u,h){var v=zr();h={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},lh(o)?Ow(u,h):(h=Tg(o,u,h,v),h!==null&&(_r(h,o,v),bw(h,u,v)))}function vw(o,u,h){var v=zr();gu(o,u,h,v)}function gu(o,u,h,v){var y={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(lh(o))Ow(u,y);else{var x=o.alternate;if(o.lanes===0&&(x===null||x.lanes===0)&&(x=u.lastRenderedReducer,x!==null))try{var C=u.lastRenderedState,M=x(C,h);if(y.hasEagerState=!0,y.eagerState=M,Pr(M,C))return Zf(o,u,y,0),zt===null&&Xf(),!1}catch{}finally{}if(h=Tg(o,u,y,v),h!==null)return _r(h,o,v),bw(h,u,v),!0}return!1}function uv(o,u,h,v){if(v={lane:2,revertLane:Zv(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},lh(o)){if(u)throw Error(r(479))}else u=Tg(o,h,v,2),u!==null&&_r(u,o,2)}function lh(o){var u=o.alternate;return o===Ye||u!==null&&u===Ye}function Ow(o,u){Al=th=!0;var h=o.pending;h===null?u.next=u:(u.next=h.next,h.next=u),o.pending=u}function bw(o,u,h){if((h&4194048)!==0){var v=u.lanes;v&=o.pendingLanes,h|=v,u.lanes=h,bn(o,h)}}var vu={readContext:Bn,use:ih,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useLayoutEffect:sn,useInsertionEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useSyncExternalStore:sn,useId:sn,useHostTransitionStatus:sn,useFormState:sn,useActionState:sn,useOptimistic:sn,useMemoCache:sn,useCacheRefresh:sn};vu.useEffectEvent=sn;var yw={readContext:Bn,use:ih,useCallback:function(o,u){return ur().memoizedState=[o,u===void 0?null:u],o},useContext:Bn,useEffect:rw,useImperativeHandle:function(o,u,h){h=h!=null?h.concat([o]):null,sh(4194308,4,ow.bind(null,u,o),h)},useLayoutEffect:function(o,u){return sh(4194308,4,o,u)},useInsertionEffect:function(o,u){sh(4,2,o,u)},useMemo:function(o,u){var h=ur();u=u===void 0?null:u;var v=o();if(yo){Gt(!0);try{o()}finally{Gt(!1)}}return h.memoizedState=[v,u],v},useReducer:function(o,u,h){var v=ur();if(h!==void 0){var y=h(u);if(yo){Gt(!0);try{h(u)}finally{Gt(!1)}}}else y=u;return v.memoizedState=v.baseState=y,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:y},v.queue=o,o=o.dispatch=k3.bind(null,Ye,o),[v.memoizedState,o]},useRef:function(o){var u=ur();return o={current:o},u.memoizedState=o},useState:function(o){o=rv(o);var u=o.queue,h=vw.bind(null,Ye,u);return u.dispatch=h,[o.memoizedState,h]},useDebugValue:sv,useDeferredValue:function(o,u){var h=ur();return ov(h,o,u)},useTransition:function(){var o=rv(!1);return o=fw.bind(null,Ye,o.queue,!0,!1),ur().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,u,h){var v=Ye,y=ur();if(ot){if(h===void 0)throw Error(r(407));h=h()}else{if(h=u(),zt===null)throw Error(r(349));(at&127)!==0||X_(v,u,h)}y.memoizedState=h;var x={value:h,getSnapshot:u};return y.queue=x,rw(B_.bind(null,v,x,o),[o]),v.flags|=2048,Pl(9,{destroy:void 0},Z_.bind(null,v,x,h,u),null),h},useId:function(){var o=ur(),u=zt.identifierPrefix;if(ot){var h=$i,v=Fi;h=(v&~(1<<32-rt(v)-1)).toString(32)+h,u="_"+u+"R_"+h,h=nh++,0<h&&(u+="H"+h.toString(32)),u+="_"}else h=O3++,u="_"+u+"r_"+h.toString(32)+"_";return o.memoizedState=u},useHostTransitionStatus:cv,useFormState:K_,useActionState:K_,useOptimistic:function(o){var u=ur();u.memoizedState=u.baseState=o;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=h,u=uv.bind(null,Ye,!0,h),h.dispatch=u,[o,u]},useMemoCache:ev,useCacheRefresh:function(){return ur().memoizedState=w3.bind(null,Ye)},useEffectEvent:function(o){var u=ur(),h={impl:o};return u.memoizedState=h,function(){if((vt&2)!==0)throw Error(r(440));return h.impl.apply(void 0,arguments)}}},dv={readContext:Bn,use:ih,useCallback:cw,useContext:Bn,useEffect:av,useImperativeHandle:lw,useInsertionEffect:aw,useLayoutEffect:sw,useMemo:uw,useReducer:ah,useRef:nw,useState:function(){return ah(Qa)},useDebugValue:sv,useDeferredValue:function(o,u){var h=fn();return dw(h,Et.memoizedState,o,u)},useTransition:function(){var o=ah(Qa)[0],u=fn().memoizedState;return[typeof o=="boolean"?o:pu(o),u]},useSyncExternalStore:I_,useId:pw,useHostTransitionStatus:cv,useFormState:J_,useActionState:J_,useOptimistic:function(o,u){var h=fn();return Y_(h,Et,o,u)},useMemoCache:ev,useCacheRefresh:gw};dv.useEffectEvent=iw;var Sw={readContext:Bn,use:ih,useCallback:cw,useContext:Bn,useEffect:av,useImperativeHandle:lw,useInsertionEffect:aw,useLayoutEffect:sw,useMemo:uw,useReducer:nv,useRef:nw,useState:function(){return nv(Qa)},useDebugValue:sv,useDeferredValue:function(o,u){var h=fn();return Et===null?ov(h,o,u):dw(h,Et.memoizedState,o,u)},useTransition:function(){var o=nv(Qa)[0],u=fn().memoizedState;return[typeof o=="boolean"?o:pu(o),u]},useSyncExternalStore:I_,useId:pw,useHostTransitionStatus:cv,useFormState:tw,useActionState:tw,useOptimistic:function(o,u){var h=fn();return Et!==null?Y_(h,Et,o,u):(h.baseState=o,[o,h.queue.dispatch])},useMemoCache:ev,useCacheRefresh:gw};Sw.useEffectEvent=iw;function fv(o,u,h,v){u=o.memoizedState,h=h(v,u),h=h==null?u:m({},u,h),o.memoizedState=h,o.lanes===0&&(o.updateQueue.baseState=h)}var hv={enqueueSetState:function(o,u,h){o=o._reactInternals;var v=zr(),y=fs(v);y.payload=u,h!=null&&(y.callback=h),u=hs(o,y,v),u!==null&&(_r(u,o,v),du(u,o,v))},enqueueReplaceState:function(o,u,h){o=o._reactInternals;var v=zr(),y=fs(v);y.tag=1,y.payload=u,h!=null&&(y.callback=h),u=hs(o,y,v),u!==null&&(_r(u,o,v),du(u,o,v))},enqueueForceUpdate:function(o,u){o=o._reactInternals;var h=zr(),v=fs(h);v.tag=2,u!=null&&(v.callback=u),u=hs(o,v,h),u!==null&&(_r(u,o,h),du(u,o,h))}};function xw(o,u,h,v,y,x,C){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(v,x,C):u.prototype&&u.prototype.isPureReactComponent?!ru(h,v)||!ru(y,x):!0}function _w(o,u,h,v){o=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(h,v),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(h,v),u.state!==o&&hv.enqueueReplaceState(u,u.state,null)}function So(o,u){var h=u;if("ref"in u){h={};for(var v in u)v!=="ref"&&(h[v]=u[v])}if(o=o.defaultProps){h===u&&(h=m({},h));for(var y in o)h[y]===void 0&&(h[y]=o[y])}return h}function ww(o){If(o)}function kw(o){console.error(o)}function jw(o){If(o)}function ch(o,u){try{var h=o.onUncaughtError;h(u.value,{componentStack:u.stack})}catch(v){setTimeout(function(){throw v})}}function Tw(o,u,h){try{var v=o.onCaughtError;v(h.value,{componentStack:h.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function mv(o,u,h){return h=fs(h),h.tag=3,h.payload={element:null},h.callback=function(){ch(o,u)},h}function Cw(o){return o=fs(o),o.tag=3,o}function Ew(o,u,h,v){var y=h.type.getDerivedStateFromError;if(typeof y=="function"){var x=v.value;o.payload=function(){return y(x)},o.callback=function(){Tw(u,h,v)}}var C=h.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(o.callback=function(){Tw(u,h,v),typeof y!="function"&&(bs===null?bs=new Set([this]):bs.add(this));var M=v.stack;this.componentDidCatch(v.value,{componentStack:M!==null?M:""})})}function j3(o,u,h,v,y){if(h.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(u=h.alternate,u!==null&&wl(u,h,y,!0),h=Rr.current,h!==null){switch(h.tag){case 31:case 13:return ri===null?Sh():h.alternate===null&&on===0&&(on=3),h.flags&=-257,h.flags|=65536,h.lanes=y,v===Hf?h.flags|=16384:(u=h.updateQueue,u===null?h.updateQueue=new Set([v]):u.add(v),qv(o,v,y)),!1;case 22:return h.flags|=65536,v===Hf?h.flags|=16384:(u=h.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([v])},h.updateQueue=u):(h=u.retryQueue,h===null?u.retryQueue=new Set([v]):h.add(v)),qv(o,v,y)),!1}throw Error(r(435,h.tag))}return qv(o,v,y),Sh(),!1}if(ot)return u=Rr.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=y,v!==Ng&&(o=Error(r(422),{cause:v}),su(Jr(o,h)))):(v!==Ng&&(u=Error(r(423),{cause:v}),su(Jr(u,h))),o=o.current.alternate,o.flags|=65536,y&=-y,o.lanes|=y,v=Jr(v,h),y=mv(o.stateNode,v,y),Vg(o,y),on!==4&&(on=2)),!1;var x=Error(r(520),{cause:v});if(x=Jr(x,h),ku===null?ku=[x]:ku.push(x),on!==4&&(on=2),u===null)return!0;v=Jr(v,h),h=u;do{switch(h.tag){case 3:return h.flags|=65536,o=y&-y,h.lanes|=o,o=mv(h.stateNode,v,o),Vg(h,o),!1;case 1:if(u=h.type,x=h.stateNode,(h.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(bs===null||!bs.has(x))))return h.flags|=65536,y&=-y,h.lanes|=y,y=Cw(y),Ew(y,o,h,v),Vg(h,y),!1}h=h.return}while(h!==null);return!1}var pv=Error(r(461)),wn=!1;function Vn(o,u,h,v){u.child=o===null?N_(u,null,h,v):bo(u,o.child,h,v)}function Aw(o,u,h,v,y){h=h.render;var x=u.ref;if("ref"in v){var C={};for(var M in v)M!=="ref"&&(C[M]=v[M])}else C=v;return po(u),v=Hg(o,u,h,C,x,y),M=Gg(),o!==null&&!wn?(Kg(o,u,y),Pa(o,u,y)):(ot&&M&&Qg(u),u.flags|=1,Vn(o,u,v,y),u.child)}function Qw(o,u,h,v,y){if(o===null){var x=h.type;return typeof x=="function"&&!Cg(x)&&x.defaultProps===void 0&&h.compare===null?(u.tag=15,u.type=x,Pw(o,u,x,v,y)):(o=Vf(h.type,null,v,u,u.mode,y),o.ref=u.ref,o.return=u,u.child=o)}if(x=o.child,!_v(o,y)){var C=x.memoizedProps;if(h=h.compare,h=h!==null?h:ru,h(C,v)&&o.ref===u.ref)return Pa(o,u,y)}return u.flags|=1,o=ja(x,v),o.ref=u.ref,o.return=u,u.child=o}function Pw(o,u,h,v,y){if(o!==null){var x=o.memoizedProps;if(ru(x,v)&&o.ref===u.ref)if(wn=!1,u.pendingProps=v=x,_v(o,y))(o.flags&131072)!==0&&(wn=!0);else return u.lanes=o.lanes,Pa(o,u,y)}return gv(o,u,h,v,y)}function Nw(o,u,h,v){var y=v.children,x=o!==null?o.memoizedState:null;if(o===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((u.flags&128)!==0){if(x=x!==null?x.baseLanes|h:h,o!==null){for(v=u.child=o.child,y=0;v!==null;)y=y|v.lanes|v.childLanes,v=v.sibling;v=y&~x}else v=0,u.child=null;return Rw(o,u,x,h,v)}if((h&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},o!==null&&$f(u,x!==null?x.cachePool:null),x!==null?L_(u,x):Yg(),D_(u);else return v=u.lanes=536870912,Rw(o,u,x!==null?x.baseLanes|h:h,h,v)}else x!==null?($f(u,x.cachePool),L_(u,x),ps(),u.memoizedState=null):(o!==null&&$f(u,null),Yg(),ps());return Vn(o,u,y,h),u.child}function Ou(o,u){return o!==null&&o.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function Rw(o,u,h,v,y){var x=Ig();return x=x===null?null:{parent:xn._currentValue,pool:x},u.memoizedState={baseLanes:h,cachePool:x},o!==null&&$f(u,null),Yg(),D_(u),o!==null&&wl(o,u,v,!0),u.childLanes=y,null}function uh(o,u){return u=fh({mode:u.mode,children:u.children},o.mode),u.ref=o.ref,o.child=u,u.return=o,u}function Mw(o,u,h){return bo(u,o.child,null,h),o=uh(u,u.pendingProps),o.flags|=2,Mr(u),u.memoizedState=null,o}function T3(o,u,h){var v=u.pendingProps,y=(u.flags&128)!==0;if(u.flags&=-129,o===null){if(ot){if(v.mode==="hidden")return o=uh(u,v),u.lanes=536870912,Ou(null,o);if($g(u),(o=Ft)?(o=Fk(o,ni),o=o!==null&&o.data==="&"?o:null,o!==null&&(u.memoizedState={dehydrated:o,treeContext:os!==null?{id:Fi,overflow:$i}:null,retryLane:536870912,hydrationErrors:null},h=O_(o),h.return=u,u.child=h,Zn=u,Ft=null)):o=null,o===null)throw cs(u);return u.lanes=536870912,null}return uh(u,v)}var x=o.memoizedState;if(x!==null){var C=x.dehydrated;if($g(u),y)if(u.flags&256)u.flags&=-257,u=Mw(o,u,h);else if(u.memoizedState!==null)u.child=o.child,u.flags|=128,u=null;else throw Error(r(558));else if(wn||wl(o,u,h,!1),y=(h&o.childLanes)!==0,wn||y){if(v=zt,v!==null&&(C=Rn(v,h),C!==0&&C!==x.retryLane))throw x.retryLane=C,uo(o,C),_r(v,o,C),pv;Sh(),u=Mw(o,u,h)}else o=x.treeContext,Ft=ii(C.nextSibling),Zn=u,ot=!0,ls=null,ni=!1,o!==null&&S_(u,o),u=uh(u,v),u.flags|=4096;return u}return o=ja(o.child,{mode:v.mode,children:v.children}),o.ref=u.ref,u.child=o,o.return=u,o}function dh(o,u){var h=u.ref;if(h===null)o!==null&&o.ref!==null&&(u.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(o===null||o.ref!==h)&&(u.flags|=4194816)}}function gv(o,u,h,v,y){return po(u),h=Hg(o,u,h,v,void 0,y),v=Gg(),o!==null&&!wn?(Kg(o,u,y),Pa(o,u,y)):(ot&&v&&Qg(u),u.flags|=1,Vn(o,u,h,y),u.child)}function Lw(o,u,h,v,y,x){return po(u),u.updateQueue=null,h=q_(u,v,h,y),z_(o),v=Gg(),o!==null&&!wn?(Kg(o,u,x),Pa(o,u,x)):(ot&&v&&Qg(u),u.flags|=1,Vn(o,u,h,x),u.child)}function Dw(o,u,h,v,y){if(po(u),u.stateNode===null){var x=yl,C=h.contextType;typeof C=="object"&&C!==null&&(x=Bn(C)),x=new h(v,x),u.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=hv,u.stateNode=x,x._reactInternals=u,x=u.stateNode,x.props=v,x.state=u.memoizedState,x.refs={},Zg(u),C=h.contextType,x.context=typeof C=="object"&&C!==null?Bn(C):yl,x.state=u.memoizedState,C=h.getDerivedStateFromProps,typeof C=="function"&&(fv(u,h,C,v),x.state=u.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(C=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),C!==x.state&&hv.enqueueReplaceState(x,x.state,null),hu(u,v,x,y),fu(),x.state=u.memoizedState),typeof x.componentDidMount=="function"&&(u.flags|=4194308),v=!0}else if(o===null){x=u.stateNode;var M=u.memoizedProps,F=So(h,M);x.props=F;var ee=x.context,se=h.contextType;C=yl,typeof se=="object"&&se!==null&&(C=Bn(se));var le=h.getDerivedStateFromProps;se=typeof le=="function"||typeof x.getSnapshotBeforeUpdate=="function",M=u.pendingProps!==M,se||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(M||ee!==C)&&_w(u,x,v,C),ds=!1;var te=u.memoizedState;x.state=te,hu(u,v,x,y),fu(),ee=u.memoizedState,M||te!==ee||ds?(typeof le=="function"&&(fv(u,h,le,v),ee=u.memoizedState),(F=ds||xw(u,h,F,v,te,ee,C))?(se||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(u.flags|=4194308)):(typeof x.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=v,u.memoizedState=ee),x.props=v,x.state=ee,x.context=C,v=F):(typeof x.componentDidMount=="function"&&(u.flags|=4194308),v=!1)}else{x=u.stateNode,Bg(o,u),C=u.memoizedProps,se=So(h,C),x.props=se,le=u.pendingProps,te=x.context,ee=h.contextType,F=yl,typeof ee=="object"&&ee!==null&&(F=Bn(ee)),M=h.getDerivedStateFromProps,(ee=typeof M=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==le||te!==F)&&_w(u,x,v,F),ds=!1,te=u.memoizedState,x.state=te,hu(u,v,x,y),fu();var ie=u.memoizedState;C!==le||te!==ie||ds||o!==null&&o.dependencies!==null&&Yf(o.dependencies)?(typeof M=="function"&&(fv(u,h,M,v),ie=u.memoizedState),(se=ds||xw(u,h,se,v,te,ie,F)||o!==null&&o.dependencies!==null&&Yf(o.dependencies))?(ee||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(v,ie,F),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(v,ie,F)),typeof x.componentDidUpdate=="function"&&(u.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof x.componentDidUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=1024),u.memoizedProps=v,u.memoizedState=ie),x.props=v,x.state=ie,x.context=F,v=se):(typeof x.componentDidUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=1024),v=!1)}return x=v,dh(o,u),v=(u.flags&128)!==0,x||v?(x=u.stateNode,h=v&&typeof h.getDerivedStateFromError!="function"?null:x.render(),u.flags|=1,o!==null&&v?(u.child=bo(u,o.child,null,y),u.child=bo(u,null,h,y)):Vn(o,u,h,y),u.memoizedState=x.state,o=u.child):o=Pa(o,u,y),o}function zw(o,u,h,v){return ho(),u.flags|=256,Vn(o,u,h,v),u.child}var vv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ov(o){return{baseLanes:o,cachePool:T_()}}function bv(o,u,h){return o=o!==null?o.childLanes&~h:0,u&&(o|=Dr),o}function qw(o,u,h){var v=u.pendingProps,y=!1,x=(u.flags&128)!==0,C;if((C=x)||(C=o!==null&&o.memoizedState===null?!1:(dn.current&2)!==0),C&&(y=!0,u.flags&=-129),C=(u.flags&32)!==0,u.flags&=-33,o===null){if(ot){if(y?ms(u):ps(),(o=Ft)?(o=Fk(o,ni),o=o!==null&&o.data!=="&"?o:null,o!==null&&(u.memoizedState={dehydrated:o,treeContext:os!==null?{id:Fi,overflow:$i}:null,retryLane:536870912,hydrationErrors:null},h=O_(o),h.return=u,u.child=h,Zn=u,Ft=null)):o=null,o===null)throw cs(u);return tO(o)?u.lanes=32:u.lanes=536870912,null}var M=v.children;return v=v.fallback,y?(ps(),y=u.mode,M=fh({mode:"hidden",children:M},y),v=fo(v,y,h,null),M.return=u,v.return=u,M.sibling=v,u.child=M,v=u.child,v.memoizedState=Ov(h),v.childLanes=bv(o,C,h),u.memoizedState=vv,Ou(null,v)):(ms(u),yv(u,M))}var F=o.memoizedState;if(F!==null&&(M=F.dehydrated,M!==null)){if(x)u.flags&256?(ms(u),u.flags&=-257,u=Sv(o,u,h)):u.memoizedState!==null?(ps(),u.child=o.child,u.flags|=128,u=null):(ps(),M=v.fallback,y=u.mode,v=fh({mode:"visible",children:v.children},y),M=fo(M,y,h,null),M.flags|=2,v.return=u,M.return=u,v.sibling=M,u.child=v,bo(u,o.child,null,h),v=u.child,v.memoizedState=Ov(h),v.childLanes=bv(o,C,h),u.memoizedState=vv,u=Ou(null,v));else if(ms(u),tO(M)){if(C=M.nextSibling&&M.nextSibling.dataset,C)var ee=C.dgst;C=ee,v=Error(r(419)),v.stack="",v.digest=C,su({value:v,source:null,stack:null}),u=Sv(o,u,h)}else if(wn||wl(o,u,h,!1),C=(h&o.childLanes)!==0,wn||C){if(C=zt,C!==null&&(v=Rn(C,h),v!==0&&v!==F.retryLane))throw F.retryLane=v,uo(o,v),_r(C,o,v),pv;eO(M)||Sh(),u=Sv(o,u,h)}else eO(M)?(u.flags|=192,u.child=o.child,u=null):(o=F.treeContext,Ft=ii(M.nextSibling),Zn=u,ot=!0,ls=null,ni=!1,o!==null&&S_(u,o),u=yv(u,v.children),u.flags|=4096);return u}return y?(ps(),M=v.fallback,y=u.mode,F=o.child,ee=F.sibling,v=ja(F,{mode:"hidden",children:v.children}),v.subtreeFlags=F.subtreeFlags&65011712,ee!==null?M=ja(ee,M):(M=fo(M,y,h,null),M.flags|=2),M.return=u,v.return=u,v.sibling=M,u.child=v,Ou(null,v),v=u.child,M=o.child.memoizedState,M===null?M=Ov(h):(y=M.cachePool,y!==null?(F=xn._currentValue,y=y.parent!==F?{parent:F,pool:F}:y):y=T_(),M={baseLanes:M.baseLanes|h,cachePool:y}),v.memoizedState=M,v.childLanes=bv(o,C,h),u.memoizedState=vv,Ou(o.child,v)):(ms(u),h=o.child,o=h.sibling,h=ja(h,{mode:"visible",children:v.children}),h.return=u,h.sibling=null,o!==null&&(C=u.deletions,C===null?(u.deletions=[o],u.flags|=16):C.push(o)),u.child=h,u.memoizedState=null,h)}function yv(o,u){return u=fh({mode:"visible",children:u},o.mode),u.return=o,o.child=u}function fh(o,u){return o=Nr(22,o,null,u),o.lanes=0,o}function Sv(o,u,h){return bo(u,o.child,null,h),o=yv(u,u.pendingProps.children),o.flags|=2,u.memoizedState=null,o}function Iw(o,u,h){o.lanes|=u;var v=o.alternate;v!==null&&(v.lanes|=u),Lg(o.return,u,h)}function xv(o,u,h,v,y,x){var C=o.memoizedState;C===null?o.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:v,tail:h,tailMode:y,treeForkCount:x}:(C.isBackwards=u,C.rendering=null,C.renderingStartTime=0,C.last=v,C.tail=h,C.tailMode=y,C.treeForkCount=x)}function Xw(o,u,h){var v=u.pendingProps,y=v.revealOrder,x=v.tail;v=v.children;var C=dn.current,M=(C&2)!==0;if(M?(C=C&1|2,u.flags|=128):C&=1,R(dn,C),Vn(o,u,v,h),v=ot?au:0,!M&&o!==null&&(o.flags&128)!==0)e:for(o=u.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&Iw(o,h,u);else if(o.tag===19)Iw(o,h,u);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===u)break e;for(;o.sibling===null;){if(o.return===null||o.return===u)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(y){case"forwards":for(h=u.child,y=null;h!==null;)o=h.alternate,o!==null&&eh(o)===null&&(y=h),h=h.sibling;h=y,h===null?(y=u.child,u.child=null):(y=h.sibling,h.sibling=null),xv(u,!1,y,h,x,v);break;case"backwards":case"unstable_legacy-backwards":for(h=null,y=u.child,u.child=null;y!==null;){if(o=y.alternate,o!==null&&eh(o)===null){u.child=y;break}o=y.sibling,y.sibling=h,h=y,y=o}xv(u,!0,h,null,x,v);break;case"together":xv(u,!1,null,null,void 0,v);break;default:u.memoizedState=null}return u.child}function Pa(o,u,h){if(o!==null&&(u.dependencies=o.dependencies),Os|=u.lanes,(h&u.childLanes)===0)if(o!==null){if(wl(o,u,h,!1),(h&u.childLanes)===0)return null}else return null;if(o!==null&&u.child!==o.child)throw Error(r(153));if(u.child!==null){for(o=u.child,h=ja(o,o.pendingProps),u.child=h,h.return=u;o.sibling!==null;)o=o.sibling,h=h.sibling=ja(o,o.pendingProps),h.return=u;h.sibling=null}return u.child}function _v(o,u){return(o.lanes&u)!==0?!0:(o=o.dependencies,!!(o!==null&&Yf(o)))}function C3(o,u,h){switch(u.tag){case 3:qe(u,u.stateNode.containerInfo),us(u,xn,o.memoizedState.cache),ho();break;case 27:case 5:Oe(u);break;case 4:qe(u,u.stateNode.containerInfo);break;case 10:us(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,$g(u),null;break;case 13:var v=u.memoizedState;if(v!==null)return v.dehydrated!==null?(ms(u),u.flags|=128,null):(h&u.child.childLanes)!==0?qw(o,u,h):(ms(u),o=Pa(o,u,h),o!==null?o.sibling:null);ms(u);break;case 19:var y=(o.flags&128)!==0;if(v=(h&u.childLanes)!==0,v||(wl(o,u,h,!1),v=(h&u.childLanes)!==0),y){if(v)return Xw(o,u,h);u.flags|=128}if(y=u.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),R(dn,dn.current),v)break;return null;case 22:return u.lanes=0,Nw(o,u,h,u.pendingProps);case 24:us(u,xn,o.memoizedState.cache)}return Pa(o,u,h)}function Zw(o,u,h){if(o!==null)if(o.memoizedProps!==u.pendingProps)wn=!0;else{if(!_v(o,h)&&(u.flags&128)===0)return wn=!1,C3(o,u,h);wn=(o.flags&131072)!==0}else wn=!1,ot&&(u.flags&1048576)!==0&&y_(u,au,u.index);switch(u.lanes=0,u.tag){case 16:e:{var v=u.pendingProps;if(o=vo(u.elementType),u.type=o,typeof o=="function")Cg(o)?(v=So(o,v),u.tag=1,u=Dw(null,u,o,v,h)):(u.tag=0,u=gv(null,u,o,v,h));else{if(o!=null){var y=o.$$typeof;if(y===E){u.tag=11,u=Aw(null,u,o,v,h);break e}else if(y===N){u.tag=14,u=Qw(null,u,o,v,h);break e}}throw u=X(o)||o,Error(r(306,u,""))}}return u;case 0:return gv(o,u,u.type,u.pendingProps,h);case 1:return v=u.type,y=So(v,u.pendingProps),Dw(o,u,v,y,h);case 3:e:{if(qe(u,u.stateNode.containerInfo),o===null)throw Error(r(387));v=u.pendingProps;var x=u.memoizedState;y=x.element,Bg(o,u),hu(u,v,null,h);var C=u.memoizedState;if(v=C.cache,us(u,xn,v),v!==x.cache&&Dg(u,[xn],h,!0),fu(),v=C.element,x.isDehydrated)if(x={element:v,isDehydrated:!1,cache:C.cache},u.updateQueue.baseState=x,u.memoizedState=x,u.flags&256){u=zw(o,u,v,h);break e}else if(v!==y){y=Jr(Error(r(424)),u),su(y),u=zw(o,u,v,h);break e}else{switch(o=u.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(Ft=ii(o.firstChild),Zn=u,ot=!0,ls=null,ni=!0,h=N_(u,null,v,h),u.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(ho(),v===y){u=Pa(o,u,h);break e}Vn(o,u,v,h)}u=u.child}return u;case 26:return dh(o,u),o===null?(h=Jk(u.type,null,u.pendingProps,null))?u.memoizedState=h:ot||(h=u.type,o=u.pendingProps,v=Ch(ve.current).createElement(h),v[tn]=u,v[Sn]=o,Un(v,h,o),an(v),u.stateNode=v):u.memoizedState=Jk(u.type,o.memoizedProps,u.pendingProps,o.memoizedState),null;case 27:return Oe(u),o===null&&ot&&(v=u.stateNode=Hk(u.type,u.pendingProps,ve.current),Zn=u,ni=!0,y=Ft,_s(u.type)?(nO=y,Ft=ii(v.firstChild)):Ft=y),Vn(o,u,u.pendingProps.children,h),dh(o,u),o===null&&(u.flags|=4194304),u.child;case 5:return o===null&&ot&&((y=v=Ft)&&(v=iz(v,u.type,u.pendingProps,ni),v!==null?(u.stateNode=v,Zn=u,Ft=ii(v.firstChild),ni=!1,y=!0):y=!1),y||cs(u)),Oe(u),y=u.type,x=u.pendingProps,C=o!==null?o.memoizedProps:null,v=x.children,Gv(y,x)?v=null:C!==null&&Gv(y,C)&&(u.flags|=32),u.memoizedState!==null&&(y=Hg(o,u,b3,null,null,h),Nu._currentValue=y),dh(o,u),Vn(o,u,v,h),u.child;case 6:return o===null&&ot&&((o=h=Ft)&&(h=az(h,u.pendingProps,ni),h!==null?(u.stateNode=h,Zn=u,Ft=null,o=!0):o=!1),o||cs(u)),null;case 13:return qw(o,u,h);case 4:return qe(u,u.stateNode.containerInfo),v=u.pendingProps,o===null?u.child=bo(u,null,v,h):Vn(o,u,v,h),u.child;case 11:return Aw(o,u,u.type,u.pendingProps,h);case 7:return Vn(o,u,u.pendingProps,h),u.child;case 8:return Vn(o,u,u.pendingProps.children,h),u.child;case 12:return Vn(o,u,u.pendingProps.children,h),u.child;case 10:return v=u.pendingProps,us(u,u.type,v.value),Vn(o,u,v.children,h),u.child;case 9:return y=u.type._context,v=u.pendingProps.children,po(u),y=Bn(y),v=v(y),u.flags|=1,Vn(o,u,v,h),u.child;case 14:return Qw(o,u,u.type,u.pendingProps,h);case 15:return Pw(o,u,u.type,u.pendingProps,h);case 19:return Xw(o,u,h);case 31:return T3(o,u,h);case 22:return Nw(o,u,h,u.pendingProps);case 24:return po(u),v=Bn(xn),o===null?(y=Ig(),y===null&&(y=zt,x=zg(),y.pooledCache=x,x.refCount++,x!==null&&(y.pooledCacheLanes|=h),y=x),u.memoizedState={parent:v,cache:y},Zg(u),us(u,xn,y)):((o.lanes&h)!==0&&(Bg(o,u),hu(u,null,null,h),fu()),y=o.memoizedState,x=u.memoizedState,y.parent!==v?(y={parent:v,cache:v},u.memoizedState=y,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=y),us(u,xn,v)):(v=x.cache,us(u,xn,v),v!==y.cache&&Dg(u,[xn],h,!0))),Vn(o,u,u.pendingProps.children,h),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function Na(o){o.flags|=4}function wv(o,u,h,v,y){if((u=(o.mode&32)!==0)&&(u=!1),u){if(o.flags|=16777216,(y&335544128)===y)if(o.stateNode.complete)o.flags|=8192;else if(pk())o.flags|=8192;else throw Oo=Hf,Xg}else o.flags&=-16777217}function Bw(o,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!i1(u))if(pk())o.flags|=8192;else throw Oo=Hf,Xg}function hh(o,u){u!==null&&(o.flags|=4),o.flags&16384&&(u=o.tag!==22?rn():536870912,o.lanes|=u,Ll|=u)}function bu(o,u){if(!ot)switch(o.tailMode){case"hidden":u=o.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?o.tail=null:h.sibling=null;break;case"collapsed":h=o.tail;for(var v=null;h!==null;)h.alternate!==null&&(v=h),h=h.sibling;v===null?u||o.tail===null?o.tail=null:o.tail.sibling=null:v.sibling=null}}function $t(o){var u=o.alternate!==null&&o.alternate.child===o.child,h=0,v=0;if(u)for(var y=o.child;y!==null;)h|=y.lanes|y.childLanes,v|=y.subtreeFlags&65011712,v|=y.flags&65011712,y.return=o,y=y.sibling;else for(y=o.child;y!==null;)h|=y.lanes|y.childLanes,v|=y.subtreeFlags,v|=y.flags,y.return=o,y=y.sibling;return o.subtreeFlags|=v,o.childLanes=h,u}function E3(o,u,h){var v=u.pendingProps;switch(Pg(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(u),null;case 1:return $t(u),null;case 3:return h=u.stateNode,v=null,o!==null&&(v=o.memoizedState.cache),u.memoizedState.cache!==v&&(u.flags|=2048),Ea(xn),Pe(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(o===null||o.child===null)&&(_l(u)?Na(u):o===null||o.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Rg())),$t(u),null;case 26:var y=u.type,x=u.memoizedState;return o===null?(Na(u),x!==null?($t(u),Bw(u,x)):($t(u),wv(u,y,null,v,h))):x?x!==o.memoizedState?(Na(u),$t(u),Bw(u,x)):($t(u),u.flags&=-16777217):(o=o.memoizedProps,o!==v&&Na(u),$t(u),wv(u,y,o,v,h)),null;case 27:if(Ve(u),h=ve.current,y=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==v&&Na(u);else{if(!v){if(u.stateNode===null)throw Error(r(166));return $t(u),null}o=me.current,_l(u)?x_(u):(o=Hk(y,v,h),u.stateNode=o,Na(u))}return $t(u),null;case 5:if(Ve(u),y=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==v&&Na(u);else{if(!v){if(u.stateNode===null)throw Error(r(166));return $t(u),null}if(x=me.current,_l(u))x_(u);else{var C=Ch(ve.current);switch(x){case 1:x=C.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:x=C.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":x=C.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":x=C.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":x=C.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof v.is=="string"?C.createElement("select",{is:v.is}):C.createElement("select"),v.multiple?x.multiple=!0:v.size&&(x.size=v.size);break;default:x=typeof v.is=="string"?C.createElement(y,{is:v.is}):C.createElement(y)}}x[tn]=u,x[Sn]=v;e:for(C=u.child;C!==null;){if(C.tag===5||C.tag===6)x.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===u)break e;for(;C.sibling===null;){if(C.return===null||C.return===u)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}u.stateNode=x;e:switch(Un(x,y,v),y){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&Na(u)}}return $t(u),wv(u,u.type,o===null?null:o.memoizedProps,u.pendingProps,h),null;case 6:if(o&&u.stateNode!=null)o.memoizedProps!==v&&Na(u);else{if(typeof v!="string"&&u.stateNode===null)throw Error(r(166));if(o=ve.current,_l(u)){if(o=u.stateNode,h=u.memoizedProps,v=null,y=Zn,y!==null)switch(y.tag){case 27:case 5:v=y.memoizedProps}o[tn]=u,o=!!(o.nodeValue===h||v!==null&&v.suppressHydrationWarning===!0||qk(o.nodeValue,h)),o||cs(u,!0)}else o=Ch(o).createTextNode(v),o[tn]=u,u.stateNode=o}return $t(u),null;case 31:if(h=u.memoizedState,o===null||o.memoizedState!==null){if(v=_l(u),h!==null){if(o===null){if(!v)throw Error(r(318));if(o=u.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[tn]=u}else ho(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;$t(u),o=!1}else h=Rg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=h),o=!0;if(!o)return u.flags&256?(Mr(u),u):(Mr(u),null);if((u.flags&128)!==0)throw Error(r(558))}return $t(u),null;case 13:if(v=u.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(y=_l(u),v!==null&&v.dehydrated!==null){if(o===null){if(!y)throw Error(r(318));if(y=u.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[tn]=u}else ho(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;$t(u),y=!1}else y=Rg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=y),y=!0;if(!y)return u.flags&256?(Mr(u),u):(Mr(u),null)}return Mr(u),(u.flags&128)!==0?(u.lanes=h,u):(h=v!==null,o=o!==null&&o.memoizedState!==null,h&&(v=u.child,y=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(y=v.alternate.memoizedState.cachePool.pool),x=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(x=v.memoizedState.cachePool.pool),x!==y&&(v.flags|=2048)),h!==o&&h&&(u.child.flags|=8192),hh(u,u.updateQueue),$t(u),null);case 4:return Pe(),o===null&&Yv(u.stateNode.containerInfo),$t(u),null;case 10:return Ea(u.type),$t(u),null;case 19:if(re(dn),v=u.memoizedState,v===null)return $t(u),null;if(y=(u.flags&128)!==0,x=v.rendering,x===null)if(y)bu(v,!1);else{if(on!==0||o!==null&&(o.flags&128)!==0)for(o=u.child;o!==null;){if(x=eh(o),x!==null){for(u.flags|=128,bu(v,!1),o=x.updateQueue,u.updateQueue=o,hh(u,o),u.subtreeFlags=0,o=h,h=u.child;h!==null;)v_(h,o),h=h.sibling;return R(dn,dn.current&1|2),ot&&Ta(u,v.treeForkCount),u.child}o=o.sibling}v.tail!==null&&bt()>Oh&&(u.flags|=128,y=!0,bu(v,!1),u.lanes=4194304)}else{if(!y)if(o=eh(x),o!==null){if(u.flags|=128,y=!0,o=o.updateQueue,u.updateQueue=o,hh(u,o),bu(v,!0),v.tail===null&&v.tailMode==="hidden"&&!x.alternate&&!ot)return $t(u),null}else 2*bt()-v.renderingStartTime>Oh&&h!==536870912&&(u.flags|=128,y=!0,bu(v,!1),u.lanes=4194304);v.isBackwards?(x.sibling=u.child,u.child=x):(o=v.last,o!==null?o.sibling=x:u.child=x,v.last=x)}return v.tail!==null?(o=v.tail,v.rendering=o,v.tail=o.sibling,v.renderingStartTime=bt(),o.sibling=null,h=dn.current,R(dn,y?h&1|2:h&1),ot&&Ta(u,v.treeForkCount),o):($t(u),null);case 22:case 23:return Mr(u),Fg(),v=u.memoizedState!==null,o!==null?o.memoizedState!==null!==v&&(u.flags|=8192):v&&(u.flags|=8192),v?(h&536870912)!==0&&(u.flags&128)===0&&($t(u),u.subtreeFlags&6&&(u.flags|=8192)):$t(u),h=u.updateQueue,h!==null&&hh(u,h.retryQueue),h=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==h&&(u.flags|=2048),o!==null&&re(go),null;case 24:return h=null,o!==null&&(h=o.memoizedState.cache),u.memoizedState.cache!==h&&(u.flags|=2048),Ea(xn),$t(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function A3(o,u){switch(Pg(u),u.tag){case 1:return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 3:return Ea(xn),Pe(),o=u.flags,(o&65536)!==0&&(o&128)===0?(u.flags=o&-65537|128,u):null;case 26:case 27:case 5:return Ve(u),null;case 31:if(u.memoizedState!==null){if(Mr(u),u.alternate===null)throw Error(r(340));ho()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 13:if(Mr(u),o=u.memoizedState,o!==null&&o.dehydrated!==null){if(u.alternate===null)throw Error(r(340));ho()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 19:return re(dn),null;case 4:return Pe(),null;case 10:return Ea(u.type),null;case 22:case 23:return Mr(u),Fg(),o!==null&&re(go),o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 24:return Ea(xn),null;case 25:return null;default:return null}}function Vw(o,u){switch(Pg(u),u.tag){case 3:Ea(xn),Pe();break;case 26:case 27:case 5:Ve(u);break;case 4:Pe();break;case 31:u.memoizedState!==null&&Mr(u);break;case 13:Mr(u);break;case 19:re(dn);break;case 10:Ea(u.type);break;case 22:case 23:Mr(u),Fg(),o!==null&&re(go);break;case 24:Ea(xn)}}function yu(o,u){try{var h=u.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var y=v.next;h=y;do{if((h.tag&o)===o){v=void 0;var x=h.create,C=h.inst;v=x(),C.destroy=v}h=h.next}while(h!==y)}}catch(M){kt(u,u.return,M)}}function gs(o,u,h){try{var v=u.updateQueue,y=v!==null?v.lastEffect:null;if(y!==null){var x=y.next;v=x;do{if((v.tag&o)===o){var C=v.inst,M=C.destroy;if(M!==void 0){C.destroy=void 0,y=u;var F=h,ee=M;try{ee()}catch(se){kt(y,F,se)}}}v=v.next}while(v!==x)}}catch(se){kt(u,u.return,se)}}function Uw(o){var u=o.updateQueue;if(u!==null){var h=o.stateNode;try{M_(u,h)}catch(v){kt(o,o.return,v)}}}function Yw(o,u,h){h.props=So(o.type,o.memoizedProps),h.state=o.memoizedState;try{h.componentWillUnmount()}catch(v){kt(o,u,v)}}function Su(o,u){try{var h=o.ref;if(h!==null){switch(o.tag){case 26:case 27:case 5:var v=o.stateNode;break;case 30:v=o.stateNode;break;default:v=o.stateNode}typeof h=="function"?o.refCleanup=h(v):h.current=v}}catch(y){kt(o,u,y)}}function Wi(o,u){var h=o.ref,v=o.refCleanup;if(h!==null)if(typeof v=="function")try{v()}catch(y){kt(o,u,y)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(y){kt(o,u,y)}else h.current=null}function Fw(o){var u=o.type,h=o.memoizedProps,v=o.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":h.autoFocus&&v.focus();break e;case"img":h.src?v.src=h.src:h.srcSet&&(v.srcset=h.srcSet)}}catch(y){kt(o,o.return,y)}}function kv(o,u,h){try{var v=o.stateNode;K3(v,o.type,h,u),v[Sn]=u}catch(y){kt(o,o.return,y)}}function $w(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&_s(o.type)||o.tag===4}function jv(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||$w(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&_s(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Tv(o,u,h){var v=o.tag;if(v===5||v===6)o=o.stateNode,u?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(o,u):(u=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,u.appendChild(o),h=h._reactRootContainer,h!=null||u.onclick!==null||(u.onclick=wi));else if(v!==4&&(v===27&&_s(o.type)&&(h=o.stateNode,u=null),o=o.child,o!==null))for(Tv(o,u,h),o=o.sibling;o!==null;)Tv(o,u,h),o=o.sibling}function mh(o,u,h){var v=o.tag;if(v===5||v===6)o=o.stateNode,u?h.insertBefore(o,u):h.appendChild(o);else if(v!==4&&(v===27&&_s(o.type)&&(h=o.stateNode),o=o.child,o!==null))for(mh(o,u,h),o=o.sibling;o!==null;)mh(o,u,h),o=o.sibling}function Ww(o){var u=o.stateNode,h=o.memoizedProps;try{for(var v=o.type,y=u.attributes;y.length;)u.removeAttributeNode(y[0]);Un(u,v,h),u[tn]=o,u[Sn]=h}catch(x){kt(o,o.return,x)}}var Ra=!1,kn=!1,Cv=!1,Hw=typeof WeakSet=="function"?WeakSet:Set,Ln=null;function Q3(o,u){if(o=o.containerInfo,Wv=Mh,o=l_(o),Sg(o)){if("selectionStart"in o)var h={start:o.selectionStart,end:o.selectionEnd};else e:{h=(h=o.ownerDocument)&&h.defaultView||window;var v=h.getSelection&&h.getSelection();if(v&&v.rangeCount!==0){h=v.anchorNode;var y=v.anchorOffset,x=v.focusNode;v=v.focusOffset;try{h.nodeType,x.nodeType}catch{h=null;break e}var C=0,M=-1,F=-1,ee=0,se=0,le=o,te=null;t:for(;;){for(var ie;le!==h||y!==0&&le.nodeType!==3||(M=C+y),le!==x||v!==0&&le.nodeType!==3||(F=C+v),le.nodeType===3&&(C+=le.nodeValue.length),(ie=le.firstChild)!==null;)te=le,le=ie;for(;;){if(le===o)break t;if(te===h&&++ee===y&&(M=C),te===x&&++se===v&&(F=C),(ie=le.nextSibling)!==null)break;le=te,te=le.parentNode}le=ie}h=M===-1||F===-1?null:{start:M,end:F}}else h=null}h=h||{start:0,end:0}}else h=null;for(Hv={focusedElem:o,selectionRange:h},Mh=!1,Ln=u;Ln!==null;)if(u=Ln,o=u.child,(u.subtreeFlags&1028)!==0&&o!==null)o.return=u,Ln=o;else for(;Ln!==null;){switch(u=Ln,x=u.alternate,o=u.flags,u.tag){case 0:if((o&4)!==0&&(o=u.updateQueue,o=o!==null?o.events:null,o!==null))for(h=0;h<o.length;h++)y=o[h],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&x!==null){o=void 0,h=u,y=x.memoizedProps,x=x.memoizedState,v=h.stateNode;try{var _e=So(h.type,y);o=v.getSnapshotBeforeUpdate(_e,x),v.__reactInternalSnapshotBeforeUpdate=o}catch(Ie){kt(h,h.return,Ie)}}break;case 3:if((o&1024)!==0){if(o=u.stateNode.containerInfo,h=o.nodeType,h===9)Jv(o);else if(h===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":Jv(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=u.sibling,o!==null){o.return=u.return,Ln=o;break}Ln=u.return}}function Gw(o,u,h){var v=h.flags;switch(h.tag){case 0:case 11:case 15:La(o,h),v&4&&yu(5,h);break;case 1:if(La(o,h),v&4)if(o=h.stateNode,u===null)try{o.componentDidMount()}catch(C){kt(h,h.return,C)}else{var y=So(h.type,u.memoizedProps);u=u.memoizedState;try{o.componentDidUpdate(y,u,o.__reactInternalSnapshotBeforeUpdate)}catch(C){kt(h,h.return,C)}}v&64&&Uw(h),v&512&&Su(h,h.return);break;case 3:if(La(o,h),v&64&&(o=h.updateQueue,o!==null)){if(u=null,h.child!==null)switch(h.child.tag){case 27:case 5:u=h.child.stateNode;break;case 1:u=h.child.stateNode}try{M_(o,u)}catch(C){kt(h,h.return,C)}}break;case 27:u===null&&v&4&&Ww(h);case 26:case 5:La(o,h),u===null&&v&4&&Fw(h),v&512&&Su(h,h.return);break;case 12:La(o,h);break;case 31:La(o,h),v&4&&ek(o,h);break;case 13:La(o,h),v&4&&tk(o,h),v&64&&(o=h.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(h=I3.bind(null,h),sz(o,h))));break;case 22:if(v=h.memoizedState!==null||Ra,!v){u=u!==null&&u.memoizedState!==null||kn,y=Ra;var x=kn;Ra=v,(kn=u)&&!x?Da(o,h,(h.subtreeFlags&8772)!==0):La(o,h),Ra=y,kn=x}break;case 30:break;default:La(o,h)}}function Kw(o){var u=o.alternate;u!==null&&(o.alternate=null,Kw(u)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(u=o.stateNode,u!==null&&Sa(u)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var Jt=null,br=!1;function Ma(o,u,h){for(h=h.child;h!==null;)Jw(o,u,h),h=h.sibling}function Jw(o,u,h){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Ht,h)}catch{}switch(h.tag){case 26:kn||Wi(h,u),Ma(o,u,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:kn||Wi(h,u);var v=Jt,y=br;_s(h.type)&&(Jt=h.stateNode,br=!1),Ma(o,u,h),Au(h.stateNode),Jt=v,br=y;break;case 5:kn||Wi(h,u);case 6:if(v=Jt,y=br,Jt=null,Ma(o,u,h),Jt=v,br=y,Jt!==null)if(br)try{(Jt.nodeType===9?Jt.body:Jt.nodeName==="HTML"?Jt.ownerDocument.body:Jt).removeChild(h.stateNode)}catch(x){kt(h,u,x)}else try{Jt.removeChild(h.stateNode)}catch(x){kt(h,u,x)}break;case 18:Jt!==null&&(br?(o=Jt,Uk(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,h.stateNode),Vl(o)):Uk(Jt,h.stateNode));break;case 4:v=Jt,y=br,Jt=h.stateNode.containerInfo,br=!0,Ma(o,u,h),Jt=v,br=y;break;case 0:case 11:case 14:case 15:gs(2,h,u),kn||gs(4,h,u),Ma(o,u,h);break;case 1:kn||(Wi(h,u),v=h.stateNode,typeof v.componentWillUnmount=="function"&&Yw(h,u,v)),Ma(o,u,h);break;case 21:Ma(o,u,h);break;case 22:kn=(v=kn)||h.memoizedState!==null,Ma(o,u,h),kn=v;break;default:Ma(o,u,h)}}function ek(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Vl(o)}catch(h){kt(u,u.return,h)}}}function tk(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Vl(o)}catch(h){kt(u,u.return,h)}}function P3(o){switch(o.tag){case 31:case 13:case 19:var u=o.stateNode;return u===null&&(u=o.stateNode=new Hw),u;case 22:return o=o.stateNode,u=o._retryCache,u===null&&(u=o._retryCache=new Hw),u;default:throw Error(r(435,o.tag))}}function ph(o,u){var h=P3(o);u.forEach(function(v){if(!h.has(v)){h.add(v);var y=X3.bind(null,o,v);v.then(y,y)}})}function yr(o,u){var h=u.deletions;if(h!==null)for(var v=0;v<h.length;v++){var y=h[v],x=o,C=u,M=C;e:for(;M!==null;){switch(M.tag){case 27:if(_s(M.type)){Jt=M.stateNode,br=!1;break e}break;case 5:Jt=M.stateNode,br=!1;break e;case 3:case 4:Jt=M.stateNode.containerInfo,br=!0;break e}M=M.return}if(Jt===null)throw Error(r(160));Jw(x,C,y),Jt=null,br=!1,x=y.alternate,x!==null&&(x.return=null),y.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)nk(u,o),u=u.sibling}var Ci=null;function nk(o,u){var h=o.alternate,v=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:yr(u,o),Sr(o),v&4&&(gs(3,o,o.return),yu(3,o),gs(5,o,o.return));break;case 1:yr(u,o),Sr(o),v&512&&(kn||h===null||Wi(h,h.return)),v&64&&Ra&&(o=o.updateQueue,o!==null&&(v=o.callbacks,v!==null&&(h=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=h===null?v:h.concat(v))));break;case 26:var y=Ci;if(yr(u,o),Sr(o),v&512&&(kn||h===null||Wi(h,h.return)),v&4){var x=h!==null?h.memoizedState:null;if(v=o.memoizedState,h===null)if(v===null)if(o.stateNode===null){e:{v=o.type,h=o.memoizedProps,y=y.ownerDocument||y;t:switch(v){case"title":x=y.getElementsByTagName("title")[0],(!x||x[Hn]||x[tn]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=y.createElement(v),y.head.insertBefore(x,y.querySelector("head > title"))),Un(x,v,h),x[tn]=o,an(x),v=x;break e;case"link":var C=n1("link","href",y).get(v+(h.href||""));if(C){for(var M=0;M<C.length;M++)if(x=C[M],x.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&x.getAttribute("rel")===(h.rel==null?null:h.rel)&&x.getAttribute("title")===(h.title==null?null:h.title)&&x.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){C.splice(M,1);break t}}x=y.createElement(v),Un(x,v,h),y.head.appendChild(x);break;case"meta":if(C=n1("meta","content",y).get(v+(h.content||""))){for(M=0;M<C.length;M++)if(x=C[M],x.getAttribute("content")===(h.content==null?null:""+h.content)&&x.getAttribute("name")===(h.name==null?null:h.name)&&x.getAttribute("property")===(h.property==null?null:h.property)&&x.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&x.getAttribute("charset")===(h.charSet==null?null:h.charSet)){C.splice(M,1);break t}}x=y.createElement(v),Un(x,v,h),y.head.appendChild(x);break;default:throw Error(r(468,v))}x[tn]=o,an(x),v=x}o.stateNode=v}else r1(y,o.type,o.stateNode);else o.stateNode=t1(y,v,o.memoizedProps);else x!==v?(x===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):x.count--,v===null?r1(y,o.type,o.stateNode):t1(y,v,o.memoizedProps)):v===null&&o.stateNode!==null&&kv(o,o.memoizedProps,h.memoizedProps)}break;case 27:yr(u,o),Sr(o),v&512&&(kn||h===null||Wi(h,h.return)),h!==null&&v&4&&kv(o,o.memoizedProps,h.memoizedProps);break;case 5:if(yr(u,o),Sr(o),v&512&&(kn||h===null||Wi(h,h.return)),o.flags&32){y=o.stateNode;try{rs(y,"")}catch(_e){kt(o,o.return,_e)}}v&4&&o.stateNode!=null&&(y=o.memoizedProps,kv(o,y,h!==null?h.memoizedProps:y)),v&1024&&(Cv=!0);break;case 6:if(yr(u,o),Sr(o),v&4){if(o.stateNode===null)throw Error(r(162));v=o.memoizedProps,h=o.stateNode;try{h.nodeValue=v}catch(_e){kt(o,o.return,_e)}}break;case 3:if(Qh=null,y=Ci,Ci=Eh(u.containerInfo),yr(u,o),Ci=y,Sr(o),v&4&&h!==null&&h.memoizedState.isDehydrated)try{Vl(u.containerInfo)}catch(_e){kt(o,o.return,_e)}Cv&&(Cv=!1,rk(o));break;case 4:v=Ci,Ci=Eh(o.stateNode.containerInfo),yr(u,o),Sr(o),Ci=v;break;case 12:yr(u,o),Sr(o);break;case 31:yr(u,o),Sr(o),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,ph(o,v)));break;case 13:yr(u,o),Sr(o),o.child.flags&8192&&o.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(vh=bt()),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,ph(o,v)));break;case 22:y=o.memoizedState!==null;var F=h!==null&&h.memoizedState!==null,ee=Ra,se=kn;if(Ra=ee||y,kn=se||F,yr(u,o),kn=se,Ra=ee,Sr(o),v&8192)e:for(u=o.stateNode,u._visibility=y?u._visibility&-2:u._visibility|1,y&&(h===null||F||Ra||kn||xo(o)),h=null,u=o;;){if(u.tag===5||u.tag===26){if(h===null){F=h=u;try{if(x=F.stateNode,y)C=x.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{M=F.stateNode;var le=F.memoizedProps.style,te=le!=null&&le.hasOwnProperty("display")?le.display:null;M.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(_e){kt(F,F.return,_e)}}}else if(u.tag===6){if(h===null){F=u;try{F.stateNode.nodeValue=y?"":F.memoizedProps}catch(_e){kt(F,F.return,_e)}}}else if(u.tag===18){if(h===null){F=u;try{var ie=F.stateNode;y?Yk(ie,!0):Yk(F.stateNode,!1)}catch(_e){kt(F,F.return,_e)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===o)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break e;for(;u.sibling===null;){if(u.return===null||u.return===o)break e;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}v&4&&(v=o.updateQueue,v!==null&&(h=v.retryQueue,h!==null&&(v.retryQueue=null,ph(o,h))));break;case 19:yr(u,o),Sr(o),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,ph(o,v)));break;case 30:break;case 21:break;default:yr(u,o),Sr(o)}}function Sr(o){var u=o.flags;if(u&2){try{for(var h,v=o.return;v!==null;){if($w(v)){h=v;break}v=v.return}if(h==null)throw Error(r(160));switch(h.tag){case 27:var y=h.stateNode,x=jv(o);mh(o,x,y);break;case 5:var C=h.stateNode;h.flags&32&&(rs(C,""),h.flags&=-33);var M=jv(o);mh(o,M,C);break;case 3:case 4:var F=h.stateNode.containerInfo,ee=jv(o);Tv(o,ee,F);break;default:throw Error(r(161))}}catch(se){kt(o,o.return,se)}o.flags&=-3}u&4096&&(o.flags&=-4097)}function rk(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var u=o;rk(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),o=o.sibling}}function La(o,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)Gw(o,u.alternate,u),u=u.sibling}function xo(o){for(o=o.child;o!==null;){var u=o;switch(u.tag){case 0:case 11:case 14:case 15:gs(4,u,u.return),xo(u);break;case 1:Wi(u,u.return);var h=u.stateNode;typeof h.componentWillUnmount=="function"&&Yw(u,u.return,h),xo(u);break;case 27:Au(u.stateNode);case 26:case 5:Wi(u,u.return),xo(u);break;case 22:u.memoizedState===null&&xo(u);break;case 30:xo(u);break;default:xo(u)}o=o.sibling}}function Da(o,u,h){for(h=h&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var v=u.alternate,y=o,x=u,C=x.flags;switch(x.tag){case 0:case 11:case 15:Da(y,x,h),yu(4,x);break;case 1:if(Da(y,x,h),v=x,y=v.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(ee){kt(v,v.return,ee)}if(v=x,y=v.updateQueue,y!==null){var M=v.stateNode;try{var F=y.shared.hiddenCallbacks;if(F!==null)for(y.shared.hiddenCallbacks=null,y=0;y<F.length;y++)R_(F[y],M)}catch(ee){kt(v,v.return,ee)}}h&&C&64&&Uw(x),Su(x,x.return);break;case 27:Ww(x);case 26:case 5:Da(y,x,h),h&&v===null&&C&4&&Fw(x),Su(x,x.return);break;case 12:Da(y,x,h);break;case 31:Da(y,x,h),h&&C&4&&ek(y,x);break;case 13:Da(y,x,h),h&&C&4&&tk(y,x);break;case 22:x.memoizedState===null&&Da(y,x,h),Su(x,x.return);break;case 30:break;default:Da(y,x,h)}u=u.sibling}}function Ev(o,u){var h=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),o=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(o=u.memoizedState.cachePool.pool),o!==h&&(o!=null&&o.refCount++,h!=null&&ou(h))}function Av(o,u){o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&ou(o))}function Ei(o,u,h,v){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)ik(o,u,h,v),u=u.sibling}function ik(o,u,h,v){var y=u.flags;switch(u.tag){case 0:case 11:case 15:Ei(o,u,h,v),y&2048&&yu(9,u);break;case 1:Ei(o,u,h,v);break;case 3:Ei(o,u,h,v),y&2048&&(o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&ou(o)));break;case 12:if(y&2048){Ei(o,u,h,v),o=u.stateNode;try{var x=u.memoizedProps,C=x.id,M=x.onPostCommit;typeof M=="function"&&M(C,u.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(F){kt(u,u.return,F)}}else Ei(o,u,h,v);break;case 31:Ei(o,u,h,v);break;case 13:Ei(o,u,h,v);break;case 23:break;case 22:x=u.stateNode,C=u.alternate,u.memoizedState!==null?x._visibility&2?Ei(o,u,h,v):xu(o,u):x._visibility&2?Ei(o,u,h,v):(x._visibility|=2,Nl(o,u,h,v,(u.subtreeFlags&10256)!==0||!1)),y&2048&&Ev(C,u);break;case 24:Ei(o,u,h,v),y&2048&&Av(u.alternate,u);break;default:Ei(o,u,h,v)}}function Nl(o,u,h,v,y){for(y=y&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var x=o,C=u,M=h,F=v,ee=C.flags;switch(C.tag){case 0:case 11:case 15:Nl(x,C,M,F,y),yu(8,C);break;case 23:break;case 22:var se=C.stateNode;C.memoizedState!==null?se._visibility&2?Nl(x,C,M,F,y):xu(x,C):(se._visibility|=2,Nl(x,C,M,F,y)),y&&ee&2048&&Ev(C.alternate,C);break;case 24:Nl(x,C,M,F,y),y&&ee&2048&&Av(C.alternate,C);break;default:Nl(x,C,M,F,y)}u=u.sibling}}function xu(o,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var h=o,v=u,y=v.flags;switch(v.tag){case 22:xu(h,v),y&2048&&Ev(v.alternate,v);break;case 24:xu(h,v),y&2048&&Av(v.alternate,v);break;default:xu(h,v)}u=u.sibling}}var _u=8192;function Rl(o,u,h){if(o.subtreeFlags&_u)for(o=o.child;o!==null;)ak(o,u,h),o=o.sibling}function ak(o,u,h){switch(o.tag){case 26:Rl(o,u,h),o.flags&_u&&o.memoizedState!==null&&Oz(h,Ci,o.memoizedState,o.memoizedProps);break;case 5:Rl(o,u,h);break;case 3:case 4:var v=Ci;Ci=Eh(o.stateNode.containerInfo),Rl(o,u,h),Ci=v;break;case 22:o.memoizedState===null&&(v=o.alternate,v!==null&&v.memoizedState!==null?(v=_u,_u=16777216,Rl(o,u,h),_u=v):Rl(o,u,h));break;default:Rl(o,u,h)}}function sk(o){var u=o.alternate;if(u!==null&&(o=u.child,o!==null)){u.child=null;do u=o.sibling,o.sibling=null,o=u;while(o!==null)}}function wu(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var v=u[h];Ln=v,lk(v,o)}sk(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)ok(o),o=o.sibling}function ok(o){switch(o.tag){case 0:case 11:case 15:wu(o),o.flags&2048&&gs(9,o,o.return);break;case 3:wu(o);break;case 12:wu(o);break;case 22:var u=o.stateNode;o.memoizedState!==null&&u._visibility&2&&(o.return===null||o.return.tag!==13)?(u._visibility&=-3,gh(o)):wu(o);break;default:wu(o)}}function gh(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var v=u[h];Ln=v,lk(v,o)}sk(o)}for(o=o.child;o!==null;){switch(u=o,u.tag){case 0:case 11:case 15:gs(8,u,u.return),gh(u);break;case 22:h=u.stateNode,h._visibility&2&&(h._visibility&=-3,gh(u));break;default:gh(u)}o=o.sibling}}function lk(o,u){for(;Ln!==null;){var h=Ln;switch(h.tag){case 0:case 11:case 15:gs(8,h,u);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var v=h.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:ou(h.memoizedState.cache)}if(v=h.child,v!==null)v.return=h,Ln=v;else e:for(h=o;Ln!==null;){v=Ln;var y=v.sibling,x=v.return;if(Kw(v),v===h){Ln=null;break e}if(y!==null){y.return=x,Ln=y;break e}Ln=x}}}var N3={getCacheForType:function(o){var u=Bn(xn),h=u.data.get(o);return h===void 0&&(h=o(),u.data.set(o,h)),h},cacheSignal:function(){return Bn(xn).controller.signal}},R3=typeof WeakMap=="function"?WeakMap:Map,vt=0,zt=null,et=null,at=0,wt=0,Lr=null,vs=!1,Ml=!1,Qv=!1,za=0,on=0,Os=0,_o=0,Pv=0,Dr=0,Ll=0,ku=null,xr=null,Nv=!1,vh=0,ck=0,Oh=1/0,bh=null,bs=null,En=0,ys=null,Dl=null,qa=0,Rv=0,Mv=null,uk=null,ju=0,Lv=null;function zr(){return(vt&2)!==0&&at!==0?at&-at:I.T!==null?Zv():Xn()}function dk(){if(Dr===0)if((at&536870912)===0||ot){var o=Wr;Wr<<=1,(Wr&3932160)===0&&(Wr=262144),Dr=o}else Dr=536870912;return o=Rr.current,o!==null&&(o.flags|=32),Dr}function _r(o,u,h){(o===zt&&(wt===2||wt===9)||o.cancelPendingCommit!==null)&&(zl(o,0),Ss(o,at,Dr,!1)),Pn(o,h),((vt&2)===0||o!==zt)&&(o===zt&&((vt&2)===0&&(_o|=h),on===4&&Ss(o,at,Dr,!1)),Hi(o))}function fk(o,u,h){if((vt&6)!==0)throw Error(r(327));var v=!h&&(u&127)===0&&(u&o.expiredLanes)===0||gn(o,u),y=v?D3(o,u):zv(o,u,!0),x=v;do{if(y===0){Ml&&!v&&Ss(o,u,0,!1);break}else{if(h=o.current.alternate,x&&!M3(h)){y=zv(o,u,!1),x=!1;continue}if(y===2){if(x=u,o.errorRecoveryDisabledLanes&x)var C=0;else C=o.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){u=C;e:{var M=o;y=ku;var F=M.current.memoizedState.isDehydrated;if(F&&(zl(M,C).flags|=256),C=zv(M,C,!1),C!==2){if(Qv&&!F){M.errorRecoveryDisabledLanes|=x,_o|=x,y=4;break e}x=xr,xr=y,x!==null&&(xr===null?xr=x:xr.push.apply(xr,x))}y=C}if(x=!1,y!==2)continue}}if(y===1){zl(o,0),Ss(o,u,0,!0);break}e:{switch(v=o,x=y,x){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:Ss(v,u,Dr,!vs);break e;case 2:xr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(y=vh+300-bt(),10<y)){if(Ss(v,u,Dr,!vs),Kt(v,0,!0)!==0)break e;qa=u,v.timeoutHandle=Bk(hk.bind(null,v,h,xr,bh,Nv,u,Dr,_o,Ll,vs,x,"Throttled",-0,0),y);break e}hk(v,h,xr,bh,Nv,u,Dr,_o,Ll,vs,x,null,-0,0)}}break}while(!0);Hi(o)}function hk(o,u,h,v,y,x,C,M,F,ee,se,le,te,ie){if(o.timeoutHandle=-1,le=u.subtreeFlags,le&8192||(le&16785408)===16785408){le={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:wi},ak(u,x,le);var _e=(x&62914560)===x?vh-bt():(x&4194048)===x?ck-bt():0;if(_e=bz(le,_e),_e!==null){qa=x,o.cancelPendingCommit=_e(Sk.bind(null,o,u,x,h,v,y,C,M,F,se,le,null,te,ie)),Ss(o,x,C,!ee);return}}Sk(o,u,x,h,v,y,C,M,F)}function M3(o){for(var u=o;;){var h=u.tag;if((h===0||h===11||h===15)&&u.flags&16384&&(h=u.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var v=0;v<h.length;v++){var y=h[v],x=y.getSnapshot;y=y.value;try{if(!Pr(x(),y))return!1}catch{return!1}}if(h=u.child,u.subtreeFlags&16384&&h!==null)h.return=u,u=h;else{if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Ss(o,u,h,v){u&=~Pv,u&=~_o,o.suspendedLanes|=u,o.pingedLanes&=~u,v&&(o.warmLanes|=u),v=o.expirationTimes;for(var y=u;0<y;){var x=31-rt(y),C=1<<x;v[x]=-1,y&=~C}h!==0&&Nn(o,h,u)}function yh(){return(vt&6)===0?(Tu(0),!1):!0}function Dv(){if(et!==null){if(wt===0)var o=et.return;else o=et,Ca=mo=null,Jg(o),Cl=null,cu=0,o=et;for(;o!==null;)Vw(o.alternate,o),o=o.return;et=null}}function zl(o,u){var h=o.timeoutHandle;h!==-1&&(o.timeoutHandle=-1,tz(h)),h=o.cancelPendingCommit,h!==null&&(o.cancelPendingCommit=null,h()),qa=0,Dv(),zt=o,et=h=ja(o.current,null),at=u,wt=0,Lr=null,vs=!1,Ml=gn(o,u),Qv=!1,Ll=Dr=Pv=_o=Os=on=0,xr=ku=null,Nv=!1,(u&8)!==0&&(u|=u&32);var v=o.entangledLanes;if(v!==0)for(o=o.entanglements,v&=u;0<v;){var y=31-rt(v),x=1<<y;u|=o[y],v&=~x}return za=u,Xf(),h}function mk(o,u){Ye=null,I.H=vu,u===Tl||u===Wf?(u=A_(),wt=3):u===Xg?(u=A_(),wt=4):wt=u===pv?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Lr=u,et===null&&(on=1,ch(o,Jr(u,o.current)))}function pk(){var o=Rr.current;return o===null?!0:(at&4194048)===at?ri===null:(at&62914560)===at||(at&536870912)!==0?o===ri:!1}function gk(){var o=I.H;return I.H=vu,o===null?vu:o}function vk(){var o=I.A;return I.A=N3,o}function Sh(){on=4,vs||(at&4194048)!==at&&Rr.current!==null||(Ml=!0),(Os&134217727)===0&&(_o&134217727)===0||zt===null||Ss(zt,at,Dr,!1)}function zv(o,u,h){var v=vt;vt|=2;var y=gk(),x=vk();(zt!==o||at!==u)&&(bh=null,zl(o,u)),u=!1;var C=on;e:do try{if(wt!==0&&et!==null){var M=et,F=Lr;switch(wt){case 8:Dv(),C=6;break e;case 3:case 2:case 9:case 6:Rr.current===null&&(u=!0);var ee=wt;if(wt=0,Lr=null,ql(o,M,F,ee),h&&Ml){C=0;break e}break;default:ee=wt,wt=0,Lr=null,ql(o,M,F,ee)}}L3(),C=on;break}catch(se){mk(o,se)}while(!0);return u&&o.shellSuspendCounter++,Ca=mo=null,vt=v,I.H=y,I.A=x,et===null&&(zt=null,at=0,Xf()),C}function L3(){for(;et!==null;)Ok(et)}function D3(o,u){var h=vt;vt|=2;var v=gk(),y=vk();zt!==o||at!==u?(bh=null,Oh=bt()+500,zl(o,u)):Ml=gn(o,u);e:do try{if(wt!==0&&et!==null){u=et;var x=Lr;t:switch(wt){case 1:wt=0,Lr=null,ql(o,u,x,1);break;case 2:case 9:if(C_(x)){wt=0,Lr=null,bk(u);break}u=function(){wt!==2&&wt!==9||zt!==o||(wt=7),Hi(o)},x.then(u,u);break e;case 3:wt=7;break e;case 4:wt=5;break e;case 7:C_(x)?(wt=0,Lr=null,bk(u)):(wt=0,Lr=null,ql(o,u,x,7));break;case 5:var C=null;switch(et.tag){case 26:C=et.memoizedState;case 5:case 27:var M=et;if(C?i1(C):M.stateNode.complete){wt=0,Lr=null;var F=M.sibling;if(F!==null)et=F;else{var ee=M.return;ee!==null?(et=ee,xh(ee)):et=null}break t}}wt=0,Lr=null,ql(o,u,x,5);break;case 6:wt=0,Lr=null,ql(o,u,x,6);break;case 8:Dv(),on=6;break e;default:throw Error(r(462))}}z3();break}catch(se){mk(o,se)}while(!0);return Ca=mo=null,I.H=v,I.A=y,vt=h,et!==null?0:(zt=null,at=0,Xf(),on)}function z3(){for(;et!==null&&!Tt();)Ok(et)}function Ok(o){var u=Zw(o.alternate,o,za);o.memoizedProps=o.pendingProps,u===null?xh(o):et=u}function bk(o){var u=o,h=u.alternate;switch(u.tag){case 15:case 0:u=Lw(h,u,u.pendingProps,u.type,void 0,at);break;case 11:u=Lw(h,u,u.pendingProps,u.type.render,u.ref,at);break;case 5:Jg(u);default:Vw(h,u),u=et=v_(u,za),u=Zw(h,u,za)}o.memoizedProps=o.pendingProps,u===null?xh(o):et=u}function ql(o,u,h,v){Ca=mo=null,Jg(u),Cl=null,cu=0;var y=u.return;try{if(j3(o,y,u,h,at)){on=1,ch(o,Jr(h,o.current)),et=null;return}}catch(x){if(y!==null)throw et=y,x;on=1,ch(o,Jr(h,o.current)),et=null;return}u.flags&32768?(ot||v===1?o=!0:Ml||(at&536870912)!==0?o=!1:(vs=o=!0,(v===2||v===9||v===3||v===6)&&(v=Rr.current,v!==null&&v.tag===13&&(v.flags|=16384))),yk(u,o)):xh(u)}function xh(o){var u=o;do{if((u.flags&32768)!==0){yk(u,vs);return}o=u.return;var h=E3(u.alternate,u,za);if(h!==null){et=h;return}if(u=u.sibling,u!==null){et=u;return}et=u=o}while(u!==null);on===0&&(on=5)}function yk(o,u){do{var h=A3(o.alternate,o);if(h!==null){h.flags&=32767,et=h;return}if(h=o.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!u&&(o=o.sibling,o!==null)){et=o;return}et=o=h}while(o!==null);on=6,et=null}function Sk(o,u,h,v,y,x,C,M,F){o.cancelPendingCommit=null;do _h();while(En!==0);if((vt&6)!==0)throw Error(r(327));if(u!==null){if(u===o.current)throw Error(r(177));if(x=u.lanes|u.childLanes,x|=jg,Yt(o,h,x,C,M,F),o===zt&&(et=zt=null,at=0),Dl=u,ys=o,qa=h,Rv=x,Mv=y,uk=v,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,Z3(je,function(){return jk(),null})):(o.callbackNode=null,o.callbackPriority=0),v=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||v){v=I.T,I.T=null,y=L.p,L.p=2,C=vt,vt|=4;try{Q3(o,u,h)}finally{vt=C,L.p=y,I.T=v}}En=1,xk(),_k(),wk()}}function xk(){if(En===1){En=0;var o=ys,u=Dl,h=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||h){h=I.T,I.T=null;var v=L.p;L.p=2;var y=vt;vt|=4;try{nk(u,o);var x=Hv,C=l_(o.containerInfo),M=x.focusedElem,F=x.selectionRange;if(C!==M&&M&&M.ownerDocument&&o_(M.ownerDocument.documentElement,M)){if(F!==null&&Sg(M)){var ee=F.start,se=F.end;if(se===void 0&&(se=ee),"selectionStart"in M)M.selectionStart=ee,M.selectionEnd=Math.min(se,M.value.length);else{var le=M.ownerDocument||document,te=le&&le.defaultView||window;if(te.getSelection){var ie=te.getSelection(),_e=M.textContent.length,Ie=Math.min(F.start,_e),Qt=F.end===void 0?Ie:Math.min(F.end,_e);!ie.extend&&Ie>Qt&&(C=Qt,Qt=Ie,Ie=C);var K=s_(M,Ie),W=s_(M,Qt);if(K&&W&&(ie.rangeCount!==1||ie.anchorNode!==K.node||ie.anchorOffset!==K.offset||ie.focusNode!==W.node||ie.focusOffset!==W.offset)){var J=le.createRange();J.setStart(K.node,K.offset),ie.removeAllRanges(),Ie>Qt?(ie.addRange(J),ie.extend(W.node,W.offset)):(J.setEnd(W.node,W.offset),ie.addRange(J))}}}}for(le=[],ie=M;ie=ie.parentNode;)ie.nodeType===1&&le.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<le.length;M++){var oe=le[M];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}Mh=!!Wv,Hv=Wv=null}finally{vt=y,L.p=v,I.T=h}}o.current=u,En=2}}function _k(){if(En===2){En=0;var o=ys,u=Dl,h=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||h){h=I.T,I.T=null;var v=L.p;L.p=2;var y=vt;vt|=4;try{Gw(o,u.alternate,u)}finally{vt=y,L.p=v,I.T=h}}En=3}}function wk(){if(En===4||En===3){En=0,Ot();var o=ys,u=Dl,h=qa,v=uk;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?En=5:(En=0,Dl=ys=null,kk(o,o.pendingLanes));var y=o.pendingLanes;if(y===0&&(bs=null),or(h),u=u.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Ht,u,void 0,(u.current.flags&128)===128)}catch{}if(v!==null){u=I.T,y=L.p,L.p=2,I.T=null;try{for(var x=o.onRecoverableError,C=0;C<v.length;C++){var M=v[C];x(M.value,{componentStack:M.stack})}}finally{I.T=u,L.p=y}}(qa&3)!==0&&_h(),Hi(o),y=o.pendingLanes,(h&261930)!==0&&(y&42)!==0?o===Lv?ju++:(ju=0,Lv=o):ju=0,Tu(0)}}function kk(o,u){(o.pooledCacheLanes&=u)===0&&(u=o.pooledCache,u!=null&&(o.pooledCache=null,ou(u)))}function _h(){return xk(),_k(),wk(),jk()}function jk(){if(En!==5)return!1;var o=ys,u=Rv;Rv=0;var h=or(qa),v=I.T,y=L.p;try{L.p=32>h?32:h,I.T=null,h=Mv,Mv=null;var x=ys,C=qa;if(En=0,Dl=ys=null,qa=0,(vt&6)!==0)throw Error(r(331));var M=vt;if(vt|=4,ok(x.current),ik(x,x.current,C,h),vt=M,Tu(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Ht,x)}catch{}return!0}finally{L.p=y,I.T=v,kk(o,u)}}function Tk(o,u,h){u=Jr(h,u),u=mv(o.stateNode,u,2),o=hs(o,u,2),o!==null&&(Pn(o,2),Hi(o))}function kt(o,u,h){if(o.tag===3)Tk(o,o,h);else for(;u!==null;){if(u.tag===3){Tk(u,o,h);break}else if(u.tag===1){var v=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(bs===null||!bs.has(v))){o=Jr(h,o),h=Cw(2),v=hs(u,h,2),v!==null&&(Ew(h,v,u,o),Pn(v,2),Hi(v));break}}u=u.return}}function qv(o,u,h){var v=o.pingCache;if(v===null){v=o.pingCache=new R3;var y=new Set;v.set(u,y)}else y=v.get(u),y===void 0&&(y=new Set,v.set(u,y));y.has(h)||(Qv=!0,y.add(h),o=q3.bind(null,o,u,h),u.then(o,o))}function q3(o,u,h){var v=o.pingCache;v!==null&&v.delete(u),o.pingedLanes|=o.suspendedLanes&h,o.warmLanes&=~h,zt===o&&(at&h)===h&&(on===4||on===3&&(at&62914560)===at&&300>bt()-vh?(vt&2)===0&&zl(o,0):Pv|=h,Ll===at&&(Ll=0)),Hi(o)}function Ck(o,u){u===0&&(u=rn()),o=uo(o,u),o!==null&&(Pn(o,u),Hi(o))}function I3(o){var u=o.memoizedState,h=0;u!==null&&(h=u.retryLane),Ck(o,h)}function X3(o,u){var h=0;switch(o.tag){case 31:case 13:var v=o.stateNode,y=o.memoizedState;y!==null&&(h=y.retryLane);break;case 19:v=o.stateNode;break;case 22:v=o.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(u),Ck(o,h)}function Z3(o,u){return Ue(o,u)}var wh=null,Il=null,Iv=!1,kh=!1,Xv=!1,xs=0;function Hi(o){o!==Il&&o.next===null&&(Il===null?wh=Il=o:Il=Il.next=o),kh=!0,Iv||(Iv=!0,V3())}function Tu(o,u){if(!Xv&&kh){Xv=!0;do for(var h=!1,v=wh;v!==null;){if(o!==0){var y=v.pendingLanes;if(y===0)var x=0;else{var C=v.suspendedLanes,M=v.pingedLanes;x=(1<<31-rt(42|o)+1)-1,x&=y&~(C&~M),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(h=!0,Pk(v,x))}else x=at,x=Kt(v,v===zt?x:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(x&3)===0||gn(v,x)||(h=!0,Pk(v,x));v=v.next}while(h);Xv=!1}}function B3(){Ek()}function Ek(){kh=Iv=!1;var o=0;xs!==0&&ez()&&(o=xs);for(var u=bt(),h=null,v=wh;v!==null;){var y=v.next,x=Ak(v,u);x===0?(v.next=null,h===null?wh=y:h.next=y,y===null&&(Il=h)):(h=v,(o!==0||(x&3)!==0)&&(kh=!0)),v=y}En!==0&&En!==5||Tu(o),xs!==0&&(xs=0)}function Ak(o,u){for(var h=o.suspendedLanes,v=o.pingedLanes,y=o.expirationTimes,x=o.pendingLanes&-62914561;0<x;){var C=31-rt(x),M=1<<C,F=y[C];F===-1?((M&h)===0||(M&v)!==0)&&(y[C]=vn(M,u)):F<=u&&(o.expiredLanes|=M),x&=~M}if(u=zt,h=at,h=Kt(o,o===u?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),v=o.callbackNode,h===0||o===u&&(wt===2||wt===9)||o.cancelPendingCommit!==null)return v!==null&&v!==null&&ht(v),o.callbackNode=null,o.callbackPriority=0;if((h&3)===0||gn(o,h)){if(u=h&-h,u===o.callbackPriority)return u;switch(v!==null&&ht(v),or(h)){case 2:case 8:h=fe;break;case 32:h=je;break;case 268435456:h=Je;break;default:h=je}return v=Qk.bind(null,o),h=Ue(h,v),o.callbackPriority=u,o.callbackNode=h,u}return v!==null&&v!==null&&ht(v),o.callbackPriority=2,o.callbackNode=null,2}function Qk(o,u){if(En!==0&&En!==5)return o.callbackNode=null,o.callbackPriority=0,null;var h=o.callbackNode;if(_h()&&o.callbackNode!==h)return null;var v=at;return v=Kt(o,o===zt?v:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),v===0?null:(fk(o,v,u),Ak(o,bt()),o.callbackNode!=null&&o.callbackNode===h?Qk.bind(null,o):null)}function Pk(o,u){if(_h())return null;fk(o,u,!0)}function V3(){nz(function(){(vt&6)!==0?Ue(ae,B3):Ek()})}function Zv(){if(xs===0){var o=kl;o===0&&(o=$r,$r<<=1,($r&261888)===0&&($r=256)),xs=o}return xs}function Nk(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:ul(""+o)}function Rk(o,u){var h=u.ownerDocument.createElement("input");return h.name=u.name,h.value=u.value,o.id&&h.setAttribute("form",o.id),u.parentNode.insertBefore(h,u),o=new FormData(o),h.parentNode.removeChild(h),o}function U3(o,u,h,v,y){if(u==="submit"&&h&&h.stateNode===y){var x=Nk((y[Sn]||null).action),C=v.submitter;C&&(u=(u=C[Sn]||null)?Nk(u.formAction):C.getAttribute("formAction"),u!==null&&(x=u,C=null));var M=new ml("action","action",null,v,y);o.push({event:M,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(xs!==0){var F=C?Rk(y,C):new FormData(y);lv(h,{pending:!0,data:F,method:y.method,action:x},null,F)}}else typeof x=="function"&&(M.preventDefault(),F=C?Rk(y,C):new FormData(y),lv(h,{pending:!0,data:F,method:y.method,action:x},x,F))},currentTarget:y}]})}}for(var Bv=0;Bv<kg.length;Bv++){var Vv=kg[Bv],Y3=Vv.toLowerCase(),F3=Vv[0].toUpperCase()+Vv.slice(1);Ti(Y3,"on"+F3)}Ti(d_,"onAnimationEnd"),Ti(f_,"onAnimationIteration"),Ti(h_,"onAnimationStart"),Ti("dblclick","onDoubleClick"),Ti("focusin","onFocus"),Ti("focusout","onBlur"),Ti(c3,"onTransitionRun"),Ti(u3,"onTransitionStart"),Ti(d3,"onTransitionCancel"),Ti(m_,"onTransitionEnd"),Ui("onMouseEnter",["mouseout","mouseover"]),Ui("onMouseLeave",["mouseout","mouseover"]),Ui("onPointerEnter",["pointerout","pointerover"]),Ui("onPointerLeave",["pointerout","pointerover"]),xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xi("onBeforeInput",["compositionend","keypress","textInput","paste"]),xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cu="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(" "),$3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cu));function Mk(o,u){u=(u&4)!==0;for(var h=0;h<o.length;h++){var v=o[h],y=v.event;v=v.listeners;e:{var x=void 0;if(u)for(var C=v.length-1;0<=C;C--){var M=v[C],F=M.instance,ee=M.currentTarget;if(M=M.listener,F!==x&&y.isPropagationStopped())break e;x=M,y.currentTarget=ee;try{x(y)}catch(se){If(se)}y.currentTarget=null,x=F}else for(C=0;C<v.length;C++){if(M=v[C],F=M.instance,ee=M.currentTarget,M=M.listener,F!==x&&y.isPropagationStopped())break e;x=M,y.currentTarget=ee;try{x(y)}catch(se){If(se)}y.currentTarget=null,x=F}}}}function tt(o,u){var h=u[ya];h===void 0&&(h=u[ya]=new Set);var v=o+"__bubble";h.has(v)||(Lk(u,o,2,!1),h.add(v))}function Uv(o,u,h){var v=0;u&&(v|=4),Lk(h,o,v,u)}var jh="_reactListening"+Math.random().toString(36).slice(2);function Yv(o){if(!o[jh]){o[jh]=!0,al.forEach(function(h){h!=="selectionchange"&&($3.has(h)||Uv(h,!1,o),Uv(h,!0,o))});var u=o.nodeType===9?o:o.ownerDocument;u===null||u[jh]||(u[jh]=!0,Uv("selectionchange",!1,u))}}function Lk(o,u,h,v){switch(d1(u)){case 2:var y=xz;break;case 8:y=_z;break;default:y=oO}h=y.bind(null,u,h,o),y=void 0,!Hc||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(y=!0),v?y!==void 0?o.addEventListener(u,h,{capture:!0,passive:y}):o.addEventListener(u,h,!0):y!==void 0?o.addEventListener(u,h,{passive:y}):o.addEventListener(u,h,!1)}function Fv(o,u,h,v,y){var x=v;if((u&1)===0&&(u&2)===0&&v!==null)e:for(;;){if(v===null)return;var C=v.tag;if(C===3||C===4){var M=v.stateNode.containerInfo;if(M===y)break;if(C===4)for(C=v.return;C!==null;){var F=C.tag;if((F===3||F===4)&&C.stateNode.containerInfo===y)return;C=C.return}for(;M!==null;){if(C=Gr(M),C===null)return;if(F=C.tag,F===5||F===6||F===26||F===27){v=x=C;continue e}M=M.parentNode}}v=v.return}Lf(function(){var ee=x,se=$c(h),le=[];e:{var te=p_.get(o);if(te!==void 0){var ie=ml,_e=o;switch(o){case"keypress":if(fl(h)===0)break e;case"keydown":case"keyup":ie=XD;break;case"focusin":_e="focus",ie=gg;break;case"focusout":_e="blur",ie=gg;break;case"beforeblur":case"afterblur":ie=gg;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=wa;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=ji;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=VD;break;case d_:case f_:case h_:ie=PD;break;case m_:ie=YD;break;case"scroll":case"scrollend":ie=pg;break;case"wheel":ie=$D;break;case"copy":case"cut":case"paste":ie=RD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=Yx;break;case"toggle":case"beforetoggle":ie=HD}var Ie=(u&4)!==0,Qt=!Ie&&(o==="scroll"||o==="scrollend"),K=Ie?te!==null?te+"Capture":null:te;Ie=[];for(var W=ee,J;W!==null;){var oe=W;if(J=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||J===null||K===null||(oe=io(W,K),oe!=null&&Ie.push(Eu(W,oe,J))),Qt)break;W=W.return}0<Ie.length&&(te=new ie(te,_e,null,h,se),le.push({event:te,listeners:Ie}))}}if((u&7)===0){e:{if(te=o==="mouseover"||o==="pointerover",ie=o==="mouseout"||o==="pointerout",te&&h!==Fc&&(_e=h.relatedTarget||h.fromElement)&&(Gr(_e)||_e[Hr]))break e;if((ie||te)&&(te=se.window===se?se:(te=se.ownerDocument)?te.defaultView||te.parentWindow:window,ie?(_e=h.relatedTarget||h.toElement,ie=ee,_e=_e?Gr(_e):null,_e!==null&&(Qt=a(_e),Ie=_e.tag,_e!==Qt||Ie!==5&&Ie!==27&&Ie!==6)&&(_e=null)):(ie=null,_e=ee),ie!==_e)){if(Ie=wa,oe="onMouseLeave",K="onMouseEnter",W="mouse",(o==="pointerout"||o==="pointerover")&&(Ie=Yx,oe="onPointerLeave",K="onPointerEnter",W="pointer"),Qt=ie==null?te:xa(ie),J=_e==null?te:xa(_e),te=new Ie(oe,W+"leave",ie,h,se),te.target=Qt,te.relatedTarget=J,oe=null,Gr(se)===ee&&(Ie=new Ie(K,W+"enter",_e,h,se),Ie.target=J,Ie.relatedTarget=Qt,oe=Ie),Qt=oe,ie&&_e)t:{for(Ie=W3,K=ie,W=_e,J=0,oe=K;oe;oe=Ie(oe))J++;oe=0;for(var Ne=W;Ne;Ne=Ie(Ne))oe++;for(;0<J-oe;)K=Ie(K),J--;for(;0<oe-J;)W=Ie(W),oe--;for(;J--;){if(K===W||W!==null&&K===W.alternate){Ie=K;break t}K=Ie(K),W=Ie(W)}Ie=null}else Ie=null;ie!==null&&Dk(le,te,ie,Ie,!1),_e!==null&&Qt!==null&&Dk(le,Qt,_e,Ie,!0)}}e:{if(te=ee?xa(ee):window,ie=te.nodeName&&te.nodeName.toLowerCase(),ie==="select"||ie==="input"&&te.type==="file")var mt=e_;else if(Kx(te))if(t_)mt=s3;else{mt=i3;var Te=r3}else ie=te.nodeName,!ie||ie.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ee&&Yc(ee.elementType)&&(mt=e_):mt=a3;if(mt&&(mt=mt(o,ee))){Jx(le,mt,h,se);break e}Te&&Te(o,te,ee),o==="focusout"&&ee&&te.type==="number"&&ee.memoizedProps.value!=null&&Uc(te,"number",te.value)}switch(Te=ee?xa(ee):window,o){case"focusin":(Kx(Te)||Te.contentEditable==="true")&&(vl=Te,xg=ee,iu=null);break;case"focusout":iu=xg=vl=null;break;case"mousedown":_g=!0;break;case"contextmenu":case"mouseup":case"dragend":_g=!1,c_(le,h,se);break;case"selectionchange":if(l3)break;case"keydown":case"keyup":c_(le,h,se)}var $e;if(Og)e:{switch(o){case"compositionstart":var st="onCompositionStart";break e;case"compositionend":st="onCompositionEnd";break e;case"compositionupdate":st="onCompositionUpdate";break e}st=void 0}else gl?Hx(o,h)&&(st="onCompositionEnd"):o==="keydown"&&h.keyCode===229&&(st="onCompositionStart");st&&(Fx&&h.locale!=="ko"&&(gl||st!=="onCompositionStart"?st==="onCompositionEnd"&&gl&&($e=Df()):(Yi=se,Gc="value"in Yi?Yi.value:Yi.textContent,gl=!0)),Te=Th(ee,st),0<Te.length&&(st=new Ux(st,o,null,h,se),le.push({event:st,listeners:Te}),$e?st.data=$e:($e=Gx(h),$e!==null&&(st.data=$e)))),($e=KD?JD(o,h):e3(o,h))&&(st=Th(ee,"onBeforeInput"),0<st.length&&(Te=new Ux("onBeforeInput","beforeinput",null,h,se),le.push({event:Te,listeners:st}),Te.data=$e)),U3(le,o,ee,h,se)}Mk(le,u)})}function Eu(o,u,h){return{instance:o,listener:u,currentTarget:h}}function Th(o,u){for(var h=u+"Capture",v=[];o!==null;){var y=o,x=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||x===null||(y=io(o,h),y!=null&&v.unshift(Eu(o,y,x)),y=io(o,u),y!=null&&v.push(Eu(o,y,x))),o.tag===3)return v;o=o.return}return[]}function W3(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function Dk(o,u,h,v,y){for(var x=u._reactName,C=[];h!==null&&h!==v;){var M=h,F=M.alternate,ee=M.stateNode;if(M=M.tag,F!==null&&F===v)break;M!==5&&M!==26&&M!==27||ee===null||(F=ee,y?(ee=io(h,x),ee!=null&&C.unshift(Eu(h,ee,F))):y||(ee=io(h,x),ee!=null&&C.push(Eu(h,ee,F)))),h=h.return}C.length!==0&&o.push({event:u,listeners:C})}var H3=/\r\n?/g,G3=/\u0000|\uFFFD/g;function zk(o){return(typeof o=="string"?o:""+o).replace(H3,`
|
|
26
|
+
`).replace(G3,"")}function qk(o,u){return u=zk(u),zk(o)===u}function At(o,u,h,v,y,x){switch(h){case"children":typeof v=="string"?u==="body"||u==="textarea"&&v===""||rs(o,v):(typeof v=="number"||typeof v=="bigint")&&u!=="body"&&rs(o,""+v);break;case"className":ll(o,"class",v);break;case"tabIndex":ll(o,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":ll(o,h,v);break;case"style":Rf(o,v,x);break;case"data":if(u!=="object"){ll(o,"data",v);break}case"src":case"href":if(v===""&&(u!=="a"||h!=="href")){o.removeAttribute(h);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){o.removeAttribute(h);break}v=ul(""+v),o.setAttribute(h,v);break;case"action":case"formAction":if(typeof v=="function"){o.setAttribute(h,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(h==="formAction"?(u!=="input"&&At(o,u,"name",y.name,y,null),At(o,u,"formEncType",y.formEncType,y,null),At(o,u,"formMethod",y.formMethod,y,null),At(o,u,"formTarget",y.formTarget,y,null)):(At(o,u,"encType",y.encType,y,null),At(o,u,"method",y.method,y,null),At(o,u,"target",y.target,y,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){o.removeAttribute(h);break}v=ul(""+v),o.setAttribute(h,v);break;case"onClick":v!=null&&(o.onclick=wi);break;case"onScroll":v!=null&&tt("scroll",o);break;case"onScrollEnd":v!=null&&tt("scrollend",o);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(y.children!=null)throw Error(r(60));o.innerHTML=h}}break;case"multiple":o.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":o.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){o.removeAttribute("xlink:href");break}h=ul(""+v),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(h,""+v):o.removeAttribute(h);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":v&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(h,""):o.removeAttribute(h);break;case"capture":case"download":v===!0?o.setAttribute(h,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(h,v):o.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?o.setAttribute(h,v):o.removeAttribute(h);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?o.removeAttribute(h):o.setAttribute(h,v);break;case"popover":tt("beforetoggle",o),tt("toggle",o),ol(o,"popover",v);break;case"xlinkActuate":_i(o,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":_i(o,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":_i(o,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":_i(o,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":_i(o,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":_i(o,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":_i(o,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":_i(o,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":_i(o,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":ol(o,"is",v);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=hg.get(h)||h,ol(o,h,v))}}function $v(o,u,h,v,y,x){switch(h){case"style":Rf(o,v,x);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(y.children!=null)throw Error(r(60));o.innerHTML=h}}break;case"children":typeof v=="string"?rs(o,v):(typeof v=="number"||typeof v=="bigint")&&rs(o,""+v);break;case"onScroll":v!=null&&tt("scroll",o);break;case"onScrollEnd":v!=null&&tt("scrollend",o);break;case"onClick":v!=null&&(o.onclick=wi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sl.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(y=h.endsWith("Capture"),u=h.slice(2,y?h.length-7:void 0),x=o[Sn]||null,x=x!=null?x[h]:null,typeof x=="function"&&o.removeEventListener(u,x,y),typeof v=="function")){typeof x!="function"&&x!==null&&(h in o?o[h]=null:o.hasAttribute(h)&&o.removeAttribute(h)),o.addEventListener(u,v,y);break e}h in o?o[h]=v:v===!0?o.setAttribute(h,""):ol(o,h,v)}}}function Un(o,u,h){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":tt("error",o),tt("load",o);var v=!1,y=!1,x;for(x in h)if(h.hasOwnProperty(x)){var C=h[x];if(C!=null)switch(x){case"src":v=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:At(o,u,x,C,h,null)}}y&&At(o,u,"srcSet",h.srcSet,h,null),v&&At(o,u,"src",h.src,h,null);return;case"input":tt("invalid",o);var M=x=C=y=null,F=null,ee=null;for(v in h)if(h.hasOwnProperty(v)){var se=h[v];if(se!=null)switch(v){case"name":y=se;break;case"type":C=se;break;case"checked":F=se;break;case"defaultChecked":ee=se;break;case"value":x=se;break;case"defaultValue":M=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,u));break;default:At(o,u,v,se,h,null)}}Af(o,x,M,F,ee,C,y,!1);return;case"select":tt("invalid",o),v=C=x=null;for(y in h)if(h.hasOwnProperty(y)&&(M=h[y],M!=null))switch(y){case"value":x=M;break;case"defaultValue":C=M;break;case"multiple":v=M;default:At(o,u,y,M,h,null)}u=x,h=C,o.multiple=!!v,u!=null?ns(o,!!v,u,!1):h!=null&&ns(o,!!v,h,!0);return;case"textarea":tt("invalid",o),x=y=v=null;for(C in h)if(h.hasOwnProperty(C)&&(M=h[C],M!=null))switch(C){case"value":v=M;break;case"defaultValue":y=M;break;case"children":x=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(91));break;default:At(o,u,C,M,h,null)}Pf(o,v,y,x);return;case"option":for(F in h)if(h.hasOwnProperty(F)&&(v=h[F],v!=null))switch(F){case"selected":o.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:At(o,u,F,v,h,null)}return;case"dialog":tt("beforetoggle",o),tt("toggle",o),tt("cancel",o),tt("close",o);break;case"iframe":case"object":tt("load",o);break;case"video":case"audio":for(v=0;v<Cu.length;v++)tt(Cu[v],o);break;case"image":tt("error",o),tt("load",o);break;case"details":tt("toggle",o);break;case"embed":case"source":case"link":tt("error",o),tt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in h)if(h.hasOwnProperty(ee)&&(v=h[ee],v!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:At(o,u,ee,v,h,null)}return;default:if(Yc(u)){for(se in h)h.hasOwnProperty(se)&&(v=h[se],v!==void 0&&$v(o,u,se,v,h,void 0));return}}for(M in h)h.hasOwnProperty(M)&&(v=h[M],v!=null&&At(o,u,M,v,h,null))}function K3(o,u,h,v){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,x=null,C=null,M=null,F=null,ee=null,se=null;for(ie in h){var le=h[ie];if(h.hasOwnProperty(ie)&&le!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":F=le;default:v.hasOwnProperty(ie)||At(o,u,ie,null,v,le)}}for(var te in v){var ie=v[te];if(le=h[te],v.hasOwnProperty(te)&&(ie!=null||le!=null))switch(te){case"type":x=ie;break;case"name":y=ie;break;case"checked":ee=ie;break;case"defaultChecked":se=ie;break;case"value":C=ie;break;case"defaultValue":M=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,u));break;default:ie!==le&&At(o,u,te,ie,v,le)}}Vc(o,C,M,F,ee,se,x,y);return;case"select":ie=C=M=te=null;for(x in h)if(F=h[x],h.hasOwnProperty(x)&&F!=null)switch(x){case"value":break;case"multiple":ie=F;default:v.hasOwnProperty(x)||At(o,u,x,null,v,F)}for(y in v)if(x=v[y],F=h[y],v.hasOwnProperty(y)&&(x!=null||F!=null))switch(y){case"value":te=x;break;case"defaultValue":M=x;break;case"multiple":C=x;default:x!==F&&At(o,u,y,x,v,F)}u=M,h=C,v=ie,te!=null?ns(o,!!h,te,!1):!!v!=!!h&&(u!=null?ns(o,!!h,u,!0):ns(o,!!h,h?[]:"",!1));return;case"textarea":ie=te=null;for(M in h)if(y=h[M],h.hasOwnProperty(M)&&y!=null&&!v.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:At(o,u,M,null,v,y)}for(C in v)if(y=v[C],x=h[C],v.hasOwnProperty(C)&&(y!=null||x!=null))switch(C){case"value":te=y;break;case"defaultValue":ie=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==x&&At(o,u,C,y,v,x)}Qf(o,te,ie);return;case"option":for(var _e in h)if(te=h[_e],h.hasOwnProperty(_e)&&te!=null&&!v.hasOwnProperty(_e))switch(_e){case"selected":o.selected=!1;break;default:At(o,u,_e,null,v,te)}for(F in v)if(te=v[F],ie=h[F],v.hasOwnProperty(F)&&te!==ie&&(te!=null||ie!=null))switch(F){case"selected":o.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:At(o,u,F,te,v,ie)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ie in h)te=h[Ie],h.hasOwnProperty(Ie)&&te!=null&&!v.hasOwnProperty(Ie)&&At(o,u,Ie,null,v,te);for(ee in v)if(te=v[ee],ie=h[ee],v.hasOwnProperty(ee)&&te!==ie&&(te!=null||ie!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,u));break;default:At(o,u,ee,te,v,ie)}return;default:if(Yc(u)){for(var Qt in h)te=h[Qt],h.hasOwnProperty(Qt)&&te!==void 0&&!v.hasOwnProperty(Qt)&&$v(o,u,Qt,void 0,v,te);for(se in v)te=v[se],ie=h[se],!v.hasOwnProperty(se)||te===ie||te===void 0&&ie===void 0||$v(o,u,se,te,v,ie);return}}for(var K in h)te=h[K],h.hasOwnProperty(K)&&te!=null&&!v.hasOwnProperty(K)&&At(o,u,K,null,v,te);for(le in v)te=v[le],ie=h[le],!v.hasOwnProperty(le)||te===ie||te==null&&ie==null||At(o,u,le,te,v,ie)}function Ik(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function J3(){if(typeof performance.getEntriesByType=="function"){for(var o=0,u=0,h=performance.getEntriesByType("resource"),v=0;v<h.length;v++){var y=h[v],x=y.transferSize,C=y.initiatorType,M=y.duration;if(x&&M&&Ik(C)){for(C=0,M=y.responseEnd,v+=1;v<h.length;v++){var F=h[v],ee=F.startTime;if(ee>M)break;var se=F.transferSize,le=F.initiatorType;se&&Ik(le)&&(F=F.responseEnd,C+=se*(F<M?1:(M-ee)/(F-ee)))}if(--v,u+=8*(x+C)/(y.duration/1e3),o++,10<o)break}}if(0<o)return u/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var Wv=null,Hv=null;function Ch(o){return o.nodeType===9?o:o.ownerDocument}function Xk(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zk(o,u){if(o===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&u==="foreignObject"?0:o}function Gv(o,u){return o==="textarea"||o==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var Kv=null;function ez(){var o=window.event;return o&&o.type==="popstate"?o===Kv?!1:(Kv=o,!0):(Kv=null,!1)}var Bk=typeof setTimeout=="function"?setTimeout:void 0,tz=typeof clearTimeout=="function"?clearTimeout:void 0,Vk=typeof Promise=="function"?Promise:void 0,nz=typeof queueMicrotask=="function"?queueMicrotask:typeof Vk<"u"?function(o){return Vk.resolve(null).then(o).catch(rz)}:Bk;function rz(o){setTimeout(function(){throw o})}function _s(o){return o==="head"}function Uk(o,u){var h=u,v=0;do{var y=h.nextSibling;if(o.removeChild(h),y&&y.nodeType===8)if(h=y.data,h==="/$"||h==="/&"){if(v===0){o.removeChild(y),Vl(u);return}v--}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")v++;else if(h==="html")Au(o.ownerDocument.documentElement);else if(h==="head"){h=o.ownerDocument.head,Au(h);for(var x=h.firstChild;x;){var C=x.nextSibling,M=x.nodeName;x[Hn]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&x.rel.toLowerCase()==="stylesheet"||h.removeChild(x),x=C}}else h==="body"&&Au(o.ownerDocument.body);h=y}while(h);Vl(u)}function Yk(o,u){var h=o;o=0;do{var v=h.nextSibling;if(h.nodeType===1?u?(h._stashedDisplay=h.style.display,h.style.display="none"):(h.style.display=h._stashedDisplay||"",h.getAttribute("style")===""&&h.removeAttribute("style")):h.nodeType===3&&(u?(h._stashedText=h.nodeValue,h.nodeValue=""):h.nodeValue=h._stashedText||""),v&&v.nodeType===8)if(h=v.data,h==="/$"){if(o===0)break;o--}else h!=="$"&&h!=="$?"&&h!=="$~"&&h!=="$!"||o++;h=v}while(h)}function Jv(o){var u=o.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var h=u;switch(u=u.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":Jv(h),Sa(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}o.removeChild(h)}}function iz(o,u,h,v){for(;o.nodeType===1;){var y=h;if(o.nodeName.toLowerCase()!==u.toLowerCase()){if(!v&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(v){if(!o[Hn])switch(u){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(x=o.getAttribute("rel"),x==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(x!==y.rel||o.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||o.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||o.getAttribute("title")!==(y.title==null?null:y.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(x=o.getAttribute("src"),(x!==(y.src==null?null:y.src)||o.getAttribute("type")!==(y.type==null?null:y.type)||o.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&x&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(u==="input"&&o.type==="hidden"){var x=y.name==null?null:""+y.name;if(y.type==="hidden"&&o.getAttribute("name")===x)return o}else return o;if(o=ii(o.nextSibling),o===null)break}return null}function az(o,u,h){if(u==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!h||(o=ii(o.nextSibling),o===null))return null;return o}function Fk(o,u){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!u||(o=ii(o.nextSibling),o===null))return null;return o}function eO(o){return o.data==="$?"||o.data==="$~"}function tO(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function sz(o,u){var h=o.ownerDocument;if(o.data==="$~")o._reactRetry=u;else if(o.data!=="$?"||h.readyState!=="loading")u();else{var v=function(){u(),h.removeEventListener("DOMContentLoaded",v)};h.addEventListener("DOMContentLoaded",v),o._reactRetry=v}}function ii(o){for(;o!=null;o=o.nextSibling){var u=o.nodeType;if(u===1||u===3)break;if(u===8){if(u=o.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return o}var nO=null;function $k(o){o=o.nextSibling;for(var u=0;o;){if(o.nodeType===8){var h=o.data;if(h==="/$"||h==="/&"){if(u===0)return ii(o.nextSibling);u--}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||u++}o=o.nextSibling}return null}function Wk(o){o=o.previousSibling;for(var u=0;o;){if(o.nodeType===8){var h=o.data;if(h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"){if(u===0)return o;u--}else h!=="/$"&&h!=="/&"||u++}o=o.previousSibling}return null}function Hk(o,u,h){switch(u=Ch(h),o){case"html":if(o=u.documentElement,!o)throw Error(r(452));return o;case"head":if(o=u.head,!o)throw Error(r(453));return o;case"body":if(o=u.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function Au(o){for(var u=o.attributes;u.length;)o.removeAttributeNode(u[0]);Sa(o)}var ai=new Map,Gk=new Set;function Eh(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Ia=L.d;L.d={f:oz,r:lz,D:cz,C:uz,L:dz,m:fz,X:mz,S:hz,M:pz};function oz(){var o=Ia.f(),u=yh();return o||u}function lz(o){var u=Bi(o);u!==null&&u.tag===5&&u.type==="form"?mw(u):Ia.r(o)}var Xl=typeof document>"u"?null:document;function Kk(o,u,h){var v=Xl;if(v&&typeof u=="string"&&u){var y=Or(u);y='link[rel="'+o+'"][href="'+y+'"]',typeof h=="string"&&(y+='[crossorigin="'+h+'"]'),Gk.has(y)||(Gk.add(y),o={rel:o,crossOrigin:h,href:u},v.querySelector(y)===null&&(u=v.createElement("link"),Un(u,"link",o),an(u),v.head.appendChild(u)))}}function cz(o){Ia.D(o),Kk("dns-prefetch",o,null)}function uz(o,u){Ia.C(o,u),Kk("preconnect",o,u)}function dz(o,u,h){Ia.L(o,u,h);var v=Xl;if(v&&o&&u){var y='link[rel="preload"][as="'+Or(u)+'"]';u==="image"&&h&&h.imageSrcSet?(y+='[imagesrcset="'+Or(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(y+='[imagesizes="'+Or(h.imageSizes)+'"]')):y+='[href="'+Or(o)+'"]';var x=y;switch(u){case"style":x=Zl(o);break;case"script":x=Bl(o)}ai.has(x)||(o=m({rel:"preload",href:u==="image"&&h&&h.imageSrcSet?void 0:o,as:u},h),ai.set(x,o),v.querySelector(y)!==null||u==="style"&&v.querySelector(Qu(x))||u==="script"&&v.querySelector(Pu(x))||(u=v.createElement("link"),Un(u,"link",o),an(u),v.head.appendChild(u)))}}function fz(o,u){Ia.m(o,u);var h=Xl;if(h&&o){var v=u&&typeof u.as=="string"?u.as:"script",y='link[rel="modulepreload"][as="'+Or(v)+'"][href="'+Or(o)+'"]',x=y;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Bl(o)}if(!ai.has(x)&&(o=m({rel:"modulepreload",href:o},u),ai.set(x,o),h.querySelector(y)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(Pu(x)))return}v=h.createElement("link"),Un(v,"link",o),an(v),h.head.appendChild(v)}}}function hz(o,u,h){Ia.S(o,u,h);var v=Xl;if(v&&o){var y=Vi(v).hoistableStyles,x=Zl(o);u=u||"default";var C=y.get(x);if(!C){var M={loading:0,preload:null};if(C=v.querySelector(Qu(x)))M.loading=5;else{o=m({rel:"stylesheet",href:o,"data-precedence":u},h),(h=ai.get(x))&&rO(o,h);var F=C=v.createElement("link");an(F),Un(F,"link",o),F._p=new Promise(function(ee,se){F.onload=ee,F.onerror=se}),F.addEventListener("load",function(){M.loading|=1}),F.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Ah(C,u,v)}C={type:"stylesheet",instance:C,count:1,state:M},y.set(x,C)}}}function mz(o,u){Ia.X(o,u);var h=Xl;if(h&&o){var v=Vi(h).hoistableScripts,y=Bl(o),x=v.get(y);x||(x=h.querySelector(Pu(y)),x||(o=m({src:o,async:!0},u),(u=ai.get(y))&&iO(o,u),x=h.createElement("script"),an(x),Un(x,"link",o),h.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},v.set(y,x))}}function pz(o,u){Ia.M(o,u);var h=Xl;if(h&&o){var v=Vi(h).hoistableScripts,y=Bl(o),x=v.get(y);x||(x=h.querySelector(Pu(y)),x||(o=m({src:o,async:!0,type:"module"},u),(u=ai.get(y))&&iO(o,u),x=h.createElement("script"),an(x),Un(x,"link",o),h.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},v.set(y,x))}}function Jk(o,u,h,v){var y=(y=ve.current)?Eh(y):null;if(!y)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(u=Zl(h.href),h=Vi(y).hoistableStyles,v=h.get(u),v||(v={type:"style",instance:null,count:0,state:null},h.set(u,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){o=Zl(h.href);var x=Vi(y).hoistableStyles,C=x.get(o);if(C||(y=y.ownerDocument||y,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(o,C),(x=y.querySelector(Qu(o)))&&!x._p&&(C.instance=x,C.state.loading=5),ai.has(o)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},ai.set(o,h),x||gz(y,o,h,C.state))),u&&v===null)throw Error(r(528,""));return C}if(u&&v!==null)throw Error(r(529,""));return null;case"script":return u=h.async,h=h.src,typeof h=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=Bl(h),h=Vi(y).hoistableScripts,v=h.get(u),v||(v={type:"script",instance:null,count:0,state:null},h.set(u,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Zl(o){return'href="'+Or(o)+'"'}function Qu(o){return'link[rel="stylesheet"]['+o+"]"}function e1(o){return m({},o,{"data-precedence":o.precedence,precedence:null})}function gz(o,u,h,v){o.querySelector('link[rel="preload"][as="style"]['+u+"]")?v.loading=1:(u=o.createElement("link"),v.preload=u,u.addEventListener("load",function(){return v.loading|=1}),u.addEventListener("error",function(){return v.loading|=2}),Un(u,"link",h),an(u),o.head.appendChild(u))}function Bl(o){return'[src="'+Or(o)+'"]'}function Pu(o){return"script[async]"+o}function t1(o,u,h){if(u.count++,u.instance===null)switch(u.type){case"style":var v=o.querySelector('style[data-href~="'+Or(h.href)+'"]');if(v)return u.instance=v,an(v),v;var y=m({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return v=(o.ownerDocument||o).createElement("style"),an(v),Un(v,"style",y),Ah(v,h.precedence,o),u.instance=v;case"stylesheet":y=Zl(h.href);var x=o.querySelector(Qu(y));if(x)return u.state.loading|=4,u.instance=x,an(x),x;v=e1(h),(y=ai.get(y))&&rO(v,y),x=(o.ownerDocument||o).createElement("link"),an(x);var C=x;return C._p=new Promise(function(M,F){C.onload=M,C.onerror=F}),Un(x,"link",v),u.state.loading|=4,Ah(x,h.precedence,o),u.instance=x;case"script":return x=Bl(h.src),(y=o.querySelector(Pu(x)))?(u.instance=y,an(y),y):(v=h,(y=ai.get(x))&&(v=m({},h),iO(v,y)),o=o.ownerDocument||o,y=o.createElement("script"),an(y),Un(y,"link",v),o.head.appendChild(y),u.instance=y);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(v=u.instance,u.state.loading|=4,Ah(v,h.precedence,o));return u.instance}function Ah(o,u,h){for(var v=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=v.length?v[v.length-1]:null,x=y,C=0;C<v.length;C++){var M=v[C];if(M.dataset.precedence===u)x=M;else if(x!==y)break}x?x.parentNode.insertBefore(o,x.nextSibling):(u=h.nodeType===9?h.head:h,u.insertBefore(o,u.firstChild))}function rO(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.title==null&&(o.title=u.title)}function iO(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.integrity==null&&(o.integrity=u.integrity)}var Qh=null;function n1(o,u,h){if(Qh===null){var v=new Map,y=Qh=new Map;y.set(h,v)}else y=Qh,v=y.get(h),v||(v=new Map,y.set(h,v));if(v.has(o))return v;for(v.set(o,null),h=h.getElementsByTagName(o),y=0;y<h.length;y++){var x=h[y];if(!(x[Hn]||x[tn]||o==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var C=x.getAttribute(u)||"";C=o+C;var M=v.get(C);M?M.push(x):v.set(C,[x])}}return v}function r1(o,u,h){o=o.ownerDocument||o,o.head.insertBefore(h,u==="title"?o.querySelector("head > title"):null)}function vz(o,u,h){if(h===1||u.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return o=u.disabled,typeof u.precedence=="string"&&o==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function i1(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function Oz(o,u,h,v){if(h.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var y=Zl(v.href),x=u.querySelector(Qu(y));if(x){u=x._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(o.count++,o=Ph.bind(o),u.then(o,o)),h.state.loading|=4,h.instance=x,an(x);return}x=u.ownerDocument||u,v=e1(v),(y=ai.get(y))&&rO(v,y),x=x.createElement("link"),an(x);var C=x;C._p=new Promise(function(M,F){C.onload=M,C.onerror=F}),Un(x,"link",v),h.instance=x}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(h,u),(u=h.state.preload)&&(h.state.loading&3)===0&&(o.count++,h=Ph.bind(o),u.addEventListener("load",h),u.addEventListener("error",h))}}var aO=0;function bz(o,u){return o.stylesheets&&o.count===0&&Rh(o,o.stylesheets),0<o.count||0<o.imgCount?function(h){var v=setTimeout(function(){if(o.stylesheets&&Rh(o,o.stylesheets),o.unsuspend){var x=o.unsuspend;o.unsuspend=null,x()}},6e4+u);0<o.imgBytes&&aO===0&&(aO=62500*J3());var y=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&Rh(o,o.stylesheets),o.unsuspend)){var x=o.unsuspend;o.unsuspend=null,x()}},(o.imgBytes>aO?50:800)+u);return o.unsuspend=h,function(){o.unsuspend=null,clearTimeout(v),clearTimeout(y)}}:null}function Ph(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Rh(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Nh=null;function Rh(o,u){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Nh=new Map,u.forEach(yz,o),Nh=null,Ph.call(o))}function yz(o,u){if(!(u.state.loading&4)){var h=Nh.get(o);if(h)var v=h.get(null);else{h=new Map,Nh.set(o,h);for(var y=o.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<y.length;x++){var C=y[x];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(h.set(C.dataset.precedence,C),v=C)}v&&h.set(null,v)}y=u.instance,C=y.getAttribute("data-precedence"),x=h.get(C)||v,x===v&&h.set(null,y),h.set(C,y),this.count++,v=Ph.bind(this),y.addEventListener("load",v),y.addEventListener("error",v),x?x.parentNode.insertBefore(y,x.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(y,o.firstChild)),u.state.loading|=4}}var Nu={$$typeof:T,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function Sz(o,u,h,v,y,x,C,M,F){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=On(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=On(0),this.hiddenUpdates=On(null),this.identifierPrefix=v,this.onUncaughtError=y,this.onCaughtError=x,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function a1(o,u,h,v,y,x,C,M,F,ee,se,le){return o=new Sz(o,u,h,C,F,ee,se,le,M),u=1,x===!0&&(u|=24),x=Nr(3,null,null,u),o.current=x,x.stateNode=o,u=zg(),u.refCount++,o.pooledCache=u,u.refCount++,x.memoizedState={element:v,isDehydrated:h,cache:u},Zg(x),o}function s1(o){return o?(o=yl,o):yl}function o1(o,u,h,v,y,x){y=s1(y),v.context===null?v.context=y:v.pendingContext=y,v=fs(u),v.payload={element:h},x=x===void 0?null:x,x!==null&&(v.callback=x),h=hs(o,v,u),h!==null&&(_r(h,o,u),du(h,o,u))}function l1(o,u){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var h=o.retryLane;o.retryLane=h!==0&&h<u?h:u}}function sO(o,u){l1(o,u),(o=o.alternate)&&l1(o,u)}function c1(o){if(o.tag===13||o.tag===31){var u=uo(o,67108864);u!==null&&_r(u,o,67108864),sO(o,67108864)}}function u1(o){if(o.tag===13||o.tag===31){var u=zr();u=yn(u);var h=uo(o,u);h!==null&&_r(h,o,u),sO(o,u)}}var Mh=!0;function xz(o,u,h,v){var y=I.T;I.T=null;var x=L.p;try{L.p=2,oO(o,u,h,v)}finally{L.p=x,I.T=y}}function _z(o,u,h,v){var y=I.T;I.T=null;var x=L.p;try{L.p=8,oO(o,u,h,v)}finally{L.p=x,I.T=y}}function oO(o,u,h,v){if(Mh){var y=lO(v);if(y===null)Fv(o,u,v,Lh,h),f1(o,v);else if(kz(y,o,u,h,v))v.stopPropagation();else if(f1(o,v),u&4&&-1<wz.indexOf(o)){for(;y!==null;){var x=Bi(y);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var C=Dt(x.pendingLanes);if(C!==0){var M=x;for(M.pendingLanes|=2,M.entangledLanes|=2;C;){var F=1<<31-rt(C);M.entanglements[1]|=F,C&=~F}Hi(x),(vt&6)===0&&(Oh=bt()+500,Tu(0))}}break;case 31:case 13:M=uo(x,2),M!==null&&_r(M,x,2),yh(),sO(x,2)}if(x=lO(v),x===null&&Fv(o,u,v,Lh,h),x===y)break;y=x}y!==null&&v.stopPropagation()}else Fv(o,u,v,null,h)}}function lO(o){return o=$c(o),cO(o)}var Lh=null;function cO(o){if(Lh=null,o=Gr(o),o!==null){var u=a(o);if(u===null)o=null;else{var h=u.tag;if(h===13){if(o=s(u),o!==null)return o;o=null}else if(h===31){if(o=l(u),o!==null)return o;o=null}else if(h===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;o=null}else u!==o&&(o=null)}}return Lh=o,null}function d1(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Si()){case ae:return 2;case fe:return 8;case je:case Be:return 32;case Je:return 268435456;default:return 32}default:return 32}}var uO=!1,ws=null,ks=null,js=null,Ru=new Map,Mu=new Map,Ts=[],wz="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function f1(o,u){switch(o){case"focusin":case"focusout":ws=null;break;case"dragenter":case"dragleave":ks=null;break;case"mouseover":case"mouseout":js=null;break;case"pointerover":case"pointerout":Ru.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mu.delete(u.pointerId)}}function Lu(o,u,h,v,y,x){return o===null||o.nativeEvent!==x?(o={blockedOn:u,domEventName:h,eventSystemFlags:v,nativeEvent:x,targetContainers:[y]},u!==null&&(u=Bi(u),u!==null&&c1(u)),o):(o.eventSystemFlags|=v,u=o.targetContainers,y!==null&&u.indexOf(y)===-1&&u.push(y),o)}function kz(o,u,h,v,y){switch(u){case"focusin":return ws=Lu(ws,o,u,h,v,y),!0;case"dragenter":return ks=Lu(ks,o,u,h,v,y),!0;case"mouseover":return js=Lu(js,o,u,h,v,y),!0;case"pointerover":var x=y.pointerId;return Ru.set(x,Lu(Ru.get(x)||null,o,u,h,v,y)),!0;case"gotpointercapture":return x=y.pointerId,Mu.set(x,Lu(Mu.get(x)||null,o,u,h,v,y)),!0}return!1}function h1(o){var u=Gr(o.target);if(u!==null){var h=a(u);if(h!==null){if(u=h.tag,u===13){if(u=s(h),u!==null){o.blockedOn=u,lr(o.priority,function(){u1(h)});return}}else if(u===31){if(u=l(h),u!==null){o.blockedOn=u,lr(o.priority,function(){u1(h)});return}}else if(u===3&&h.stateNode.current.memoizedState.isDehydrated){o.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Dh(o){if(o.blockedOn!==null)return!1;for(var u=o.targetContainers;0<u.length;){var h=lO(o.nativeEvent);if(h===null){h=o.nativeEvent;var v=new h.constructor(h.type,h);Fc=v,h.target.dispatchEvent(v),Fc=null}else return u=Bi(h),u!==null&&c1(u),o.blockedOn=h,!1;u.shift()}return!0}function m1(o,u,h){Dh(o)&&h.delete(u)}function jz(){uO=!1,ws!==null&&Dh(ws)&&(ws=null),ks!==null&&Dh(ks)&&(ks=null),js!==null&&Dh(js)&&(js=null),Ru.forEach(m1),Mu.forEach(m1)}function zh(o,u){o.blockedOn===u&&(o.blockedOn=null,uO||(uO=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,jz)))}var qh=null;function p1(o){qh!==o&&(qh=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qh===o&&(qh=null);for(var u=0;u<o.length;u+=3){var h=o[u],v=o[u+1],y=o[u+2];if(typeof v!="function"){if(cO(v||h)===null)continue;break}var x=Bi(h);x!==null&&(o.splice(u,3),u-=3,lv(x,{pending:!0,data:y,method:h.method,action:v},v,y))}}))}function Vl(o){function u(F){return zh(F,o)}ws!==null&&zh(ws,o),ks!==null&&zh(ks,o),js!==null&&zh(js,o),Ru.forEach(u),Mu.forEach(u);for(var h=0;h<Ts.length;h++){var v=Ts[h];v.blockedOn===o&&(v.blockedOn=null)}for(;0<Ts.length&&(h=Ts[0],h.blockedOn===null);)h1(h),h.blockedOn===null&&Ts.shift();if(h=(o.ownerDocument||o).$$reactFormReplay,h!=null)for(v=0;v<h.length;v+=3){var y=h[v],x=h[v+1],C=y[Sn]||null;if(typeof x=="function")C||p1(h);else if(C){var M=null;if(x&&x.hasAttribute("formAction")){if(y=x,C=x[Sn]||null)M=C.formAction;else if(cO(y)!==null)continue}else M=C.action;typeof M=="function"?h[v+1]=M:(h.splice(v,3),v-=3),p1(h)}}}function g1(){function o(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(C){return y=C})},focusReset:"manual",scroll:"manual"})}function u(){y!==null&&(y(),y=null),v||setTimeout(h,20)}function h(){if(!v&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,y=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(h,100),function(){v=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),y!==null&&(y(),y=null)}}}function dO(o){this._internalRoot=o}Ih.prototype.render=dO.prototype.render=function(o){var u=this._internalRoot;if(u===null)throw Error(r(409));var h=u.current,v=zr();o1(h,v,o,u,null,null)},Ih.prototype.unmount=dO.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var u=o.containerInfo;o1(o.current,2,null,o,null,null),yh(),u[Hr]=null}};function Ih(o){this._internalRoot=o}Ih.prototype.unstable_scheduleHydration=function(o){if(o){var u=Xn();o={blockedOn:null,target:o,priority:u};for(var h=0;h<Ts.length&&u!==0&&u<Ts[h].priority;h++);Ts.splice(h,0,o),h===0&&h1(o)}};var v1=t.version;if(v1!=="19.2.4")throw Error(r(527,v1,"19.2.4"));L.findDOMNode=function(o){var u=o._reactInternals;if(u===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=d(u),o=o!==null?f(o):null,o=o===null?null:o.stateNode,o};var Tz={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xh.isDisabled&&Xh.supportsFiber)try{Ht=Xh.inject(Tz),Mt=Xh}catch{}}return Du.createRoot=function(o,u){if(!i(o))throw Error(r(299));var h=!1,v="",y=ww,x=kw,C=jw;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onUncaughtError!==void 0&&(y=u.onUncaughtError),u.onCaughtError!==void 0&&(x=u.onCaughtError),u.onRecoverableError!==void 0&&(C=u.onRecoverableError)),u=a1(o,1,!1,null,null,h,v,null,y,x,C,g1),o[Hr]=u.current,Yv(o),new dO(u)},Du.hydrateRoot=function(o,u,h){if(!i(o))throw Error(r(299));var v=!1,y="",x=ww,C=kw,M=jw,F=null;return h!=null&&(h.unstable_strictMode===!0&&(v=!0),h.identifierPrefix!==void 0&&(y=h.identifierPrefix),h.onUncaughtError!==void 0&&(x=h.onUncaughtError),h.onCaughtError!==void 0&&(C=h.onCaughtError),h.onRecoverableError!==void 0&&(M=h.onRecoverableError),h.formState!==void 0&&(F=h.formState)),u=a1(o,1,!0,u,h??null,v,y,F,x,C,M,g1),u.context=s1(null),h=u.current,v=zr(),v=yn(v),y=fs(v),y.callback=null,hs(h,y,v),h=v,u.current.lanes=h,Pn(u,h),Hi(u),o[Hr]=u.current,Yv(o),new Ih(u)},Du.version="19.2.4",Du}var w1;function Bz(){if(w1)return hO.exports;w1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),hO.exports=Zz(),hO.exports}var Vz=Bz();const Uz=bE(Vz),Yz="modulepreload",Fz=function(e){return"/"+e},k1={},Ae=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=s(n.map(d=>{if(d=Fz(d),d in k1)return;k1[d]=!0;const f=d.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":Yz,f||(p.as="script"),p.crossOrigin="",p.href=d,c&&p.setAttribute("nonce",c),document.head.appendChild(p),f)return new Promise((O,b)=>{p.addEventListener("load",O),p.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&a(l.reason);return t().catch(a)})};function Mb(e){"@babel/helpers - typeof";return Mb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mb(e)}function SE(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Mb(XMLHttpRequest))==="object"}function $z(e){return!!e&&typeof e.then=="function"}function Wz(e){return $z(e)?e:Promise.resolve(e)}function j1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function T1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j1(Object(n),!0).forEach(function(r){Hz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hz(e,t,n){return(t=Gz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gz(e){var t=Kz(e,"string");return Io(t)=="symbol"?t:t+""}function Kz(e,t){if(Io(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Io(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Io(e){"@babel/helpers - typeof";return Io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Io(e)}var Ys=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Ys=global.fetch:typeof window<"u"&&window.fetch&&(Ys=window.fetch);var kd;SE()&&(typeof global<"u"&&global.XMLHttpRequest?kd=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(kd=window.XMLHttpRequest));var Zm;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Zm=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Zm=window.ActiveXObject));typeof Ys!="function"&&(Ys=void 0);if(!Ys&&!kd&&!Zm)try{Ae(()=>import("./browser-ponyfill-D2ngVqWO.js").then(e=>e.b),__vite__mapDeps([0,1])).then(function(e){Ys=e.default}).catch(function(){})}catch{}var Lb=function(t,n){if(n&&Io(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},C1=function(t,n,r,i){var a=function(c){if(!c.ok)return r(c.statusText||"Error",{status:c.status});c.text().then(function(d){r(null,{status:c.status,data:d})}).catch(r)};if(i){var s=i(t,n);if(s instanceof Promise){s.then(a).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(a).catch(r):Ys(t,n).then(a).catch(r)},E1=!1,Jz=function(t,n,r,i){t.queryStringParams&&(n=Lb(n,t.queryStringParams));var a=T1({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(a["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(a["Content-Type"]="application/json");var s=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,l=T1({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:a},E1?{}:s),c=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{C1(n,l,i,c)}catch(d){if(!s||Object.keys(s).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(s).forEach(function(f){delete l[f]}),C1(n,l,i,c),E1=!0}catch(f){i(f)}}},eq=function(t,n,r,i){r&&Io(r)==="object"&&(r=Lb("",r).slice(1)),t.queryStringParams&&(n=Lb(n,t.queryStringParams));try{var a=kd?new kd:new Zm("MSXML2.XMLHTTP.3.0");a.open(r?"POST":"GET",n,1),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!t.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var s=t.customHeaders;if(s=typeof s=="function"?s():s,s)for(var l in s)a.setRequestHeader(l,s[l]);a.onreadystatechange=function(){a.readyState>3&&i(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(r)}catch(c){console&&console.log(c)}},tq=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Ys&&n.indexOf("file:")!==0)return Jz(t,n,r,i);if(SE()||typeof ActiveXObject=="function")return eq(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function fc(e){"@babel/helpers - typeof";return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(e)}function A1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A1(Object(n),!0).forEach(function(r){xE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_E(r.key),r)}}function iq(e,t,n){return t&&rq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xE(e,t,n){return(t=_E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _E(e){var t=aq(e,"string");return fc(t)=="symbol"?t:t+""}function aq(e,t){if(fc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var sq=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return xE({},r,i||"")},parseLoadPayload:function(n,r){},request:tq,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},wE=(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};nq(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return iq(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=gO(gO(gO({},sq()),this.options||{}),i),this.allOptions=a,this.services&&this.options.reloadInterval){var s=setInterval(function(){return r.reload()},this.options.reloadInterval);fc(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,a,s){var l=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,i)),c=Wz(c),c.then(function(d){if(!d)return s(null,{});var f=l.services.interpolator.interpolate(d,{lng:n.join("+"),ns:i.join("+")});l.loadUrl(f,s,r,a)})}},{key:"loadUrl",value:function(n,r,i,a){var s=this,l=typeof i=="string"?[i]:i,c=typeof a=="string"?[a]:a,d=this.options.parseLoadPayload(l,c);this.options.request(this.options,n,d,function(f,m){if(m&&(m.status>=500&&m.status<600||!m.status))return r("failed loading "+n+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+n+"; status code: "+m.status,!1);if(!m&&f&&f.message){var p=f.message.toLowerCase(),O=["failed","fetch","network","load"].find(function(w){return p.indexOf(w)>-1});if(O)return r("failed loading "+n+": "+f.message,!0)}if(f)return r(f,!1);var b,S;try{typeof m.data=="string"?b=s.options.parse(m.data,i,a):b=m.data}catch{S="failed parsing "+n+" to json"}if(S)return r(S,!1);r(null,b)})}},{key:"create",value:function(n,r,i,a,s){var l=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,i,a),d=0,f=[],m=[];n.forEach(function(p){var O=l.options.addPath;typeof l.options.addPath=="function"&&(O=l.options.addPath(p,r));var b=l.services.interpolator.interpolate(O,{lng:p,ns:r});l.options.request(l.options,b,c,function(S,w){d+=1,f.push(S),m.push(w),d===n.length&&typeof s=="function"&&s(f,m)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,a=r.languageUtils,s=r.logger,l=i.language;if(!(l&&l.toLowerCase()==="cimode")){var c=[],d=function(m){var p=a.toResolveHierarchy(m);p.forEach(function(O){c.indexOf(O)<0&&c.push(O)})};d(l),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return d(f)}),c.forEach(function(f){n.allOptions.ns.forEach(function(m){i.read(f,m,"read",null,null,function(p,O){p&&s.warn("loading namespace ".concat(m," for language ").concat(f," failed"),p),!p&&O&&s.log("loaded namespace ".concat(m," for language ").concat(f),O),i.loaded("".concat(f,"|").concat(m),p,O)})})})}}}])})();wE.type="backend";const kE=["ar","bn","cs","da","de","el","en","es","fa","fi","fr","he","hi","id","it","ja","ko","ms","nl","no","pl","pt","ro","sv","th","tr","uk","vi","zh"],hc="en";function Db(e){return kE.includes(e)}Dz.use(wE).use(zz).init({ns:["translation"],defaultNS:"translation",fallbackLng:hc,supportedLngs:[...kE],backend:{loadPath:"/messages/{{lng}}.json"},interpolation:{escapeValue:!1},initImmediate:!1});var zb=function(e,t){return zb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},zb(e,t)};function jc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");zb(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function oq(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function l(f){try{d(r.next(f))}catch(m){s(m)}}function c(f){try{d(r.throw(f))}catch(m){s(m)}}function d(f){f.done?a(f.value):i(f.value).then(l,c)}d((r=r.apply(e,t||[])).next())})}function jE(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=l(0),s.throw=l(1),s.return=l(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(n=0)),n;)try{if(r=1,i&&(a=d[0]&2?i.return:d[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,d[1])).done)return a;switch(i=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){n.label=d[1];break}if(d[0]===6&&n.label<a[1]){n.label=a[1],a=d;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(d);break}a[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(f){d=[6,f],i=0}finally{r=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function mc(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function qb(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(l){s={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a}function Ib(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function Jl(e){return this instanceof Jl?(this.v=e,this):new Jl(e)}function lq(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(O){return function(b){return Promise.resolve(b).then(O,m)}}function l(O,b){r[O]&&(i[O]=function(S){return new Promise(function(w,k){a.push([O,S,w,k])>1||c(O,S)})},b&&(i[O]=b(i[O])))}function c(O,b){try{d(r[O](b))}catch(S){p(a[0][3],S)}}function d(O){O.value instanceof Jl?Promise.resolve(O.value.v).then(f,m):p(a[0][2],O)}function f(O){c("next",O)}function m(O){c("throw",O)}function p(O,b){O(b),a.shift(),a.length&&c(a[0][0],a[0][1])}}function cq(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof mc=="function"?mc(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(s){return new Promise(function(l,c){s=e[a](s),i(l,c,s.done,s.value)})}}function i(a,s,l,c){Promise.resolve(c).then(function(d){a({value:d,done:l})},s)}}function Qn(e){return typeof e=="function"}function TE(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var vO=TE(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
27
|
+
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
|
28
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function Xb(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var wp=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,a;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var l=mc(s),c=l.next();!c.done;c=l.next()){var d=c.value;d.remove(this)}}catch(S){t={error:S}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}else s.remove(this);var f=this.initialTeardown;if(Qn(f))try{f()}catch(S){a=S instanceof vO?S.errors:[S]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var p=mc(m),O=p.next();!O.done;O=p.next()){var b=O.value;try{Q1(b)}catch(S){a=a??[],S instanceof vO?a=Ib(Ib([],qb(a)),qb(S.errors)):a.push(S)}}}catch(S){r={error:S}}finally{try{O&&!O.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}}if(a)throw new vO(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Q1(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Xb(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Xb(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),CE=wp.EMPTY;function EE(e){return e instanceof wp||e&&"closed"in e&&Qn(e.remove)&&Qn(e.add)&&Qn(e.unsubscribe)}function Q1(e){Qn(e)?e():e.unsubscribe()}var uq={Promise:void 0},dq={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ib([e,t],qb(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function AE(e){dq.setTimeout(function(){throw e})}function Zb(){}function Sm(e){e()}var z0=(function(e){jc(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,EE(n)&&n.add(r)):r.destination=mq,r}return t.create=function(n,r,i){return new Bb(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(wp),fq=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){Zh(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Zh(r)}else Zh(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Zh(n)}},e})(),Bb=(function(e){jc(t,e);function t(n,r,i){var a=e.call(this)||this,s;return Qn(n)||!n?s={next:n??void 0,error:r??void 0,complete:i??void 0}:s=n,a.destination=new fq(s),a}return t})(z0);function Zh(e){AE(e)}function hq(e){throw e}var mq={closed:!0,next:Zb,error:hq,complete:Zb},q0=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function I0(e){return e}function pq(e){return e.length===0?I0:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var nr=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,a=vq(t)?t:new Bb(t,n,r);return Sm(function(){var s=i,l=s.operator,c=s.source;a.add(l?l.call(a,c):c?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=P1(n),new n(function(i,a){var s=new Bb({next:function(l){try{t(l)}catch(c){a(c),s.unsubscribe()}},error:a,complete:i});r.subscribe(s)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[q0]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return pq(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=P1(t),new t(function(r,i){var a;n.subscribe(function(s){return a=s},function(s){return i(s)},function(){return r(a)})})},e.create=function(t){return new e(t)},e})();function P1(e){var t;return(t=e??uq.Promise)!==null&&t!==void 0?t:Promise}function gq(e){return e&&Qn(e.next)&&Qn(e.error)&&Qn(e.complete)}function vq(e){return e&&e instanceof z0||gq(e)&&EE(e)}function Oq(e){return Qn(e==null?void 0:e.lift)}function Yo(e){return function(t){if(Oq(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Xo(e,t,n,r,i){return new bq(e,t,n,r,i)}var bq=(function(e){jc(t,e);function t(n,r,i,a,s,l){var c=e.call(this,n)||this;return c.onFinalize=s,c.shouldUnsubscribe=l,c._next=r?function(d){try{r(d)}catch(f){n.error(f)}}:e.prototype._next,c._error=a?function(d){try{a(d)}catch(f){n.error(f)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(d){n.error(d)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(z0),yq=TE(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),kp=(function(e){jc(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new N1(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new yq},t.prototype.next=function(n){var r=this;Sm(function(){var i,a;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var s=mc(r.currentObservers),l=s.next();!l.done;l=s.next()){var c=l.value;c.next(n)}}catch(d){i={error:d}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;Sm(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;Sm(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,a=i.hasError,s=i.isStopped,l=i.observers;return a||s?CE:(this.currentObservers=null,l.push(n),new wp(function(){r.currentObservers=null,Xb(l,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,a=r.thrownError,s=r.isStopped;i?n.error(a):s&&n.complete()},t.prototype.asObservable=function(){var n=new nr;return n.source=this,n},t.create=function(n,r){return new N1(n,r)},t})(nr),N1=(function(e){jc(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:CE},t})(kp),Ul=(function(e){jc(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,a=n._value;if(r)throw i;return this._throwIfClosed(),a},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t})(kp),Sq=new nr(function(e){return e.complete()});function xq(e){return e&&Qn(e.schedule)}function QE(e){return e[e.length-1]}function _q(e){return xq(QE(e))?e.pop():void 0}function wq(e,t){return typeof QE(e)=="number"?e.pop():t}var PE=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function NE(e){return Qn(e==null?void 0:e.then)}function RE(e){return Qn(e[q0])}function ME(e){return Symbol.asyncIterator&&Qn(e==null?void 0:e[Symbol.asyncIterator])}function LE(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function kq(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var DE=kq();function zE(e){return Qn(e==null?void 0:e[DE])}function qE(e){return lq(this,arguments,function(){var n,r,i,a;return jE(this,function(s){switch(s.label){case 0:n=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,Jl(n.read())];case 3:return r=s.sent(),i=r.value,a=r.done,a?[4,Jl(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Jl(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function IE(e){return Qn(e==null?void 0:e.getReader)}function Fo(e){if(e instanceof nr)return e;if(e!=null){if(RE(e))return jq(e);if(PE(e))return Tq(e);if(NE(e))return Cq(e);if(ME(e))return XE(e);if(zE(e))return Eq(e);if(IE(e))return Aq(e)}throw LE(e)}function jq(e){return new nr(function(t){var n=e[q0]();if(Qn(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Tq(e){return new nr(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function Cq(e){return new nr(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,AE)})}function Eq(e){return new nr(function(t){var n,r;try{for(var i=mc(e),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.next(s),t.closed)return}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function XE(e){return new nr(function(t){Qq(e,t).catch(function(n){return t.error(n)})})}function Aq(e){return XE(qE(e))}function Qq(e,t){var n,r,i,a;return oq(this,void 0,void 0,function(){var s,l;return jE(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=cq(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return l=c.sent(),i={error:l},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Do(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function ZE(e,t){return t===void 0&&(t=0),Yo(function(n,r){n.subscribe(Xo(r,function(i){return Do(r,e,function(){return r.next(i)},t)},function(){return Do(r,e,function(){return r.complete()},t)},function(i){return Do(r,e,function(){return r.error(i)},t)}))})}function BE(e,t){return t===void 0&&(t=0),Yo(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function Pq(e,t){return Fo(e).pipe(BE(t),ZE(t))}function Nq(e,t){return Fo(e).pipe(BE(t),ZE(t))}function Rq(e,t){return new nr(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Mq(e,t){return new nr(function(n){var r;return Do(n,t,function(){r=e[DE](),Do(n,t,function(){var i,a,s;try{i=r.next(),a=i.value,s=i.done}catch(l){n.error(l);return}s?n.complete():n.next(a)},0,!0)}),function(){return Qn(r==null?void 0:r.return)&&r.return()}})}function VE(e,t){if(!e)throw new Error("Iterable cannot be null");return new nr(function(n){Do(n,t,function(){var r=e[Symbol.asyncIterator]();Do(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Lq(e,t){return VE(qE(e),t)}function Dq(e,t){if(e!=null){if(RE(e))return Pq(e,t);if(PE(e))return Rq(e,t);if(NE(e))return Nq(e,t);if(ME(e))return VE(e,t);if(zE(e))return Mq(e,t);if(IE(e))return Lq(e,t)}throw LE(e)}function zq(e,t){return t?Dq(e,t):Fo(e)}function Ls(e,t){return Yo(function(n,r){var i=0;n.subscribe(Xo(r,function(a){r.next(e.call(t,a,i++))}))})}function qq(e,t,n,r,i,a,s,l){var c=[],d=0,f=0,m=!1,p=function(){m&&!c.length&&!d&&t.complete()},O=function(S){return d<r?b(S):c.push(S)},b=function(S){d++;var w=!1;Fo(n(S,f++)).subscribe(Xo(t,function(k){t.next(k)},function(){w=!0},void 0,function(){if(w)try{d--;for(var k=function(){var j=c.shift();s||b(j)};c.length&&d<r;)k();p()}catch(j){t.error(j)}}))};return e.subscribe(Xo(t,O,function(){m=!0,p()})),function(){}}function UE(e,t,n){return n===void 0&&(n=1/0),Qn(t)?UE(function(r,i){return Ls(function(a,s){return t(r,a,i,s)})(Fo(e(r,i)))},n):(typeof t=="number"&&(n=t),Yo(function(r,i){return qq(r,i,e,n)}))}function Iq(e){return e===void 0&&(e=1/0),UE(I0,e)}function Bm(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=_q(e),r=wq(e,1/0),i=e;return i.length?i.length===1?Fo(i[0]):Iq(r)(zq(i,n)):Sq}function Di(e,t){return Yo(function(n,r){var i=0;n.subscribe(Xo(r,function(a){return e.call(t,a,i++)&&r.next(a)}))})}function zu(e,t){return t===void 0&&(t=I0),e=e??Xq,Yo(function(n,r){var i,a=!0;n.subscribe(Xo(r,function(s){var l=t(s);(a||!e(i,l))&&(a=!1,i=l,r.next(s))}))})}function Xq(e,t){return e===t}function X0(e){return Yo(function(t,n){Fo(e).subscribe(Xo(n,function(){return n.complete()},Zb)),!n.closed&&t.subscribe(n)})}function nre(e){return e}function rre(e){return e}function Zq(e){return e}function ire(e){return e}function pi(e){if(e.includes("/"))throw new TypeError(`Expected ResourceId, got URI: ${e}`);return e}function mr(e){if(e.includes("/"))throw new TypeError(`Expected AnnotationId, got URI: ${e}`);return e}function YE(e){var n;const t=e.payload;if(e.type==="mark:added")return((n=t==null?void 0:t.annotation)==null?void 0:n.id)||null;if((e.type==="mark:removed"||e.type==="mark:body-updated")&&t!=null&&t.annotationId&&e.resourceId)try{const r=e.resourceId;return`${r.substring(0,r.lastIndexOf("/resources/"))}/annotations/${t.annotationId}`}catch{return null}return null}var Z0=class{constructor(){Me(this,"subjects");Me(this,"isDestroyed");this.subjects=new Map,this.isDestroyed=!1}get(e){if(this.isDestroyed)throw new Error(`Cannot access event '${String(e)}' on destroyed bus`);return this.subjects.has(e)||this.subjects.set(e,new kp),this.subjects.get(e)}getDomainEvent(e){return this.get(e)}destroy(){if(!this.isDestroyed){for(const e of this.subjects.values())e.complete();this.subjects.clear(),this.isDestroyed=!0}}get destroyed(){return this.isDestroyed}scope(e){return new Bq(this,e)}},Bq=class FE{constructor(t,n){this.parent=t,this.scopePrefix=n}get(t){const n=`${this.scopePrefix}:${t}`,r=this.parent.subjects;return r.has(n)||r.set(n,new kp),r.get(n)}getDomainEvent(t){return this.get(t)}scope(t){return new FE(this.parent,`${this.scopePrefix}:${t}`)}};function gi(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextPositionSelector");return n&&n.type==="TextPositionSelector"?n:null}function $E(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="SvgSelector");return n&&n.type==="SvgSelector"?n:null}function Vq(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="FragmentSelector");return n&&n.type==="FragmentSelector"?n:null}class Vm extends Error{constructor(n,r,i){const a=n.status||n.status===0?n.status:"",s=n.statusText??"",l=`${a} ${s}`.trim(),c=l?`status code ${l}`:"an unknown error";super(`Request failed with ${c}: ${r.method} ${r.url}`);Me(this,"response");Me(this,"request");Me(this,"options");this.name="HTTPError",this.response=n,this.request=r,this.options=i}}class WE extends Error{constructor(n){let r="Non-error value was thrown";try{typeof n=="string"?r=n:n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"&&(r=n.message)}catch{}super(r);Me(this,"name","NonError");Me(this,"value");this.value=n}}class OO extends Error{constructor(n){const r=n!=null&&n.cause?n.cause instanceof Error?n.cause:new WE(n.cause):void 0;super(n!=null&&n.code?`Forced retry: ${n.code}`:"Forced retry",r?{cause:r}:void 0);Me(this,"name","ForceRetryError");Me(this,"customDelay");Me(this,"code");Me(this,"customRequest");this.customDelay=n==null?void 0:n.delay,this.code=n==null?void 0:n.code,this.customRequest=n==null?void 0:n.request}}const R1=(()=>{let e=!1,t=!1;const n=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(n&&r)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return e&&!t})(),Uq=typeof globalThis.AbortController=="function",HE=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",Yq=typeof globalThis.ReadableStream=="function",Fq=typeof globalThis.FormData=="function",GE=["get","post","put","patch","head","delete"],$q={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},bO=2147483647,Wq=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,KE=Symbol("stop");class JE{constructor(t){Me(this,"options");this.options=t}}const Hq=e=>new JE(e),Gq={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Kq={next:!0},Jq={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},eI=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[n,r]of e)t+=Wq,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,t+=typeof r=="string"?new TextEncoder().encode(r).length:r.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e=="string")return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{const t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},eA=(e,t,n)=>{let r,i=0;return e.pipeThrough(new TransformStream({transform(a,s){if(s.enqueue(a),r){i+=r.byteLength;let l=t===0?0:i/t;l>=1&&(l=1-Number.EPSILON),n==null||n({percent:l,totalBytes:Math.max(t,i),transferredBytes:i},r)}r=a},flush(){r&&(i+=r.byteLength,n==null||n({percent:1,totalBytes:Math.max(t,i),transferredBytes:i},r))}}))},tI=(e,t)=>{if(!e.body)return e;if(e.status===204)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});const n=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(eA(e.body,n,t),{status:e.status,statusText:e.statusText,headers:e.headers})},nI=(e,t,n)=>{if(!e.body)return e;const r=eI(n??e.body);return new Request(e,{duplex:"half",body:eA(e.body,r,t)})},Eo=e=>e!==null&&typeof e=="object",Bh=(...e)=>{for(const t of e)if((!Eo(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return B0({},...e)},tA=(e={},t={})=>{const n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(const[a,s]of i.entries())r&&s==="undefined"||s===void 0?n.delete(a):n.set(a,s);return n};function Vh(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:B0(e[n]??[],t[n]??[])}const nA=(e={},t={})=>({beforeRequest:Vh(e,t,"beforeRequest"),beforeRetry:Vh(e,t,"beforeRetry"),afterResponse:Vh(e,t,"afterResponse"),beforeError:Vh(e,t,"beforeError")}),rI=(e,t)=>{const n=new URLSearchParams;for(const r of[e,t])if(r!==void 0)if(r instanceof URLSearchParams)for(const[i,a]of r.entries())n.append(i,a);else if(Array.isArray(r))for(const i of r){if(!Array.isArray(i)||i.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");n.append(String(i[0]),String(i[1]))}else if(Eo(r))for(const[i,a]of Object.entries(r))a!==void 0&&n.append(i,String(a));else{const i=new URLSearchParams(r);for(const[a,s]of i.entries())n.append(a,s)}return n},B0=(...e)=>{let t={},n={},r={},i;const a=[];for(const s of e)if(Array.isArray(s))Array.isArray(t)||(t=[]),t=[...t,...s];else if(Eo(s)){for(let[l,c]of Object.entries(s)){if(l==="signal"&&c instanceof globalThis.AbortSignal){a.push(c);continue}if(l==="context"){if(c!=null&&(!Eo(c)||Array.isArray(c)))throw new TypeError("The `context` option must be an object");t={...t,context:c==null?{}:{...t.context,...c}};continue}if(l==="searchParams"){c==null?i=void 0:i=i===void 0?c:rI(i,c);continue}Eo(c)&&l in t&&(c=B0(t[l],c)),t={...t,[l]:c}}Eo(s.hooks)&&(r=nA(r,s.hooks),t.hooks=r),Eo(s.headers)&&(n=tA(n,s.headers),t.headers=n)}return i!==void 0&&(t.searchParams=i),a.length>0&&(a.length===1?t.signal=a[0]:HE?t.signal=AbortSignal.any(a):t.signal=a.at(-1)),t},iI=e=>GE.includes(e)?e.toUpperCase():e,aI=["get","put","head","delete","options","trace"],sI=[408,413,429,500,502,503,504],oI=[413,429,503],M1={limit:2,methods:aI,statusCodes:sI,afterStatusCodes:oI,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},lI=(e={})=>{if(typeof e=="number")return{...M1,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&(e.methods=e.methods.map(n=>n.toLowerCase())),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0));return{...M1,...t}};class Vb extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);Me(this,"request");this.name="TimeoutError",this.request=n}}async function cI(e,t,n,r){return new Promise((i,a)=>{const s=setTimeout(()=>{n&&n.abort(),a(new Vb(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(s)})})}async function uI(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(a),r(t.reason)}const a=setTimeout(()=>{t==null||t.removeEventListener("abort",i),n()},e)})}const dI=(e,t)=>{const n={};for(const r in t)Object.hasOwn(t,r)&&!(r in Jq)&&!(r in Gq)&&(!(r in e)||r in Kq)&&(n[r]=t[r]);return n},fI=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:typeof e=="object"?Object.keys(e).length>0:typeof e=="string"?e.trim().length>0:!!e;function hI(e){return e instanceof Vm||(e==null?void 0:e.name)===Vm.name}function mI(e){return e instanceof Vb||(e==null?void 0:e.name)===Vb.name}var _p,rA,Ni,li,Kn,ye,qs,sa,Lo,Ge,xm,iA,Ub,_m,Qs,Yb,aA,$u,wm,Fb;const wd=class wd{constructor(t,n={}){Gi(this,Ge);Me(this,"request");Gi(this,Ni);Gi(this,li,0);Gi(this,Kn);Gi(this,ye);Gi(this,qs);Gi(this,sa);Gi(this,Lo);var i,a,s;if(Ai(this,Kn,t),Ai(this,ye,{...n,headers:tA(ce(this,Kn).headers,n.headers),hooks:nA({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:iI(n.method??ce(this,Kn).method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:lI(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}}),typeof ce(this,Kn)!="string"&&!(ce(this,Kn)instanceof URL||ce(this,Kn)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(ce(this,ye).prefixUrl&&typeof ce(this,Kn)=="string"){if(ce(this,Kn).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");ce(this,ye).prefixUrl.endsWith("/")||(ce(this,ye).prefixUrl+="/"),Ai(this,Kn,ce(this,ye).prefixUrl+ce(this,Kn))}Uq&&HE&&(Ai(this,sa,ce(this,ye).signal??ce(this,Kn).signal),Ai(this,Ni,new globalThis.AbortController),ce(this,ye).signal=ce(this,sa)?AbortSignal.any([ce(this,sa),ce(this,Ni).signal]):ce(this,Ni).signal),R1&&(ce(this,ye).duplex="half"),ce(this,ye).json!==void 0&&(ce(this,ye).body=((a=(i=ce(this,ye)).stringifyJson)==null?void 0:a.call(i,ce(this,ye).json))??JSON.stringify(ce(this,ye).json),ce(this,ye).headers.set("content-type",ce(this,ye).headers.get("content-type")??"application/json"));const r=n.headers&&new globalThis.Headers(n.headers).has("content-type");if(ce(this,Kn)instanceof globalThis.Request&&(Fq&&ce(this,ye).body instanceof globalThis.FormData||ce(this,ye).body instanceof URLSearchParams)&&!r&&ce(this,ye).headers.delete("content-type"),this.request=new globalThis.Request(ce(this,Kn),ce(this,ye)),fI(ce(this,ye).searchParams)){const c="?"+(typeof ce(this,ye).searchParams=="string"?ce(this,ye).searchParams.replace(/^\?/,""):new URLSearchParams(yt(s=wd,_p,rA).call(s,ce(this,ye).searchParams)).toString()),d=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,c);this.request=new globalThis.Request(d,ce(this,ye))}if(ce(this,ye).onUploadProgress){if(typeof ce(this,ye).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!R1)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=yt(this,Ge,Fb).call(this,this.request,ce(this,ye).body??void 0)}}static create(t,n){var s,l,c;const r=new wd(t,n),i=async()=>{var f,m,p,O,b,S,w,k,j,T,E,Q;if(typeof ce(r,ye).timeout=="number"&&ce(r,ye).timeout>bO)throw new RangeError(`The \`timeout\` option cannot be greater than ${bO}`);await Promise.resolve();let d=await yt(f=r,Ge,aA).call(f);for(const A of ce(r,ye).hooks.afterResponse){const N=yt(m=r,Ge,Ub).call(m,d.clone());let D;try{D=await A(r.request,yt(p=r,Ge,$u).call(p),N,{retryCount:ce(r,li)})}catch(P){throw yt(O=r,Ge,Qs).call(O,N),yt(b=r,Ge,Qs).call(b,d),P}if(D instanceof JE)throw yt(S=r,Ge,Qs).call(S,N),yt(w=r,Ge,Qs).call(w,d),new OO(D.options);const q=D instanceof globalThis.Response?D:d;N!==q&&yt(k=r,Ge,Qs).call(k,N),d!==q&&yt(j=r,Ge,Qs).call(j,d),d=q}if(yt(T=r,Ge,Ub).call(T,d),!d.ok&&(typeof ce(r,ye).throwHttpErrors=="function"?ce(r,ye).throwHttpErrors(d.status):ce(r,ye).throwHttpErrors)){let A=new Vm(d,r.request,yt(E=r,Ge,$u).call(E));for(const N of ce(r,ye).hooks.beforeError)A=await N(A,{retryCount:ce(r,li)});throw A}if(ce(r,ye).onDownloadProgress){if(typeof ce(r,ye).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Yq)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const A=d.clone();return yt(Q=r,Ge,Qs).call(Q,d),tI(A,ce(r,ye).onDownloadProgress)}return d},a=yt(s=r,Ge,Yb).call(s,i).finally(()=>{var f,m;const d=ce(r,qs);yt(f=r,Ge,_m).call(f,(d==null?void 0:d.body)??void 0),yt(m=r,Ge,_m).call(m,r.request.body??void 0)});for(const[d,f]of Object.entries($q))d==="bytes"&&typeof((c=(l=globalThis.Response)==null?void 0:l.prototype)==null?void 0:c.bytes)!="function"||(a[d]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||f);const m=await a;if(d==="json"){if(m.status===204)return"";const p=await m.text();return p===""?"":n.parseJson?n.parseJson(p):JSON.parse(p)}return m[d]()});return a}};_p=new WeakSet,rA=function(t){return t&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof URLSearchParams)?Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0)):t},Ni=new WeakMap,li=new WeakMap,Kn=new WeakMap,ye=new WeakMap,qs=new WeakMap,sa=new WeakMap,Lo=new WeakMap,Ge=new WeakSet,xm=function(){const t=ce(this,ye).retry.delay(ce(this,li));let n=t;ce(this,ye).retry.jitter===!0?n=Math.random()*t:typeof ce(this,ye).retry.jitter=="function"&&(n=ce(this,ye).retry.jitter(t),(!Number.isFinite(n)||n<0)&&(n=t));const r=ce(this,ye).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,n)},iA=async function(t){if(b1(this,li)._++,ce(this,li)>ce(this,ye).retry.limit)throw t;const n=t instanceof Error?t:new WE(t);if(n instanceof OO)return n.customDelay??yt(this,Ge,xm).call(this);if(!ce(this,ye).retry.methods.includes(this.request.method.toLowerCase()))throw t;if(ce(this,ye).retry.shouldRetry!==void 0){const r=await ce(this,ye).retry.shouldRetry({error:n,retryCount:ce(this,li)});if(r===!1)throw t;if(r===!0)return yt(this,Ge,xm).call(this)}if(mI(t)&&!ce(this,ye).retry.retryOnTimeout)throw t;if(hI(t)){if(!ce(this,ye).retry.statusCodes.includes(t.response.status))throw t;const r=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Retry-After")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(r&&ce(this,ye).retry.afterStatusCodes.includes(t.response.status)){let i=Number(r)*1e3;Number.isNaN(i)?i=Date.parse(r)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const a=ce(this,ye).retry.maxRetryAfter??i;return i<a?i:a}if(t.response.status===413)throw t}return yt(this,Ge,xm).call(this)},Ub=function(t){return ce(this,ye).parseJson&&(t.json=async()=>ce(this,ye).parseJson(await t.text())),t},_m=function(t){t&&t.cancel().catch(()=>{})},Qs=function(t){yt(this,Ge,_m).call(this,t.body??void 0)},Yb=async function(t){try{return await t()}catch(n){const r=Math.min(await yt(this,Ge,iA).call(this,n),bO);if(ce(this,li)<1)throw n;if(await uI(r,ce(this,sa)?{signal:ce(this,sa)}:{}),n instanceof OO&&n.customRequest){const i=ce(this,ye).signal?new globalThis.Request(n.customRequest,{signal:ce(this,ye).signal}):new globalThis.Request(n.customRequest);yt(this,Ge,wm).call(this,i)}for(const i of ce(this,ye).hooks.beforeRetry){const a=await i({request:this.request,options:yt(this,Ge,$u).call(this),error:n,retryCount:ce(this,li)});if(a instanceof globalThis.Request){yt(this,Ge,wm).call(this,a);break}if(a instanceof globalThis.Response)return a;if(a===KE)return}return yt(this,Ge,Yb).call(this,t)}},aA=async function(){var n;(n=ce(this,Ni))!=null&&n.signal.aborted&&(Ai(this,Ni,new globalThis.AbortController),ce(this,ye).signal=ce(this,sa)?AbortSignal.any([ce(this,sa),ce(this,Ni).signal]):ce(this,Ni).signal,this.request=new globalThis.Request(this.request,{signal:ce(this,ye).signal}));for(const r of ce(this,ye).hooks.beforeRequest){const i=await r(this.request,yt(this,Ge,$u).call(this),{retryCount:ce(this,li)});if(i instanceof Response)return i;if(i instanceof globalThis.Request){yt(this,Ge,wm).call(this,i);break}}const t=dI(this.request,ce(this,ye));return Ai(this,qs,this.request),this.request=ce(this,qs).clone(),ce(this,ye).timeout===!1?ce(this,ye).fetch(ce(this,qs),t):cI(ce(this,qs),t,ce(this,Ni),ce(this,ye))},$u=function(){if(!ce(this,Lo)){const{hooks:t,...n}=ce(this,ye);Ai(this,Lo,Object.freeze(n))}return ce(this,Lo)},wm=function(t){Ai(this,Lo,void 0),this.request=yt(this,Ge,Fb).call(this,t)},Fb=function(t,n){return!ce(this,ye).onUploadProgress||!t.body?t:nI(t,ce(this,ye).onUploadProgress,n??ce(this,ye).body??void 0)},Gi(wd,_p);let Um=wd;/*! MIT License © Sindre Sorhus */const $b=e=>{const t=(n,r)=>Um.create(n,Bh(e,r));for(const n of GE)t[n]=(r,i)=>Um.create(r,Bh(e,i,{method:n}));return t.create=n=>$b(Bh(n)),t.extend=n=>(typeof n=="function"&&(n=n(e??{})),$b(Bh(e,n))),t.stop=KE,t.retry=Hq,t},yO=$b();function SO(e,t,n,r){let i=new AbortController,a=!1,s=null;const l=1e3,c=3e4;let d=l;const f=async()=>{try{r==null||r.debug("SSE Stream Request",{type:"sse_request",url:e,method:t.method||"GET",timestamp:Date.now()});const O={...t.headers,Accept:"text/event-stream"};s!==null&&(O["Last-Event-ID"]=s);const b=await fetch(e,{...t,signal:i.signal,headers:O});if(!b.ok){const Q=await b.json().catch(()=>({})),A=new Error(Q.message||`HTTP ${b.status}: ${b.statusText}`);throw r==null||r.error("SSE Stream Error",{type:"sse_error",url:e,error:A.message,status:b.status,phase:"connect"}),A}if(!b.body){const Q=new Error("Response body is null - server did not return a stream");throw r==null||r.error("SSE Stream Error",{type:"sse_error",url:e,error:Q.message,phase:"connect"}),Q}r==null||r.info("SSE Stream Connected",{type:"sse_connected",url:e,status:b.status,contentType:b.headers.get("content-type")||"unknown"});const S=b.body.getReader(),w=new TextDecoder;let k="",j="",T="",E="";for(;;){const{done:Q,value:A}=await S.read();if(Q||a)break;const N=w.decode(A,{stream:!0});k+=N;const D=k.split(`
|
|
29
|
+
`);k=D.pop()||"";for(const q of D)if(q.startsWith("event:"))j=q.slice(6).trim();else if(q.startsWith("data:"))T=q.slice(5).trim();else if(q.startsWith("id:"))E=q.slice(3).trim();else if(q===""&&T&&!a){if(m(j,T,E),a)break;j="",T="",E=""}if(a)break}r==null||r.info("SSE Stream Closed",{type:"sse_closed",url:e,reason:"complete"})}catch(O){O instanceof Error&&O.name!=="AbortError"?r==null||r.error("SSE Stream Error",{type:"sse_error",url:e,error:O.message,phase:"stream"}):O instanceof Error&&O.name==="AbortError"&&(r==null||r.info("SSE Stream Closed",{type:"sse_closed",url:e,reason:"abort"}))}},m=(O,b,S)=>{if(!b.startsWith(":")){S&&(s=S);try{const w=JSON.parse(b);if(r==null||r.debug("SSE Event Received",{type:"sse_event",url:e,event:O||"message",hasData:!!b}),typeof w=="object"&&w!==null&&"metadata"in w){n.eventBus.get(O).next(w);return}n.eventBus.get(O).next(w),(n.completeEvent&&O===n.completeEvent||n.errorEvent&&O===n.errorEvent)&&(a=!0,i.abort())}catch(w){r==null||r.error("SSE Failed to parse event data",{error:w,eventType:O,data:b})}}};return(async()=>{if(!n.reconnect)return f();for(;!a;){i=new AbortController;try{if(await f(),a)return;r==null||r.info("SSE Stream ended cleanly; reconnecting",{url:e})}catch(O){if(a||O instanceof Error&&O.name==="AbortError")return;r==null||r.warn("SSE Stream errored; reconnecting",{url:e,error:O instanceof Error?O.message:String(O),delayMs:d})}await new Promise(O=>setTimeout(O,d)),d=Math.min(d*2,c)}})(),{close(){a=!0,i.abort()}}}var xO="stream-connected",pI=class{constructor(e){Me(this,"baseUrl");Me(this,"logger");this.baseUrl=e.baseUrl.endsWith("/")?e.baseUrl.slice(0,-1):e.baseUrl,this.logger=e.logger}getHeaders(e){const t={"Content-Type":"application/json"};return e&&(t.Authorization=`Bearer ${e}`),t}resourceEvents(e,t){const n=`${this.baseUrl}/resources/${e}/events/stream`,r=SO(n,{method:"GET",headers:this.getHeaders(t.auth)},{progressEvents:["*"],completeEvent:null,errorEvent:null,eventBus:t.eventBus,reconnect:!0},this.logger);if(t.onConnected){const i=t.eventBus.get(xO).subscribe(()=>{t.onConnected(),i.unsubscribe()})}return r}globalEvents(e){const t=`${this.baseUrl}/api/events/stream`,n=SO(t,{method:"GET",headers:this.getHeaders(e.auth)},{progressEvents:["*"],completeEvent:null,errorEvent:null,eventBus:e.eventBus,reconnect:!0},this.logger);if(e.onConnected){const r=e.eventBus.get(xO).subscribe(()=>{e.onConnected(),r.unsubscribe()})}return n}attentionStream(e){const t=`${this.baseUrl}/api/participants/me/attention-stream`,n=SO(t,{method:"GET",headers:this.getHeaders(e.auth)},{progressEvents:["*"],completeEvent:null,errorEvent:null,eventBus:e.eventBus,reconnect:!0},this.logger);if(e.onConnected){const r=e.eventBus.get(xO).subscribe(()=>{e.onConnected(),r.unsubscribe()})}return n}},gI=class{constructor(e,t,n){Me(this,"annotationList$",new Ul(new Map));Me(this,"fetchingAnnotationList",new Set);Me(this,"annotationListObs$",new Map);Me(this,"annotationDetail$",new Ul(new Map));Me(this,"fetchingAnnotationDetail",new Set);Me(this,"annotationDetailObs$",new Map);Me(this,"resourceDetail$",new Ul(new Map));Me(this,"fetchingResourceDetail",new Set);Me(this,"resourceDetailObs$",new Map);Me(this,"resourceList$",new Ul(new Map));Me(this,"fetchingResourceList",new Set);Me(this,"resourceListObs$",new Map);Me(this,"entityTypes$",new Ul(void 0));Me(this,"fetchingEntityTypes",!1);Me(this,"referencedBy$",new Ul(new Map));Me(this,"fetchingReferencedBy",new Set);Me(this,"referencedByObs$",new Map);Me(this,"getToken");this.http=e,this.eventBus=t,this.getToken=n,this.subscribeToEvents()}resource(e){!this.resourceDetail$.value.has(e)&&!this.fetchingResourceDetail.has(e)&&this.fetchResourceDetail(e);let t=this.resourceDetailObs$.get(e);return t||(t=this.resourceDetail$.pipe(Ls(n=>n.get(e)),zu()),this.resourceDetailObs$.set(e,t)),t}resources(e){const t=JSON.stringify(e??{});!this.resourceList$.value.has(t)&&!this.fetchingResourceList.has(t)&&this.fetchResourceList(t,e);let n=this.resourceListObs$.get(t);return n||(n=this.resourceList$.pipe(Ls(r=>r.get(t)),zu()),this.resourceListObs$.set(t,n)),n}annotations(e){!this.annotationList$.value.has(e)&&!this.fetchingAnnotationList.has(e)&&this.fetchAnnotationList(e);let t=this.annotationListObs$.get(e);return t||(t=this.annotationList$.pipe(Ls(n=>{var r;return(r=n.get(e))==null?void 0:r.annotations}),zu()),this.annotationListObs$.set(e,t)),t}annotation(e,t){!this.annotationDetail$.value.has(t)&&!this.fetchingAnnotationDetail.has(t)&&this.fetchAnnotationDetail(e,t);let n=this.annotationDetailObs$.get(t);return n||(n=this.annotationDetail$.pipe(Ls(r=>r.get(t)),zu()),this.annotationDetailObs$.set(t,n)),n}entityTypes(){return this.entityTypes$.value===void 0&&!this.fetchingEntityTypes&&this.fetchEntityTypes(),this.entityTypes$.asObservable()}referencedBy(e){!this.referencedBy$.value.has(e)&&!this.fetchingReferencedBy.has(e)&&this.fetchReferencedBy(e);let t=this.referencedByObs$.get(e);return t||(t=this.referencedBy$.pipe(Ls(n=>n.get(e)),zu()),this.referencedByObs$.set(e,t)),t}async resourceContent(e){const t=await this.http.getResourceRepresentation(e,{accept:"text/plain",auth:this.getToken()});return new TextDecoder().decode(t.data)}async resourceRepresentation(e,t){return this.http.getResourceRepresentation(e,{accept:t==null?void 0:t.accept,auth:this.getToken()})}async resourceRepresentationStream(e,t){return this.http.getResourceRepresentationStream(e,{accept:t==null?void 0:t.accept,auth:this.getToken()})}async resourceEvents(e){return(await this.http.getResourceEvents(e,{auth:this.getToken()})).events}async annotationHistory(e,t){return this.http.getAnnotationHistory(e,t,{auth:this.getToken()})}async connections(e){throw new Error("Not implemented: connections endpoint does not exist yet")}async backlinks(e){throw new Error("Not implemented: backlinks endpoint does not exist yet")}async resourcesByName(e,t){throw new Error("Not implemented: resourcesByName endpoint does not exist yet")}async files(e,t){return this.http.browseFiles(e,t,{auth:this.getToken()})}invalidateAnnotationList(e){const t=new Map(this.annotationList$.value);t.delete(e),this.annotationList$.next(t),this.fetchAnnotationList(e)}invalidateAnnotationDetail(e){const t=new Map(this.annotationDetail$.value);t.delete(e),this.annotationDetail$.next(t)}invalidateResourceDetail(e){const t=new Map(this.resourceDetail$.value);t.delete(e),this.resourceDetail$.next(t),this.fetchResourceDetail(e)}invalidateResourceLists(){this.resourceList$.next(new Map)}invalidateEntityTypes(){this.entityTypes$.next(void 0),this.fetchEntityTypes()}invalidateReferencedBy(e){const t=new Map(this.referencedBy$.value);t.delete(e),this.referencedBy$.next(t),this.fetchReferencedBy(e)}updateAnnotationInPlace(e,t){const n=this.annotationList$.value.get(e);if(!n)return;const r=n.annotations.findIndex(l=>l.id===t.id),i=r>=0?n.annotations.map((l,c)=>c===r?t:l):[...n.annotations,t],a={...n,annotations:i},s=new Map(this.annotationList$.value);s.set(e,a),this.annotationList$.next(s)}subscribeToEvents(){const e=this.eventBus;e.get("mark:delete-ok").subscribe(t=>{this.invalidateAnnotationDetail(mr(t.annotationId))}),e.get("mark:added").subscribe(t=>{t.resourceId&&this.invalidateAnnotationList(t.resourceId)}),e.get("mark:removed").subscribe(t=>{t.resourceId&&this.invalidateAnnotationList(t.resourceId),this.invalidateAnnotationDetail(mr(t.payload.annotationId))}),e.get("mark:body-updated").subscribe(t=>{const n=t;!n.resourceId||!n.annotation||(this.updateAnnotationInPlace(n.resourceId,n.annotation),this.invalidateAnnotationDetail(mr(n.annotation.id)))}),e.get("mark:entity-tag-added").subscribe(t=>{t.resourceId&&(this.invalidateAnnotationList(t.resourceId),this.invalidateResourceDetail(t.resourceId))}),e.get("mark:entity-tag-removed").subscribe(t=>{t.resourceId&&(this.invalidateAnnotationList(t.resourceId),this.invalidateResourceDetail(t.resourceId))}),e.get("replay-window-exceeded").subscribe(t=>{t.resourceId&&this.invalidateAnnotationList(t.resourceId)}),e.get("yield:create-ok").subscribe(t=>{this.fetchResourceDetail(pi(t.resourceId)),this.invalidateResourceLists()}),e.get("yield:update-ok").subscribe(t=>{this.invalidateResourceDetail(pi(t.resourceId)),this.invalidateResourceLists()}),e.get("mark:archived").subscribe(t=>{t.resourceId&&(this.invalidateResourceDetail(t.resourceId),this.invalidateResourceLists())}),e.get("mark:unarchived").subscribe(t=>{t.resourceId&&(this.invalidateResourceDetail(t.resourceId),this.invalidateResourceLists())}),e.get("mark:entity-type-added").subscribe(()=>{this.invalidateEntityTypes()})}async fetchAnnotationList(e){if(!this.fetchingAnnotationList.has(e)){this.fetchingAnnotationList.add(e);try{const t=await this.http.browseAnnotations(e,void 0,{auth:this.getToken()}),n=new Map(this.annotationList$.value);n.set(e,t),this.annotationList$.next(n)}catch{}finally{this.fetchingAnnotationList.delete(e)}}}async fetchAnnotationDetail(e,t){if(!this.fetchingAnnotationDetail.has(t)){this.fetchingAnnotationDetail.add(t);try{const n=await this.http.browseAnnotation(e,t,{auth:this.getToken()}),r=new Map(this.annotationDetail$.value);r.set(t,n.annotation),this.annotationDetail$.next(r)}catch{}finally{this.fetchingAnnotationDetail.delete(t)}}}async fetchResourceDetail(e){if(!this.fetchingResourceDetail.has(e)){this.fetchingResourceDetail.add(e);try{const t=await this.http.browseResource(e,{auth:this.getToken()}),n=new Map(this.resourceDetail$.value);n.set(e,t.resource),this.resourceDetail$.next(n)}catch{}finally{this.fetchingResourceDetail.delete(e)}}}async fetchResourceList(e,t){if(!this.fetchingResourceList.has(e)){this.fetchingResourceList.add(e);try{const n=t!=null&&t.search?t.search:void 0,r=await this.http.browseResources(t==null?void 0:t.limit,t==null?void 0:t.archived,n,{auth:this.getToken()}),i=new Map(this.resourceList$.value);i.set(e,r.resources),this.resourceList$.next(i)}catch{}finally{this.fetchingResourceList.delete(e)}}}async fetchEntityTypes(){if(!this.fetchingEntityTypes){this.fetchingEntityTypes=!0;try{const e=await this.http.listEntityTypes({auth:this.getToken()});this.entityTypes$.next(e.entityTypes)}catch{}finally{this.fetchingEntityTypes=!1}}}async fetchReferencedBy(e){if(!this.fetchingReferencedBy.has(e)){this.fetchingReferencedBy.add(e);try{const t=await this.http.browseReferences(e,{auth:this.getToken()}),n=new Map(this.referencedBy$.value);n.set(e,t.referencedBy),this.referencedBy$.next(n)}catch{}finally{this.fetchingReferencedBy.delete(e)}}}},vI=class{constructor(e,t,n){this.http=e,this.eventBus=t,this.getToken=n}async annotation(e,t){return this.http.markAnnotation(e,t,{auth:this.getToken()})}async delete(e,t){return this.http.deleteAnnotation(e,t,{auth:this.getToken()})}async entityType(e){return this.http.addEntityType(e,{auth:this.getToken()})}async entityTypes(e){return this.http.addEntityTypesBulk(e,{auth:this.getToken()})}async updateResource(e,t){return this.http.updateResource(e,t,{auth:this.getToken()})}async archive(e){return this.http.updateResource(e,{archived:!0},{auth:this.getToken()})}async unarchive(e){return this.http.updateResource(e,{archived:!1},{auth:this.getToken()})}assist(e,t,n){return new nr(r=>{const i=this.eventBus.get("mark:progress").pipe(Di(p=>p.resourceId===e)),a=this.eventBus.get("mark:assist-finished").pipe(Di(p=>p.resourceId===e&&p.motivation===t)),s=this.eventBus.get("mark:assist-failed").pipe(Di(p=>p.resourceId===e)),l=i.pipe(X0(Bm(a,s))).subscribe(p=>r.next(p)),c=a.subscribe(p=>{r.next(p),r.complete()}),d=s.subscribe(p=>{r.error(new Error(p.message))}),f=this.getToken();return this.dispatchAssist(e,t,n,f).catch(p=>{r.error(p)}),()=>{l.unsubscribe(),c.unsubscribe(),d.unsubscribe()}})}async dispatchAssist(e,t,n,r){if(t==="tagging"){const{schemaId:i,categories:a}=n;if(!i||!(a!=null&&a.length))throw new Error("Tag assist requires schemaId and categories");await this.http.annotateTags(e,{schemaId:i,categories:a},{auth:r})}else if(t==="linking"){const{entityTypes:i,includeDescriptiveReferences:a}=n;if(!(i!=null&&i.length))throw new Error("Reference assist requires entityTypes");await this.http.annotateReferences(e,{entityTypes:i,includeDescriptiveReferences:a??!1},{auth:r})}else t==="highlighting"?await this.http.annotateHighlights(e,{instructions:n.instructions,density:n.density},{auth:r}):t==="assessing"?await this.http.annotateAssessments(e,{instructions:n.instructions,tone:n.tone,density:n.density,language:n.language},{auth:r}):t==="commenting"&&await this.http.annotateComments(e,{instructions:n.instructions,tone:n.tone,density:n.density,language:n.language},{auth:r})}},OI=class{constructor(e,t){this.http=e,this.getToken=t}async body(e,t,n){await this.http.bindAnnotation(e,t,{operations:n},{auth:this.getToken()})}},bI=class{constructor(e,t,n){this.http=e,this.eventBus=t,this.getToken=n}annotation(e,t,n){return new nr(r=>{const i=crypto.randomUUID(),a=this.eventBus.get("gather:complete").pipe(Di(f=>f.correlationId===i)),s=this.eventBus.get("gather:failed").pipe(Di(f=>f.correlationId===i)),l=Bm(this.eventBus.get("gather:annotation-progress").pipe(Di(f=>f.annotationId===e),Ls(f=>f)),a.pipe(Ls(f=>f))).pipe(X0(Bm(a,s))).subscribe({next:f=>r.next(f),error:f=>r.error(f)}),c=a.subscribe(f=>{r.next(f),r.complete()}),d=s.subscribe(f=>{r.error(new Error(f.message))});return this.http.gatherAnnotationContext(t,mr(e),{correlationId:i,contextWindow:(n==null?void 0:n.contextWindow)??2e3},{auth:this.getToken()}).catch(f=>{r.error(f)}),()=>{l.unsubscribe(),c.unsubscribe(),d.unsubscribe()}})}resource(e,t){throw new Error("Not implemented: gather.resource() — no backend route yet")}},yI=class{constructor(e,t,n){this.http=e,this.eventBus=t,this.getToken=n}search(e,t,n,r){return new nr(i=>{const a=crypto.randomUUID(),s=this.eventBus.get("match:search-results").pipe(Di(f=>f.correlationId===a)),l=this.eventBus.get("match:search-failed").pipe(Di(f=>f.correlationId===a)),c=s.subscribe(f=>{i.next(f),i.complete()}),d=l.subscribe(f=>{i.error(new Error(f.error))});return this.http.matchSearch(e,{correlationId:a,referenceId:t,context:n,limit:r==null?void 0:r.limit,useSemanticScoring:r==null?void 0:r.useSemanticScoring},{auth:this.getToken()}).catch(f=>{i.error(f)}),()=>{c.unsubscribe(),d.unsubscribe()}})}},SI=class{constructor(e,t,n){this.http=e,this.eventBus=t,this.getToken=n}async resource(e){return this.http.yieldResource(e,{auth:this.getToken()})}fromAnnotation(e,t,n){return new nr(r=>{const i=this.eventBus.get("yield:progress").pipe(Di(f=>f.referenceId===t)),a=this.eventBus.get("yield:finished").pipe(Di(f=>f.referenceId===t)),s=this.eventBus.get("yield:failed").pipe(Di(f=>f.referenceId===t)),l=i.pipe(X0(Bm(a,s))).subscribe(f=>r.next(f)),c=a.subscribe(f=>{r.next(f),r.complete(),f.resourceId&&f.referenceId&&f.sourceResourceId&&this.eventBus.get("bind:update-body").next({correlationId:crypto.randomUUID(),annotationId:mr(f.referenceId),resourceId:pi(f.sourceResourceId),operations:[{op:"add",item:{type:"SpecificResource",source:f.resourceId}}]})}),d=s.subscribe(f=>{r.error(new Error(f.error??f.message??"Generation failed"))});return this.http.yieldResourceFromAnnotation(e,t,n,{auth:this.getToken()}).catch(f=>{r.error(f)}),()=>{l.unsubscribe(),c.unsubscribe(),d.unsubscribe()}})}async cloneToken(e){return await this.http.generateCloneToken(e,{auth:this.getToken()})}async fromToken(e){return(await this.http.getResourceByToken(e,{auth:this.getToken()})).sourceResource}async createFromToken(e){return this.http.createResourceFromToken(e,{auth:this.getToken()})}},xI=class{constructor(e,t){this.http=e,this.getToken=t}attention(e,t){this.http.beckonAttention("me",{annotationId:e,resourceId:t},{auth:this.getToken()}).catch(()=>{})}},_I=class{constructor(e,t){this.http=e,this.getToken=t}async status(e){return this.http.getJobStatus(e,{auth:this.getToken()})}async pollUntilComplete(e,t){return this.http.pollJobUntilComplete(e,{interval:t==null?void 0:t.interval,timeout:t==null?void 0:t.timeout,onProgress:t==null?void 0:t.onProgress,auth:this.getToken()})}async cancel(e,t){throw new Error(`Not implemented: job.cancel(${e}, ${t}) — needs EventBus wiring`)}},wI=class{constructor(e,t){this.http=e,this.getToken=t}async password(e,t){return this.http.authenticatePassword(e,t)}async google(e){return this.http.authenticateGoogle(e)}async refresh(e){return this.http.refreshToken(e)}async logout(){await this.http.logout({auth:this.getToken()})}async me(){return this.http.getMe({auth:this.getToken()})}async acceptTerms(){await this.http.acceptTerms({auth:this.getToken()})}async mcpToken(){return this.http.generateMCPToken({auth:this.getToken()})}async mediaToken(e){return this.http.getMediaToken(e,{auth:this.getToken()})}},kI=class{constructor(e,t){this.http=e,this.getToken=t}async users(){return(await this.http.listUsers({auth:this.getToken()})).users}async userStats(){return this.http.getUserStats({auth:this.getToken()})}async updateUser(e,t){return(await this.http.updateUser(e,t,{auth:this.getToken()})).user}async oauthConfig(){return this.http.getOAuthConfig({auth:this.getToken()})}async healthCheck(){return this.http.healthCheck({auth:this.getToken()})}async status(){return this.http.getStatus({auth:this.getToken()})}async backup(){return this.http.backupKnowledgeBase({auth:this.getToken()})}async restore(e,t){return this.http.restoreKnowledgeBase(e,{auth:this.getToken(),onProgress:t})}async exportKnowledgeBase(e){return this.http.exportKnowledgeBase(e,{auth:this.getToken()})}async importKnowledgeBase(e,t){return this.http.importKnowledgeBase(e,{auth:this.getToken(),onProgress:t})}},sA=class extends Error{constructor(e,t,n,r){super(e),this.status=t,this.statusText=n,this.details=r,this.name="APIError"}},V0=class{constructor(e){Me(this,"http");Me(this,"baseUrl");Me(this,"eventBus");Me(this,"logger");Me(this,"_getToken",()=>{});Me(this,"sse");Me(this,"browse");Me(this,"mark");Me(this,"bind");Me(this,"gather");Me(this,"match");Me(this,"yield");Me(this,"beckon");Me(this,"job");Me(this,"auth");Me(this,"admin");const{baseUrl:t,eventBus:n,timeout:r=3e4,retry:i=2,logger:a,tokenRefresher:s}=e;this.eventBus=n,this.logger=a,this.baseUrl=t.endsWith("/")?t.slice(0,-1):t;const l=s?{limit:1,methods:["get","post","put","patch","delete","head","options"],statusCodes:[401,408,413,429,500,502,503,504]}:i;this.http=yO.create({timeout:r,retry:l,credentials:"include",hooks:{beforeRequest:[d=>{this.logger&&this.logger.debug("HTTP Request",{type:"http_request",url:d.url,method:d.method,timestamp:Date.now(),hasAuth:d.headers.has("Authorization")})}],beforeRetry:s?[async({request:d,error:f})=>{if(!(!(f instanceof Vm)||f.response.status!==401))try{const m=await s();if(!m)return yO.stop;d.headers.set("Authorization",`Bearer ${m}`);return}catch{return yO.stop}}]:[],afterResponse:[(d,f,m)=>(this.logger&&this.logger.debug("HTTP Response",{type:"http_response",url:d.url,method:d.method,status:m.status,statusText:m.statusText}),m)],beforeError:[async d=>{const{response:f,request:m}=d;if(f){const p=await f.json().catch(()=>({}));throw this.logger&&this.logger.error("HTTP Request Failed",{type:"http_error",url:m.url,method:m.method,status:f.status,statusText:f.statusText,error:p.message||`HTTP ${f.status}: ${f.statusText}`}),new sA(p.message||`HTTP ${f.status}: ${f.statusText}`,f.status,f.statusText,p)}return d}]}}),this.sse=new pI({baseUrl:this.baseUrl,logger:this.logger}),e.getToken&&(this._getToken=e.getToken);const c=()=>this._getToken();this.browse=new gI(this,this.eventBus,c),this.mark=new vI(this,this.eventBus,c),this.bind=new OI(this,c),this.gather=new bI(this,this.eventBus,c),this.match=new yI(this,this.eventBus,c),this.yield=new SI(this,this.eventBus,c),this.beckon=new xI(this,c),this.job=new _I(this,c),this.auth=new wI(this,c),this.admin=new kI(this,c)}setTokenGetter(e){this._getToken=e}authHeaders(e){return e!=null&&e.auth?{Authorization:`Bearer ${e.auth}`}:{}}async authenticatePassword(e,t,n){return this.http.post(`${this.baseUrl}/api/tokens/password`,{json:{email:e,password:t},headers:this.authHeaders(n)}).json()}async refreshToken(e,t){return this.http.post(`${this.baseUrl}/api/tokens/refresh`,{json:{refreshToken:e},headers:this.authHeaders(t)}).json()}async authenticateGoogle(e,t){return this.http.post(`${this.baseUrl}/api/tokens/google`,{json:{credential:e},headers:this.authHeaders(t)}).json()}async generateMCPToken(e){return this.http.post(`${this.baseUrl}/api/tokens/mcp-generate`,{headers:this.authHeaders(e)}).json()}async getMediaToken(e,t){return this.http.post(`${this.baseUrl}/api/tokens/media`,{json:{resourceId:e},headers:this.authHeaders(t)}).json()}async getMe(e){return this.http.get(`${this.baseUrl}/api/users/me`,{headers:this.authHeaders(e)}).json()}async acceptTerms(e){return this.http.post(`${this.baseUrl}/api/users/accept-terms`,{headers:this.authHeaders(e)}).json()}async logout(e){return this.http.post(`${this.baseUrl}/api/users/logout`,{headers:this.authHeaders(e)}).json()}async yieldResource(e,t){const n=new FormData;if(n.append("name",e.name),n.append("format",e.format),n.append("storageUri",e.storageUri),e.file instanceof File)n.append("file",e.file);else if(Buffer.isBuffer(e.file)){const r=new Blob([new Uint8Array(e.file)],{type:e.format});n.append("file",r,e.name)}else throw new Error("file must be a File or Buffer");return e.entityTypes&&e.entityTypes.length>0&&n.append("entityTypes",JSON.stringify(e.entityTypes)),e.language&&n.append("language",e.language),e.creationMethod&&n.append("creationMethod",e.creationMethod),e.sourceAnnotationId&&n.append("sourceAnnotationId",e.sourceAnnotationId),e.sourceResourceId&&n.append("sourceResourceId",e.sourceResourceId),this.http.post(`${this.baseUrl}/resources`,{body:n,headers:this.authHeaders(t)}).json()}async browseResource(e,t){return this.http.get(`${this.baseUrl}/resources/${e}`,{headers:this.authHeaders(t)}).json()}async getResourceRepresentation(e,t){const n=await this.http.get(`${this.baseUrl}/resources/${e}`,{headers:{Accept:(t==null?void 0:t.accept)||"text/plain",...this.authHeaders(t)}}),r=n.headers.get("content-type")||"application/octet-stream";return{data:await n.arrayBuffer(),contentType:r}}async getResourceRepresentationStream(e,t){const n=await this.http.get(`${this.baseUrl}/resources/${e}`,{headers:{Accept:(t==null?void 0:t.accept)||"text/plain",...this.authHeaders(t)}}),r=n.headers.get("content-type")||"application/octet-stream";if(!n.body)throw new Error("Response body is null - cannot create stream");return{stream:n.body,contentType:r}}async browseResources(e,t,n,r){const i=new URLSearchParams;return e&&i.append("limit",e.toString()),t!==void 0&&i.append("archived",t.toString()),n&&i.append("q",n),this.http.get(`${this.baseUrl}/resources`,{searchParams:i,headers:this.authHeaders(r)}).json()}async updateResource(e,t,n){await this.http.patch(`${this.baseUrl}/resources/${e}`,{json:t,headers:this.authHeaders(n)}).text()}async getResourceEvents(e,t){return this.http.get(`${this.baseUrl}/resources/${e}/events`,{headers:this.authHeaders(t)}).json()}async browseReferences(e,t){return this.http.get(`${this.baseUrl}/resources/${e}/referenced-by`,{headers:this.authHeaders(t)}).json()}async generateCloneToken(e,t){return this.http.post(`${this.baseUrl}/resources/${e}/clone-with-token`,{headers:this.authHeaders(t)}).json()}async getResourceByToken(e,t){return this.http.get(`${this.baseUrl}/api/clone-tokens/${e}`,{headers:this.authHeaders(t)}).json()}async createResourceFromToken(e,t){return this.http.post(`${this.baseUrl}/api/clone-tokens/create-resource`,{json:e,headers:this.authHeaders(t)}).json()}async markAnnotation(e,t,n){return this.http.post(`${this.baseUrl}/resources/${e}/annotations`,{json:t,headers:this.authHeaders(n)}).json()}async getAnnotation(e,t){return this.http.get(`${this.baseUrl}/annotations/${e}`,{headers:this.authHeaders(t)}).json()}async browseAnnotation(e,t,n){return this.http.get(`${this.baseUrl}/resources/${e}/annotations/${t}`,{headers:this.authHeaders(n)}).json()}async browseAnnotations(e,t,n){const r=new URLSearchParams;return t&&r.append("motivation",t),this.http.get(`${this.baseUrl}/resources/${e}/annotations`,{searchParams:r,headers:this.authHeaders(n)}).json()}async deleteAnnotation(e,t,n){await this.http.delete(`${this.baseUrl}/resources/${e}/annotations/${t}`,{headers:this.authHeaders(n)})}async bindAnnotation(e,t,n,r){return this.http.post(`${this.baseUrl}/resources/${e}/annotations/${t}/bind`,{json:{resourceId:e,...n},headers:this.authHeaders(r)}).json()}async getAnnotationHistory(e,t,n){return this.http.get(`${this.baseUrl}/resources/${e}/annotations/${t}/history`,{headers:this.authHeaders(n)}).json()}async annotateReferences(e,t,n){return this.http.post(`${this.baseUrl}/resources/${e}/annotate-references`,{json:t,headers:this.authHeaders(n)}).json()}async annotateHighlights(e,t,n){return this.http.post(`${this.baseUrl}/resources/${e}/annotate-highlights`,{json:t,headers:this.authHeaders(n)}).json()}async annotateAssessments(e,t,n){return this.http.post(`${this.baseUrl}/resources/${e}/annotate-assessments`,{json:t,headers:this.authHeaders(n)}).json()}async annotateComments(e,t,n){return this.http.post(`${this.baseUrl}/resources/${e}/annotate-comments`,{json:t,headers:this.authHeaders(n)}).json()}async annotateTags(e,t,n){return this.http.post(`${this.baseUrl}/resources/${e}/annotate-tags`,{json:t,headers:this.authHeaders(n)}).json()}async yieldResourceFromAnnotation(e,t,n,r){return this.http.post(`${this.baseUrl}/resources/${e}/annotations/${t}/yield-resource`,{json:n,headers:this.authHeaders(r)}).json()}async gatherAnnotationContext(e,t,n,r){return this.http.post(`${this.baseUrl}/resources/${e}/annotations/${t}/gather`,{json:n,headers:this.authHeaders(r)}).json()}async matchSearch(e,t,n){return this.http.post(`${this.baseUrl}/resources/${e}/match-search`,{json:{resourceId:e,...t},headers:this.authHeaders(n)}).json()}async addEntityType(e,t){await this.http.post(`${this.baseUrl}/api/entity-types`,{json:{tag:e},headers:this.authHeaders(t)})}async addEntityTypesBulk(e,t){await this.http.post(`${this.baseUrl}/api/entity-types/bulk`,{json:{tags:e},headers:this.authHeaders(t)})}async listEntityTypes(e){return this.http.get(`${this.baseUrl}/api/entity-types`,{headers:this.authHeaders(e)}).json()}async beckonAttention(e,t,n){return this.http.post(`${this.baseUrl}/api/participants/${e}/attention`,{json:t,headers:this.authHeaders(n)}).json()}async listUsers(e){return this.http.get(`${this.baseUrl}/api/admin/users`,{headers:this.authHeaders(e)}).json()}async getUserStats(e){return this.http.get(`${this.baseUrl}/api/admin/users/stats`,{headers:this.authHeaders(e)}).json()}async updateUser(e,t,n){return this.http.patch(`${this.baseUrl}/api/admin/users/${e}`,{json:t,headers:this.authHeaders(n)}).json()}async getOAuthConfig(e){return this.http.get(`${this.baseUrl}/api/admin/oauth/config`,{headers:this.authHeaders(e)}).json()}async backupKnowledgeBase(e){return this.http.post(`${this.baseUrl}/api/admin/exchange/backup`,{headers:this.authHeaders(e)})}async restoreKnowledgeBase(e,t){const n=new FormData;n.append("file",e);const r=await this.http.post(`${this.baseUrl}/api/admin/exchange/restore`,{body:n,headers:this.authHeaders(t)});return this.parseSSEStream(r,t==null?void 0:t.onProgress)}async exportKnowledgeBase(e,t){const n=e!=null&&e.includeArchived?new URLSearchParams({includeArchived:"true"}):void 0;return this.http.post(`${this.baseUrl}/api/moderate/exchange/export`,{headers:this.authHeaders(t),...n?{searchParams:n}:{}})}async importKnowledgeBase(e,t){const n=new FormData;n.append("file",e);const r=await this.http.post(`${this.baseUrl}/api/moderate/exchange/import`,{body:n,headers:this.authHeaders(t)});return this.parseSSEStream(r,t==null?void 0:t.onProgress)}async parseSSEStream(e,t){const n=e.body.getReader(),r=new TextDecoder;let i="",a={phase:"unknown"};for(;;){const{done:s,value:l}=await n.read();if(s)break;i+=r.decode(l,{stream:!0});const c=i.split(`
|
|
30
|
+
`);i=c.pop();for(const d of c)if(d.startsWith("data: ")){const f=JSON.parse(d.slice(6));t==null||t(f),a=f}}return a}async getJobStatus(e,t){return this.http.get(`${this.baseUrl}/api/jobs/${e}`,{headers:this.authHeaders(t)}).json()}async pollJobUntilComplete(e,t){const n=(t==null?void 0:t.interval)??1e3,r=(t==null?void 0:t.timeout)??6e4,i=Date.now();for(;;){const a=await this.getJobStatus(e,{auth:t==null?void 0:t.auth});if(t!=null&&t.onProgress&&t.onProgress(a),a.status==="complete"||a.status==="failed"||a.status==="cancelled")return a;if(Date.now()-i>r)throw new Error(`Job polling timeout after ${r}ms`);await new Promise(s=>setTimeout(s,n))}}async healthCheck(e){return this.http.get(`${this.baseUrl}/api/health`,{headers:this.authHeaders(e)}).json()}async getStatus(e){return this.http.get(`${this.baseUrl}/api/status`,{headers:this.authHeaders(e)}).json()}async browseFiles(e,t,n){const r=new URLSearchParams;return e&&r.append("path",e),t&&r.append("sort",t),this.http.get(`${this.baseUrl}/api/browse/files`,{searchParams:r,headers:this.authHeaders(n)}).json()}};function Wa(e){if(Array.isArray(e)){for(const t of e)if(typeof t=="object"&&t!==null&&"type"in t&&"source"in t){const n=t.type,r=t.source;if(n==="SpecificResource"&&typeof r=="string")return r}return null}if(typeof e=="object"&&e!==null&&"type"in e&&"source"in e){const t=e.type,n=e.source;if(t==="SpecificResource"&&typeof n=="string")return n}return null}function jd(e){return Wa(e)!==null}function qn(e){if(typeof e!="string")return e.selector}function Tc(e){return e.motivation==="highlighting"}function Ii(e){return e.motivation==="linking"}function Hd(e){return e.motivation==="assessing"}function $o(e){return e.motivation==="commenting"}function Cc(e){return e.motivation==="tagging"}function jI(e){if(!$o(e))return;const t=Array.isArray(e.body)?e.body[0]:e.body;if(t&&"value"in t)return t.value}function U0(e){return Ii(e)&&jd(e.body)}function Is(e){if(!e)return"";const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextQuoteSelector");return n?n.exact:""}function Gd(e){const t=qn(e.target);return Is(t)}function TI(e){const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextQuoteSelector");return n&&n.type==="TextQuoteSelector"?n:null}function Wb(e){return e.replace(/\s+/g," ").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/\u2014/g,"--").replace(/\u2013/g,"-").trim()}function CI(e,t){const n=e.length,r=t.length,i=[];for(let a=0;a<=n;a++)i[a]=[a];for(let a=0;a<=r;a++)i[0][a]=a;for(let a=1;a<=n;a++)for(let s=1;s<=r;s++){const l=e[a-1]===t[s-1]?0:1,c=i[a-1][s]+1,d=i[a][s-1]+1,f=i[a-1][s-1]+l;i[a][s]=Math.min(c,d,f)}return i[n][r]}function EI(e){return{normalizedContent:Wb(e),lowerContent:e.toLowerCase()}}function AI(e,t,n,r){const i=Math.max(5,Math.floor(t.length*.05)),a=e.indexOf(t);if(a!==-1)return{start:a,end:a+t.length,matchQuality:"exact"};const s=Wb(t),l=r.normalizedContent.indexOf(s);if(l!==-1){let S=0,w=0;for(;w<l&&S<e.length;){const k=e[S],j=Wb(k);j&&(w+=j.length),S++}return{start:S,end:S+t.length,matchQuality:"normalized"}}const c=t.toLowerCase(),d=r.lowerContent.indexOf(c);if(d!==-1)return{start:d,end:d+t.length,matchQuality:"case-insensitive"};const f=t.length,m=Math.min(500,e.length),p=n!==void 0?Math.max(0,n-m):0,O=n!==void 0?Math.min(e.length,n+m):e.length;let b=null;for(let S=p;S<=O-f;S++){const w=e.substring(S,S+f),k=CI(t,w);k<=i&&(!b||k<b.distance)&&(b={start:S,distance:k})}return b?{start:b.start,end:b.start+f,matchQuality:"fuzzy"}:null}function QI(e,t,n,r,i,a){if(!t)return null;if(i!==void 0&&i>=0&&i+t.length<=e.length&&e.substring(i,i+t.length)===t)return{start:i,end:i+t.length};const s=[];let l=e.indexOf(t);for(;l!==-1;)s.push(l),l=e.indexOf(t,l+1);if(s.length===0){const d=AI(e,t,i,a);return d?{start:d.start,end:d.end}:null}if(s.length===1){const d=s[0];return{start:d,end:d+t.length}}if(n||r){for(const d of s){const f=Math.max(0,d-((n==null?void 0:n.length)||0)),m=e.substring(f,d),p=Math.min(e.length,d+t.length+((r==null?void 0:r.length)||0)),O=e.substring(d+t.length,p),b=!n||m.endsWith(n),S=!r||O.startsWith(r);if(b&&S)return{start:d,end:d+t.length}}for(const d of s){const f=e.substring(Math.max(0,d-((n==null?void 0:n.length)||0)),d),m=e.substring(d+t.length,d+t.length+((r==null?void 0:r.length)||0)),p=!n||f.includes(n.trim()),O=!r||m.includes(r.trim());if(p&&O)return{start:d,end:d+t.length}}}const c=s[0];return{start:c,end:c+t.length}}var ec=[{code:"ar",nativeName:"العربية",englishName:"Arabic"},{code:"bn",nativeName:"বাংলা",englishName:"Bengali"},{code:"cs",nativeName:"Čeština",englishName:"Czech"},{code:"da",nativeName:"Dansk",englishName:"Danish"},{code:"de",nativeName:"Deutsch",englishName:"German"},{code:"el",nativeName:"Ελληνικά",englishName:"Greek"},{code:"en",nativeName:"English",englishName:"English"},{code:"es",nativeName:"Español",englishName:"Spanish"},{code:"fa",nativeName:"فارسی",englishName:"Persian"},{code:"fi",nativeName:"Suomi",englishName:"Finnish"},{code:"fr",nativeName:"Français",englishName:"French"},{code:"he",nativeName:"עברית",englishName:"Hebrew"},{code:"hi",nativeName:"हिन्दी",englishName:"Hindi"},{code:"id",nativeName:"Bahasa Indonesia",englishName:"Indonesian"},{code:"it",nativeName:"Italiano",englishName:"Italian"},{code:"ja",nativeName:"日本語",englishName:"Japanese"},{code:"ko",nativeName:"한국어",englishName:"Korean"},{code:"ms",nativeName:"Bahasa Melayu",englishName:"Malay"},{code:"nl",nativeName:"Nederlands",englishName:"Dutch"},{code:"no",nativeName:"Norsk",englishName:"Norwegian"},{code:"pl",nativeName:"Polski",englishName:"Polish"},{code:"pt",nativeName:"Português",englishName:"Portuguese"},{code:"ro",nativeName:"Română",englishName:"Romanian"},{code:"sv",nativeName:"Svenska",englishName:"Swedish"},{code:"th",nativeName:"ไทย",englishName:"Thai"},{code:"tr",nativeName:"Türkçe",englishName:"Turkish"},{code:"uk",nativeName:"Українська",englishName:"Ukrainian"},{code:"vi",nativeName:"Tiếng Việt",englishName:"Vietnamese"},{code:"zh",nativeName:"中文",englishName:"Chinese"}],PI=new Map(ec.map(e=>[e.code.toLowerCase(),e]));function NI(e){if(e)return PI.get(e.toLowerCase())}function RI(e){if(!e)return;const t=NI(e);return t?`${t.nativeName} (${e.toLowerCase()})`:e}function Hb(e){if(e)return e["@id"]||void 0}function Y0(e){return e!=null&&e.representations?(Array.isArray(e.representations)?e.representations:[e.representations])[0]:void 0}function Gb(e){var t;return(t=Y0(e))==null?void 0:t.mediaType}function L1(e){var t;return(t=Y0(e))==null?void 0:t.language}function oA(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),i=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);return`<svg xmlns="http://www.w3.org/2000/svg"><rect x="${n}" y="${r}" width="${i}" height="${a}"/></svg>`}function lA(e){if(e.length<3)throw new Error("Polygon requires at least 3 points");return`<svg xmlns="http://www.w3.org/2000/svg"><polygon points="${e.map(n=>`${n.x},${n.y}`).join(" ")}"/></svg>`}function cA(e,t){if(t<=0)throw new Error("Circle radius must be positive");return`<svg xmlns="http://www.w3.org/2000/svg"><circle cx="${e.x}" cy="${e.y}" r="${t}"/></svg>`}function F0(e){var i,a,s,l,c,d,f;const t=e.match(/<rect\s+([^>]+)\/>/);if(t&&t[1]){const m=t[1],p=parseFloat(((i=m.match(/x="([^"]+)"/))==null?void 0:i[1])||"0"),O=parseFloat(((a=m.match(/y="([^"]+)"/))==null?void 0:a[1])||"0"),b=parseFloat(((s=m.match(/width="([^"]+)"/))==null?void 0:s[1])||"0"),S=parseFloat(((l=m.match(/height="([^"]+)"/))==null?void 0:l[1])||"0");return{type:"rect",data:{x:p,y:O,width:b,height:S}}}const n=e.match(/<polygon\s+points="([^"]+)"/);if(n&&n[1])return{type:"polygon",data:{points:n[1].split(/\s+/).map(O=>{const[b,S]=O.split(",").map(parseFloat);return{x:b,y:S}})}};const r=e.match(/<circle\s+([^>]+)\/>/);if(r&&r[1]){const m=r[1],p=parseFloat(((c=m.match(/cx="([^"]+)"/))==null?void 0:c[1])||"0"),O=parseFloat(((d=m.match(/cy="([^"]+)"/))==null?void 0:d[1])||"0"),b=parseFloat(((f=m.match(/r="([^"]+)"/))==null?void 0:f[1])||"0");return{type:"circle",data:{cx:p,cy:O,r:b}}}return null}function MI(e,t,n,r,i){const a=F0(e);if(!a)return e;const s=r/t,l=i/n;switch(a.type){case"rect":{const{x:c,y:d,width:f,height:m}=a.data;return oA({x:c*s,y:d*l},{x:(c+f)*s,y:(d+m)*l})}case"circle":{const{cx:c,cy:d,r:f}=a.data;return cA({x:c*s,y:d*l},f*Math.min(s,l))}case"polygon":{const c=a.data.points.map(d=>({x:d.x*s,y:d.y*l}));return lA(c)}}return e}function LI(e,t,n){let a;if(t>0){let l=Math.max(0,t-64),c=0;for(;l>0&&c<32;){const d=e[l-1];if(!d||/[\s.,;:!?'"()\[\]{}<>\/\\]/.test(d))break;l--,c++}a=e.substring(l,t)}let s;if(n<e.length){let l=Math.min(e.length,n+64),c=0;for(;l<e.length&&c<32;){const d=e[l];if(!d||/[\s.,;:!?'"()\[\]{}<>\/\\]/.test(d))break;l++,c++}s=e.substring(n,l)}return{prefix:a,suffix:s}}function DI(e){const t=e.match(/charset=([^\s;]+)/i);return((t==null?void 0:t[1])||"utf-8").toLowerCase()}function zI(e,t){const n=DI(t);return new TextDecoder(n).decode(e)}function Kb(e){return e==="image/png"||e==="image/jpeg"}function qI(e){return e==="text/plain"||e==="text/markdown"}function Ec(e){return e==="application/pdf"}function $0(e){return qI(e)?"text":Kb(e)||Ec(e)?"image":"unsupported"}var uA=_.createContext(null);function are({children:e}){const t=_.useRef(null);t.current||(t.current=new Z0);const n=t.current;return g.jsx(uA.Provider,{value:n,children:e})}function gt(){const e=_.useContext(uA);if(!e)throw new Error("useEventBus must be used within EventBusProvider");return e}var dA=_.createContext(void 0);function sre({baseUrl:e,tokenRefresher:t,children:n}){const r=gt(),i=_.useMemo(()=>new V0({baseUrl:e,eventBus:r,timeout:3e4,...t&&{tokenRefresher:t}}),[e,r,t]);return g.jsx(dA.Provider,{value:i,children:n})}function In(){const e=_.useContext(dA);if(e===void 0)throw new Error("useApiClient must be used within an ApiClientProvider");return e}var fA=_.createContext(void 0);function ore({token:e,children:t}){return g.jsx(fA.Provider,{value:e,children:t})}function Wt(){const e=_.useContext(fA);if(e===void 0)throw new Error("useAuthToken must be used within an AuthTokenProvider");return e}function gr(e){const t=gt(),n=_.useRef(e);_.useEffect(()=>{n.current=e});const r=_.useMemo(()=>Object.keys(e).sort(),[Object.keys(e).sort().join(",")]);_.useEffect(()=>{const i=[];for(const a of r){const s=c=>{const d=n.current[a];d?d(c):console.warn("[useEventSubscriptions] No current handler found for:",a)},l=t.get(a).subscribe(s);i.push(l)}return()=>{for(const a of i)a.unsubscribe()}},[r,t])}function II(){const e=gt(),[t,n]=_.useState(null),r=_.useCallback(({annotationId:a})=>{n(a),a&&e.get("beckon:sparkle").next({annotationId:a})},[]),i=_.useCallback(({annotationId:a})=>{e.get("beckon:focus").next({annotationId:a})},[]);return gr({"beckon:hover":r,"browse:click":i}),{hoveredAnnotationId:t}}var Jb=150;function W0(e,t){let n=null,r=null;const i=()=>{r!==null&&(clearTimeout(r),r=null)};return{handleMouseEnter:l=>{n!==l&&(i(),r=setTimeout(()=>{r=null,n=l,e(l)},t))},handleMouseLeave:()=>{i(),n!==null&&(n=null,e(null))},cleanup:i}}function Kd(e,t=Jb){const n=gt(),r=_.useRef(null),i=_.useRef(null),a=_.useCallback(()=>{r.current!==e&&(i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,r.current=e,n.get("beckon:hover").next({annotationId:e})},t))},[e,t]),s=_.useCallback(()=>{i.current!==null&&(clearTimeout(i.current),i.current=null),r.current!==null&&(r.current=null,n.get("beckon:hover").next({annotationId:null}))},[]);return _.useEffect(()=>()=>{i.current!==null&&(clearTimeout(i.current),i.current=null)},[]),{onMouseEnter:a,onMouseLeave:s}}function lre(){const e=In(),t=Wt(),n=_.useRef(t);_.useEffect(()=>{n.current=t});const[r,i]=_.useState("disconnected");return _.useEffect(()=>{i("connecting");try{const a=e.sse.attentionStream({auth:n.current?n.current:void 0,eventBus:e.eventBus});return i("connected"),()=>{a.close(),i("disconnected")}}catch(a){console.error("[AttentionStream] Failed to connect:",a),i("error");return}},[e]),{status:r}}var hA={annotations:"Annotations",history:"History",resourceInfo:"Resource Info",collaboration:"Collaboration",userAccount:"User Account",settings:"Settings",knowledgeBase:"Knowledge Base"},mA={title:"Resource Info",locale:"Locale",notSpecified:"Not specified",entityTypeTags:"Entity Type Tags",representation:"Representation",mediaType:"Media Type",byteSize:"Size",storageUri:"Storage",clone:"Clone",cloneDescription:"Generate a shareable clone link for this resource",archive:"Archive",archiveDescription:"Move this resource to archived status",unarchive:"Unarchive",unarchiveDescription:"Restore this resource to active status",provenance:"Provenance",createdAt:"Created",modifiedAt:"Modified",creationMethod:"How created",attributedTo:"Attributed to",derivedFrom:"Derived from",generatedBy:"Generated by"},pA={title:"Collaboration",connectionStatus:"Connection Status",live:"Live",disconnected:"Disconnected",events:"{{count}} events",lastSync:"Last sync:",noActivity:"No activity yet",justNow:"Just now",secondsAgo:"{{count}} seconds ago",minuteAgo:"1 minute ago",minutesAgo:"{{count}} minutes ago",hourAgo:"1 hour ago",hoursAgo:"{{count}} hours ago",realtimeActive:"Real-time updates are active",reconnecting:"Reconnecting to server...",sharing:"Sharing",collaborationComingSoon:"Collaboration features coming soon"},gA={history:"History",loading:"Loading...",user:"User",method:"Method",viewOriginal:"View original",viewAnnotation:"View annotation: {{content}}",resourceCreated:"Created Resource",resourceCloned:"Cloned",resourceArchived:"Archived",resourceUnarchived:"Unarchived",highlightAdded:"Highlight Added",highlightRemoved:"Highlight Removed",referenceCreated:"Reference Created",referenceResolved:"Reference Resolved",referenceDeleted:"Reference Deleted",entitytagAdded:"Tag Added",entitytagRemoved:"Tag Removed",assessmentAdded:"Assessment Added",assessmentRemoved:"Assessment Removed",annotationAdded:"Annotation Added",annotationRemoved:"Annotation Removed",annotationBodyUpdated:"Annotation Updated",jobEvent:"Job Event",embeddingComputed:"Embedding Computed",justNow:"just now",minutesAgo:"{{count}}m ago",hoursAgo:"{{count}}h ago",daysAgo:"{{count}}d ago"},vA={title:"Comments",noComments:"No comments yet. Select text and click Comment to add one.",commentPlaceholder:"Type your comment here...",save:"Save",cancel:"Cancel",edit:"Edit",annotateComments:"Annotate Comments",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Focus on technical terminology...",annotate:"Annotate",annotating:"Annotating...",toneLabel:"Tone",toneOptional:"(optional)",toneScholarly:"Scholarly",toneExplanatory:"Explanatory",toneConversational:"Conversational",toneTechnical:"Technical",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",closeProgress:"Close"},OA={title:"Highlights",noHighlights:"No highlights yet. Use AI annotation to find important passages.",annotateHighlights:"Annotate Highlights",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Focus on key technical concepts...",annotate:"Annotate",annotating:"Annotating...",cancel:"Cancel",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",closeProgress:"Close"},bA={title:"Assessments",noAssessments:"No assessments yet. Use AI annotation to evaluate passages.",assessmentPlaceholder:"Type your assessment here...",save:"Save",cancel:"Cancel",annotateAssessments:"Annotate Assessments",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Evaluate claims for accuracy and evidence...",annotate:"Annotate",annotating:"Annotating...",toneLabel:"Tone",toneOptional:"(optional)",toneAnalytical:"Analytical",toneCritical:"Critical",toneBalanced:"Balanced",toneConstructive:"Constructive",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",closeProgress:"Close"},yA={title:"Tags",noTags:"No tags yet. Use AI annotation to identify structural roles.",annotateTags:"Annotate Tags",selectSchema:"Select Framework",schemaLegal:"Legal Analysis (IRAC)",schemaScientific:"Scientific Paper (IMRAD)",schemaArgument:"Argument Structure (Toulmin)",selectCategories:"Select Categories",categoryIssue:"Issue",categoryRule:"Rule",categoryApplication:"Application",categoryConclusion:"Conclusion",categoryIntroduction:"Introduction",categoryMethods:"Methods",categoryResults:"Results",categoryDiscussion:"Discussion",categoryClaim:"Claim",categoryEvidence:"Evidence",categoryWarrant:"Warrant",categoryCounterargument:"Counterargument",categoryRebuttal:"Rebuttal",annotate:"Annotate",annotating:"Annotating...",cancel:"Cancel",selectAll:"Select All",deselectAll:"Deselect All",categoriesSelected:"{count, plural, =0 {No categories selected} =1 {1 category selected} other {# categories selected}}",createTagForSelection:"Create Tag for Selection",selectCategory:"Select Category",chooseCategory:"Choose a category...",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected"},SA={title:"Annotations",statistics:"Statistics",highlight:"Highlights",reference:"References",assessment:"Assessments",comment:"Comments",tag:"Tags"},xA={title:"Statistics",highlights:"Highlights",comments:"Comments",assessments:"Assessments",tags:"Tags",references:"References",stub:"Stub",resolved:"Resolved",entityTypes:"Entity Types"},_A={title:"References",noReferences:"No references yet. Select text to create references to other resources.",outgoingReferences:"Outgoing References",incomingReferences:"Incoming References",noIncomingReferences:"No incoming references",stub:"Stub reference (not linked)",resolved:"Resolved reference (linked)",open:"Open",unlink:"Unlink",resolve:"Resolve Reference",cancel:"Cancel",createReference:"Create Reference",entityTypesOptional:"Entity Types (Optional)",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",annotateReferences:"Annotate References",selectEntityTypes:"Entity types:",select:"Select",deselect:"Deselect",noEntityTypes:"No entity types available",typesSelected:"{count, plural, =1 {1 type selected} other {# types selected}}",annotate:"Annotate",annotating:"Annotating...",includeDescriptiveReferences:"Include descriptive references",descriptiveReferencesTooltip:"Also find phrases like 'the CEO', 'the tech giant', 'the physicist' (in addition to names)",annotationProgressTitle:"Annotating Entity References",cancelAnnotation:"Cancel annotation",found:"{{count}} found",complete:"Annotation complete!",failed:"Annotation failed",current:"Current: {{entityType}}",closeProgress:"Close",loading:"loading...",loadingEllipsis:"Loading...",untitledResource:"Untitled Resource",noText:"No text"},wA={title:"Keyboard Shortcuts",closeDialog:"Close dialog",or:"or",navigationTitle:"Navigation",navOpenSearch:"Open global search",navOpenSearchAlt:"Open global search (alternative)",navCreateResource:"Create new resource",navCloseOverlays:"Close all overlays (double press)",navShowHelp:"Show keyboard shortcuts help",sidebarTitle:"Knowledge Sidebar",sidebarCollapse:"Collapse sidebar",sidebarExpand:"Expand sidebar",sidebarPickup:"Pick up resource tab (when focused)",sidebarMove:"Move resource tab (when dragging)",sidebarDrop:"Drop resource tab (when dragging)",sidebarCancel:"Cancel drag operation",annotationsTitle:"Resource Annotations",annotHighlight:"Create highlight from annotation (direct)",annotReference:"Open reference popup for annotation",annotDelete:"Delete focused annotation",annotNavigate:"Navigate through annotations",annotNavigateBack:"Navigate annotations backward",listsTitle:"Lists & Grids",listsFilterNav:"Navigate entity type filters",listsGridNav:"Navigate resource grid",listsJumpFirst:"Jump to first item",listsJumpLast:"Jump to last item",searchModalTitle:"In Search Modal",searchNav:"Navigate search results",searchSelect:"Select result",searchClose:"Close search",modalTitle:"Modal Controls",modalClose:"Close active modal",modalNavForward:"Navigate forward through buttons",modalNavBackward:"Navigate backward through buttons",modalActivate:"Activate focused button",accessibilityTitle:"Accessibility",a11ySkipLinks:"Navigate to skip links (when at page start)",a11yFollowLink:"Follow skip link",macNote:"Using Mac keyboard shortcuts. ⌘ is the Command key.",windowsNote:"Using Windows/Linux keyboard shortcuts. Ctrl is the Control key.",footerHint:"Press {{key}} anytime to show this help",close:"Close"},kA={modeGroup:"Mode",browse:"Browse",annotate:"Annotate",selectionGroup:"Motivation",clickGroup:"Click",shapeGroup:"Shape",none:"None",linking:"Reference",highlighting:"Highlight",assessing:"Assess",commenting:"Comment",tagging:"Tag",detail:"Detail",follow:"Follow",deleting:"Delete",jsonld:"JSON-LD",rectangle:"Rectangle",circle:"Circle",polygon:"Polygon"},jA={title:"Navigation",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",dragToReorder:"Drag to reorder",dragToReorderDoc:"Drag to reorder {{name}}",closeResource:"Close resource",dragInstructions:"To reorder resources: Use Tab to navigate to a resource. Press Alt+Up arrow to move up or Alt+Down arrow to move down. For drag and drop: Press space bar to pick up the item. Use arrow keys to move it. Press space bar again to drop."},TA={deleteConfirmationTitle:"Delete Annotation",deleteConfirmationMessage:"Are you sure you want to delete this annotation? This action cannot be undone.",deleteConfirmationCancel:"Cancel",deleteConfirmationDelete:"Delete"},CA={title:"Settings",lineNumbers:"Line Numbers",lineNumbersVisible:"Visible",lineNumbersHidden:"Hidden",theme:"Theme",themeLight:"Light",themeDark:"Dark",themeSystem:"System",themeSystemActive:"System ({{mode}})",themeModeActive:"Using {{mode}} mode",language:"Language",languageHint:"Change language in the main navigation",languageChanging:"Changing language...",hoverDelay:"Hover Delay",hoverDelayFast:"Fast",hoverDelaySlow:"Slow",hoverDelayDescription:"{{delay}}ms delay before hover effects appear"},EA={},AA={gatherTitle:"Gathered Context",configureGenerationTitle:"Configure Generation",configureSearchTitle:"Configure Search",searchResultsTitle:"Search Results",sourceContextLabel:"Annotation context in resource",connectionsLabel:"Peer Annotations",citedByLabel:"Resource Cited By",userHintLabel:"Hint",userHintPlaceholder:"Describe what this annotation refers to...",loadingContext:"Gathering context...",failedContext:"Failed to gather context",cancel:"Cancel",generate:"Generate",compose:"Compose",resolutionStrategyLabel:"Resolution Strategy",back:"Back",link:"Link",score:"Score",noResults:"No results found",resourceTitle:"Resource Title",resourceTitlePlaceholder:"Enter resource title...",additionalInstructions:"Additional Instructions",additionalInstructionsPlaceholder:"Enter additional instructions...",language:"Language",languageHelp:"Language for generated content",creativity:"Creativity",creativityFocused:"Focused",creativityCreative:"Creative",maxLength:"Max Length",maxLengthHelp:"Maximum number of tokens",maxResults:"Max Results",semanticScoring:"Semantic Scoring",semanticScoringHelp:"Use AI to score results by semantic relevance",searching:"Searching...",search:"Search"},zo={Toolbar:hA,ResourceInfoPanel:mA,CollaborationPanel:pA,AnnotationHistory:gA,CommentsPanel:vA,HighlightPanel:OA,AssessmentPanel:bA,TaggingPanel:yA,UnifiedAnnotationsPanel:SA,StatisticsPanel:xA,ReferencesPanel:_A,KeyboardShortcuts:wA,AnnotateToolbar:kA,CollapsibleResourceNavigation:jA,ResourceViewer:TA,Settings:CA,AnnotateView:EA,ReferenceWizard:AA},XI=Object.create,H0=Object.defineProperty,ZI=Object.getOwnPropertyDescriptor,QA=Object.getOwnPropertyNames,BI=Object.getPrototypeOf,VI=Object.prototype.hasOwnProperty,UI=e=>t=>{var n=e[t];if(n)return n();throw new Error("Module not found in bundle: "+t)},U=(e,t)=>function(){return t||(0,e[QA(e)[0]])((t={exports:{}}).exports,t),t.exports},PA=(e,t)=>{for(var n in t)H0(e,n,{get:t[n],enumerable:!0})},YI=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of QA(t))!VI.call(e,i)&&i!==n&&H0(e,i,{get:()=>t[i],enumerable:!(r=ZI(t,i))||r.enumerable});return e},Ac=(e,t,n)=>(n=e!=null?XI(BI(e)):{},YI(t||!e||!e.__esModule?H0(n,"default",{value:e,enumerable:!0}):n,e)),FI="semiont.session.",NA="semiont.knowledgeBases",_O="semiont.activeKnowledgeBaseId",$I=300*1e3;function jp(e){return`${FI}${e}`}function Ym(e){const t=localStorage.getItem(jp(e));if(!t)return null;try{const n=JSON.parse(t);if(n&&typeof n.access=="string"&&typeof n.refresh=="string")return{access:n.access,refresh:n.refresh}}catch{}return null}function ey(e,t){localStorage.setItem(jp(e),JSON.stringify(t))}function Yl(e){localStorage.removeItem(jp(e))}function ty(e){try{const t=e.split(".");if(t.length!==3||!t[1])return null;const n=JSON.parse(atob(t[1]));return n.exp?new Date(n.exp*1e3):null}catch{return null}}function ny(e){const t=ty(e);return t?t.getTime()<Date.now():!0}function WI(e){if(e.host!==void 0)return e;try{const t=new URL(e.backendUrl);return{id:e.id,label:e.label,host:t.hostname,port:parseInt(t.port,10)||(t.protocol==="https:"?443:80),protocol:t.protocol==="https:"?"https":"http",email:""}}catch{return{id:e.id,label:e.label||"Unknown",host:"localhost",port:4e3,protocol:"http",email:""}}}function D1(){try{const e=localStorage.getItem(NA);return e?JSON.parse(e).map(WI):[]}catch{return[]}}function HI(e){localStorage.setItem(NA,JSON.stringify(e))}function cre(e){return e==="localhost"||e==="127.0.0.1"?"http":"https"}var GI=/^(([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?|localhost|\d{1,3}(\.\d{1,3}){3})$/;function KI(e){return GI.test(e)}function RA(e){if(!KI(e.host))throw new Error(`Invalid KB hostname: "${e.host}"`);const t=new URL("http://x");return t.protocol=e.protocol+":",t.hostname=e.host,t.port=String(e.port),`${e.protocol}://${t.hostname}:${e.port}`}function ure(e){const t=Ym(e);return t?ny(t.access)?"expired":"authenticated":"signed-out"}function JI(){return crypto.randomUUID()}var id=null,ad=null;function dre(e){id==null||id(e)}function fre(e){ad==null||ad(e)}function eX(e){return id=e.onSessionExpired,ad=e.onPermissionDenied,()=>{id=null,ad=null}}var wO=new Map;async function kO(e){const t=wO.get(e.id);if(t)return t;const n=(async()=>{const r=Ym(e.id);if(!r)return null;const i=new V0({baseUrl:RA(e),eventBus:new Z0});try{const s=(await i.refreshToken(r.refresh)).access_token;return s?(ey(e.id,{access:s,refresh:r.refresh}),s):null}catch{return null}})();wO.set(e.id,n);try{return await n}finally{wO.delete(e.id)}}var MA=_.createContext(void 0);function tX({children:e}){const[t,n]=_.useState(()=>D1()),[r,i]=_.useState(()=>{var ne;const L=localStorage.getItem(_O),$=D1();return L&&$.some(z=>z.id===L)?L:((ne=$[0])==null?void 0:ne.id)??null}),[a,s]=_.useState(null),[l,c]=_.useState(()=>{const L=r;if(!L)return!1;const $=Ym(L);return $?!ny($.access)||$.refresh!=null:!1}),[d,f]=_.useState(null),[m,p]=_.useState(null),[O,b]=_.useState(null),[S,w]=_.useState(null);_.useEffect(()=>{HI(t)},[t]),_.useEffect(()=>{r?localStorage.setItem(_O,r):localStorage.removeItem(_O)},[r]);const k=_.useMemo(()=>t.find(L=>L.id===r)??null,[t,r]),j=_.useRef(k);_.useEffect(()=>{j.current=k},[k]);const T=_.useRef(null),E=_.useCallback(L=>{T.current&&(clearTimeout(T.current),T.current=null);const $=ty(L);if(!$)return;const ne=$.getTime()-$I,z=Math.max(0,ne-Date.now());T.current=setTimeout(()=>{var G;T.current=null,(G=Q.current)==null||G.call(Q)},z)},[]),Q=_.useRef(null),A=_.useCallback(async()=>{const L=j.current;if(!L)return null;const $=await kO(L);return $?(s(ne=>ne&&{...ne,token:$}),E($)):(s(null),Yl(L.id),p("Your session has expired. Please sign in again."),f(Date.now()),T.current&&(clearTimeout(T.current),T.current=null)),$},[E]);Q.current=A,_.useEffect(()=>{if(!k){s(null),c(!1);return}const L=Ym(k.id);if(!L){s(null),c(!1);return}let $=!1;const ne=async z=>{const G=new V0({baseUrl:RA(k),eventBus:new Z0});try{const re=await G.getMe({auth:z});if($)return;s({token:z,user:re}),E(z)}catch(re){if($)return;if(s(null),re instanceof sA&&re.status===401){const R=await kO(k);if($)return;if(R)return ne(R);Yl(k.id),p("Your session has expired. Please sign in again."),f(Date.now())}}finally{$||c(!1)}};return c(!0),ny(L.access)?(async()=>{const z=await kO(k);$||(z?await ne(z):(s(null),Yl(k.id),c(!1)))})():ne(L.access),()=>{$=!0}},[k,E]),_.useEffect(()=>()=>{T.current&&(clearTimeout(T.current),T.current=null)},[]),_.useEffect(()=>{if(!r)return;const L=jp(r),$=ne=>{if(ne.key===L){if(!ne.newValue){s(null),T.current&&(clearTimeout(T.current),T.current=null);return}try{const z=JSON.parse(ne.newValue);typeof z.access=="string"&&(s(G=>G&&{...G,token:z.access}),E(z.access))}catch{}}};return window.addEventListener("storage",$),()=>window.removeEventListener("storage",$)},[r,E]),_.useEffect(()=>eX({onSessionExpired:L=>{p(L??"Your session has expired. Please sign in again."),f(Date.now()),s(null),r&&Yl(r),T.current&&(clearTimeout(T.current),T.current=null)},onPermissionDenied:L=>{w(L??"You do not have permission to perform this action."),b(Date.now())}}),[r]);const N=_.useCallback((L,$,ne)=>{const z={id:JI(),...L};return ey(z.id,{access:$,refresh:ne}),n(G=>[...G,z]),i(z.id),z},[]),D=_.useCallback(L=>{Yl(L),n($=>{const ne=$.filter(z=>z.id!==L);return i(z=>{var G;return z===L?((G=ne[0])==null?void 0:G.id)??null:z}),ne})},[]),q=_.useCallback(L=>{i(L)},[]),P=_.useCallback((L,$)=>{n(ne=>ne.map(z=>z.id===L?{...z,...$}:z))},[]),V=_.useCallback((L,$,ne)=>{ey(L,{access:$,refresh:ne}),n(z=>z.map(G=>G.id===L?{...G}:G)),i(L)},[]),Z=_.useCallback(L=>{Yl(L),i($=>($===L&&(s(null),T.current&&(clearTimeout(T.current),T.current=null)),$)),n($=>[...$])},[]),Y=_.useCallback(()=>{f(null),p(null)},[]),X=_.useCallback(()=>{b(null),w(null)},[]),[,H]=_.useState(0);_.useEffect(()=>{const L=setInterval(()=>H($=>$+1),3e4);return()=>clearInterval(L)},[]);const I=_.useMemo(()=>{var z,G;const L=(a==null?void 0:a.user)??null,$=(a==null?void 0:a.token)??null,ne=$?ty($):null;return{knowledgeBases:t,activeKnowledgeBase:k,session:a,isLoading:l,user:L,token:$,isAuthenticated:!!a,hasValidBackendToken:!!$,isFullyAuthenticated:!!a,displayName:(L==null?void 0:L.name)??((z=L==null?void 0:L.email)==null?void 0:z.split("@")[0])??"User",avatarUrl:(L==null?void 0:L.image)??null,userDomain:(L==null?void 0:L.domain)||((G=L==null?void 0:L.email)==null?void 0:G.split("@")[1]),isAdmin:(L==null?void 0:L.isAdmin)??!1,isModerator:(L==null?void 0:L.isModerator)??!1,expiresAt:ne,sessionExpiredAt:d,sessionExpiredMessage:m,permissionDeniedAt:O,permissionDeniedMessage:S,addKnowledgeBase:N,removeKnowledgeBase:D,setActiveKnowledgeBase:q,updateKnowledgeBase:P,signIn:V,signOut:Z,refreshActive:A,acknowledgeSessionExpired:Y,acknowledgePermissionDenied:X}},[t,k,a,l,d,m,O,S,N,D,q,P,V,Z,A,Y,X]);return g.jsx(MA.Provider,{value:I,children:e})}function G0(){const e=_.useContext(MA);if(!e)throw new Error("useKnowledgeBaseSession requires KnowledgeBaseSessionProvider. This component is rendered outside the auth boundary. Move it into a protected layout.");return e}var nX={success:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),error:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),warning:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),info:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})};function rX({toast:e,onClose:t}){return _.useEffect(()=>{const n=setTimeout(()=>{t(e.id)},e.duration||3e3);return()=>clearTimeout(n)},[e,t]),g.jsxs("div",{className:"semiont-toast","data-variant":e.type,role:"alert",children:[g.jsx("div",{className:"semiont-toast-icon-wrapper",children:nX[e.type]}),g.jsx("p",{className:"semiont-toast-message",children:e.message}),g.jsx("button",{onClick:()=>t(e.id),className:"semiont-toast-close","aria-label":"Close",children:g.jsx("svg",{className:"semiont-toast-close-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}function iX({toasts:e,onClose:t}){const[n,r]=_.useState(!1);return _.useEffect(()=>(r(!0),()=>r(!1)),[]),n?No.createPortal(g.jsx("div",{className:"semiont-toast-container",children:e.map(i=>g.jsx(rX,{toast:i,onClose:t},i.id))}),document.body):null}var LA=ue.createContext(void 0);function hre({children:e}){const[t,n]=_.useState([]),r=ue.useCallback((f,m="info",p)=>{const O=Date.now().toString(),b=p!==void 0?{id:O,message:f,type:m,duration:p}:{id:O,message:f,type:m};n(S=>[...S,b])},[]),i=ue.useCallback((f,m)=>r(f,"success",m),[r]),a=ue.useCallback((f,m)=>r(f,"error",m),[r]),s=ue.useCallback((f,m)=>r(f,"warning",m),[r]),l=ue.useCallback((f,m)=>r(f,"info",m),[r]),c=ue.useCallback(f=>{n(m=>m.filter(p=>p.id!==f))},[]),d=ue.useMemo(()=>({showToast:r,showSuccess:i,showError:a,showWarning:s,showInfo:l}),[r,i,a,s,l]);return g.jsxs(LA.Provider,{value:d,children:[e,g.jsx(iX,{toasts:t,onClose:c})]})}function Jd(){const e=ue.useContext(LA);if(e===void 0)throw new Error("useToast must be used within a ToastProvider");return e}var DA=_.createContext(void 0);function mre({openResourcesManager:e,children:t}){return g.jsx(DA.Provider,{value:e,children:t})}function aX(){const e=_.useContext(DA);if(e===void 0)throw new Error("useOpenResources must be used within an OpenResourcesProvider");return e}var sX=UI({"../../translations/ar.json":()=>Ae(()=>import("./ar-3W37O3R3-BJ1fDUvB.js"),[]),"../../translations/bn.json":()=>Ae(()=>import("./bn-JZTJLMVE-k1gI6ffq.js"),[]),"../../translations/cs.json":()=>Ae(()=>import("./cs-XYHH7HNE-BqQWIWM9.js"),[]),"../../translations/da.json":()=>Ae(()=>import("./da-MZKIECVT-pufSb0d_.js"),[]),"../../translations/de.json":()=>Ae(()=>import("./de-AYXTMRQW-BRMduIa0.js"),[]),"../../translations/el.json":()=>Ae(()=>import("./el-A6CVQWAW-DycBhXUi.js"),[]),"../../translations/en.json":()=>Ae(()=>Promise.resolve().then(()=>Gne),void 0),"../../translations/es.json":()=>Ae(()=>import("./es-M2HXLJGT-BFQ6WIpw.js"),[]),"../../translations/fa.json":()=>Ae(()=>import("./fa-V6JZJDYP-C8CwCeSd.js"),[]),"../../translations/fi.json":()=>Ae(()=>import("./fi-ONDTZ5H7-aby5--Ip.js"),[]),"../../translations/fr.json":()=>Ae(()=>import("./fr-PAPV4H4G-D9SFT8MA.js"),[]),"../../translations/he.json":()=>Ae(()=>import("./he-F6VTLJLW-B8Rc1C-m.js"),[]),"../../translations/hi.json":()=>Ae(()=>import("./hi-CFUAV4BF-CuWy2y7I.js"),[]),"../../translations/id.json":()=>Ae(()=>import("./id-NBKLCCI7-DnMwKKq7.js"),[]),"../../translations/it.json":()=>Ae(()=>import("./it-SLSOWVVU-hrlm8f9F.js"),[]),"../../translations/ja.json":()=>Ae(()=>import("./ja-L5IG4ECE-BvMVB5sy.js"),[]),"../../translations/ko.json":()=>Ae(()=>import("./ko-QYMTULKK-CNEZe0oy.js"),[]),"../../translations/ms.json":()=>Ae(()=>import("./ms-5DGSFKM2-BlyezW6W.js"),[]),"../../translations/nl.json":()=>Ae(()=>import("./nl-VZPCGONO-BJ0llUPS.js"),[]),"../../translations/no.json":()=>Ae(()=>import("./no-MF6F352I-Wf2ZNjHx.js"),[]),"../../translations/pl.json":()=>Ae(()=>import("./pl-WIK72JUO-wOGg7Me5.js"),[]),"../../translations/pt.json":()=>Ae(()=>import("./pt-RRP5ZF6A-C32Vedhv.js"),[]),"../../translations/ro.json":()=>Ae(()=>import("./ro-XHQLC3T7-uGs3uHRp.js"),[]),"../../translations/sv.json":()=>Ae(()=>import("./sv-EWULDN6E-CkRBfwt9.js"),[]),"../../translations/th.json":()=>Ae(()=>import("./th-TGOBHFG4-BGt_aO5K.js"),[]),"../../translations/tr.json":()=>Ae(()=>import("./tr-LMMPBMV7-CrGE1PKA.js"),[]),"../../translations/uk.json":()=>Ae(()=>import("./uk-IPGRRJY6-CPaxgpd8.js"),[]),"../../translations/vi.json":()=>Ae(()=>import("./vi-Q676OJQS-DpyIm6R1.js"),[]),"../../translations/zh.json":()=>Ae(()=>import("./zh-F3MTWQDX-C09t_PFf.js"),[])}),km=_.createContext(null),Uh=new Map;function K0(e,t){const n=e.match(/\{(\w+),\s*plural,\s*/);if(!n)return e;const r=n[1],i=t[r];if(i===void 0)return e;let a=n[0].length,s=1,l=a;for(let b=a;b<e.length;b++)if(e[b]==="{")s++;else if(e[b]==="}"&&(s--,s===0)){l=b;break}const c=e.substring(a,l),d={},f=/(?:=(\d+)|(\w+))\s*\{([^}]+)\}/g;let m;for(;(m=f.exec(c))!==null;){const[,b,S,w]=m,k=b!==void 0?`=${b}`:S;d[k]=w}const p=d[`=${i}`];if(p!==void 0){const b=p.replace(/#/g,String(i));return e.substring(0,n.index)+b+e.substring(l+1)}const O=d.other;if(O!==void 0){const b=O.replace(/#/g,String(i));return e.substring(0,n.index)+b+e.substring(l+1)}return e}async function oX(e){if(Uh.has(e))return Uh.get(e);if(e==="en")return Uh.set("en",zo),zo;try{const t=await sX(`../../translations/${e}.json`),n=t.default||t;return Uh.set(e,n),n}catch(t){return console.error(`Failed to load translations for locale: ${e}`,t),zo}}var lX={t:(e,t,n)=>{var a;const i=(a=zo[e])==null?void 0:a[t];if(!i)return console.warn(`Translation not found for ${e}.${t}`),`${e}.${t}`;if(n&&typeof i=="string"){let s=i;return s=K0(s,n),Object.entries(n).forEach(([l,c])=>{s=s.replace(new RegExp(`\\{\\{${l}\\}\\}`,"g"),String(c))}),s}return i}};function pre({translationManager:e,locale:t,loadingComponent:n=null,children:r}){const[i,a]=_.useState(null),[s,l]=_.useState(!1);_.useEffect(()=>{t&&!e&&(l(!0),oX(t).then(d=>{a(d),l(!1)}).catch(d=>{console.error("Failed to load translations:",d),a(zo),l(!1)}))},[t,e]);const c=_.useMemo(()=>i?{t:(d,f,m)=>{var O;const p=(O=i[d])==null?void 0:O[f];if(!p)return console.warn(`Translation not found for ${d}.${f} in locale ${t}`),`${d}.${f}`;if(m&&typeof p=="string"){let b=p;return b=K0(b,m),Object.entries(m).forEach(([S,w])=>{b=b.replace(new RegExp(`\\{\\{${S}\\}\\}`,"g"),String(w))}),b}return p}}:null,[i,t]);return e?g.jsx(km.Provider,{value:e,children:r}):t&&s?g.jsx(g.Fragment,{children:n}):t&&c?g.jsx(km.Provider,{value:c,children:r}):g.jsx(km.Provider,{value:lX,children:r})}function hn(e){const t=_.useContext(km);return t?(n,r)=>t.t(e,n,r):(n,r)=>{var s;const a=(s=zo[e])==null?void 0:s[n];if(!a)return console.warn(`Translation not found for ${e}.${n}`),`${e}.${n}`;if(r&&typeof a=="string"){let l=a;return l=K0(l,r),Object.entries(r).forEach(([c,d])=>{l=l.replace(new RegExp(`\\{\\{${c}\\}\\}`,"g"),String(d))}),l}return a}}const cX=_.createContext(null),jO={didCatch:!1,error:null};let uX=class extends _.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=jO}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:a,reason:"imperative-api"}),this.setState(jO)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;if(r&&n.error!==null&&dX(t.resetKeys,i)){var a,s;(a=(s=this.props).onReset)===null||a===void 0||a.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(jO)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:a,error:s}=this.state;let l=t;if(a){const c={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")l=n(c);else if(r)l=_.createElement(r,c);else if(i!==void 0)l=i;else throw s}return _.createElement(cX.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},l)}};function dX(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}var TO={exports:{}},CO={};/**
|
|
31
|
+
* @license React
|
|
32
|
+
* use-sync-external-store-with-selector.production.js
|
|
33
|
+
*
|
|
34
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the MIT license found in the
|
|
37
|
+
* LICENSE file in the root directory of this source tree.
|
|
38
|
+
*/var z1;function fX(){if(z1)return CO;z1=1;var e=OE();function t(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return CO.useSyncExternalStoreWithSelector=function(c,d,f,m,p){var O=i(null);if(O.current===null){var b={hasValue:!1,value:null};O.current=b}else b=O.current;O=s(function(){function w(Q){if(!k){if(k=!0,j=Q,Q=m(Q),p!==void 0&&b.hasValue){var A=b.value;if(p(A,Q))return T=A}return T=Q}if(A=T,n(j,Q))return A;var N=m(Q);return p!==void 0&&p(A,N)?(j=Q,A):(j=Q,T=N)}var k=!1,j,T,E=f===void 0?null:f;return[function(){return w(d())},E===null?void 0:function(){return w(E())}]},[d,f,m,p]);var S=r(c,O[0],O[1]);return a(function(){b.hasValue=!0,b.value=S},[S]),l(S),S},CO}var q1;function hX(){return q1||(q1=1,TO.exports=fX()),TO.exports}var mX=hX();const ia={};var EO={exports:{}},I1;function pX(){if(I1)return EO.exports;I1=1;var e=EO.exports={},t,n;function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?t=setTimeout:t=r}catch{t=r}try{typeof clearTimeout=="function"?n=clearTimeout:n=i}catch{n=i}})();function a(S){if(t===setTimeout)return setTimeout(S,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(S,0);try{return t(S,0)}catch{try{return t.call(null,S,0)}catch{return t.call(this,S,0)}}}function s(S){if(n===clearTimeout)return clearTimeout(S);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(S);try{return n(S)}catch{try{return n.call(null,S)}catch{return n.call(this,S)}}}var l=[],c=!1,d,f=-1;function m(){!c||!d||(c=!1,d.length?l=d.concat(l):f=-1,l.length&&p())}function p(){if(!c){var S=a(m);c=!0;for(var w=l.length;w;){for(d=l,l=[];++f<w;)d&&d[f].run();f=-1,w=l.length}d=null,c=!1,s(S)}}e.nextTick=function(S){var w=new Array(arguments.length-1);if(arguments.length>1)for(var k=1;k<arguments.length;k++)w[k-1]=arguments[k];l.push(new O(S,w)),l.length===1&&!c&&a(p)};function O(S,w){this.fun=S,this.array=w}O.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={};function b(){}return e.on=b,e.addListener=b,e.once=b,e.off=b,e.removeListener=b,e.removeAllListeners=b,e.emit=b,e.prependListener=b,e.prependOnceListener=b,e.listeners=function(S){return[]},e.binding=function(S){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(S){throw new Error("process.chdir is not supported")},e.umask=function(){return 0},EO.exports}var gX=pX();const vX=bE(gX);function OX(e){return e.replace(/^file:\/\//,"")}var ry={},Nt=U({"../../node_modules/rxjs/dist/cjs/internal/util/isFunction.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;function t(n){return typeof n=="function"}e.isFunction=t}}),Wo=U({"../../node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorClass=void 0;function t(n){var r=function(a){Error.call(a),a.stack=new Error().stack},i=n(r);return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}e.createErrorClass=t}}),zA=U({"../../node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UnsubscriptionError=void 0;var t=Wo();e.UnsubscriptionError=t.createErrorClass(function(n){return function(i){n(this),this.message=i?i.length+` errors occurred during unsubscription:
|
|
39
|
+
`+i.map(function(a,s){return s+1+") "+a.toString()}).join(`
|
|
40
|
+
`):"",this.name="UnsubscriptionError",this.errors=i}})}}),Gs=U({"../../node_modules/rxjs/dist/cjs/internal/util/arrRemove.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.arrRemove=void 0;function t(n,r){if(n){var i=n.indexOf(r);0<=i&&n.splice(i,1)}}e.arrRemove=t}}),Oi=U({"../../node_modules/rxjs/dist/cjs/internal/Subscription.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},n=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,S=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)S.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return S},r=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.isSubscription=e.EMPTY_SUBSCRIPTION=e.Subscription=void 0;var i=Nt(),a=zA(),s=Gs(),l=(function(){function f(m){this.initialTeardown=m,this.closed=!1,this._parentage=null,this._finalizers=null}return f.prototype.unsubscribe=function(){var m,p,O,b,S;if(!this.closed){this.closed=!0;var w=this._parentage;if(w)if(this._parentage=null,Array.isArray(w))try{for(var k=t(w),j=k.next();!j.done;j=k.next()){var T=j.value;T.remove(this)}}catch(q){m={error:q}}finally{try{j&&!j.done&&(p=k.return)&&p.call(k)}finally{if(m)throw m.error}}else w.remove(this);var E=this.initialTeardown;if(i.isFunction(E))try{E()}catch(q){S=q instanceof a.UnsubscriptionError?q.errors:[q]}var Q=this._finalizers;if(Q){this._finalizers=null;try{for(var A=t(Q),N=A.next();!N.done;N=A.next()){var D=N.value;try{d(D)}catch(q){S=S??[],q instanceof a.UnsubscriptionError?S=r(r([],n(S)),n(q.errors)):S.push(q)}}}catch(q){O={error:q}}finally{try{N&&!N.done&&(b=A.return)&&b.call(A)}finally{if(O)throw O.error}}}if(S)throw new a.UnsubscriptionError(S)}},f.prototype.add=function(m){var p;if(m&&m!==this)if(this.closed)d(m);else{if(m instanceof f){if(m.closed||m._hasParent(this))return;m._addParent(this)}(this._finalizers=(p=this._finalizers)!==null&&p!==void 0?p:[]).push(m)}},f.prototype._hasParent=function(m){var p=this._parentage;return p===m||Array.isArray(p)&&p.includes(m)},f.prototype._addParent=function(m){var p=this._parentage;this._parentage=Array.isArray(p)?(p.push(m),p):p?[p,m]:m},f.prototype._removeParent=function(m){var p=this._parentage;p===m?this._parentage=null:Array.isArray(p)&&s.arrRemove(p,m)},f.prototype.remove=function(m){var p=this._finalizers;p&&s.arrRemove(p,m),m instanceof f&&m._removeParent(this)},f.EMPTY=(function(){var m=new f;return m.closed=!0,m})(),f})();e.Subscription=l,e.EMPTY_SUBSCRIPTION=l.EMPTY;function c(f){return f instanceof l||f&&"closed"in f&&i.isFunction(f.remove)&&i.isFunction(f.add)&&i.isFunction(f.unsubscribe)}e.isSubscription=c;function d(f){i.isFunction(f)?f():f.unsubscribe()}}}),ef=U({"../../node_modules/rxjs/dist/cjs/internal/config.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.config=void 0,e.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}}}),qA=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js"(e){var t=e&&e.__read||function(r,i){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var s=a.call(r),l,c=[],d;try{for(;(i===void 0||i-- >0)&&!(l=s.next()).done;)c.push(l.value)}catch(f){d={error:f}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(d)throw d.error}}return c},n=e&&e.__spreadArray||function(r,i){for(var a=0,s=i.length,l=r.length;a<s;a++,l++)r[l]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutProvider=void 0,e.timeoutProvider={setTimeout:function(r,i){for(var a=[],s=2;s<arguments.length;s++)a[s-2]=arguments[s];var l=e.timeoutProvider.delegate;return l!=null&&l.setTimeout?l.setTimeout.apply(l,n([r,i],t(a))):setTimeout.apply(void 0,n([r,i],t(a)))},clearTimeout:function(r){var i=e.timeoutProvider.delegate;return((i==null?void 0:i.clearTimeout)||clearTimeout)(r)},delegate:void 0}}}),IA=U({"../../node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportUnhandledError=void 0;var t=ef(),n=qA();function r(i){n.timeoutProvider.setTimeout(function(){var a=t.config.onUnhandledError;if(a)a(i);else throw i})}e.reportUnhandledError=r}}),rr=U({"../../node_modules/rxjs/dist/cjs/internal/util/noop.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.noop=void 0;function t(){}e.noop=t}}),bX=U({"../../node_modules/rxjs/dist/cjs/internal/NotificationFactories.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createNotification=e.nextNotification=e.errorNotification=e.COMPLETE_NOTIFICATION=void 0,e.COMPLETE_NOTIFICATION=(function(){return r("C",void 0,void 0)})();function t(i){return r("E",void 0,i)}e.errorNotification=t;function n(i){return r("N",i,void 0)}e.nextNotification=n;function r(i,a,s){return{kind:i,value:a,error:s}}e.createNotification=r}}),J0=U({"../../node_modules/rxjs/dist/cjs/internal/util/errorContext.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.captureError=e.errorContext=void 0;var t=ef(),n=null;function r(a){if(t.config.useDeprecatedSynchronousErrorHandling){var s=!n;if(s&&(n={errorThrown:!1,error:null}),a(),s){var l=n,c=l.errorThrown,d=l.error;if(n=null,c)throw d}}else a()}e.errorContext=r;function i(a){t.config.useDeprecatedSynchronousErrorHandling&&n&&(n.errorThrown=!0,n.error=a)}e.captureError=i}}),tf=U({"../../node_modules/rxjs/dist/cjs/internal/Subscriber.js"(e){var t=e&&e.__extends||(function(){var j=function(T,E){return j=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Q,A){Q.__proto__=A}||function(Q,A){for(var N in A)Object.prototype.hasOwnProperty.call(A,N)&&(Q[N]=A[N])},j(T,E)};return function(T,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");j(T,E);function Q(){this.constructor=T}T.prototype=E===null?Object.create(E):(Q.prototype=E.prototype,new Q)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_OBSERVER=e.SafeSubscriber=e.Subscriber=void 0;var n=Nt(),r=Oi(),i=ef(),a=IA(),s=rr(),l=bX(),c=qA(),d=J0(),f=(function(j){t(T,j);function T(E){var Q=j.call(this)||this;return Q.isStopped=!1,E?(Q.destination=E,r.isSubscription(E)&&E.add(Q)):Q.destination=e.EMPTY_OBSERVER,Q}return T.create=function(E,Q,A){return new b(E,Q,A)},T.prototype.next=function(E){this.isStopped?k(l.nextNotification(E),this):this._next(E)},T.prototype.error=function(E){this.isStopped?k(l.errorNotification(E),this):(this.isStopped=!0,this._error(E))},T.prototype.complete=function(){this.isStopped?k(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},T.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,j.prototype.unsubscribe.call(this),this.destination=null)},T.prototype._next=function(E){this.destination.next(E)},T.prototype._error=function(E){try{this.destination.error(E)}finally{this.unsubscribe()}},T.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},T})(r.Subscription);e.Subscriber=f;var m=Function.prototype.bind;function p(j,T){return m.call(j,T)}var O=(function(){function j(T){this.partialObserver=T}return j.prototype.next=function(T){var E=this.partialObserver;if(E.next)try{E.next(T)}catch(Q){S(Q)}},j.prototype.error=function(T){var E=this.partialObserver;if(E.error)try{E.error(T)}catch(Q){S(Q)}else S(T)},j.prototype.complete=function(){var T=this.partialObserver;if(T.complete)try{T.complete()}catch(E){S(E)}},j})(),b=(function(j){t(T,j);function T(E,Q,A){var N=j.call(this)||this,D;if(n.isFunction(E)||!E)D={next:E??void 0,error:Q??void 0,complete:A??void 0};else{var q;N&&i.config.useDeprecatedNextContext?(q=Object.create(E),q.unsubscribe=function(){return N.unsubscribe()},D={next:E.next&&p(E.next,q),error:E.error&&p(E.error,q),complete:E.complete&&p(E.complete,q)}):D=E}return N.destination=new O(D),N}return T})(f);e.SafeSubscriber=b;function S(j){i.config.useDeprecatedSynchronousErrorHandling?d.captureError(j):a.reportUnhandledError(j)}function w(j){throw j}function k(j,T){var E=i.config.onStoppedNotification;E&&c.timeoutProvider.setTimeout(function(){return E(j,T)})}e.EMPTY_OBSERVER={closed:!0,next:s.noop,error:w,complete:s.noop}}}),Tp=U({"../../node_modules/rxjs/dist/cjs/internal/symbol/observable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observable=void 0,e.observable=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})()}}),ir=U({"../../node_modules/rxjs/dist/cjs/internal/util/identity.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.identity=void 0;function t(n){return n}e.identity=t}}),Cp=U({"../../node_modules/rxjs/dist/cjs/internal/util/pipe.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pipeFromArray=e.pipe=void 0;var t=ir();function n(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return r(i)}e.pipe=n;function r(i){return i.length===0?t.identity:i.length===1?i[0]:function(s){return i.reduce(function(l,c){return c(l)},s)}}e.pipeFromArray=r}}),Zt=U({"../../node_modules/rxjs/dist/cjs/internal/Observable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=void 0;var t=tf(),n=Oi(),r=Tp(),i=Cp(),a=ef(),s=Nt(),l=J0(),c=(function(){function p(O){O&&(this._subscribe=O)}return p.prototype.lift=function(O){var b=new p;return b.source=this,b.operator=O,b},p.prototype.subscribe=function(O,b,S){var w=this,k=m(O)?O:new t.SafeSubscriber(O,b,S);return l.errorContext(function(){var j=w,T=j.operator,E=j.source;k.add(T?T.call(k,E):E?w._subscribe(k):w._trySubscribe(k))}),k},p.prototype._trySubscribe=function(O){try{return this._subscribe(O)}catch(b){O.error(b)}},p.prototype.forEach=function(O,b){var S=this;return b=d(b),new b(function(w,k){var j=new t.SafeSubscriber({next:function(T){try{O(T)}catch(E){k(E),j.unsubscribe()}},error:k,complete:w});S.subscribe(j)})},p.prototype._subscribe=function(O){var b;return(b=this.source)===null||b===void 0?void 0:b.subscribe(O)},p.prototype[r.observable]=function(){return this},p.prototype.pipe=function(){for(var O=[],b=0;b<arguments.length;b++)O[b]=arguments[b];return i.pipeFromArray(O)(this)},p.prototype.toPromise=function(O){var b=this;return O=d(O),new O(function(S,w){var k;b.subscribe(function(j){return k=j},function(j){return w(j)},function(){return S(k)})})},p.create=function(O){return new p(O)},p})();e.Observable=c;function d(p){var O;return(O=p??a.config.Promise)!==null&&O!==void 0?O:Promise}function f(p){return p&&s.isFunction(p.next)&&s.isFunction(p.error)&&s.isFunction(p.complete)}function m(p){return p&&p instanceof t.Subscriber||f(p)&&n.isSubscription(p)}}}),be=U({"../../node_modules/rxjs/dist/cjs/internal/util/lift.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.operate=e.hasLift=void 0;var t=Nt();function n(i){return t.isFunction(i==null?void 0:i.lift)}e.hasLift=n;function r(i){return function(a){if(n(a))return a.lift(function(s){try{return i(s,this)}catch(l){this.error(l)}});throw new TypeError("Unable to lift unknown Observable type")}}e.operate=r}}),Qe=U({"../../node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js"(e){var t=e&&e.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function c(){this.constructor=s}s.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.OperatorSubscriber=e.createOperatorSubscriber=void 0;var n=tf();function r(a,s,l,c,d){return new i(a,s,l,c,d)}e.createOperatorSubscriber=r;var i=(function(a){t(s,a);function s(l,c,d,f,m,p){var O=a.call(this,l)||this;return O.onFinalize=m,O.shouldUnsubscribe=p,O._next=c?function(b){try{c(b)}catch(S){l.error(S)}}:a.prototype._next,O._error=f?function(b){try{f(b)}catch(S){l.error(S)}finally{this.unsubscribe()}}:a.prototype._error,O._complete=d?function(){try{d()}catch(b){l.error(b)}finally{this.unsubscribe()}}:a.prototype._complete,O}return s.prototype.unsubscribe=function(){var l;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var c=this.closed;a.prototype.unsubscribe.call(this),!c&&((l=this.onFinalize)===null||l===void 0||l.call(this))}},s})(n.Subscriber);e.OperatorSubscriber=i}}),eS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/refCount.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.refCount=void 0;var t=be(),n=Qe();function r(){return t.operate(function(i,a){var s=null;i._refCount++;var l=n.createOperatorSubscriber(a,void 0,void 0,void 0,function(){if(!i||i._refCount<=0||0<--i._refCount){s=null;return}var c=i._connection,d=s;s=null,c&&(!d||c===d)&&c.unsubscribe(),a.unsubscribe()});i.subscribe(l),l.closed||(s=i.connect())})}e.refCount=r}}),Ep=U({"../../node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js"(e){var t=e&&e.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,p){m.__proto__=p}||function(m,p){for(var O in p)Object.prototype.hasOwnProperty.call(p,O)&&(m[O]=p[O])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function m(){this.constructor=d}d.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectableObservable=void 0;var n=Zt(),r=Oi(),i=eS(),a=Qe(),s=be(),l=(function(c){t(d,c);function d(f,m){var p=c.call(this)||this;return p.source=f,p.subjectFactory=m,p._subject=null,p._refCount=0,p._connection=null,s.hasLift(f)&&(p.lift=f.lift),p}return d.prototype._subscribe=function(f){return this.getSubject().subscribe(f)},d.prototype.getSubject=function(){var f=this._subject;return(!f||f.isStopped)&&(this._subject=this.subjectFactory()),this._subject},d.prototype._teardown=function(){this._refCount=0;var f=this._connection;this._subject=this._connection=null,f==null||f.unsubscribe()},d.prototype.connect=function(){var f=this,m=this._connection;if(!m){m=this._connection=new r.Subscription;var p=this.getSubject();m.add(this.source.subscribe(a.createOperatorSubscriber(p,void 0,function(){f._teardown(),p.complete()},function(O){f._teardown(),p.error(O)},function(){return f._teardown()}))),m.closed&&(this._connection=null,m=r.Subscription.EMPTY)}return m},d.prototype.refCount=function(){return i.refCount()(this)},d})(n.Observable);e.ConnectableObservable=l}}),yX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.performanceTimestampProvider=void 0,e.performanceTimestampProvider={now:function(){return(e.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}}}),XA=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js"(e){var t=e&&e.__read||function(i,a){var s=typeof Symbol=="function"&&i[Symbol.iterator];if(!s)return i;var l=s.call(i),c,d=[],f;try{for(;(a===void 0||a-- >0)&&!(c=l.next()).done;)d.push(c.value)}catch(m){f={error:m}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(f)throw f.error}}return d},n=e&&e.__spreadArray||function(i,a){for(var s=0,l=a.length,c=i.length;s<l;s++,c++)i[c]=a[s];return i};Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrameProvider=void 0;var r=Oi();e.animationFrameProvider={schedule:function(i){var a=requestAnimationFrame,s=cancelAnimationFrame,l=e.animationFrameProvider.delegate;l&&(a=l.requestAnimationFrame,s=l.cancelAnimationFrame);var c=a(function(d){s=void 0,i(d)});return new r.Subscription(function(){return s==null?void 0:s(c)})},requestAnimationFrame:function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=e.animationFrameProvider.delegate;return((s==null?void 0:s.requestAnimationFrame)||requestAnimationFrame).apply(void 0,n([],t(i)))},cancelAnimationFrame:function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=e.animationFrameProvider.delegate;return((s==null?void 0:s.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,n([],t(i)))},delegate:void 0}}}),SX=U({"../../node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrames=void 0;var t=Zt(),n=yX(),r=XA();function i(l){return l?a(l):s}e.animationFrames=i;function a(l){return new t.Observable(function(c){var d=l||n.performanceTimestampProvider,f=d.now(),m=0,p=function(){c.closed||(m=r.animationFrameProvider.requestAnimationFrame(function(O){m=0;var b=d.now();c.next({timestamp:l?b:O,elapsed:b-f}),p()}))};return p(),function(){m&&r.animationFrameProvider.cancelAnimationFrame(m)}})}var s=a()}}),ZA=U({"../../node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectUnsubscribedError=void 0;var t=Wo();e.ObjectUnsubscribedError=t.createErrorClass(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})}}),ar=U({"../../node_modules/rxjs/dist/cjs/internal/Subject.js"(e){var t=e&&e.__extends||(function(){var f=function(m,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,b){O.__proto__=b}||function(O,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(O[S]=b[S])},f(m,p)};return function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(m,p);function O(){this.constructor=m}m.prototype=p===null?Object.create(p):(O.prototype=p.prototype,new O)}})(),n=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AnonymousSubject=e.Subject=void 0;var r=Zt(),i=Oi(),a=ZA(),s=Gs(),l=J0(),c=(function(f){t(m,f);function m(){var p=f.call(this)||this;return p.closed=!1,p.currentObservers=null,p.observers=[],p.isStopped=!1,p.hasError=!1,p.thrownError=null,p}return m.prototype.lift=function(p){var O=new d(this,this);return O.operator=p,O},m.prototype._throwIfClosed=function(){if(this.closed)throw new a.ObjectUnsubscribedError},m.prototype.next=function(p){var O=this;l.errorContext(function(){var b,S;if(O._throwIfClosed(),!O.isStopped){O.currentObservers||(O.currentObservers=Array.from(O.observers));try{for(var w=n(O.currentObservers),k=w.next();!k.done;k=w.next()){var j=k.value;j.next(p)}}catch(T){b={error:T}}finally{try{k&&!k.done&&(S=w.return)&&S.call(w)}finally{if(b)throw b.error}}}})},m.prototype.error=function(p){var O=this;l.errorContext(function(){if(O._throwIfClosed(),!O.isStopped){O.hasError=O.isStopped=!0,O.thrownError=p;for(var b=O.observers;b.length;)b.shift().error(p)}})},m.prototype.complete=function(){var p=this;l.errorContext(function(){if(p._throwIfClosed(),!p.isStopped){p.isStopped=!0;for(var O=p.observers;O.length;)O.shift().complete()}})},m.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(m.prototype,"observed",{get:function(){var p;return((p=this.observers)===null||p===void 0?void 0:p.length)>0},enumerable:!1,configurable:!0}),m.prototype._trySubscribe=function(p){return this._throwIfClosed(),f.prototype._trySubscribe.call(this,p)},m.prototype._subscribe=function(p){return this._throwIfClosed(),this._checkFinalizedStatuses(p),this._innerSubscribe(p)},m.prototype._innerSubscribe=function(p){var O=this,b=this,S=b.hasError,w=b.isStopped,k=b.observers;return S||w?i.EMPTY_SUBSCRIPTION:(this.currentObservers=null,k.push(p),new i.Subscription(function(){O.currentObservers=null,s.arrRemove(k,p)}))},m.prototype._checkFinalizedStatuses=function(p){var O=this,b=O.hasError,S=O.thrownError,w=O.isStopped;b?p.error(S):w&&p.complete()},m.prototype.asObservable=function(){var p=new r.Observable;return p.source=this,p},m.create=function(p,O){return new d(p,O)},m})(r.Observable);e.Subject=c;var d=(function(f){t(m,f);function m(p,O){var b=f.call(this)||this;return b.destination=p,b.source=O,b}return m.prototype.next=function(p){var O,b;(b=(O=this.destination)===null||O===void 0?void 0:O.next)===null||b===void 0||b.call(O,p)},m.prototype.error=function(p){var O,b;(b=(O=this.destination)===null||O===void 0?void 0:O.error)===null||b===void 0||b.call(O,p)},m.prototype.complete=function(){var p,O;(O=(p=this.destination)===null||p===void 0?void 0:p.complete)===null||O===void 0||O.call(p)},m.prototype._subscribe=function(p){var O,b;return(b=(O=this.source)===null||O===void 0?void 0:O.subscribe(p))!==null&&b!==void 0?b:i.EMPTY_SUBSCRIPTION},m})(c);e.AnonymousSubject=d}}),BA=U({"../../node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.BehaviorSubject=void 0;var n=ar(),r=(function(i){t(a,i);function a(s){var l=i.call(this)||this;return l._value=s,l}return Object.defineProperty(a.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),a.prototype._subscribe=function(s){var l=i.prototype._subscribe.call(this,s);return!l.closed&&s.next(this._value),l},a.prototype.getValue=function(){var s=this,l=s.hasError,c=s.thrownError,d=s._value;if(l)throw c;return this._throwIfClosed(),d},a.prototype.next=function(s){i.prototype.next.call(this,this._value=s)},a})(n.Subject);e.BehaviorSubject=r}}),tS=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}}}),nS=U({"../../node_modules/rxjs/dist/cjs/internal/ReplaySubject.js"(e){var t=e&&e.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function c(){this.constructor=s}s.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaySubject=void 0;var n=ar(),r=tS(),i=(function(a){t(s,a);function s(l,c,d){l===void 0&&(l=1/0),c===void 0&&(c=1/0),d===void 0&&(d=r.dateTimestampProvider);var f=a.call(this)||this;return f._bufferSize=l,f._windowTime=c,f._timestampProvider=d,f._buffer=[],f._infiniteTimeWindow=!0,f._infiniteTimeWindow=c===1/0,f._bufferSize=Math.max(1,l),f._windowTime=Math.max(1,c),f}return s.prototype.next=function(l){var c=this,d=c.isStopped,f=c._buffer,m=c._infiniteTimeWindow,p=c._timestampProvider,O=c._windowTime;d||(f.push(l),!m&&f.push(p.now()+O)),this._trimBuffer(),a.prototype.next.call(this,l)},s.prototype._subscribe=function(l){this._throwIfClosed(),this._trimBuffer();for(var c=this._innerSubscribe(l),d=this,f=d._infiniteTimeWindow,m=d._buffer,p=m.slice(),O=0;O<p.length&&!l.closed;O+=f?1:2)l.next(p[O]);return this._checkFinalizedStatuses(l),c},s.prototype._trimBuffer=function(){var l=this,c=l._bufferSize,d=l._timestampProvider,f=l._buffer,m=l._infiniteTimeWindow,p=(m?1:2)*c;if(c<1/0&&p<f.length&&f.splice(0,f.length-p),!m){for(var O=d.now(),b=0,S=1;S<f.length&&f[S]<=O;S+=2)b=S;b&&f.splice(0,b+1)}},s})(n.Subject);e.ReplaySubject=i}}),rS=U({"../../node_modules/rxjs/dist/cjs/internal/AsyncSubject.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncSubject=void 0;var n=ar(),r=(function(i){t(a,i);function a(){var s=i!==null&&i.apply(this,arguments)||this;return s._value=null,s._hasValue=!1,s._isComplete=!1,s}return a.prototype._checkFinalizedStatuses=function(s){var l=this,c=l.hasError,d=l._hasValue,f=l._value,m=l.thrownError,p=l.isStopped,O=l._isComplete;c?s.error(m):(p||O)&&(d&&s.next(f),s.complete())},a.prototype.next=function(s){this.isStopped||(this._value=s,this._hasValue=!0)},a.prototype.complete=function(){var s=this,l=s._hasValue,c=s._value,d=s._isComplete;d||(this._isComplete=!0,l&&i.prototype.next.call(this,c),i.prototype.complete.call(this))},a})(n.Subject);e.AsyncSubject=r}}),xX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/Action.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0;var n=Oi(),r=(function(i){t(a,i);function a(s,l){return i.call(this)||this}return a.prototype.schedule=function(s,l){return this},a})(n.Subscription);e.Action=r}}),_X=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js"(e){var t=e&&e.__read||function(r,i){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var s=a.call(r),l,c=[],d;try{for(;(i===void 0||i-- >0)&&!(l=s.next()).done;)c.push(l.value)}catch(f){d={error:f}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(d)throw d.error}}return c},n=e&&e.__spreadArray||function(r,i){for(var a=0,s=i.length,l=r.length;a<s;a++,l++)r[l]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.intervalProvider=void 0,e.intervalProvider={setInterval:function(r,i){for(var a=[],s=2;s<arguments.length;s++)a[s-2]=arguments[s];var l=e.intervalProvider.delegate;return l!=null&&l.setInterval?l.setInterval.apply(l,n([r,i],t(a))):setInterval.apply(void 0,n([r,i],t(a)))},clearInterval:function(r){var i=e.intervalProvider.delegate;return((i==null?void 0:i.clearInterval)||clearInterval)(r)},delegate:void 0}}}),nf=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js"(e){var t=e&&e.__extends||(function(){var s=function(l,c){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(d[m]=f[m])},s(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");s(l,c);function d(){this.constructor=l}l.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncAction=void 0;var n=xX(),r=_X(),i=Gs(),a=(function(s){t(l,s);function l(c,d){var f=s.call(this,c,d)||this;return f.scheduler=c,f.work=d,f.pending=!1,f}return l.prototype.schedule=function(c,d){var f;if(d===void 0&&(d=0),this.closed)return this;this.state=c;var m=this.id,p=this.scheduler;return m!=null&&(this.id=this.recycleAsyncId(p,m,d)),this.pending=!0,this.delay=d,this.id=(f=this.id)!==null&&f!==void 0?f:this.requestAsyncId(p,this.id,d),this},l.prototype.requestAsyncId=function(c,d,f){return f===void 0&&(f=0),r.intervalProvider.setInterval(c.flush.bind(c,this),f)},l.prototype.recycleAsyncId=function(c,d,f){if(f===void 0&&(f=0),f!=null&&this.delay===f&&this.pending===!1)return d;d!=null&&r.intervalProvider.clearInterval(d)},l.prototype.execute=function(c,d){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var f=this._execute(c,d);if(f)return f;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},l.prototype._execute=function(c,d){var f=!1,m;try{this.work(c)}catch(p){f=!0,m=p||new Error("Scheduled action threw falsy error")}if(f)return this.unsubscribe(),m},l.prototype.unsubscribe=function(){if(!this.closed){var c=this,d=c.id,f=c.scheduler,m=f.actions;this.work=this.state=this.scheduler=null,this.pending=!1,i.arrRemove(m,this),d!=null&&(this.id=this.recycleAsyncId(f,d,null)),this.delay=null,s.prototype.unsubscribe.call(this)}},l})(n.Action);e.AsyncAction=a}}),wX=U({"../../node_modules/rxjs/dist/cjs/internal/util/Immediate.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TestTools=e.Immediate=void 0;var t=1,n,r={};function i(a){return a in r?(delete r[a],!0):!1}e.Immediate={setImmediate:function(a){var s=t++;return r[s]=!0,n||(n=Promise.resolve()),n.then(function(){return i(s)&&a()}),s},clearImmediate:function(a){i(a)}},e.TestTools={pending:function(){return Object.keys(r).length}}}}),kX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.immediateProvider=void 0;var r=wX(),i=r.Immediate.setImmediate,a=r.Immediate.clearImmediate;e.immediateProvider={setImmediate:function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var c=e.immediateProvider.delegate;return((c==null?void 0:c.setImmediate)||i).apply(void 0,n([],t(s)))},clearImmediate:function(s){var l=e.immediateProvider.delegate;return((l==null?void 0:l.clearImmediate)||a)(s)},delegate:void 0}}}),jX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js"(e){var t=e&&e.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function c(){this.constructor=s}s.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsapAction=void 0;var n=nf(),r=kX(),i=(function(a){t(s,a);function s(l,c){var d=a.call(this,l,c)||this;return d.scheduler=l,d.work=c,d}return s.prototype.requestAsyncId=function(l,c,d){return d===void 0&&(d=0),d!==null&&d>0?a.prototype.requestAsyncId.call(this,l,c,d):(l.actions.push(this),l._scheduled||(l._scheduled=r.immediateProvider.setImmediate(l.flush.bind(l,void 0))))},s.prototype.recycleAsyncId=function(l,c,d){var f;if(d===void 0&&(d=0),d!=null?d>0:this.delay>0)return a.prototype.recycleAsyncId.call(this,l,c,d);var m=l.actions;c!=null&&((f=m[m.length-1])===null||f===void 0?void 0:f.id)!==c&&(r.immediateProvider.clearImmediate(c),l._scheduled===c&&(l._scheduled=void 0))},s})(n.AsyncAction);e.AsapAction=i}}),VA=U({"../../node_modules/rxjs/dist/cjs/internal/Scheduler.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scheduler=void 0;var t=tS(),n=(function(){function r(i,a){a===void 0&&(a=r.now),this.schedulerActionCtor=i,this.now=a}return r.prototype.schedule=function(i,a,s){return a===void 0&&(a=0),new this.schedulerActionCtor(this,i).schedule(s,a)},r.now=t.dateTimestampProvider.now,r})();e.Scheduler=n}}),rf=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncScheduler=void 0;var n=VA(),r=(function(i){t(a,i);function a(s,l){l===void 0&&(l=n.Scheduler.now);var c=i.call(this,s,l)||this;return c.actions=[],c._active=!1,c}return a.prototype.flush=function(s){var l=this.actions;if(this._active){l.push(s);return}var c;this._active=!0;do if(c=s.execute(s.state,s.delay))break;while(s=l.shift());if(this._active=!1,c){for(;s=l.shift();)s.unsubscribe();throw c}},a})(n.Scheduler);e.AsyncScheduler=r}}),TX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsapScheduler=void 0;var n=rf(),r=(function(i){t(a,i);function a(){return i!==null&&i.apply(this,arguments)||this}return a.prototype.flush=function(s){this._active=!0;var l=this._scheduled;this._scheduled=void 0;var c=this.actions,d;s=s||c.shift();do if(d=s.execute(s.state,s.delay))break;while((s=c[0])&&s.id===l&&c.shift());if(this._active=!1,d){for(;(s=c[0])&&s.id===l&&c.shift();)s.unsubscribe();throw d}},a})(n.AsyncScheduler);e.AsapScheduler=r}}),CX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/asap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.asap=e.asapScheduler=void 0;var t=jX(),n=TX();e.asapScheduler=new n.AsapScheduler(t.AsapAction),e.asap=e.asapScheduler}}),Ur=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/async.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.async=e.asyncScheduler=void 0;var t=nf(),n=rf();e.asyncScheduler=new n.AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler}}),EX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.QueueAction=void 0;var n=nf(),r=(function(i){t(a,i);function a(s,l){var c=i.call(this,s,l)||this;return c.scheduler=s,c.work=l,c}return a.prototype.schedule=function(s,l){return l===void 0&&(l=0),l>0?i.prototype.schedule.call(this,s,l):(this.delay=l,this.state=s,this.scheduler.flush(this),this)},a.prototype.execute=function(s,l){return l>0||this.closed?i.prototype.execute.call(this,s,l):this._execute(s,l)},a.prototype.requestAsyncId=function(s,l,c){return c===void 0&&(c=0),c!=null&&c>0||c==null&&this.delay>0?i.prototype.requestAsyncId.call(this,s,l,c):(s.flush(this),0)},a})(n.AsyncAction);e.QueueAction=r}}),AX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.QueueScheduler=void 0;var n=rf(),r=(function(i){t(a,i);function a(){return i!==null&&i.apply(this,arguments)||this}return a})(n.AsyncScheduler);e.QueueScheduler=r}}),QX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/queue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.queue=e.queueScheduler=void 0;var t=EX(),n=AX();e.queueScheduler=new n.QueueScheduler(t.QueueAction),e.queue=e.queueScheduler}}),PX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js"(e){var t=e&&e.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function c(){this.constructor=s}s.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrameAction=void 0;var n=nf(),r=XA(),i=(function(a){t(s,a);function s(l,c){var d=a.call(this,l,c)||this;return d.scheduler=l,d.work=c,d}return s.prototype.requestAsyncId=function(l,c,d){return d===void 0&&(d=0),d!==null&&d>0?a.prototype.requestAsyncId.call(this,l,c,d):(l.actions.push(this),l._scheduled||(l._scheduled=r.animationFrameProvider.requestAnimationFrame(function(){return l.flush(void 0)})))},s.prototype.recycleAsyncId=function(l,c,d){var f;if(d===void 0&&(d=0),d!=null?d>0:this.delay>0)return a.prototype.recycleAsyncId.call(this,l,c,d);var m=l.actions;c!=null&&c===l._scheduled&&((f=m[m.length-1])===null||f===void 0?void 0:f.id)!==c&&(r.animationFrameProvider.cancelAnimationFrame(c),l._scheduled=void 0)},s})(n.AsyncAction);e.AnimationFrameAction=i}}),NX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrameScheduler=void 0;var n=rf(),r=(function(i){t(a,i);function a(){return i!==null&&i.apply(this,arguments)||this}return a.prototype.flush=function(s){this._active=!0;var l;s?l=s.id:(l=this._scheduled,this._scheduled=void 0);var c=this.actions,d;s=s||c.shift();do if(d=s.execute(s.state,s.delay))break;while((s=c[0])&&s.id===l&&c.shift());if(this._active=!1,d){for(;(s=c[0])&&s.id===l&&c.shift();)s.unsubscribe();throw d}},a})(n.AsyncScheduler);e.AnimationFrameScheduler=r}}),RX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrame=e.animationFrameScheduler=void 0;var t=PX(),n=NX();e.animationFrameScheduler=new n.AnimationFrameScheduler(t.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler}}),MX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js"(e){var t=e&&e.__extends||(function(){var l=function(c,d){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var p in m)Object.prototype.hasOwnProperty.call(m,p)&&(f[p]=m[p])},l(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");l(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.VirtualAction=e.VirtualTimeScheduler=void 0;var n=nf(),r=Oi(),i=rf(),a=(function(l){t(c,l);function c(d,f){d===void 0&&(d=s),f===void 0&&(f=1/0);var m=l.call(this,d,function(){return m.frame})||this;return m.maxFrames=f,m.frame=0,m.index=-1,m}return c.prototype.flush=function(){for(var d=this,f=d.actions,m=d.maxFrames,p,O;(O=f[0])&&O.delay<=m&&(f.shift(),this.frame=O.delay,!(p=O.execute(O.state,O.delay))););if(p){for(;O=f.shift();)O.unsubscribe();throw p}},c.frameTimeFactor=10,c})(i.AsyncScheduler);e.VirtualTimeScheduler=a;var s=(function(l){t(c,l);function c(d,f,m){m===void 0&&(m=d.index+=1);var p=l.call(this,d,f)||this;return p.scheduler=d,p.work=f,p.index=m,p.active=!0,p.index=d.index=m,p}return c.prototype.schedule=function(d,f){if(f===void 0&&(f=0),Number.isFinite(f)){if(!this.id)return l.prototype.schedule.call(this,d,f);this.active=!1;var m=new c(this.scheduler,this.work);return this.add(m),m.schedule(d,f)}else return r.Subscription.EMPTY},c.prototype.requestAsyncId=function(d,f,m){m===void 0&&(m=0),this.delay=d.frame+m;var p=d.actions;return p.push(this),p.sort(c.sortActions),1},c.prototype.recycleAsyncId=function(d,f,m){},c.prototype._execute=function(d,f){if(this.active===!0)return l.prototype._execute.call(this,d,f)},c.sortActions=function(d,f){return d.delay===f.delay?d.index===f.index?0:d.index>f.index?1:-1:d.delay>f.delay?1:-1},c})(n.AsyncAction);e.VirtualAction=s}}),ha=U({"../../node_modules/rxjs/dist/cjs/internal/observable/empty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.empty=e.EMPTY=void 0;var t=Zt();e.EMPTY=new t.Observable(function(i){return i.complete()});function n(i){return i?r(i):e.EMPTY}e.empty=n;function r(i){return new t.Observable(function(a){return i.schedule(function(){return a.complete()})})}}}),Ap=U({"../../node_modules/rxjs/dist/cjs/internal/util/isScheduler.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isScheduler=void 0;var t=Nt();function n(r){return r&&t.isFunction(r.schedule)}e.isScheduler=n}}),Yr=U({"../../node_modules/rxjs/dist/cjs/internal/util/args.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.popNumber=e.popScheduler=e.popResultSelector=void 0;var t=Nt(),n=Ap();function r(l){return l[l.length-1]}function i(l){return t.isFunction(r(l))?l.pop():void 0}e.popResultSelector=i;function a(l){return n.isScheduler(r(l))?l.pop():void 0}e.popScheduler=a;function s(l,c){return typeof r(l)=="number"?l.pop():c}e.popNumber=s}}),iS=U({"../../node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isArrayLike=void 0,e.isArrayLike=(function(t){return t&&typeof t.length=="number"&&typeof t!="function"})}}),UA=U({"../../node_modules/rxjs/dist/cjs/internal/util/isPromise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isPromise=void 0;var t=Nt();function n(r){return t.isFunction(r==null?void 0:r.then)}e.isPromise=n}}),YA=U({"../../node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isInteropObservable=void 0;var t=Tp(),n=Nt();function r(i){return n.isFunction(i[t.observable])}e.isInteropObservable=r}}),FA=U({"../../node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAsyncIterable=void 0;var t=Nt();function n(r){return Symbol.asyncIterator&&t.isFunction(r==null?void 0:r[Symbol.asyncIterator])}e.isAsyncIterable=n}}),$A=U({"../../node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createInvalidObservableTypeError=void 0;function t(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}e.createInvalidObservableTypeError=t}}),WA=U({"../../node_modules/rxjs/dist/cjs/internal/symbol/iterator.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.iterator=e.getSymbolIterator=void 0;function t(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}e.getSymbolIterator=t,e.iterator=t()}}),HA=U({"../../node_modules/rxjs/dist/cjs/internal/util/isIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIterable=void 0;var t=WA(),n=Nt();function r(i){return n.isFunction(i==null?void 0:i[t.iterator])}e.isIterable=r}}),aS=U({"../../node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js"(e){var t=e&&e.__generator||function(l,c){var d={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},f,m,p,O;return O={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(O[Symbol.iterator]=function(){return this}),O;function b(w){return function(k){return S([w,k])}}function S(w){if(f)throw new TypeError("Generator is already executing.");for(;d;)try{if(f=1,m&&(p=w[0]&2?m.return:w[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,w[1])).done)return p;switch(m=0,p&&(w=[w[0]&2,p.value]),w[0]){case 0:case 1:p=w;break;case 4:return d.label++,{value:w[1],done:!1};case 5:d.label++,m=w[1],w=[0];continue;case 7:w=d.ops.pop(),d.trys.pop();continue;default:if(p=d.trys,!(p=p.length>0&&p[p.length-1])&&(w[0]===6||w[0]===2)){d=0;continue}if(w[0]===3&&(!p||w[1]>p[0]&&w[1]<p[3])){d.label=w[1];break}if(w[0]===6&&d.label<p[1]){d.label=p[1],p=w;break}if(p&&d.label<p[2]){d.label=p[2],d.ops.push(w);break}p[2]&&d.ops.pop(),d.trys.pop();continue}w=c.call(l,d)}catch(k){w=[6,k],m=0}finally{f=p=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},n=e&&e.__await||function(l){return this instanceof n?(this.v=l,this):new n(l)},r=e&&e.__asyncGenerator||function(l,c,d){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var f=d.apply(l,c||[]),m,p=[];return m={},O("next"),O("throw"),O("return"),m[Symbol.asyncIterator]=function(){return this},m;function O(T){f[T]&&(m[T]=function(E){return new Promise(function(Q,A){p.push([T,E,Q,A])>1||b(T,E)})})}function b(T,E){try{S(f[T](E))}catch(Q){j(p[0][3],Q)}}function S(T){T.value instanceof n?Promise.resolve(T.value.v).then(w,k):j(p[0][2],T)}function w(T){b("next",T)}function k(T){b("throw",T)}function j(T,E){T(E),p.shift(),p.length&&b(p[0][0],p[0][1])}};Object.defineProperty(e,"__esModule",{value:!0}),e.isReadableStreamLike=e.readableStreamLikeToAsyncGenerator=void 0;var i=Nt();function a(l){return r(this,arguments,function(){var d,f,m,p;return t(this,function(O){switch(O.label){case 0:d=l.getReader(),O.label=1;case 1:O.trys.push([1,,9,10]),O.label=2;case 2:return[4,n(d.read())];case 3:return f=O.sent(),m=f.value,p=f.done,p?[4,n(void 0)]:[3,5];case 4:return[2,O.sent()];case 5:return[4,n(m)];case 6:return[4,O.sent()];case 7:return O.sent(),[3,2];case 8:return[3,10];case 9:return d.releaseLock(),[7];case 10:return[2]}})})}e.readableStreamLikeToAsyncGenerator=a;function s(l){return i.isFunction(l==null?void 0:l.getReader)}e.isReadableStreamLike=s}}),He=U({"../../node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js"(e){var t=e&&e.__awaiter||function(D,q,P,V){function Z(Y){return Y instanceof P?Y:new P(function(X){X(Y)})}return new(P||(P=Promise))(function(Y,X){function H($){try{L(V.next($))}catch(ne){X(ne)}}function I($){try{L(V.throw($))}catch(ne){X(ne)}}function L($){$.done?Y($.value):Z($.value).then(H,I)}L((V=V.apply(D,q||[])).next())})},n=e&&e.__generator||function(D,q){var P={label:0,sent:function(){if(Y[0]&1)throw Y[1];return Y[1]},trys:[],ops:[]},V,Z,Y,X;return X={next:H(0),throw:H(1),return:H(2)},typeof Symbol=="function"&&(X[Symbol.iterator]=function(){return this}),X;function H(L){return function($){return I([L,$])}}function I(L){if(V)throw new TypeError("Generator is already executing.");for(;P;)try{if(V=1,Z&&(Y=L[0]&2?Z.return:L[0]?Z.throw||((Y=Z.return)&&Y.call(Z),0):Z.next)&&!(Y=Y.call(Z,L[1])).done)return Y;switch(Z=0,Y&&(L=[L[0]&2,Y.value]),L[0]){case 0:case 1:Y=L;break;case 4:return P.label++,{value:L[1],done:!1};case 5:P.label++,Z=L[1],L=[0];continue;case 7:L=P.ops.pop(),P.trys.pop();continue;default:if(Y=P.trys,!(Y=Y.length>0&&Y[Y.length-1])&&(L[0]===6||L[0]===2)){P=0;continue}if(L[0]===3&&(!Y||L[1]>Y[0]&&L[1]<Y[3])){P.label=L[1];break}if(L[0]===6&&P.label<Y[1]){P.label=Y[1],Y=L;break}if(Y&&P.label<Y[2]){P.label=Y[2],P.ops.push(L);break}Y[2]&&P.ops.pop(),P.trys.pop();continue}L=q.call(D,P)}catch($){L=[6,$],Z=0}finally{V=Y=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},r=e&&e.__asyncValues||function(D){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var q=D[Symbol.asyncIterator],P;return q?q.call(D):(D=typeof i=="function"?i(D):D[Symbol.iterator](),P={},V("next"),V("throw"),V("return"),P[Symbol.asyncIterator]=function(){return this},P);function V(Y){P[Y]=D[Y]&&function(X){return new Promise(function(H,I){X=D[Y](X),Z(H,I,X.done,X.value)})}}function Z(Y,X,H,I){Promise.resolve(I).then(function(L){Y({value:L,done:H})},X)}},i=e&&e.__values||function(D){var q=typeof Symbol=="function"&&Symbol.iterator,P=q&&D[q],V=0;if(P)return P.call(D);if(D&&typeof D.length=="number")return{next:function(){return D&&V>=D.length&&(D=void 0),{value:D&&D[V++],done:!D}}};throw new TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.fromReadableStreamLike=e.fromAsyncIterable=e.fromIterable=e.fromPromise=e.fromArrayLike=e.fromInteropObservable=e.innerFrom=void 0;var a=iS(),s=UA(),l=Zt(),c=YA(),d=FA(),f=$A(),m=HA(),p=aS(),O=Nt(),b=IA(),S=Tp();function w(D){if(D instanceof l.Observable)return D;if(D!=null){if(c.isInteropObservable(D))return k(D);if(a.isArrayLike(D))return j(D);if(s.isPromise(D))return T(D);if(d.isAsyncIterable(D))return Q(D);if(m.isIterable(D))return E(D);if(p.isReadableStreamLike(D))return A(D)}throw f.createInvalidObservableTypeError(D)}e.innerFrom=w;function k(D){return new l.Observable(function(q){var P=D[S.observable]();if(O.isFunction(P.subscribe))return P.subscribe(q);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}e.fromInteropObservable=k;function j(D){return new l.Observable(function(q){for(var P=0;P<D.length&&!q.closed;P++)q.next(D[P]);q.complete()})}e.fromArrayLike=j;function T(D){return new l.Observable(function(q){D.then(function(P){q.closed||(q.next(P),q.complete())},function(P){return q.error(P)}).then(null,b.reportUnhandledError)})}e.fromPromise=T;function E(D){return new l.Observable(function(q){var P,V;try{for(var Z=i(D),Y=Z.next();!Y.done;Y=Z.next()){var X=Y.value;if(q.next(X),q.closed)return}}catch(H){P={error:H}}finally{try{Y&&!Y.done&&(V=Z.return)&&V.call(Z)}finally{if(P)throw P.error}}q.complete()})}e.fromIterable=E;function Q(D){return new l.Observable(function(q){N(D,q).catch(function(P){return q.error(P)})})}e.fromAsyncIterable=Q;function A(D){return Q(p.readableStreamLikeToAsyncGenerator(D))}e.fromReadableStreamLike=A;function N(D,q){var P,V,Z,Y;return t(this,void 0,void 0,function(){var X,H;return n(this,function(I){switch(I.label){case 0:I.trys.push([0,5,6,11]),P=r(D),I.label=1;case 1:return[4,P.next()];case 2:if(V=I.sent(),!!V.done)return[3,4];if(X=V.value,q.next(X),q.closed)return[2];I.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=I.sent(),Z={error:H},[3,11];case 6:return I.trys.push([6,,9,10]),V&&!V.done&&(Y=P.return)?[4,Y.call(P)]:[3,8];case 7:I.sent(),I.label=8;case 8:return[3,10];case 9:if(Z)throw Z.error;return[7];case 10:return[7];case 11:return q.complete(),[2]}})})}}}),Ks=U({"../../node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.executeSchedule=void 0;function t(n,r,i,a,s){a===void 0&&(a=0),s===void 0&&(s=!1);var l=r.schedule(function(){i(),s?n.add(this.schedule(null,a)):this.unsubscribe()},a);if(n.add(l),!s)return l}e.executeSchedule=t}}),af=U({"../../node_modules/rxjs/dist/cjs/internal/operators/observeOn.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observeOn=void 0;var t=Ks(),n=be(),r=Qe();function i(a,s){return s===void 0&&(s=0),n.operate(function(l,c){l.subscribe(r.createOperatorSubscriber(c,function(d){return t.executeSchedule(c,a,function(){return c.next(d)},s)},function(){return t.executeSchedule(c,a,function(){return c.complete()},s)},function(d){return t.executeSchedule(c,a,function(){return c.error(d)},s)}))})}e.observeOn=i}}),sf=U({"../../node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.subscribeOn=void 0;var t=be();function n(r,i){return i===void 0&&(i=0),t.operate(function(a,s){s.add(r.schedule(function(){return a.subscribe(s)},i))})}e.subscribeOn=n}}),LX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleObservable=void 0;var t=He(),n=af(),r=sf();function i(a,s){return t.innerFrom(a).pipe(r.subscribeOn(s),n.observeOn(s))}e.scheduleObservable=i}}),DX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schedulePromise=void 0;var t=He(),n=af(),r=sf();function i(a,s){return t.innerFrom(a).pipe(r.subscribeOn(s),n.observeOn(s))}e.schedulePromise=i}}),zX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleArray=void 0;var t=Zt();function n(r,i){return new t.Observable(function(a){var s=0;return i.schedule(function(){s===r.length?a.complete():(a.next(r[s++]),a.closed||this.schedule())})})}e.scheduleArray=n}}),GA=U({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleIterable=void 0;var t=Zt(),n=WA(),r=Nt(),i=Ks();function a(s,l){return new t.Observable(function(c){var d;return i.executeSchedule(c,l,function(){d=s[n.iterator](),i.executeSchedule(c,l,function(){var f,m,p;try{f=d.next(),m=f.value,p=f.done}catch(O){c.error(O);return}p?c.complete():c.next(m)},0,!0)}),function(){return r.isFunction(d==null?void 0:d.return)&&d.return()}})}e.scheduleIterable=a}}),KA=U({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleAsyncIterable=void 0;var t=Zt(),n=Ks();function r(i,a){if(!i)throw new Error("Iterable cannot be null");return new t.Observable(function(s){n.executeSchedule(s,a,function(){var l=i[Symbol.asyncIterator]();n.executeSchedule(s,a,function(){l.next().then(function(c){c.done?s.complete():s.next(c.value)})},0,!0)})})}e.scheduleAsyncIterable=r}}),qX=U({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleReadableStreamLike=void 0;var t=KA(),n=aS();function r(i,a){return t.scheduleAsyncIterable(n.readableStreamLikeToAsyncGenerator(i),a)}e.scheduleReadableStreamLike=r}}),JA=U({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduled=void 0;var t=LX(),n=DX(),r=zX(),i=GA(),a=KA(),s=YA(),l=UA(),c=iS(),d=HA(),f=FA(),m=$A(),p=aS(),O=qX();function b(S,w){if(S!=null){if(s.isInteropObservable(S))return t.scheduleObservable(S,w);if(c.isArrayLike(S))return r.scheduleArray(S,w);if(l.isPromise(S))return n.schedulePromise(S,w);if(f.isAsyncIterable(S))return a.scheduleAsyncIterable(S,w);if(d.isIterable(S))return i.scheduleIterable(S,w);if(p.isReadableStreamLike(S))return O.scheduleReadableStreamLike(S,w)}throw m.createInvalidObservableTypeError(S)}e.scheduled=b}}),Js=U({"../../node_modules/rxjs/dist/cjs/internal/observable/from.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.from=void 0;var t=JA(),n=He();function r(i,a){return a?t.scheduled(i,a):n.innerFrom(i)}e.from=r}}),sS=U({"../../node_modules/rxjs/dist/cjs/internal/observable/of.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.of=void 0;var t=Yr(),n=Js();function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=t.popScheduler(i);return n.from(i,s)}e.of=r}}),eQ=U({"../../node_modules/rxjs/dist/cjs/internal/observable/throwError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=void 0;var t=Zt(),n=Nt();function r(i,a){var s=n.isFunction(i)?i:function(){return i},l=function(c){return c.error(s())};return new t.Observable(a?function(c){return a.schedule(l,0,c)}:l)}e.throwError=r}}),oS=U({"../../node_modules/rxjs/dist/cjs/internal/Notification.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observeNotification=e.Notification=e.NotificationKind=void 0;var t=ha(),n=sS(),r=eQ(),i=Nt();(function(l){l.NEXT="N",l.ERROR="E",l.COMPLETE="C"})(e.NotificationKind||(e.NotificationKind={}));var a=(function(){function l(c,d,f){this.kind=c,this.value=d,this.error=f,this.hasValue=c==="N"}return l.prototype.observe=function(c){return s(this,c)},l.prototype.do=function(c,d,f){var m=this,p=m.kind,O=m.value,b=m.error;return p==="N"?c==null?void 0:c(O):p==="E"?d==null?void 0:d(b):f==null?void 0:f()},l.prototype.accept=function(c,d,f){var m;return i.isFunction((m=c)===null||m===void 0?void 0:m.next)?this.observe(c):this.do(c,d,f)},l.prototype.toObservable=function(){var c=this,d=c.kind,f=c.value,m=c.error,p=d==="N"?n.of(f):d==="E"?r.throwError(function(){return m}):d==="C"?t.EMPTY:0;if(!p)throw new TypeError("Unexpected notification kind "+d);return p},l.createNext=function(c){return new l("N",c)},l.createError=function(c){return new l("E",void 0,c)},l.createComplete=function(){return l.completeNotification},l.completeNotification=new l("C"),l})();e.Notification=a;function s(l,c){var d,f,m,p=l,O=p.kind,b=p.value,S=p.error;if(typeof O!="string")throw new TypeError('Invalid notification, missing "kind"');O==="N"?(d=c.next)===null||d===void 0||d.call(c,b):O==="E"?(f=c.error)===null||f===void 0||f.call(c,S):(m=c.complete)===null||m===void 0||m.call(c)}e.observeNotification=s}}),IX=U({"../../node_modules/rxjs/dist/cjs/internal/util/isObservable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isObservable=void 0;var t=Zt(),n=Nt();function r(i){return!!i&&(i instanceof t.Observable||n.isFunction(i.lift)&&n.isFunction(i.subscribe))}e.isObservable=r}}),Ho=U({"../../node_modules/rxjs/dist/cjs/internal/util/EmptyError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyError=void 0;var t=Wo();e.EmptyError=t.createErrorClass(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}})}}),XX=U({"../../node_modules/rxjs/dist/cjs/internal/lastValueFrom.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.lastValueFrom=void 0;var t=Ho();function n(r,i){var a=typeof i=="object";return new Promise(function(s,l){var c=!1,d;r.subscribe({next:function(f){d=f,c=!0},error:l,complete:function(){c?s(d):a?s(i.defaultValue):l(new t.EmptyError)}})})}e.lastValueFrom=n}}),ZX=U({"../../node_modules/rxjs/dist/cjs/internal/firstValueFrom.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.firstValueFrom=void 0;var t=Ho(),n=tf();function r(i,a){var s=typeof a=="object";return new Promise(function(l,c){var d=new n.SafeSubscriber({next:function(f){l(f),d.unsubscribe()},error:c,complete:function(){s?l(a.defaultValue):c(new t.EmptyError)}});i.subscribe(d)})}e.firstValueFrom=r}}),tQ=U({"../../node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentOutOfRangeError=void 0;var t=Wo();e.ArgumentOutOfRangeError=t.createErrorClass(function(n){return function(){n(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})}}),nQ=U({"../../node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotFoundError=void 0;var t=Wo();e.NotFoundError=t.createErrorClass(function(n){return function(i){n(this),this.name="NotFoundError",this.message=i}})}}),rQ=U({"../../node_modules/rxjs/dist/cjs/internal/util/SequenceError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SequenceError=void 0;var t=Wo();e.SequenceError=t.createErrorClass(function(n){return function(i){n(this),this.name="SequenceError",this.message=i}})}}),lS=U({"../../node_modules/rxjs/dist/cjs/internal/util/isDate.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isValidDate=void 0;function t(n){return n instanceof Date&&!isNaN(n)}e.isValidDate=t}}),Fm=U({"../../node_modules/rxjs/dist/cjs/internal/operators/timeout.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeout=e.TimeoutError=void 0;var t=Ur(),n=lS(),r=be(),i=He(),a=Wo(),s=Qe(),l=Ks();e.TimeoutError=a.createErrorClass(function(f){return function(p){p===void 0&&(p=null),f(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=p}});function c(f,m){var p=n.isValidDate(f)?{first:f}:typeof f=="number"?{each:f}:f,O=p.first,b=p.each,S=p.with,w=S===void 0?d:S,k=p.scheduler,j=k===void 0?m??t.asyncScheduler:k,T=p.meta,E=T===void 0?null:T;if(O==null&&b==null)throw new TypeError("No timeout provided.");return r.operate(function(Q,A){var N,D,q=null,P=0,V=function(Z){D=l.executeSchedule(A,j,function(){try{N.unsubscribe(),i.innerFrom(w({meta:E,lastValue:q,seen:P})).subscribe(A)}catch(Y){A.error(Y)}},Z)};N=Q.subscribe(s.createOperatorSubscriber(A,function(Z){D==null||D.unsubscribe(),P++,A.next(q=Z),b>0&&V(b)},void 0,void 0,function(){D!=null&&D.closed||D==null||D.unsubscribe(),q=null})),!P&&V(O!=null?typeof O=="number"?O:+O-j.now():b)})}e.timeout=c;function d(f){throw new e.TimeoutError(f)}}}),eo=U({"../../node_modules/rxjs/dist/cjs/internal/operators/map.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.map=void 0;var t=be(),n=Qe();function r(i,a){return t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){l.next(i.call(a,d,c++))}))})}e.map=r}}),Go=U({"../../node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js"(e){var t=e&&e.__read||function(l,c){var d=typeof Symbol=="function"&&l[Symbol.iterator];if(!d)return l;var f=d.call(l),m,p=[],O;try{for(;(c===void 0||c-- >0)&&!(m=f.next()).done;)p.push(m.value)}catch(b){O={error:b}}finally{try{m&&!m.done&&(d=f.return)&&d.call(f)}finally{if(O)throw O.error}}return p},n=e&&e.__spreadArray||function(l,c){for(var d=0,f=c.length,m=l.length;d<f;d++,m++)l[m]=c[d];return l};Object.defineProperty(e,"__esModule",{value:!0}),e.mapOneOrManyArgs=void 0;var r=eo(),i=Array.isArray;function a(l,c){return i(c)?l.apply(void 0,n([],t(c))):l(c)}function s(l){return r.map(function(c){return a(l,c)})}e.mapOneOrManyArgs=s}}),iQ=U({"../../node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,S=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)S.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return S},n=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.bindCallbackInternals=void 0;var r=Ap(),i=Zt(),a=sf(),s=Go(),l=af(),c=rS();function d(f,m,p,O){if(p)if(r.isScheduler(p))O=p;else return function(){for(var b=[],S=0;S<arguments.length;S++)b[S]=arguments[S];return d(f,m,O).apply(this,b).pipe(s.mapOneOrManyArgs(p))};return O?function(){for(var b=[],S=0;S<arguments.length;S++)b[S]=arguments[S];return d(f,m).apply(this,b).pipe(a.subscribeOn(O),l.observeOn(O))}:function(){for(var b=this,S=[],w=0;w<arguments.length;w++)S[w]=arguments[w];var k=new c.AsyncSubject,j=!0;return new i.Observable(function(T){var E=k.subscribe(T);if(j){j=!1;var Q=!1,A=!1;m.apply(b,n(n([],t(S)),[function(){for(var N=[],D=0;D<arguments.length;D++)N[D]=arguments[D];if(f){var q=N.shift();if(q!=null){k.error(q);return}}k.next(1<N.length?N:N[0]),A=!0,Q&&k.complete()}])),A&&k.complete(),Q=!0}return E})}}e.bindCallbackInternals=d}}),BX=U({"../../node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bindCallback=void 0;var t=iQ();function n(r,i,a){return t.bindCallbackInternals(!1,r,i,a)}e.bindCallback=n}}),VX=U({"../../node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bindNodeCallback=void 0;var t=iQ();function n(r,i,a){return t.bindCallbackInternals(!0,r,i,a)}e.bindNodeCallback=n}}),aQ=U({"../../node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.argsArgArrayOrObject=void 0;var t=Array.isArray,n=Object.getPrototypeOf,r=Object.prototype,i=Object.keys;function a(l){if(l.length===1){var c=l[0];if(t(c))return{args:c,keys:null};if(s(c)){var d=i(c);return{args:d.map(function(f){return c[f]}),keys:d}}}return{args:l,keys:null}}e.argsArgArrayOrObject=a;function s(l){return l&&typeof l=="object"&&n(l)===r}}}),sQ=U({"../../node_modules/rxjs/dist/cjs/internal/util/createObject.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createObject=void 0;function t(n,r){return n.reduce(function(i,a,s){return i[a]=r[s],i},{})}e.createObject=t}}),cS=U({"../../node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestInit=e.combineLatest=void 0;var t=Zt(),n=aQ(),r=Js(),i=ir(),a=Go(),s=Yr(),l=sQ(),c=Qe(),d=Ks();function f(){for(var O=[],b=0;b<arguments.length;b++)O[b]=arguments[b];var S=s.popScheduler(O),w=s.popResultSelector(O),k=n.argsArgArrayOrObject(O),j=k.args,T=k.keys;if(j.length===0)return r.from([],S);var E=new t.Observable(m(j,S,T?function(Q){return l.createObject(T,Q)}:i.identity));return w?E.pipe(a.mapOneOrManyArgs(w)):E}e.combineLatest=f;function m(O,b,S){return S===void 0&&(S=i.identity),function(w){p(b,function(){for(var k=O.length,j=new Array(k),T=k,E=k,Q=function(N){p(b,function(){var D=r.from(O[N],b),q=!1;D.subscribe(c.createOperatorSubscriber(w,function(P){j[N]=P,q||(q=!0,E--),E||w.next(S(j.slice()))},function(){--T||w.complete()}))},w)},A=0;A<k;A++)Q(A)},w)}}e.combineLatestInit=m;function p(O,b,S){O?d.executeSchedule(S,O,b):b()}}}),uS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeInternals=void 0;var t=He(),n=Ks(),r=Qe();function i(a,s,l,c,d,f,m,p){var O=[],b=0,S=0,w=!1,k=function(){w&&!O.length&&!b&&s.complete()},j=function(E){return b<c?T(E):O.push(E)},T=function(E){f&&s.next(E),b++;var Q=!1;t.innerFrom(l(E,S++)).subscribe(r.createOperatorSubscriber(s,function(A){d==null||d(A),f?j(A):s.next(A)},function(){Q=!0},void 0,function(){if(Q)try{b--;for(var A=function(){var N=O.shift();m?n.executeSchedule(s,m,function(){return T(N)}):T(N)};O.length&&b<c;)A();k()}catch(N){s.error(N)}}))};return a.subscribe(r.createOperatorSubscriber(s,j,function(){w=!0,k()})),function(){p==null||p()}}e.mergeInternals=i}}),Ja=U({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMap=void 0;var t=eo(),n=He(),r=be(),i=uS(),a=Nt();function s(l,c,d){return d===void 0&&(d=1/0),a.isFunction(c)?s(function(f,m){return t.map(function(p,O){return c(f,p,m,O)})(n.innerFrom(l(f,m)))},d):(typeof c=="number"&&(d=c),r.operate(function(f,m){return i.mergeInternals(f,m,l,d)}))}e.mergeMap=s}}),of=U({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=void 0;var t=Ja(),n=ir();function r(i){return i===void 0&&(i=1/0),t.mergeMap(n.identity,i)}e.mergeAll=r}}),Qp=U({"../../node_modules/rxjs/dist/cjs/internal/operators/concatAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatAll=void 0;var t=of();function n(){return t.mergeAll(1)}e.concatAll=n}}),Pp=U({"../../node_modules/rxjs/dist/cjs/internal/observable/concat.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concat=void 0;var t=Qp(),n=Yr(),r=Js();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return t.concatAll()(r.from(a,n.popScheduler(a)))}e.concat=i}}),Np=U({"../../node_modules/rxjs/dist/cjs/internal/observable/defer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defer=void 0;var t=Zt(),n=He();function r(i){return new t.Observable(function(a){n.innerFrom(i()).subscribe(a)})}e.defer=r}}),UX=U({"../../node_modules/rxjs/dist/cjs/internal/observable/connectable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.connectable=void 0;var t=ar(),n=Zt(),r=Np(),i={connector:function(){return new t.Subject},resetOnDisconnect:!0};function a(s,l){l===void 0&&(l=i);var c=null,d=l.connector,f=l.resetOnDisconnect,m=f===void 0?!0:f,p=d(),O=new n.Observable(function(b){return p.subscribe(b)});return O.connect=function(){return(!c||c.closed)&&(c=r.defer(function(){return s}).subscribe(p),m&&c.add(function(){return p=d()})),c},O}e.connectable=a}}),YX=U({"../../node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.forkJoin=void 0;var t=Zt(),n=aQ(),r=He(),i=Yr(),a=Qe(),s=Go(),l=sQ();function c(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];var m=i.popResultSelector(d),p=n.argsArgArrayOrObject(d),O=p.args,b=p.keys,S=new t.Observable(function(w){var k=O.length;if(!k){w.complete();return}for(var j=new Array(k),T=k,E=k,Q=function(N){var D=!1;r.innerFrom(O[N]).subscribe(a.createOperatorSubscriber(w,function(q){D||(D=!0,E--),j[N]=q},function(){return T--},void 0,function(){(!T||!D)&&(E||w.next(b?l.createObject(b,j):j),w.complete())}))},A=0;A<k;A++)Q(A)});return m?S.pipe(s.mapOneOrManyArgs(m)):S}e.forkJoin=c}}),FX=U({"../../node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js"(e){var t=e&&e.__read||function(w,k){var j=typeof Symbol=="function"&&w[Symbol.iterator];if(!j)return w;var T=j.call(w),E,Q=[],A;try{for(;(k===void 0||k-- >0)&&!(E=T.next()).done;)Q.push(E.value)}catch(N){A={error:N}}finally{try{E&&!E.done&&(j=T.return)&&j.call(T)}finally{if(A)throw A.error}}return Q};Object.defineProperty(e,"__esModule",{value:!0}),e.fromEvent=void 0;var n=He(),r=Zt(),i=Ja(),a=iS(),s=Nt(),l=Go(),c=["addListener","removeListener"],d=["addEventListener","removeEventListener"],f=["on","off"];function m(w,k,j,T){if(s.isFunction(j)&&(T=j,j=void 0),T)return m(w,k,j).pipe(l.mapOneOrManyArgs(T));var E=t(S(w)?d.map(function(N){return function(D){return w[N](k,D,j)}}):O(w)?c.map(p(w,k)):b(w)?f.map(p(w,k)):[],2),Q=E[0],A=E[1];if(!Q&&a.isArrayLike(w))return i.mergeMap(function(N){return m(N,k,j)})(n.innerFrom(w));if(!Q)throw new TypeError("Invalid event target");return new r.Observable(function(N){var D=function(){for(var q=[],P=0;P<arguments.length;P++)q[P]=arguments[P];return N.next(1<q.length?q:q[0])};return Q(D),function(){return A(D)}})}e.fromEvent=m;function p(w,k){return function(j){return function(T){return w[j](k,T)}}}function O(w){return s.isFunction(w.addListener)&&s.isFunction(w.removeListener)}function b(w){return s.isFunction(w.on)&&s.isFunction(w.off)}function S(w){return s.isFunction(w.addEventListener)&&s.isFunction(w.removeEventListener)}}}),$X=U({"../../node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fromEventPattern=void 0;var t=Zt(),n=Nt(),r=Go();function i(a,s,l){return l?i(a,s).pipe(r.mapOneOrManyArgs(l)):new t.Observable(function(c){var d=function(){for(var m=[],p=0;p<arguments.length;p++)m[p]=arguments[p];return c.next(m.length===1?m[0]:m)},f=a(d);return n.isFunction(s)?function(){return s(d,f)}:void 0})}e.fromEventPattern=i}}),WX=U({"../../node_modules/rxjs/dist/cjs/internal/observable/generate.js"(e){var t=e&&e.__generator||function(l,c){var d={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},f,m,p,O;return O={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(O[Symbol.iterator]=function(){return this}),O;function b(w){return function(k){return S([w,k])}}function S(w){if(f)throw new TypeError("Generator is already executing.");for(;d;)try{if(f=1,m&&(p=w[0]&2?m.return:w[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,w[1])).done)return p;switch(m=0,p&&(w=[w[0]&2,p.value]),w[0]){case 0:case 1:p=w;break;case 4:return d.label++,{value:w[1],done:!1};case 5:d.label++,m=w[1],w=[0];continue;case 7:w=d.ops.pop(),d.trys.pop();continue;default:if(p=d.trys,!(p=p.length>0&&p[p.length-1])&&(w[0]===6||w[0]===2)){d=0;continue}if(w[0]===3&&(!p||w[1]>p[0]&&w[1]<p[3])){d.label=w[1];break}if(w[0]===6&&d.label<p[1]){d.label=p[1],p=w;break}if(p&&d.label<p[2]){d.label=p[2],d.ops.push(w);break}p[2]&&d.ops.pop(),d.trys.pop();continue}w=c.call(l,d)}catch(k){w=[6,k],m=0}finally{f=p=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.generate=void 0;var n=ir(),r=Ap(),i=Np(),a=GA();function s(l,c,d,f,m){var p,O,b,S;arguments.length===1?(p=l,S=p.initialState,c=p.condition,d=p.iterate,O=p.resultSelector,b=O===void 0?n.identity:O,m=p.scheduler):(S=l,!f||r.isScheduler(f)?(b=n.identity,m=f):b=f);function w(){var k;return t(this,function(j){switch(j.label){case 0:k=S,j.label=1;case 1:return!c||c(k)?[4,b(k)]:[3,4];case 2:j.sent(),j.label=3;case 3:return k=d(k),[3,1];case 4:return[2]}})}return i.defer(m?function(){return a.scheduleIterable(w(),m)}:w)}e.generate=s}}),HX=U({"../../node_modules/rxjs/dist/cjs/internal/observable/iif.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.iif=void 0;var t=Np();function n(r,i,a){return t.defer(function(){return r()?i:a})}e.iif=n}}),Ko=U({"../../node_modules/rxjs/dist/cjs/internal/observable/timer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timer=void 0;var t=Zt(),n=Ur(),r=Ap(),i=lS();function a(s,l,c){s===void 0&&(s=0),c===void 0&&(c=n.async);var d=-1;return l!=null&&(r.isScheduler(l)?c=l:d=l),new t.Observable(function(f){var m=i.isValidDate(s)?+s-c.now():s;m<0&&(m=0);var p=0;return c.schedule(function(){f.closed||(f.next(p++),0<=d?this.schedule(void 0,d):f.complete())},m)})}e.timer=a}}),oQ=U({"../../node_modules/rxjs/dist/cjs/internal/observable/interval.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.interval=void 0;var t=Ur(),n=Ko();function r(i,a){return i===void 0&&(i=0),a===void 0&&(a=t.asyncScheduler),i<0&&(i=0),n.timer(i,i,a)}e.interval=r}}),GX=U({"../../node_modules/rxjs/dist/cjs/internal/observable/merge.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var t=of(),n=He(),r=ha(),i=Yr(),a=Js();function s(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var d=i.popScheduler(l),f=i.popNumber(l,1/0),m=l;return m.length?m.length===1?n.innerFrom(m[0]):t.mergeAll(f)(a.from(m,d)):r.EMPTY}e.merge=s}}),X1=U({"../../node_modules/rxjs/dist/cjs/internal/observable/never.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.never=e.NEVER=void 0;var t=Zt(),n=rr();e.NEVER=new t.Observable(n.noop);function r(){return e.NEVER}e.never=r}}),Qc=U({"../../node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.argsOrArgArray=void 0;var t=Array.isArray;function n(r){return r.length===1&&t(r[0])?r[0]:r}e.argsOrArgArray=n}}),lQ=U({"../../node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.onErrorResumeNext=void 0;var t=Zt(),n=Qc(),r=Qe(),i=rr(),a=He();function s(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var d=n.argsOrArgArray(l);return new t.Observable(function(f){var m=0,p=function(){if(m<d.length){var O=void 0;try{O=a.innerFrom(d[m++])}catch{p();return}var b=new r.OperatorSubscriber(f,void 0,i.noop,i.noop);O.subscribe(b),b.add(p)}else f.complete()};p()})}e.onErrorResumeNext=s}}),KX=U({"../../node_modules/rxjs/dist/cjs/internal/observable/pairs.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pairs=void 0;var t=Js();function n(r,i){return t.from(Object.entries(r),i)}e.pairs=n}}),cQ=U({"../../node_modules/rxjs/dist/cjs/internal/util/not.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.not=void 0;function t(n,r){return function(i,a){return!n.call(r,i,a)}}e.not=t}}),to=U({"../../node_modules/rxjs/dist/cjs/internal/operators/filter.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.filter=void 0;var t=be(),n=Qe();function r(i,a){return t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){return i.call(a,d,c++)&&l.next(d)}))})}e.filter=r}}),JX=U({"../../node_modules/rxjs/dist/cjs/internal/observable/partition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.partition=void 0;var t=cQ(),n=to(),r=He();function i(a,s,l){return[n.filter(s,l)(r.innerFrom(a)),n.filter(t.not(s,l))(r.innerFrom(a))]}e.partition=i}}),uQ=U({"../../node_modules/rxjs/dist/cjs/internal/observable/race.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.raceInit=e.race=void 0;var t=Zt(),n=He(),r=Qc(),i=Qe();function a(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return l=r.argsOrArgArray(l),l.length===1?n.innerFrom(l[0]):new t.Observable(s(l))}e.race=a;function s(l){return function(c){for(var d=[],f=function(p){d.push(n.innerFrom(l[p]).subscribe(i.createOperatorSubscriber(c,function(O){if(d){for(var b=0;b<d.length;b++)b!==p&&d[b].unsubscribe();d=null}c.next(O)})))},m=0;d&&!c.closed&&m<l.length;m++)f(m)}}e.raceInit=s}}),eZ=U({"../../node_modules/rxjs/dist/cjs/internal/observable/range.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.range=void 0;var t=Zt(),n=ha();function r(i,a,s){if(a==null&&(a=i,i=0),a<=0)return n.EMPTY;var l=a+i;return new t.Observable(s?function(c){var d=i;return s.schedule(function(){d<l?(c.next(d++),this.schedule()):c.complete()})}:function(c){for(var d=i;d<l&&!c.closed;)c.next(d++);c.complete()})}e.range=r}}),tZ=U({"../../node_modules/rxjs/dist/cjs/internal/observable/using.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.using=void 0;var t=Zt(),n=He(),r=ha();function i(a,s){return new t.Observable(function(l){var c=a(),d=s(c),f=d?n.innerFrom(d):r.EMPTY;return f.subscribe(l),function(){c&&c.unsubscribe()}})}e.using=i}}),dS=U({"../../node_modules/rxjs/dist/cjs/internal/observable/zip.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,S=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)S.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return S},n=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.zip=void 0;var r=Zt(),i=He(),a=Qc(),s=ha(),l=Qe(),c=Yr();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f),O=a.argsOrArgArray(f);return O.length?new r.Observable(function(b){var S=O.map(function(){return[]}),w=O.map(function(){return!1});b.add(function(){S=w=null});for(var k=function(T){i.innerFrom(O[T]).subscribe(l.createOperatorSubscriber(b,function(E){if(S[T].push(E),S.every(function(A){return A.length})){var Q=S.map(function(A){return A.shift()});b.next(p?p.apply(void 0,n([],t(Q))):Q),S.some(function(A,N){return!A.length&&w[N]})&&b.complete()}},function(){w[T]=!0,!S[T].length&&b.complete()}))},j=0;!b.closed&&j<O.length;j++)k(j);return function(){S=w=null}}):s.EMPTY}e.zip=d}}),nZ=U({"../../node_modules/rxjs/dist/cjs/internal/types.js"(e){Object.defineProperty(e,"__esModule",{value:!0})}}),fS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/audit.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.audit=void 0;var t=be(),n=He(),r=Qe();function i(a){return t.operate(function(s,l){var c=!1,d=null,f=null,m=!1,p=function(){if(f==null||f.unsubscribe(),f=null,c){c=!1;var b=d;d=null,l.next(b)}m&&l.complete()},O=function(){f=null,m&&l.complete()};s.subscribe(r.createOperatorSubscriber(l,function(b){c=!0,d=b,f||n.innerFrom(a(b)).subscribe(f=r.createOperatorSubscriber(l,p,O))},function(){m=!0,(!c||!f||f.closed)&&l.complete()}))})}e.audit=i}}),dQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/auditTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.auditTime=void 0;var t=Ur(),n=fS(),r=Ko();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.audit(function(){return r.timer(a,s)})}e.auditTime=i}}),fQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/buffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.buffer=void 0;var t=be(),n=rr(),r=Qe(),i=He();function a(s){return t.operate(function(l,c){var d=[];return l.subscribe(r.createOperatorSubscriber(c,function(f){return d.push(f)},function(){c.next(d),c.complete()})),i.innerFrom(s).subscribe(r.createOperatorSubscriber(c,function(){var f=d;d=[],c.next(f)},n.noop)),function(){d=null}})}e.buffer=a}}),hQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js"(e){var t=e&&e.__values||function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferCount=void 0;var n=be(),r=Qe(),i=Gs();function a(s,l){return l===void 0&&(l=null),l=l??s,n.operate(function(c,d){var f=[],m=0;c.subscribe(r.createOperatorSubscriber(d,function(p){var O,b,S,w,k=null;m++%l===0&&f.push([]);try{for(var j=t(f),T=j.next();!T.done;T=j.next()){var E=T.value;E.push(p),s<=E.length&&(k=k??[],k.push(E))}}catch(N){O={error:N}}finally{try{T&&!T.done&&(b=j.return)&&b.call(j)}finally{if(O)throw O.error}}if(k)try{for(var Q=t(k),A=Q.next();!A.done;A=Q.next()){var E=A.value;i.arrRemove(f,E),d.next(E)}}catch(N){S={error:N}}finally{try{A&&!A.done&&(w=Q.return)&&w.call(Q)}finally{if(S)throw S.error}}},function(){var p,O;try{for(var b=t(f),S=b.next();!S.done;S=b.next()){var w=S.value;d.next(w)}}catch(k){p={error:k}}finally{try{S&&!S.done&&(O=b.return)&&O.call(b)}finally{if(p)throw p.error}}d.complete()},void 0,function(){f=null}))})}e.bufferCount=a}}),mQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferTime=void 0;var n=Oi(),r=be(),i=Qe(),a=Gs(),s=Ur(),l=Yr(),c=Ks();function d(f){for(var m,p,O=[],b=1;b<arguments.length;b++)O[b-1]=arguments[b];var S=(m=l.popScheduler(O))!==null&&m!==void 0?m:s.asyncScheduler,w=(p=O[0])!==null&&p!==void 0?p:null,k=O[1]||1/0;return r.operate(function(j,T){var E=[],Q=!1,A=function(q){var P=q.buffer,V=q.subs;V.unsubscribe(),a.arrRemove(E,q),T.next(P),Q&&N()},N=function(){if(E){var q=new n.Subscription;T.add(q);var P=[],V={buffer:P,subs:q};E.push(V),c.executeSchedule(q,S,function(){return A(V)},f)}};w!==null&&w>=0?c.executeSchedule(T,S,N,w,!0):Q=!0,N();var D=i.createOperatorSubscriber(T,function(q){var P,V,Z=E.slice();try{for(var Y=t(Z),X=Y.next();!X.done;X=Y.next()){var H=X.value,I=H.buffer;I.push(q),k<=I.length&&A(H)}}catch(L){P={error:L}}finally{try{X&&!X.done&&(V=Y.return)&&V.call(Y)}finally{if(P)throw P.error}}},function(){for(;E!=null&&E.length;)T.next(E.shift().buffer);D==null||D.unsubscribe(),T.complete(),T.unsubscribe()},void 0,function(){return E=null});j.subscribe(D)})}e.bufferTime=d}}),pQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js"(e){var t=e&&e.__values||function(d){var f=typeof Symbol=="function"&&Symbol.iterator,m=f&&d[f],p=0;if(m)return m.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&p>=d.length&&(d=void 0),{value:d&&d[p++],done:!d}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferToggle=void 0;var n=Oi(),r=be(),i=He(),a=Qe(),s=rr(),l=Gs();function c(d,f){return r.operate(function(m,p){var O=[];i.innerFrom(d).subscribe(a.createOperatorSubscriber(p,function(b){var S=[];O.push(S);var w=new n.Subscription,k=function(){l.arrRemove(O,S),p.next(S),w.unsubscribe()};w.add(i.innerFrom(f(b)).subscribe(a.createOperatorSubscriber(p,k,s.noop)))},s.noop)),m.subscribe(a.createOperatorSubscriber(p,function(b){var S,w;try{for(var k=t(O),j=k.next();!j.done;j=k.next()){var T=j.value;T.push(b)}}catch(E){S={error:E}}finally{try{j&&!j.done&&(w=k.return)&&w.call(k)}finally{if(S)throw S.error}}},function(){for(;O.length>0;)p.next(O.shift());p.complete()}))})}e.bufferToggle=c}}),gQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bufferWhen=void 0;var t=be(),n=rr(),r=Qe(),i=He();function a(s){return t.operate(function(l,c){var d=null,f=null,m=function(){f==null||f.unsubscribe();var p=d;d=[],p&&c.next(p),i.innerFrom(s()).subscribe(f=r.createOperatorSubscriber(c,m,n.noop))};m(),l.subscribe(r.createOperatorSubscriber(c,function(p){return d==null?void 0:d.push(p)},function(){d&&c.next(d),c.complete()},void 0,function(){return d=f=null}))})}e.bufferWhen=a}}),vQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/catchError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.catchError=void 0;var t=He(),n=Qe(),r=be();function i(a){return r.operate(function(s,l){var c=null,d=!1,f;c=s.subscribe(n.createOperatorSubscriber(l,void 0,void 0,function(m){f=t.innerFrom(a(m,i(a)(s))),c?(c.unsubscribe(),c=null,f.subscribe(l)):d=!0})),d&&(c.unsubscribe(),c=null,f.subscribe(l))})}e.catchError=i}}),OQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scanInternals=void 0;var t=Qe();function n(r,i,a,s,l){return function(c,d){var f=a,m=i,p=0;c.subscribe(t.createOperatorSubscriber(d,function(O){var b=p++;m=f?r(m,O,b):(f=!0,O),s&&d.next(m)},l&&(function(){f&&d.next(m),d.complete()})))}}e.scanInternals=n}}),Pc=U({"../../node_modules/rxjs/dist/cjs/internal/operators/reduce.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reduce=void 0;var t=OQ(),n=be();function r(i,a){return n.operate(t.scanInternals(i,a,arguments.length>=2,!1,!0))}e.reduce=r}}),hS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/toArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toArray=void 0;var t=Pc(),n=be(),r=function(a,s){return a.push(s),a};function i(){return n.operate(function(a,s){t.reduce(r,[])(a).subscribe(s)})}e.toArray=i}}),bQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.joinAllInternals=void 0;var t=ir(),n=Go(),r=Cp(),i=Ja(),a=hS();function s(l,c){return r.pipe(a.toArray(),i.mergeMap(function(d){return l(d)}),c?n.mapOneOrManyArgs(c):t.identity)}e.joinAllInternals=s}}),mS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestAll=void 0;var t=cS(),n=bQ();function r(i){return n.joinAllInternals(t.combineLatest,i)}e.combineLatestAll=r}}),yQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/combineAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineAll=void 0;var t=mS();e.combineAll=t.combineLatestAll}}),SQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,S=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)S.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return S},n=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatest=void 0;var r=cS(),i=be(),a=Qc(),s=Go(),l=Cp(),c=Yr();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f);return p?l.pipe(d.apply(void 0,n([],t(f))),s.mapOneOrManyArgs(p)):i.operate(function(O,b){r.combineLatestInit(n([O],t(a.argsOrArgArray(f))))(b)})}e.combineLatest=d}}),xQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestWith=void 0;var r=SQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.combineLatest.apply(void 0,n([],t(a)))}e.combineLatestWith=i}}),pS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/concatMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatMap=void 0;var t=Ja(),n=Nt();function r(i,a){return n.isFunction(a)?t.mergeMap(i,a,1):t.mergeMap(i,1)}e.concatMap=r}}),_Q=U({"../../node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatMapTo=void 0;var t=pS(),n=Nt();function r(i,a){return n.isFunction(a)?t.concatMap(function(){return i},a):t.concatMap(function(){return i})}e.concatMapTo=r}}),wQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/concat.js"(e){var t=e&&e.__read||function(c,d){var f=typeof Symbol=="function"&&c[Symbol.iterator];if(!f)return c;var m=f.call(c),p,O=[],b;try{for(;(d===void 0||d-- >0)&&!(p=m.next()).done;)O.push(p.value)}catch(S){b={error:S}}finally{try{p&&!p.done&&(f=m.return)&&f.call(m)}finally{if(b)throw b.error}}return O},n=e&&e.__spreadArray||function(c,d){for(var f=0,m=d.length,p=c.length;f<m;f++,p++)c[p]=d[f];return c};Object.defineProperty(e,"__esModule",{value:!0}),e.concat=void 0;var r=be(),i=Qp(),a=Yr(),s=Js();function l(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var f=a.popScheduler(c);return r.operate(function(m,p){i.concatAll()(s.from(n([m],t(c)),f)).subscribe(p)})}e.concat=l}}),kQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/concatWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.concatWith=void 0;var r=wQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.concat.apply(void 0,n([],t(a)))}e.concatWith=i}}),rZ=U({"../../node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fromSubscribable=void 0;var t=Zt();function n(r){return new t.Observable(function(i){return r.subscribe(i)})}e.fromSubscribable=n}}),Rp=U({"../../node_modules/rxjs/dist/cjs/internal/operators/connect.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.connect=void 0;var t=ar(),n=He(),r=be(),i=rZ(),a={connector:function(){return new t.Subject}};function s(l,c){c===void 0&&(c=a);var d=c.connector;return r.operate(function(f,m){var p=d();n.innerFrom(l(i.fromSubscribable(p))).subscribe(m),m.add(f.subscribe(p))})}e.connect=s}}),jQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/count.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.count=void 0;var t=Pc();function n(r){return t.reduce(function(i,a,s){return!r||r(a,s)?i+1:i},0)}e.count=n}}),TQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/debounce.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.debounce=void 0;var t=be(),n=rr(),r=Qe(),i=He();function a(s){return t.operate(function(l,c){var d=!1,f=null,m=null,p=function(){if(m==null||m.unsubscribe(),m=null,d){d=!1;var O=f;f=null,c.next(O)}};l.subscribe(r.createOperatorSubscriber(c,function(O){m==null||m.unsubscribe(),d=!0,f=O,m=r.createOperatorSubscriber(c,p,n.noop),i.innerFrom(s(O)).subscribe(m)},function(){p(),c.complete()},void 0,function(){f=m=null}))})}e.debounce=a}}),CQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.debounceTime=void 0;var t=Ur(),n=be(),r=Qe();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.operate(function(l,c){var d=null,f=null,m=null,p=function(){if(d){d.unsubscribe(),d=null;var b=f;f=null,c.next(b)}};function O(){var b=m+a,S=s.now();if(S<b){d=this.schedule(void 0,b-S),c.add(d);return}p()}l.subscribe(r.createOperatorSubscriber(c,function(b){f=b,m=s.now(),d||(d=s.schedule(O,a),c.add(d))},function(){p(),c.complete()},void 0,function(){f=d=null}))})}e.debounceTime=i}}),lf=U({"../../node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defaultIfEmpty=void 0;var t=be(),n=Qe();function r(i){return t.operate(function(a,s){var l=!1;a.subscribe(n.createOperatorSubscriber(s,function(c){l=!0,s.next(c)},function(){l||s.next(i),s.complete()}))})}e.defaultIfEmpty=r}}),cf=U({"../../node_modules/rxjs/dist/cjs/internal/operators/take.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.take=void 0;var t=ha(),n=be(),r=Qe();function i(a){return a<=0?function(){return t.EMPTY}:n.operate(function(s,l){var c=0;s.subscribe(r.createOperatorSubscriber(l,function(d){++c<=a&&(l.next(d),a<=c&&l.complete())}))})}e.take=i}}),gS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreElements=void 0;var t=be(),n=Qe(),r=rr();function i(){return t.operate(function(a,s){a.subscribe(n.createOperatorSubscriber(s,r.noop))})}e.ignoreElements=i}}),vS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/mapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapTo=void 0;var t=eo();function n(r){return t.map(function(){return r})}e.mapTo=n}}),OS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.delayWhen=void 0;var t=Pp(),n=cf(),r=gS(),i=vS(),a=Ja(),s=He();function l(c,d){return d?function(f){return t.concat(d.pipe(n.take(1),r.ignoreElements()),f.pipe(l(c)))}:a.mergeMap(function(f,m){return s.innerFrom(c(f,m)).pipe(n.take(1),i.mapTo(f))})}e.delayWhen=l}}),EQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/delay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.delay=void 0;var t=Ur(),n=OS(),r=Ko();function i(a,s){s===void 0&&(s=t.asyncScheduler);var l=r.timer(a,s);return n.delayWhen(function(){return l})}e.delay=i}}),AQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.dematerialize=void 0;var t=oS(),n=be(),r=Qe();function i(){return n.operate(function(a,s){a.subscribe(r.createOperatorSubscriber(s,function(l){return t.observeNotification(l,s)}))})}e.dematerialize=i}}),QQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/distinct.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinct=void 0;var t=be(),n=Qe(),r=rr(),i=He();function a(s,l){return t.operate(function(c,d){var f=new Set;c.subscribe(n.createOperatorSubscriber(d,function(m){var p=s?s(m):m;f.has(p)||(f.add(p),d.next(m))})),l&&i.innerFrom(l).subscribe(n.createOperatorSubscriber(d,function(){return f.clear()},r.noop))})}e.distinct=a}}),bS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinctUntilChanged=void 0;var t=ir(),n=be(),r=Qe();function i(s,l){return l===void 0&&(l=t.identity),s=s??a,n.operate(function(c,d){var f,m=!0;c.subscribe(r.createOperatorSubscriber(d,function(p){var O=l(p);(m||!s(f,O))&&(m=!1,f=O,d.next(p))}))})}e.distinctUntilChanged=i;function a(s,l){return s===l}}}),PQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinctUntilKeyChanged=void 0;var t=bS();function n(r,i){return t.distinctUntilChanged(function(a,s){return i?i(a[r],s[r]):a[r]===s[r]})}e.distinctUntilKeyChanged=n}}),uf=U({"../../node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throwIfEmpty=void 0;var t=Ho(),n=be(),r=Qe();function i(s){return s===void 0&&(s=a),n.operate(function(l,c){var d=!1;l.subscribe(r.createOperatorSubscriber(c,function(f){d=!0,c.next(f)},function(){return d?c.complete():c.error(s())}))})}e.throwIfEmpty=i;function a(){return new t.EmptyError}}}),NQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/elementAt.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.elementAt=void 0;var t=tQ(),n=to(),r=uf(),i=lf(),a=cf();function s(l,c){if(l<0)throw new t.ArgumentOutOfRangeError;var d=arguments.length>=2;return function(f){return f.pipe(n.filter(function(m,p){return p===l}),a.take(1),d?i.defaultIfEmpty(c):r.throwIfEmpty(function(){return new t.ArgumentOutOfRangeError}))}}e.elementAt=s}}),RQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/endWith.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.endWith=void 0;var r=Pp(),i=sS();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return function(c){return r.concat(c,i.of.apply(void 0,n([],t(s))))}}e.endWith=a}}),MQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/every.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.every=void 0;var t=be(),n=Qe();function r(i,a){return t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){i.call(a,d,c++,s)||(l.next(!1),l.complete())},function(){l.next(!0),l.complete()}))})}e.every=r}}),yS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustMap=void 0;var t=eo(),n=He(),r=be(),i=Qe();function a(s,l){return l?function(c){return c.pipe(a(function(d,f){return n.innerFrom(s(d,f)).pipe(t.map(function(m,p){return l(d,m,f,p)}))}))}:r.operate(function(c,d){var f=0,m=null,p=!1;c.subscribe(i.createOperatorSubscriber(d,function(O){m||(m=i.createOperatorSubscriber(d,void 0,function(){m=null,p&&d.complete()}),n.innerFrom(s(O,f++)).subscribe(m))},function(){p=!0,!m&&d.complete()}))})}e.exhaustMap=a}}),SS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustAll=void 0;var t=yS(),n=ir();function r(){return t.exhaustMap(n.identity)}e.exhaustAll=r}}),LQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaust.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaust=void 0;var t=SS();e.exhaust=t.exhaustAll}}),DQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/expand.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.expand=void 0;var t=be(),n=uS();function r(i,a,s){return a===void 0&&(a=1/0),a=(a||0)<1?1/0:a,t.operate(function(l,c){return n.mergeInternals(l,c,i,a,void 0,!0,s)})}e.expand=r}}),zQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/finalize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.finalize=void 0;var t=be();function n(r){return t.operate(function(i,a){try{i.subscribe(a)}finally{a.add(r)}})}e.finalize=n}}),xS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/find.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFind=e.find=void 0;var t=be(),n=Qe();function r(a,s){return t.operate(i(a,s,"value"))}e.find=r;function i(a,s,l){var c=l==="index";return function(d,f){var m=0;d.subscribe(n.createOperatorSubscriber(f,function(p){var O=m++;a.call(s,p,O,d)&&(f.next(c?O:p),f.complete())},function(){f.next(c?-1:void 0),f.complete()}))}}e.createFind=i}}),qQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/findIndex.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.findIndex=void 0;var t=be(),n=xS();function r(i,a){return t.operate(n.createFind(i,a,"index"))}e.findIndex=r}}),IQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/first.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.first=void 0;var t=Ho(),n=to(),r=cf(),i=lf(),a=uf(),s=ir();function l(c,d){var f=arguments.length>=2;return function(m){return m.pipe(c?n.filter(function(p,O){return c(p,O,m)}):s.identity,r.take(1),f?i.defaultIfEmpty(d):a.throwIfEmpty(function(){return new t.EmptyError}))}}e.first=l}}),XQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/groupBy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.groupBy=void 0;var t=Zt(),n=He(),r=ar(),i=be(),a=Qe();function s(l,c,d,f){return i.operate(function(m,p){var O;!c||typeof c=="function"?O=c:(d=c.duration,O=c.element,f=c.connector);var b=new Map,S=function(Q){b.forEach(Q),Q(p)},w=function(Q){return S(function(A){return A.error(Q)})},k=0,j=!1,T=new a.OperatorSubscriber(p,function(Q){try{var A=l(Q),N=b.get(A);if(!N){b.set(A,N=f?f():new r.Subject);var D=E(A,N);if(p.next(D),d){var q=a.createOperatorSubscriber(N,function(){N.complete(),q==null||q.unsubscribe()},void 0,void 0,function(){return b.delete(A)});T.add(n.innerFrom(d(D)).subscribe(q))}}N.next(O?O(Q):Q)}catch(P){w(P)}},function(){return S(function(Q){return Q.complete()})},w,function(){return b.clear()},function(){return j=!0,k===0});m.subscribe(T);function E(Q,A){var N=new t.Observable(function(D){k++;var q=A.subscribe(D);return function(){q.unsubscribe(),--k===0&&j&&T.unsubscribe()}});return N.key=Q,N}})}e.groupBy=s}}),ZQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=void 0;var t=be(),n=Qe();function r(){return t.operate(function(i,a){i.subscribe(n.createOperatorSubscriber(a,function(){a.next(!1),a.complete()},function(){a.next(!0),a.complete()}))})}e.isEmpty=r}}),_S=U({"../../node_modules/rxjs/dist/cjs/internal/operators/takeLast.js"(e){var t=e&&e.__values||function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.takeLast=void 0;var n=ha(),r=be(),i=Qe();function a(s){return s<=0?function(){return n.EMPTY}:r.operate(function(l,c){var d=[];l.subscribe(i.createOperatorSubscriber(c,function(f){d.push(f),s<d.length&&d.shift()},function(){var f,m;try{for(var p=t(d),O=p.next();!O.done;O=p.next()){var b=O.value;c.next(b)}}catch(S){f={error:S}}finally{try{O&&!O.done&&(m=p.return)&&m.call(p)}finally{if(f)throw f.error}}c.complete()},void 0,function(){d=null}))})}e.takeLast=a}}),BQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/last.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.last=void 0;var t=Ho(),n=to(),r=_S(),i=uf(),a=lf(),s=ir();function l(c,d){var f=arguments.length>=2;return function(m){return m.pipe(c?n.filter(function(p,O){return c(p,O,m)}):s.identity,r.takeLast(1),f?a.defaultIfEmpty(d):i.throwIfEmpty(function(){return new t.EmptyError}))}}e.last=l}}),VQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/materialize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.materialize=void 0;var t=oS(),n=be(),r=Qe();function i(){return n.operate(function(a,s){a.subscribe(r.createOperatorSubscriber(s,function(l){s.next(t.Notification.createNext(l))},function(){s.next(t.Notification.createComplete()),s.complete()},function(l){s.next(t.Notification.createError(l)),s.complete()}))})}e.materialize=i}}),UQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/max.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.max=void 0;var t=Pc(),n=Nt();function r(i){return t.reduce(n.isFunction(i)?function(a,s){return i(a,s)>0?a:s}:function(a,s){return a>s?a:s})}e.max=r}}),YQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/flatMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.flatMap=void 0;var t=Ja();e.flatMap=t.mergeMap}}),FQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMapTo=void 0;var t=Ja(),n=Nt();function r(i,a,s){return s===void 0&&(s=1/0),n.isFunction(a)?t.mergeMap(function(){return i},a,s):(typeof a=="number"&&(s=a),t.mergeMap(function(){return i},s))}e.mergeMapTo=r}}),$Q=U({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeScan=void 0;var t=be(),n=uS();function r(i,a,s){return s===void 0&&(s=1/0),t.operate(function(l,c){var d=a;return n.mergeInternals(l,c,function(f,m){return i(d,f,m)},s,function(f){d=f},!1,void 0,function(){return d=null})})}e.mergeScan=r}}),WQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/merge.js"(e){var t=e&&e.__read||function(c,d){var f=typeof Symbol=="function"&&c[Symbol.iterator];if(!f)return c;var m=f.call(c),p,O=[],b;try{for(;(d===void 0||d-- >0)&&!(p=m.next()).done;)O.push(p.value)}catch(S){b={error:S}}finally{try{p&&!p.done&&(f=m.return)&&f.call(m)}finally{if(b)throw b.error}}return O},n=e&&e.__spreadArray||function(c,d){for(var f=0,m=d.length,p=c.length;f<m;f++,p++)c[p]=d[f];return c};Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var r=be(),i=of(),a=Yr(),s=Js();function l(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var f=a.popScheduler(c),m=a.popNumber(c,1/0);return r.operate(function(p,O){i.mergeAll(m)(s.from(n([p],t(c)),f)).subscribe(O)})}e.merge=l}}),HQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.mergeWith=void 0;var r=WQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.merge.apply(void 0,n([],t(a)))}e.mergeWith=i}}),GQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/min.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.min=void 0;var t=Pc(),n=Nt();function r(i){return t.reduce(n.isFunction(i)?function(a,s){return i(a,s)<0?a:s}:function(a,s){return a<s?a:s})}e.min=r}}),Mp=U({"../../node_modules/rxjs/dist/cjs/internal/operators/multicast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.multicast=void 0;var t=Ep(),n=Nt(),r=Rp();function i(a,s){var l=n.isFunction(a)?a:function(){return a};return n.isFunction(s)?r.connect(s,{connector:l}):function(c){return new t.ConnectableObservable(c,l)}}e.multicast=i}}),KQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.onErrorResumeNext=e.onErrorResumeNextWith=void 0;var r=Qc(),i=lQ();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var c=r.argsOrArgArray(s);return function(d){return i.onErrorResumeNext.apply(void 0,n([d],t(c)))}}e.onErrorResumeNextWith=a,e.onErrorResumeNext=a}}),JQ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/pairwise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pairwise=void 0;var t=be(),n=Qe();function r(){return t.operate(function(i,a){var s,l=!1;i.subscribe(n.createOperatorSubscriber(a,function(c){var d=s;s=c,l&&a.next([d,c]),l=!0}))})}e.pairwise=r}}),eP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/pluck.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pluck=void 0;var t=eo();function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=r.length;if(a===0)throw new Error("list of properties cannot be empty.");return t.map(function(s){for(var l=s,c=0;c<a;c++){var d=l==null?void 0:l[r[c]];if(typeof d<"u")l=d;else return}return l})}e.pluck=n}}),tP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/publish.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publish=void 0;var t=ar(),n=Mp(),r=Rp();function i(a){return a?function(s){return r.connect(a)(s)}:function(s){return n.multicast(new t.Subject)(s)}}e.publish=i}}),nP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishBehavior=void 0;var t=BA(),n=Ep();function r(i){return function(a){var s=new t.BehaviorSubject(i);return new n.ConnectableObservable(a,function(){return s})}}e.publishBehavior=r}}),rP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/publishLast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishLast=void 0;var t=rS(),n=Ep();function r(){return function(i){var a=new t.AsyncSubject;return new n.ConnectableObservable(i,function(){return a})}}e.publishLast=r}}),iP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishReplay=void 0;var t=nS(),n=Mp(),r=Nt();function i(a,s,l,c){l&&!r.isFunction(l)&&(c=l);var d=r.isFunction(l)?l:void 0;return function(f){return n.multicast(new t.ReplaySubject(a,s,c),d)(f)}}e.publishReplay=i}}),wS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/raceWith.js"(e){var t=e&&e.__read||function(l,c){var d=typeof Symbol=="function"&&l[Symbol.iterator];if(!d)return l;var f=d.call(l),m,p=[],O;try{for(;(c===void 0||c-- >0)&&!(m=f.next()).done;)p.push(m.value)}catch(b){O={error:b}}finally{try{m&&!m.done&&(d=f.return)&&d.call(f)}finally{if(O)throw O.error}}return p},n=e&&e.__spreadArray||function(l,c){for(var d=0,f=c.length,m=l.length;d<f;d++,m++)l[m]=c[d];return l};Object.defineProperty(e,"__esModule",{value:!0}),e.raceWith=void 0;var r=uQ(),i=be(),a=ir();function s(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return l.length?i.operate(function(d,f){r.raceInit(n([d],t(l)))(f)}):a.identity}e.raceWith=s}}),aP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/repeat.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.repeat=void 0;var t=ha(),n=be(),r=Qe(),i=He(),a=Ko();function s(l){var c,d=1/0,f;return l!=null&&(typeof l=="object"?(c=l.count,d=c===void 0?1/0:c,f=l.delay):d=l),d<=0?function(){return t.EMPTY}:n.operate(function(m,p){var O=0,b,S=function(){if(b==null||b.unsubscribe(),b=null,f!=null){var k=typeof f=="number"?a.timer(f):i.innerFrom(f(O)),j=r.createOperatorSubscriber(p,function(){j.unsubscribe(),w()});k.subscribe(j)}else w()},w=function(){var k=!1;b=m.subscribe(r.createOperatorSubscriber(p,void 0,function(){++O<d?b?S():k=!0:p.complete()})),k&&S()};w()})}e.repeat=s}}),sP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.repeatWhen=void 0;var t=He(),n=ar(),r=be(),i=Qe();function a(s){return r.operate(function(l,c){var d,f=!1,m,p=!1,O=!1,b=function(){return O&&p&&(c.complete(),!0)},S=function(){return m||(m=new n.Subject,t.innerFrom(s(m)).subscribe(i.createOperatorSubscriber(c,function(){d?w():f=!0},function(){p=!0,b()}))),m},w=function(){O=!1,d=l.subscribe(i.createOperatorSubscriber(c,void 0,function(){O=!0,!b()&&S().next()})),f&&(d.unsubscribe(),d=null,f=!1,w())};w()})}e.repeatWhen=a}}),oP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/retry.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.retry=void 0;var t=be(),n=Qe(),r=ir(),i=Ko(),a=He();function s(l){l===void 0&&(l=1/0);var c;l&&typeof l=="object"?c=l:c={count:l};var d=c.count,f=d===void 0?1/0:d,m=c.delay,p=c.resetOnSuccess,O=p===void 0?!1:p;return f<=0?r.identity:t.operate(function(b,S){var w=0,k,j=function(){var T=!1;k=b.subscribe(n.createOperatorSubscriber(S,function(E){O&&(w=0),S.next(E)},void 0,function(E){if(w++<f){var Q=function(){k?(k.unsubscribe(),k=null,j()):T=!0};if(m!=null){var A=typeof m=="number"?i.timer(m):a.innerFrom(m(E,w)),N=n.createOperatorSubscriber(S,function(){N.unsubscribe(),Q()},function(){S.complete()});A.subscribe(N)}else Q()}else S.error(E)})),T&&(k.unsubscribe(),k=null,j())};j()})}e.retry=s}}),lP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.retryWhen=void 0;var t=He(),n=ar(),r=be(),i=Qe();function a(s){return r.operate(function(l,c){var d,f=!1,m,p=function(){d=l.subscribe(i.createOperatorSubscriber(c,void 0,void 0,function(O){m||(m=new n.Subject,t.innerFrom(s(m)).subscribe(i.createOperatorSubscriber(c,function(){return d?p():f=!0}))),m&&m.next(O)})),f&&(d.unsubscribe(),d=null,f=!1,p())};p()})}e.retryWhen=a}}),kS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/sample.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sample=void 0;var t=He(),n=be(),r=rr(),i=Qe();function a(s){return n.operate(function(l,c){var d=!1,f=null;l.subscribe(i.createOperatorSubscriber(c,function(m){d=!0,f=m})),t.innerFrom(s).subscribe(i.createOperatorSubscriber(c,function(){if(d){d=!1;var m=f;f=null,c.next(m)}},r.noop))})}e.sample=a}}),cP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sampleTime=void 0;var t=Ur(),n=kS(),r=oQ();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.sample(r.interval(a,s))}e.sampleTime=i}}),uP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/scan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scan=void 0;var t=be(),n=OQ();function r(i,a){return t.operate(n.scanInternals(i,a,arguments.length>=2,!0))}e.scan=r}}),dP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sequenceEqual=void 0;var t=be(),n=Qe(),r=He();function i(s,l){return l===void 0&&(l=function(c,d){return c===d}),t.operate(function(c,d){var f=a(),m=a(),p=function(b){d.next(b),d.complete()},O=function(b,S){var w=n.createOperatorSubscriber(d,function(k){var j=S.buffer,T=S.complete;j.length===0?T?p(!1):b.buffer.push(k):!l(k,j.shift())&&p(!1)},function(){b.complete=!0;var k=S.complete,j=S.buffer;k&&p(j.length===0),w==null||w.unsubscribe()});return w};c.subscribe(O(f,m)),r.innerFrom(s).subscribe(O(m,f))})}e.sequenceEqual=i;function a(){return{buffer:[],complete:!1}}}}),jS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/share.js"(e){var t=e&&e.__read||function(d,f){var m=typeof Symbol=="function"&&d[Symbol.iterator];if(!m)return d;var p=m.call(d),O,b=[],S;try{for(;(f===void 0||f-- >0)&&!(O=p.next()).done;)b.push(O.value)}catch(w){S={error:w}}finally{try{O&&!O.done&&(m=p.return)&&m.call(p)}finally{if(S)throw S.error}}return b},n=e&&e.__spreadArray||function(d,f){for(var m=0,p=f.length,O=d.length;m<p;m++,O++)d[O]=f[m];return d};Object.defineProperty(e,"__esModule",{value:!0}),e.share=void 0;var r=He(),i=ar(),a=tf(),s=be();function l(d){d===void 0&&(d={});var f=d.connector,m=f===void 0?function(){return new i.Subject}:f,p=d.resetOnError,O=p===void 0?!0:p,b=d.resetOnComplete,S=b===void 0?!0:b,w=d.resetOnRefCountZero,k=w===void 0?!0:w;return function(j){var T,E,Q,A=0,N=!1,D=!1,q=function(){E==null||E.unsubscribe(),E=void 0},P=function(){q(),T=Q=void 0,N=D=!1},V=function(){var Z=T;P(),Z==null||Z.unsubscribe()};return s.operate(function(Z,Y){A++,!D&&!N&&q();var X=Q=Q??m();Y.add(function(){A--,A===0&&!D&&!N&&(E=c(V,k))}),X.subscribe(Y),!T&&A>0&&(T=new a.SafeSubscriber({next:function(H){return X.next(H)},error:function(H){D=!0,q(),E=c(P,O,H),X.error(H)},complete:function(){N=!0,q(),E=c(P,S),X.complete()}}),r.innerFrom(Z).subscribe(T))})(j)}}e.share=l;function c(d,f){for(var m=[],p=2;p<arguments.length;p++)m[p-2]=arguments[p];if(f===!0){d();return}if(f!==!1){var O=new a.SafeSubscriber({next:function(){O.unsubscribe(),d()}});return r.innerFrom(f.apply(void 0,n([],t(m)))).subscribe(O)}}}}),fP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.shareReplay=void 0;var t=nS(),n=jS();function r(i,a,s){var l,c,d,f,m=!1;return i&&typeof i=="object"?(l=i.bufferSize,f=l===void 0?1/0:l,c=i.windowTime,a=c===void 0?1/0:c,d=i.refCount,m=d===void 0?!1:d,s=i.scheduler):f=i??1/0,n.share({connector:function(){return new t.ReplaySubject(f,a,s)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:m})}e.shareReplay=r}}),hP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/single.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.single=void 0;var t=Ho(),n=rQ(),r=nQ(),i=be(),a=Qe();function s(l){return i.operate(function(c,d){var f=!1,m,p=!1,O=0;c.subscribe(a.createOperatorSubscriber(d,function(b){p=!0,(!l||l(b,O++,c))&&(f&&d.error(new n.SequenceError("Too many matching values")),f=!0,m=b)},function(){f?(d.next(m),d.complete()):d.error(p?new r.NotFoundError("No matching values"):new t.EmptyError)}))})}e.single=s}}),mP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/skip.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skip=void 0;var t=to();function n(r){return t.filter(function(i,a){return r<=a})}e.skip=n}}),pP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/skipLast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipLast=void 0;var t=ir(),n=be(),r=Qe();function i(a){return a<=0?t.identity:n.operate(function(s,l){var c=new Array(a),d=0;return s.subscribe(r.createOperatorSubscriber(l,function(f){var m=d++;if(m<a)c[m]=f;else{var p=m%a,O=c[p];c[p]=f,l.next(O)}})),function(){c=null}})}e.skipLast=i}}),gP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipUntil=void 0;var t=be(),n=Qe(),r=He(),i=rr();function a(s){return t.operate(function(l,c){var d=!1,f=n.createOperatorSubscriber(c,function(){f==null||f.unsubscribe(),d=!0},i.noop);r.innerFrom(s).subscribe(f),l.subscribe(n.createOperatorSubscriber(c,function(m){return d&&c.next(m)}))})}e.skipUntil=a}}),vP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipWhile=void 0;var t=be(),n=Qe();function r(i){return t.operate(function(a,s){var l=!1,c=0;a.subscribe(n.createOperatorSubscriber(s,function(d){return(l||(l=!i(d,c++)))&&s.next(d)}))})}e.skipWhile=r}}),OP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/startWith.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.startWith=void 0;var t=Pp(),n=Yr(),r=be();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=n.popScheduler(a);return r.operate(function(c,d){(l?t.concat(a,c,l):t.concat(a,c)).subscribe(d)})}e.startWith=i}}),df=U({"../../node_modules/rxjs/dist/cjs/internal/operators/switchMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchMap=void 0;var t=He(),n=be(),r=Qe();function i(a,s){return n.operate(function(l,c){var d=null,f=0,m=!1,p=function(){return m&&!d&&c.complete()};l.subscribe(r.createOperatorSubscriber(c,function(O){d==null||d.unsubscribe();var b=0,S=f++;t.innerFrom(a(O,S)).subscribe(d=r.createOperatorSubscriber(c,function(w){return c.next(s?s(O,w,S,b++):w)},function(){d=null,p()}))},function(){m=!0,p()}))})}e.switchMap=i}}),bP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/switchAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchAll=void 0;var t=df(),n=ir();function r(){return t.switchMap(n.identity)}e.switchAll=r}}),yP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchMapTo=void 0;var t=df(),n=Nt();function r(i,a){return n.isFunction(a)?t.switchMap(function(){return i},a):t.switchMap(function(){return i})}e.switchMapTo=r}}),SP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/switchScan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchScan=void 0;var t=df(),n=be();function r(i,a){return n.operate(function(s,l){var c=a;return t.switchMap(function(d,f){return i(c,d,f)},function(d,f){return c=f,f})(s).subscribe(l),function(){c=null}})}e.switchScan=r}}),xP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.takeUntil=void 0;var t=be(),n=Qe(),r=He(),i=rr();function a(s){return t.operate(function(l,c){r.innerFrom(s).subscribe(n.createOperatorSubscriber(c,function(){return c.complete()},i.noop)),!c.closed&&l.subscribe(c)})}e.takeUntil=a}}),_P=U({"../../node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.takeWhile=void 0;var t=be(),n=Qe();function r(i,a){return a===void 0&&(a=!1),t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){var f=i(d,c++);(f||a)&&l.next(d),!f&&l.complete()}))})}e.takeWhile=r}}),wP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/tap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.tap=void 0;var t=Nt(),n=be(),r=Qe(),i=ir();function a(s,l,c){var d=t.isFunction(s)||l||c?{next:s,error:l,complete:c}:s;return d?n.operate(function(f,m){var p;(p=d.subscribe)===null||p===void 0||p.call(d);var O=!0;f.subscribe(r.createOperatorSubscriber(m,function(b){var S;(S=d.next)===null||S===void 0||S.call(d,b),m.next(b)},function(){var b;O=!1,(b=d.complete)===null||b===void 0||b.call(d),m.complete()},function(b){var S;O=!1,(S=d.error)===null||S===void 0||S.call(d,b),m.error(b)},function(){var b,S;O&&((b=d.unsubscribe)===null||b===void 0||b.call(d)),(S=d.finalize)===null||S===void 0||S.call(d)}))}):i.identity}e.tap=a}}),TS=U({"../../node_modules/rxjs/dist/cjs/internal/operators/throttle.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=void 0;var t=be(),n=Qe(),r=He();function i(a,s){return t.operate(function(l,c){var d=s??{},f=d.leading,m=f===void 0?!0:f,p=d.trailing,O=p===void 0?!1:p,b=!1,S=null,w=null,k=!1,j=function(){w==null||w.unsubscribe(),w=null,O&&(Q(),k&&c.complete())},T=function(){w=null,k&&c.complete()},E=function(A){return w=r.innerFrom(a(A)).subscribe(n.createOperatorSubscriber(c,j,T))},Q=function(){if(b){b=!1;var A=S;S=null,c.next(A),!k&&E(A)}};l.subscribe(n.createOperatorSubscriber(c,function(A){b=!0,S=A,!(w&&!w.closed)&&(m?Q():E(A))},function(){k=!0,!(O&&b&&w&&!w.closed)&&c.complete()}))})}e.throttle=i}}),kP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throttleTime=void 0;var t=Ur(),n=TS(),r=Ko();function i(a,s,l){s===void 0&&(s=t.asyncScheduler);var c=r.timer(a,s);return n.throttle(function(){return c},l)}e.throttleTime=i}}),jP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimeInterval=e.timeInterval=void 0;var t=Ur(),n=be(),r=Qe();function i(s){return s===void 0&&(s=t.asyncScheduler),n.operate(function(l,c){var d=s.now();l.subscribe(r.createOperatorSubscriber(c,function(f){var m=s.now(),p=m-d;d=m,c.next(new a(f,p))}))})}e.timeInterval=i;var a=(function(){function s(l,c){this.value=l,this.interval=c}return s})();e.TimeInterval=a}}),TP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutWith=void 0;var t=Ur(),n=lS(),r=Fm();function i(a,s,l){var c,d,f;if(l=l??t.async,n.isValidDate(a)?c=a:typeof a=="number"&&(d=a),s)f=function(){return s};else throw new TypeError("No observable provided to switch to");if(c==null&&d==null)throw new TypeError("No timeout provided.");return r.timeout({first:c,each:d,scheduler:l,with:f})}e.timeoutWith=i}}),CP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/timestamp.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timestamp=void 0;var t=tS(),n=eo();function r(i){return i===void 0&&(i=t.dateTimestampProvider),n.map(function(a){return{value:a,timestamp:i.now()}})}e.timestamp=r}}),EP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/window.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.window=void 0;var t=ar(),n=be(),r=Qe(),i=rr(),a=He();function s(l){return n.operate(function(c,d){var f=new t.Subject;d.next(f.asObservable());var m=function(p){f.error(p),d.error(p)};return c.subscribe(r.createOperatorSubscriber(d,function(p){return f==null?void 0:f.next(p)},function(){f.complete(),d.complete()},m)),a.innerFrom(l).subscribe(r.createOperatorSubscriber(d,function(){f.complete(),d.next(f=new t.Subject)},i.noop,m)),function(){f==null||f.unsubscribe(),f=null}})}e.window=s}}),AP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/windowCount.js"(e){var t=e&&e.__values||function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.windowCount=void 0;var n=ar(),r=be(),i=Qe();function a(s,l){l===void 0&&(l=0);var c=l>0?l:s;return r.operate(function(d,f){var m=[new n.Subject],p=0;f.next(m[0].asObservable()),d.subscribe(i.createOperatorSubscriber(f,function(O){var b,S;try{for(var w=t(m),k=w.next();!k.done;k=w.next()){var j=k.value;j.next(O)}}catch(Q){b={error:Q}}finally{try{k&&!k.done&&(S=w.return)&&S.call(w)}finally{if(b)throw b.error}}var T=p-s+1;if(T>=0&&T%c===0&&m.shift().complete(),++p%c===0){var E=new n.Subject;m.push(E),f.next(E.asObservable())}},function(){for(;m.length>0;)m.shift().complete();f.complete()},function(O){for(;m.length>0;)m.shift().error(O);f.error(O)},function(){m=null}))})}e.windowCount=a}}),QP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/windowTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.windowTime=void 0;var t=ar(),n=Ur(),r=Oi(),i=be(),a=Qe(),s=Gs(),l=Yr(),c=Ks();function d(f){for(var m,p,O=[],b=1;b<arguments.length;b++)O[b-1]=arguments[b];var S=(m=l.popScheduler(O))!==null&&m!==void 0?m:n.asyncScheduler,w=(p=O[0])!==null&&p!==void 0?p:null,k=O[1]||1/0;return i.operate(function(j,T){var E=[],Q=!1,A=function(P){var V=P.window,Z=P.subs;V.complete(),Z.unsubscribe(),s.arrRemove(E,P),Q&&N()},N=function(){if(E){var P=new r.Subscription;T.add(P);var V=new t.Subject,Z={window:V,subs:P,seen:0};E.push(Z),T.next(V.asObservable()),c.executeSchedule(P,S,function(){return A(Z)},f)}};w!==null&&w>=0?c.executeSchedule(T,S,N,w,!0):Q=!0,N();var D=function(P){return E.slice().forEach(P)},q=function(P){D(function(V){var Z=V.window;return P(Z)}),P(T),T.unsubscribe()};return j.subscribe(a.createOperatorSubscriber(T,function(P){D(function(V){V.window.next(P),k<=++V.seen&&A(V)})},function(){return q(function(P){return P.complete()})},function(P){return q(function(V){return V.error(P)})})),function(){E=null}})}e.windowTime=d}}),PP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.windowToggle=void 0;var n=ar(),r=Oi(),i=be(),a=He(),s=Qe(),l=rr(),c=Gs();function d(f,m){return i.operate(function(p,O){var b=[],S=function(w){for(;0<b.length;)b.shift().error(w);O.error(w)};a.innerFrom(f).subscribe(s.createOperatorSubscriber(O,function(w){var k=new n.Subject;b.push(k);var j=new r.Subscription,T=function(){c.arrRemove(b,k),k.complete(),j.unsubscribe()},E;try{E=a.innerFrom(m(w))}catch(Q){S(Q);return}O.next(k.asObservable()),j.add(E.subscribe(s.createOperatorSubscriber(O,T,l.noop,S)))},l.noop)),p.subscribe(s.createOperatorSubscriber(O,function(w){var k,j,T=b.slice();try{for(var E=t(T),Q=E.next();!Q.done;Q=E.next()){var A=Q.value;A.next(w)}}catch(N){k={error:N}}finally{try{Q&&!Q.done&&(j=E.return)&&j.call(E)}finally{if(k)throw k.error}}},function(){for(;0<b.length;)b.shift().complete();O.complete()},S,function(){for(;0<b.length;)b.shift().unsubscribe()}))})}e.windowToggle=d}}),NP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.windowWhen=void 0;var t=ar(),n=be(),r=Qe(),i=He();function a(s){return n.operate(function(l,c){var d,f,m=function(O){d.error(O),c.error(O)},p=function(){f==null||f.unsubscribe(),d==null||d.complete(),d=new t.Subject,c.next(d.asObservable());var O;try{O=i.innerFrom(s())}catch(b){m(b);return}O.subscribe(f=r.createOperatorSubscriber(c,p,p,m))};p(),l.subscribe(r.createOperatorSubscriber(c,function(O){return d.next(O)},function(){d.complete(),c.complete()},m,function(){f==null||f.unsubscribe(),d=null}))})}e.windowWhen=a}}),RP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,S=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)S.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return S},n=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.withLatestFrom=void 0;var r=be(),i=Qe(),a=He(),s=ir(),l=rr(),c=Yr();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f);return r.operate(function(O,b){for(var S=f.length,w=new Array(S),k=f.map(function(){return!1}),j=!1,T=function(Q){a.innerFrom(f[Q]).subscribe(i.createOperatorSubscriber(b,function(A){w[Q]=A,!j&&!k[Q]&&(k[Q]=!0,(j=k.every(s.identity))&&(k=null))},l.noop))},E=0;E<S;E++)T(E);O.subscribe(i.createOperatorSubscriber(b,function(Q){if(j){var A=n([Q],t(w));b.next(p?p.apply(void 0,n([],t(A))):A)}}))})}e.withLatestFrom=d}}),MP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/zipAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.zipAll=void 0;var t=dS(),n=bQ();function r(i){return n.joinAllInternals(t.zip,i)}e.zipAll=r}}),LP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/zip.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.zip=void 0;var r=dS(),i=be();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return i.operate(function(c,d){r.zip.apply(void 0,n([c],t(s))).subscribe(d)})}e.zip=a}}),DP=U({"../../node_modules/rxjs/dist/cjs/internal/operators/zipWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.zipWith=void 0;var r=LP();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.zip.apply(void 0,n([],t(a)))}e.zipWith=i}}),iZ=U({"../../node_modules/rxjs/dist/cjs/index.js"(e){var t=e&&e.__createBinding||(Object.create?(function(wa,ss,ji,ka){ka===void 0&&(ka=ji),Object.defineProperty(wa,ka,{enumerable:!0,get:function(){return ss[ji]}})}):(function(wa,ss,ji,ka){ka===void 0&&(ka=ji),wa[ka]=ss[ji]})),n=e&&e.__exportStar||function(wa,ss){for(var ji in wa)ji!=="default"&&!Object.prototype.hasOwnProperty.call(ss,ji)&&t(ss,wa,ji)};Object.defineProperty(e,"__esModule",{value:!0}),e.interval=e.iif=e.generate=e.fromEventPattern=e.fromEvent=e.from=e.forkJoin=e.empty=e.defer=e.connectable=e.concat=e.combineLatest=e.bindNodeCallback=e.bindCallback=e.UnsubscriptionError=e.TimeoutError=e.SequenceError=e.ObjectUnsubscribedError=e.NotFoundError=e.EmptyError=e.ArgumentOutOfRangeError=e.firstValueFrom=e.lastValueFrom=e.isObservable=e.identity=e.noop=e.pipe=e.NotificationKind=e.Notification=e.Subscriber=e.Subscription=e.Scheduler=e.VirtualAction=e.VirtualTimeScheduler=e.animationFrameScheduler=e.animationFrame=e.queueScheduler=e.queue=e.asyncScheduler=e.async=e.asapScheduler=e.asap=e.AsyncSubject=e.ReplaySubject=e.BehaviorSubject=e.Subject=e.animationFrames=e.observable=e.ConnectableObservable=e.Observable=void 0,e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.combineLatestWith=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=e.config=e.NEVER=e.EMPTY=e.scheduled=e.zip=e.using=e.timer=e.throwError=e.range=e.race=e.partition=e.pairs=e.onErrorResumeNext=e.of=e.never=e.merge=void 0,e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.pairwise=e.onErrorResumeNextWith=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=e.mergeAll=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=void 0,e.zipWith=e.zipAll=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=void 0;var r=Zt();Object.defineProperty(e,"Observable",{enumerable:!0,get:function(){return r.Observable}});var i=Ep();Object.defineProperty(e,"ConnectableObservable",{enumerable:!0,get:function(){return i.ConnectableObservable}});var a=Tp();Object.defineProperty(e,"observable",{enumerable:!0,get:function(){return a.observable}});var s=SX();Object.defineProperty(e,"animationFrames",{enumerable:!0,get:function(){return s.animationFrames}});var l=ar();Object.defineProperty(e,"Subject",{enumerable:!0,get:function(){return l.Subject}});var c=BA();Object.defineProperty(e,"BehaviorSubject",{enumerable:!0,get:function(){return c.BehaviorSubject}});var d=nS();Object.defineProperty(e,"ReplaySubject",{enumerable:!0,get:function(){return d.ReplaySubject}});var f=rS();Object.defineProperty(e,"AsyncSubject",{enumerable:!0,get:function(){return f.AsyncSubject}});var m=CX();Object.defineProperty(e,"asap",{enumerable:!0,get:function(){return m.asap}}),Object.defineProperty(e,"asapScheduler",{enumerable:!0,get:function(){return m.asapScheduler}});var p=Ur();Object.defineProperty(e,"async",{enumerable:!0,get:function(){return p.async}}),Object.defineProperty(e,"asyncScheduler",{enumerable:!0,get:function(){return p.asyncScheduler}});var O=QX();Object.defineProperty(e,"queue",{enumerable:!0,get:function(){return O.queue}}),Object.defineProperty(e,"queueScheduler",{enumerable:!0,get:function(){return O.queueScheduler}});var b=RX();Object.defineProperty(e,"animationFrame",{enumerable:!0,get:function(){return b.animationFrame}}),Object.defineProperty(e,"animationFrameScheduler",{enumerable:!0,get:function(){return b.animationFrameScheduler}});var S=MX();Object.defineProperty(e,"VirtualTimeScheduler",{enumerable:!0,get:function(){return S.VirtualTimeScheduler}}),Object.defineProperty(e,"VirtualAction",{enumerable:!0,get:function(){return S.VirtualAction}});var w=VA();Object.defineProperty(e,"Scheduler",{enumerable:!0,get:function(){return w.Scheduler}});var k=Oi();Object.defineProperty(e,"Subscription",{enumerable:!0,get:function(){return k.Subscription}});var j=tf();Object.defineProperty(e,"Subscriber",{enumerable:!0,get:function(){return j.Subscriber}});var T=oS();Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return T.Notification}}),Object.defineProperty(e,"NotificationKind",{enumerable:!0,get:function(){return T.NotificationKind}});var E=Cp();Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return E.pipe}});var Q=rr();Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return Q.noop}});var A=ir();Object.defineProperty(e,"identity",{enumerable:!0,get:function(){return A.identity}});var N=IX();Object.defineProperty(e,"isObservable",{enumerable:!0,get:function(){return N.isObservable}});var D=XX();Object.defineProperty(e,"lastValueFrom",{enumerable:!0,get:function(){return D.lastValueFrom}});var q=ZX();Object.defineProperty(e,"firstValueFrom",{enumerable:!0,get:function(){return q.firstValueFrom}});var P=tQ();Object.defineProperty(e,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return P.ArgumentOutOfRangeError}});var V=Ho();Object.defineProperty(e,"EmptyError",{enumerable:!0,get:function(){return V.EmptyError}});var Z=nQ();Object.defineProperty(e,"NotFoundError",{enumerable:!0,get:function(){return Z.NotFoundError}});var Y=ZA();Object.defineProperty(e,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return Y.ObjectUnsubscribedError}});var X=rQ();Object.defineProperty(e,"SequenceError",{enumerable:!0,get:function(){return X.SequenceError}});var H=Fm();Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return H.TimeoutError}});var I=zA();Object.defineProperty(e,"UnsubscriptionError",{enumerable:!0,get:function(){return I.UnsubscriptionError}});var L=BX();Object.defineProperty(e,"bindCallback",{enumerable:!0,get:function(){return L.bindCallback}});var $=VX();Object.defineProperty(e,"bindNodeCallback",{enumerable:!0,get:function(){return $.bindNodeCallback}});var ne=cS();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return ne.combineLatest}});var z=Pp();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return z.concat}});var G=UX();Object.defineProperty(e,"connectable",{enumerable:!0,get:function(){return G.connectable}});var re=Np();Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return re.defer}});var R=ha();Object.defineProperty(e,"empty",{enumerable:!0,get:function(){return R.empty}});var me=YX();Object.defineProperty(e,"forkJoin",{enumerable:!0,get:function(){return me.forkJoin}});var Se=Js();Object.defineProperty(e,"from",{enumerable:!0,get:function(){return Se.from}});var ve=FX();Object.defineProperty(e,"fromEvent",{enumerable:!0,get:function(){return ve.fromEvent}});var Xe=$X();Object.defineProperty(e,"fromEventPattern",{enumerable:!0,get:function(){return Xe.fromEventPattern}});var qe=WX();Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return qe.generate}});var Pe=HX();Object.defineProperty(e,"iif",{enumerable:!0,get:function(){return Pe.iif}});var Oe=oQ();Object.defineProperty(e,"interval",{enumerable:!0,get:function(){return Oe.interval}});var Ve=GX();Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return Ve.merge}});var we=X1();Object.defineProperty(e,"never",{enumerable:!0,get:function(){return we.never}});var Ze=sS();Object.defineProperty(e,"of",{enumerable:!0,get:function(){return Ze.of}});var Fe=lQ();Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return Fe.onErrorResumeNext}});var ft=KX();Object.defineProperty(e,"pairs",{enumerable:!0,get:function(){return ft.pairs}});var Rt=JX();Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return Rt.partition}});var mn=uQ();Object.defineProperty(e,"race",{enumerable:!0,get:function(){return mn.race}});var ke=eZ();Object.defineProperty(e,"range",{enumerable:!0,get:function(){return ke.range}});var de=eQ();Object.defineProperty(e,"throwError",{enumerable:!0,get:function(){return de.throwError}});var Ue=Ko();Object.defineProperty(e,"timer",{enumerable:!0,get:function(){return Ue.timer}});var ht=tZ();Object.defineProperty(e,"using",{enumerable:!0,get:function(){return ht.using}});var Tt=dS();Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return Tt.zip}});var Ot=JA();Object.defineProperty(e,"scheduled",{enumerable:!0,get:function(){return Ot.scheduled}});var bt=ha();Object.defineProperty(e,"EMPTY",{enumerable:!0,get:function(){return bt.EMPTY}});var Si=X1();Object.defineProperty(e,"NEVER",{enumerable:!0,get:function(){return Si.NEVER}}),n(nZ(),e);var ae=ef();Object.defineProperty(e,"config",{enumerable:!0,get:function(){return ae.config}});var fe=fS();Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return fe.audit}});var je=dQ();Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return je.auditTime}});var Be=fQ();Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return Be.buffer}});var Je=hQ();Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return Je.bufferCount}});var Ct=mQ();Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return Ct.bufferTime}});var un=pQ();Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return un.bufferToggle}});var Ht=gQ();Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return Ht.bufferWhen}});var Mt=vQ();Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return Mt.catchError}});var Gt=yQ();Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return Gt.combineAll}});var rt=mS();Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return rt.combineLatestAll}});var Wn=xQ();Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return Wn.combineLatestWith}});var pn=Qp();Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return pn.concatAll}});var ba=pS();Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return ba.concatMap}});var $r=_Q();Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return $r.concatMapTo}});var Wr=kQ();Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return Wr.concatWith}});var Lt=Rp();Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return Lt.connect}});var Dt=jQ();Object.defineProperty(e,"count",{enumerable:!0,get:function(){return Dt.count}});var Kt=TQ();Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return Kt.debounce}});var gn=CQ();Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return gn.debounceTime}});var vn=lf();Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return vn.defaultIfEmpty}});var rn=EQ();Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return rn.delay}});var On=OS();Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return On.delayWhen}});var Pn=AQ();Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return Pn.dematerialize}});var Yt=QQ();Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return Yt.distinct}});var Nn=bS();Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return Nn.distinctUntilChanged}});var bn=PQ();Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return bn.distinctUntilKeyChanged}});var Rn=NQ();Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return Rn.elementAt}});var yn=RQ();Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return yn.endWith}});var or=MQ();Object.defineProperty(e,"every",{enumerable:!0,get:function(){return or.every}});var Xn=LQ();Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return Xn.exhaust}});var lr=SS();Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return lr.exhaustAll}});var Mn=yS();Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return Mn.exhaustMap}});var tn=DQ();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return tn.expand}});var Sn=to();Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return Sn.filter}});var Hr=zQ();Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return Hr.finalize}});var ya=xS();Object.defineProperty(e,"find",{enumerable:!0,get:function(){return ya.find}});var Re=qQ();Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return Re.findIndex}});var it=IQ();Object.defineProperty(e,"first",{enumerable:!0,get:function(){return it.first}});var cr=XQ();Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return cr.groupBy}});var Hn=gS();Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return Hn.ignoreElements}});var Sa=ZQ();Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return Sa.isEmpty}});var Gr=BQ();Object.defineProperty(e,"last",{enumerable:!0,get:function(){return Gr.last}});var Bi=eo();Object.defineProperty(e,"map",{enumerable:!0,get:function(){return Bi.map}});var xa=vS();Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return xa.mapTo}});var Vi=VQ();Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Vi.materialize}});var an=UQ();Object.defineProperty(e,"max",{enumerable:!0,get:function(){return an.max}});var al=of();Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return al.mergeAll}});var sl=YQ();Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return sl.flatMap}});var xi=Ja();Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return xi.mergeMap}});var Ui=FQ();Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return Ui.mergeMapTo}});var Zc=$Q();Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return Zc.mergeScan}});var jf=HQ();Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return jf.mergeWith}});var Tf=GQ();Object.defineProperty(e,"min",{enumerable:!0,get:function(){return Tf.min}});var cg=Mp();Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return cg.multicast}});var ol=af();Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return ol.observeOn}});var ll=KQ();Object.defineProperty(e,"onErrorResumeNextWith",{enumerable:!0,get:function(){return ll.onErrorResumeNextWith}});var _i=JQ();Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return _i.pairwise}});var vr=eP();Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return vr.pluck}});var Cf=tP();Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return Cf.publish}});var ug=nP();Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return ug.publishBehavior}});var Bc=rP();Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return Bc.publishLast}});var Ef=iP();Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return Ef.publishReplay}});var cl=wS();Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return cl.raceWith}});var dg=Pc();Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return dg.reduce}});var Or=aP();Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return Or.repeat}});var Vc=sP();Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return Vc.repeatWhen}});var Af=oP();Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return Af.retry}});var Uc=lP();Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return Uc.retryWhen}});var ns=eS();Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return ns.refCount}});var Qf=kS();Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return Qf.sample}});var Pf=cP();Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return Pf.sampleTime}});var rs=uP();Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return rs.scan}});var fg=dP();Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return fg.sequenceEqual}});var Nf=jS();Object.defineProperty(e,"share",{enumerable:!0,get:function(){return Nf.share}});var Rf=fP();Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return Rf.shareReplay}});var Yc=hP();Object.defineProperty(e,"single",{enumerable:!0,get:function(){return Yc.single}});var hg=mP();Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return hg.skip}});var mg=pP();Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return mg.skipLast}});var ul=gP();Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return ul.skipUntil}});var wi=vP();Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return wi.skipWhile}});var Fc=OP();Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return Fc.startWith}});var $c=sf();Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return $c.subscribeOn}});var is=bP();Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return is.switchAll}});var as=df();Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return as.switchMap}});var Mf=yP();Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return Mf.switchMapTo}});var Wc=SP();Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return Wc.switchScan}});var Lf=cf();Object.defineProperty(e,"take",{enumerable:!0,get:function(){return Lf.take}});var io=_S();Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return io.takeLast}});var ki=xP();Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return ki.takeUntil}});var Hc=_P();Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return Hc.takeWhile}});var ao=wP();Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return ao.tap}});var Yi=TS();Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return Yi.throttle}});var Gc=kP();Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return Gc.throttleTime}});var dl=uf();Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return dl.throwIfEmpty}});var Df=jP();Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return Df.timeInterval}});var fl=Fm();Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return fl.timeout}});var hl=TP();Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return hl.timeoutWith}});var zf=CP();Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return zf.timestamp}});var Gn=hS();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return Gn.toArray}});var _a=EP();Object.defineProperty(e,"window",{enumerable:!0,get:function(){return _a.window}});var ml=AP();Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return ml.windowCount}});var so=QP();Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return so.windowTime}});var pg=PP();Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return pg.windowToggle}});var Kc=NP();Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return Kc.windowWhen}});var Jc=RP();Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return Jc.withLatestFrom}});var oo=MP();Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return oo.zipAll}});var pl=DP();Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return pl.zipWith}})}}),aZ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/partition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.partition=void 0;var t=cQ(),n=to();function r(i,a){return function(s){return[n.filter(i,a)(s),n.filter(t.not(i,a))(s)]}}e.partition=r}}),sZ=U({"../../node_modules/rxjs/dist/cjs/internal/operators/race.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.race=void 0;var r=Qc(),i=wS();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return i.raceWith.apply(void 0,n([],t(r.argsOrArgArray(s))))}e.race=a}}),CS=U({"../../node_modules/rxjs/dist/cjs/operators/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=e.merge=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.concat=e.combineLatestWith=e.combineLatest=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=void 0,e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.race=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.partition=e.pairwise=e.onErrorResumeNext=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=void 0,e.zipWith=e.zipAll=e.zip=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=void 0;var t=fS();Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return t.audit}});var n=dQ();Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return n.auditTime}});var r=fQ();Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return r.buffer}});var i=hQ();Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return i.bufferCount}});var a=mQ();Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var s=pQ();Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return s.bufferToggle}});var l=gQ();Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return l.bufferWhen}});var c=vQ();Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return c.catchError}});var d=yQ();Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return d.combineAll}});var f=mS();Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return f.combineLatestAll}});var m=SQ();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return m.combineLatest}});var p=xQ();Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var O=wQ();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return O.concat}});var b=Qp();Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return b.concatAll}});var S=pS();Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return S.concatMap}});var w=_Q();Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return w.concatMapTo}});var k=kQ();Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return k.concatWith}});var j=Rp();Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return j.connect}});var T=jQ();Object.defineProperty(e,"count",{enumerable:!0,get:function(){return T.count}});var E=TQ();Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return E.debounce}});var Q=CQ();Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return Q.debounceTime}});var A=lf();Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return A.defaultIfEmpty}});var N=EQ();Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return N.delay}});var D=OS();Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return D.delayWhen}});var q=AQ();Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return q.dematerialize}});var P=QQ();Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return P.distinct}});var V=bS();Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return V.distinctUntilChanged}});var Z=PQ();Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Z.distinctUntilKeyChanged}});var Y=NQ();Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return Y.elementAt}});var X=RQ();Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return X.endWith}});var H=MQ();Object.defineProperty(e,"every",{enumerable:!0,get:function(){return H.every}});var I=LQ();Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return I.exhaust}});var L=SS();Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return L.exhaustAll}});var $=yS();Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return $.exhaustMap}});var ne=DQ();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return ne.expand}});var z=to();Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return z.filter}});var G=zQ();Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return G.finalize}});var re=xS();Object.defineProperty(e,"find",{enumerable:!0,get:function(){return re.find}});var R=qQ();Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return R.findIndex}});var me=IQ();Object.defineProperty(e,"first",{enumerable:!0,get:function(){return me.first}});var Se=XQ();Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return Se.groupBy}});var ve=gS();Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return ve.ignoreElements}});var Xe=ZQ();Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return Xe.isEmpty}});var qe=BQ();Object.defineProperty(e,"last",{enumerable:!0,get:function(){return qe.last}});var Pe=eo();Object.defineProperty(e,"map",{enumerable:!0,get:function(){return Pe.map}});var Oe=vS();Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return Oe.mapTo}});var Ve=VQ();Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Ve.materialize}});var we=UQ();Object.defineProperty(e,"max",{enumerable:!0,get:function(){return we.max}});var Ze=WQ();Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return Ze.merge}});var Fe=of();Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return Fe.mergeAll}});var ft=YQ();Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return ft.flatMap}});var Rt=Ja();Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return Rt.mergeMap}});var mn=FQ();Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return mn.mergeMapTo}});var ke=$Q();Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return ke.mergeScan}});var de=HQ();Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return de.mergeWith}});var Ue=GQ();Object.defineProperty(e,"min",{enumerable:!0,get:function(){return Ue.min}});var ht=Mp();Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return ht.multicast}});var Tt=af();Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return Tt.observeOn}});var Ot=KQ();Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return Ot.onErrorResumeNext}});var bt=JQ();Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return bt.pairwise}});var Si=aZ();Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return Si.partition}});var ae=eP();Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return ae.pluck}});var fe=tP();Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return fe.publish}});var je=nP();Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return je.publishBehavior}});var Be=rP();Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return Be.publishLast}});var Je=iP();Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return Je.publishReplay}});var Ct=sZ();Object.defineProperty(e,"race",{enumerable:!0,get:function(){return Ct.race}});var un=wS();Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return un.raceWith}});var Ht=Pc();Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return Ht.reduce}});var Mt=aP();Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return Mt.repeat}});var Gt=sP();Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return Gt.repeatWhen}});var rt=oP();Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return rt.retry}});var Wn=lP();Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return Wn.retryWhen}});var pn=eS();Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return pn.refCount}});var ba=kS();Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return ba.sample}});var $r=cP();Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return $r.sampleTime}});var Wr=uP();Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return Wr.scan}});var Lt=dP();Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return Lt.sequenceEqual}});var Dt=jS();Object.defineProperty(e,"share",{enumerable:!0,get:function(){return Dt.share}});var Kt=fP();Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return Kt.shareReplay}});var gn=hP();Object.defineProperty(e,"single",{enumerable:!0,get:function(){return gn.single}});var vn=mP();Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return vn.skip}});var rn=pP();Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return rn.skipLast}});var On=gP();Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return On.skipUntil}});var Pn=vP();Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return Pn.skipWhile}});var Yt=OP();Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return Yt.startWith}});var Nn=sf();Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return Nn.subscribeOn}});var bn=bP();Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return bn.switchAll}});var Rn=df();Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return Rn.switchMap}});var yn=yP();Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return yn.switchMapTo}});var or=SP();Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return or.switchScan}});var Xn=cf();Object.defineProperty(e,"take",{enumerable:!0,get:function(){return Xn.take}});var lr=_S();Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return lr.takeLast}});var Mn=xP();Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return Mn.takeUntil}});var tn=_P();Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return tn.takeWhile}});var Sn=wP();Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return Sn.tap}});var Hr=TS();Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return Hr.throttle}});var ya=kP();Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return ya.throttleTime}});var Re=uf();Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return Re.throwIfEmpty}});var it=jP();Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return it.timeInterval}});var cr=Fm();Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return cr.timeout}});var Hn=TP();Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return Hn.timeoutWith}});var Sa=CP();Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return Sa.timestamp}});var Gr=hS();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return Gr.toArray}});var Bi=EP();Object.defineProperty(e,"window",{enumerable:!0,get:function(){return Bi.window}});var xa=AP();Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return xa.windowCount}});var Vi=QP();Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return Vi.windowTime}});var an=PP();Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return an.windowToggle}});var al=NP();Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return al.windowWhen}});var sl=RP();Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return sl.withLatestFrom}});var xi=LP();Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return xi.zip}});var Ui=MP();Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return Ui.zipAll}});var Zc=DP();Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return Zc.zipWith}})}}),oZ=U({"../../node_modules/inline-style-parser/cjs/index.js"(e,t){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
|
|
41
|
+
`,m="/",p="*",O="",b="comment",S="declaration";function w(j,T){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];T=T||{};var E=1,Q=1;function A(I){var L=I.match(r);L&&(E+=L.length);var $=I.lastIndexOf(f);Q=~$?I.length-$:Q+I.length}function N(){var I={line:E,column:Q};return function(L){return L.position=new D(I),V(),L}}function D(I){this.start=I,this.end={line:E,column:Q},this.source=T.source}D.prototype.content=j;function q(I){var L=new Error(T.source+":"+E+":"+Q+": "+I);if(L.reason=I,L.filename=T.source,L.line=E,L.column=Q,L.source=j,!T.silent)throw L}function P(I){var L=I.exec(j);if(L){var $=L[0];return A($),j=j.slice($.length),L}}function V(){P(i)}function Z(I){var L;for(I=I||[];L=Y();)L!==!1&&I.push(L);return I}function Y(){var I=N();if(!(m!=j.charAt(0)||p!=j.charAt(1))){for(var L=2;O!=j.charAt(L)&&(p!=j.charAt(L)||m!=j.charAt(L+1));)++L;if(L+=2,O===j.charAt(L-1))return q("End of comment missing");var $=j.slice(2,L-2);return Q+=2,A($),j=j.slice(L),Q+=2,I({type:b,comment:$})}}function X(){var I=N(),L=P(a);if(L){if(Y(),!P(s))return q("property missing ':'");var $=P(l),ne=I({type:S,property:k(L[0].replace(n,O)),value:$?k($[0].replace(n,O)):O});return P(c),ne}}function H(){var I=[];Z(I);for(var L;L=X();)L!==!1&&(I.push(L),Z(I));return I}return V(),H()}function k(j){return j?j.replace(d,O):O}t.exports=w}}),lZ=U({"../../node_modules/style-to-object/cjs/index.js"(e){var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(oZ());function r(i,a){let s=null;if(!i||typeof i!="string")return s;const l=(0,n.default)(i),c=typeof a=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:m}=d;c?a(f,m,d):m&&(s=s||{},s[f]=m)}),s}}}),cZ=U({"../../node_modules/style-to-js/cjs/utilities.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(f){return!f||r.test(f)||t.test(f)},l=function(f,m){return m.toUpperCase()},c=function(f,m){return"".concat(m,"-")},d=function(f,m){return m===void 0&&(m={}),s(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(a,c):f=f.replace(i,c),f.replace(n,l))};e.camelCase=d}}),uZ=U({"../../node_modules/style-to-js/cjs/index.js"(e,t){var n=e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=n(lZ()),i=cZ();function a(s,l){var c={};return!s||typeof s!="string"||(0,r.default)(s,function(d,f){d&&f&&(c[(0,i.camelCase)(d,l)]=f)}),c}a.default=a,t.exports=a}}),dZ=U({"../../node_modules/extend/index.js"(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):r.call(m)==="[object Array]"},l=function(m){if(!m||r.call(m)!=="[object Object]")return!1;var p=n.call(m,"constructor"),O=m.constructor&&m.constructor.prototype&&n.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!p&&!O)return!1;var b;for(b in m);return typeof b>"u"||n.call(m,b)},c=function(m,p){i&&p.name==="__proto__"?i(m,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):m[p.name]=p.newValue},d=function(m,p){if(p==="__proto__")if(n.call(m,p)){if(a)return a(m,p).value}else return;return m[p]};t.exports=function f(){var m,p,O,b,S,w,k=arguments[0],j=1,T=arguments.length,E=!1;for(typeof k=="boolean"&&(E=k,k=arguments[1]||{},j=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});j<T;++j)if(m=arguments[j],m!=null)for(p in m)O=d(k,p),b=d(m,p),k!==b&&(E&&b&&(l(b)||(S=s(b)))?(S?(S=!1,w=O&&s(O)?O:[]):w=O&&l(O)?O:{},c(k,{name:p,newValue:f(E,w,b)})):typeof b<"u"&&c(k,{name:p,newValue:b}));return k}}}),tr={highlight:{motivation:"highlighting",internalType:"highlight",displayName:"Highlight",description:"Mark text for attention",className:"annotation-highlight",iconEmoji:"🟡",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>Tc(e),announceOnCreate:"Highlight created",create:{bodyBuilder:"empty",refetchAfter:!1},detection:{sseMethod:"detectHighlights",countField:"createdCount",displayNamePlural:"highlights",displayNameSingular:"highlight",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},comment:{motivation:"commenting",internalType:"comment",displayName:"Comment",description:"Add a comment about the text",className:"annotation-comment",iconEmoji:"💬",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>$o(e),announceOnCreate:"Comment created",create:{bodyBuilder:"text",refetchAfter:!1},detection:{sseMethod:"detectComments",countField:"createdCount",displayNamePlural:"comments",displayNameSingular:"comment",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[1]=="string"&&e[1]&&t.push({label:"Tone",value:e[1]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},assessment:{motivation:"assessing",internalType:"assessment",displayName:"Assessment",description:"Provide evaluation or assessment",className:"annotation-assessment",iconEmoji:"🔴",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>e.motivation==="assessing",announceOnCreate:"Assessment created",create:{bodyBuilder:"text",refetchAfter:!1},detection:{sseMethod:"detectAssessments",countField:"createdCount",displayNamePlural:"assessments",displayNameSingular:"assessment",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[1]=="string"&&e[1]&&t.push({label:"Tone",value:e[1]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},reference:{motivation:"linking",internalType:"reference",displayName:"Reference",description:"Link to another resource",className:"annotation-reference",iconEmoji:"🔵",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>Ii(e),announceOnCreate:"Reference created",create:{bodyBuilder:"entityTag",refetchAfter:!0},detection:{sseMethod:"detectReferences",countField:"foundCount",displayNamePlural:"entity references",displayNameSingular:"entity reference",formatRequestParams:e=>{const t=[],n=e[0];return Array.isArray(n)&&n.length>0&&t.push({label:"Entity Types",value:n.join(", ")}),e[1]===!0&&t.push({label:"Include Descriptive References",value:"Yes"}),t}}},tag:{motivation:"tagging",internalType:"tag",displayName:"Tag",description:"Structural role annotation",className:"annotation-tag",iconEmoji:"🏷️",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>Cc(e),announceOnCreate:"Tag created",create:{bodyBuilder:"dualTag",refetchAfter:!1,successMessage:'Tag "{value}" created'},detection:{sseMethod:"detectTags",countField:"tagsCreated",displayNamePlural:"tags",displayNameSingular:"tag",formatRequestParams:e=>{const t=[];if(typeof e[0]=="string"&&e[0]){const r={"legal-irac":"Legal (IRAC)","scientific-imrad":"Scientific (IMRAD)","argument-toulmin":"Argument (Toulmin)"};t.push({label:"Schema",value:r[e[0]]||e[0]})}const n=e[1];return Array.isArray(n)&&n.length>0&&t.push({label:"Categories",value:n.join(", ")}),t}}}},xt={users:{me:()=>["users","me"]},health:()=>["health"],status:()=>["status"],resources:{all:(e,t)=>["resources",{limit:e,archived:t}],detail:e=>["resources",e],byToken:e=>["resources","by-token",e],events:e=>["resources",e,"events"],annotations:e=>["resources",e,"annotations"],referencedBy:e=>["resources",e,"referenced-by"],representation:e=>["resources",e,"representation"],mediaToken:e=>["resources",e,"media-token"]},annotations:{detail:e=>["annotations",e],history:(e,t)=>["annotations",e,t,"history"]},entityTypes:{all:()=>["entity-types"]},admin:{users:{all:()=>["admin","users"],stats:()=>["admin","users","stats"]},oauth:{config:()=>["admin","oauth","config"]}}};function ut(e){return e?e:void 0}function Lp(){const e=In(),t=Wt(),n=gt();return{list:{useQuery:r=>Dn({queryKey:xt.resources.all(r==null?void 0:r.limit,r==null?void 0:r.archived),queryFn:()=>e.browseResources(r==null?void 0:r.limit,r==null?void 0:r.archived,r!=null&&r.query?r.query:void 0,{auth:ut(t)}),enabled:!!e})},get:{useQuery:(r,i)=>Dn({queryKey:xt.resources.detail(r),queryFn:()=>e.browseResource(r,{auth:ut(t)}),enabled:!!e&&!!r,...i})},events:{useQuery:r=>Dn({queryKey:xt.resources.events(r),queryFn:()=>e.getResourceEvents(r,{auth:ut(t)}),enabled:!!e&&!!r})},annotations:{useQuery:r=>Dn({queryKey:xt.resources.annotations(r),queryFn:()=>e.browseAnnotations(r,void 0,{auth:ut(t)}),enabled:!!e&&!!r})},referencedBy:{useQuery:r=>Dn({queryKey:xt.resources.referencedBy(r),queryFn:()=>e.browseReferences(r,{auth:ut(t)}),enabled:!!e&&!!r})},representation:{useQuery:(r,i)=>Dn({queryKey:xt.resources.representation(r),queryFn:async()=>{const{data:a}=await e.getResourceRepresentation(r,{accept:i,auth:ut(t)});return zI(a,i)},enabled:!!e&&!!r&&!!i})},mediaToken:{useQuery:r=>Dn({queryKey:xt.resources.mediaToken(r),queryFn:()=>e.getMediaToken(r,{auth:ut(t)}),enabled:!!e&&!!r,staleTime:240*1e3})},create:{useMutation:()=>{const r=Wt();return Yn({mutationFn:i=>{if(!e)throw new Error("Not authenticated - please sign in to create resources");return e.yieldResource(i,{auth:ut(r)})},onSuccess:i=>{e.browse.invalidateResourceDetail(pi(i.resourceId)),e.browse.invalidateResourceLists()}})}},update:{useMutation:()=>{const r=Wt();return Yn({mutationFn:({id:i,data:a})=>{if(!e)throw new Error("Not authenticated");return e.updateResource(i,a,{auth:ut(r)})},onSuccess:(i,a)=>{n.get("yield:update-ok").next({resourceId:a.id})}})}},generateCloneToken:{useMutation:()=>{const r=Wt();return Yn({mutationFn:i=>{if(!e)throw new Error("Not authenticated");return e.generateCloneToken(i,{auth:ut(r)})}})}},getByToken:{useQuery:r=>{const i=Wt();return Dn({queryKey:["resources","token",r],queryFn:()=>e.getResourceByToken(r,{auth:ut(i)}),enabled:!!e&&!!r})}},createFromToken:{useMutation:()=>{const r=Wt();return Yn({mutationFn:i=>{if(!e)throw new Error("Not authenticated");return e.createResourceFromToken(i,{auth:ut(r)})},onSuccess:i=>{e.browse.invalidateResourceDetail(pi(i.resourceId)),e.browse.invalidateResourceLists()}})}}}}function fZ(){const e=In(),t=kc(),n=Wt();return{get:{useQuery:r=>Dn({queryKey:["annotations",r],queryFn:()=>e.getAnnotation(r,{auth:ut(n)}),enabled:!!e&&!!r})},browseAnnotation:{useQuery:(r,i)=>Dn({queryKey:["annotations",r,i],queryFn:()=>e.browseAnnotation(r,i,{auth:ut(n)}),enabled:!!e&&!!r&&!!i})},history:{useQuery:(r,i)=>Dn({queryKey:xt.annotations.history(r,i),queryFn:()=>e.getAnnotationHistory(r,i,{auth:ut(n)}),enabled:!!e&&!!r&&!!i})},create:{useMutation:()=>{const r=Wt();return Yn({mutationFn:({resourceId:i,data:a})=>{if(!e)throw new Error("Not authenticated");return e.markAnnotation(i,a,{auth:ut(r)})},onSuccess:(i,a)=>{e.browse.invalidateAnnotationDetail(mr(i.annotationId)),t.invalidateQueries({queryKey:xt.resources.events(a.resourceId)})}})}},delete:{useMutation:()=>{const r=Wt();return Yn({mutationFn:i=>{if(!e)throw new Error("Not authenticated");return e.deleteAnnotation(i.resourceId,i.annotationId,{auth:ut(r)})},onSuccess:(i,a)=>{e.browse.invalidateAnnotationDetail(a.annotationId),t.invalidateQueries({queryKey:xt.resources.events(a.resourceId)})}})}},updateBody:{useMutation:()=>{const r=Wt();return Yn({mutationFn:({resourceId:i,annotationId:a,data:s})=>{if(!e)throw new Error("Not authenticated");return e.bindAnnotation(i,a,s,{auth:ut(r)})},onSuccess:(i,a)=>{if(e.browse.invalidateAnnotationDetail(a.annotationId),t.invalidateQueries({queryKey:xt.resources.events(a.resourceId)}),a.data.operations){for(const s of a.data.operations)if(s.op==="add"&&s.item&&typeof s.item=="object"&&"type"in s.item&&s.item.type==="SpecificResource"&&"source"in s.item&&s.item.source){const l=s.item.source;t.invalidateQueries({queryKey:xt.resources.referencedBy(l)})}}}})}}}}function hZ(){const e=In(),t=kc(),n=Wt();return{list:{useQuery:r=>Dn({queryKey:xt.entityTypes.all(),queryFn:()=>e.listEntityTypes({auth:ut(n)}),enabled:!!e,...r})},add:{useMutation:()=>{const r=Wt();return Yn({mutationFn:i=>{if(!e)throw new Error("Not authenticated");return e.addEntityType(i,{auth:ut(r)})},onSuccess:()=>{t.invalidateQueries({queryKey:xt.entityTypes.all()})}})}},addBulk:{useMutation:()=>{const r=Wt();return Yn({mutationFn:i=>{if(!e)throw new Error("Not authenticated");return e.addEntityTypesBulk(i.map(Zq),{auth:ut(r)})},onSuccess:()=>{t.invalidateQueries({queryKey:xt.entityTypes.all()})}})}}}}function vre(){const e=In(),t=kc(),n=Wt();return{users:{list:{useQuery:()=>Dn({queryKey:xt.admin.users.all(),queryFn:()=>e.listUsers({auth:ut(n)}),enabled:!!e})},stats:{useQuery:()=>Dn({queryKey:xt.admin.users.stats(),queryFn:()=>e.getUserStats({auth:ut(n)}),enabled:!!e})},update:{useMutation:()=>{const r=Wt();return Yn({mutationFn:({id:i,data:a})=>{if(!e)throw new Error("Not authenticated");return e.updateUser(i,a,{auth:ut(r)})},onSuccess:()=>{t.invalidateQueries({queryKey:xt.admin.users.all()}),t.invalidateQueries({queryKey:xt.admin.users.stats()})}})}}},oauth:{config:{useQuery:()=>Dn({queryKey:xt.admin.oauth.config(),queryFn:()=>e.getOAuthConfig({auth:ut(n)}),enabled:!!e})}},exchange:{backup:{useMutation:()=>Yn({mutationFn:async()=>{var d;if(!e)throw new Error("Not authenticated");const r=await e.backupKnowledgeBase({auth:ut(n)});if(!r.ok)throw new Error(`Backup failed: ${r.status} ${r.statusText}`);const i=await r.blob(),a=r.headers.get("Content-Disposition"),s=((d=a==null?void 0:a.match(/filename="(.+?)"/))==null?void 0:d[1])??`semiont-backup-${Date.now()}.tar.gz`,l=URL.createObjectURL(i),c=document.createElement("a");return c.href=l,c.download=s,c.click(),URL.revokeObjectURL(l),{filename:s,size:i.size}}})},restore:{useMutation:()=>Yn({mutationFn:async({file:r,onProgress:i})=>{if(!e)throw new Error("Not authenticated");return e.restoreKnowledgeBase(r,{auth:ut(n),onProgress:i})}})}}}}function Ore(){const e=In(),t=Wt();return{exchange:{export:{useMutation:()=>Yn({mutationFn:async n=>{var d;if(!e)throw new Error("Not authenticated");const r=await e.exportKnowledgeBase(n,{auth:ut(t)});if(!r.ok)throw new Error(`Export failed: ${r.status} ${r.statusText}`);const i=await r.blob(),a=r.headers.get("Content-Disposition"),s=((d=a==null?void 0:a.match(/filename="(.+?)"/))==null?void 0:d[1])??`semiont-export-${Date.now()}.tar.gz`,l=URL.createObjectURL(i),c=document.createElement("a");return c.href=l,c.download=s,c.click(),URL.revokeObjectURL(l),{filename:s,size:i.size}}})},import:{useMutation:()=>Yn({mutationFn:async({file:n,onProgress:r})=>{if(!e)throw new Error("Not authenticated");return e.importKnowledgeBase(n,{auth:ut(t),onProgress:r})}})}}}}function bre(){const e=In(),t=kc(),n=Wt();return{me:{useQuery:()=>Dn({queryKey:xt.users.me(),queryFn:()=>e.getMe({auth:ut(n)}),enabled:!!e})},acceptTerms:{useMutation:()=>{const r=Wt();return Yn({mutationFn:()=>{if(!e)throw new Error("Not authenticated");return e.acceptTerms({auth:ut(r)})},onSuccess:()=>{t.invalidateQueries({queryKey:xt.users.me()})}})}},generateMCPToken:{useMutation:()=>{const r=Wt();return Yn({mutationFn:()=>{if(!e)throw new Error("Not authenticated");return e.generateMCPToken({auth:ut(r)})}})}},logout:{useMutation:()=>{const r=Wt();return Yn({mutationFn:()=>{if(!e)throw new Error("Not authenticated");return e.logout({auth:ut(r)})},onSuccess:()=>{t.clear()}})}}}}function mZ(){const e=In(),t=Wt();return{check:{useQuery:()=>Dn({queryKey:xt.health(),queryFn:()=>e.healthCheck(),enabled:!!e})},status:{useQuery:n=>Dn({queryKey:xt.status(),queryFn:()=>e.getStatus({auth:ut(t)}),enabled:!!e,...n&&{refetchInterval:n}})}}}var sd={primary:{base:"semiont-button semiont-button--primary",large:"semiont-button semiont-button--primary semiont-button--large"},secondary:{base:"semiont-button semiont-button--secondary",withScale:"semiont-button semiont-button--secondary semiont-button--scale"},tertiary:{base:"semiont-button semiont-button--tertiary"},danger:{base:"semiont-button semiont-button--danger"},warning:{base:"semiont-button semiont-button--warning"},combine:(...e)=>e.filter(Boolean).join(" ")},iy=[],zP=[];(()=>{let e="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,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?zP:iy).push(n=n+e[t])})();function pZ(e){if(e<768)return!1;for(let t=0,n=iy.length;;){let r=t+n>>1;if(e<iy[r])n=r;else if(e>=zP[r])t=r+1;else return!0;if(t==n)return!1}}function Z1(e){return e>=127462&&e<=127487}var B1=8205;function gZ(e,t,n=!0,r=!0){return(n?qP:vZ)(e,t,r)}function qP(e,t,n){if(t==e.length)return t;t&&IP(e.charCodeAt(t))&&XP(e.charCodeAt(t-1))&&t--;let r=AO(e,t);for(t+=V1(r);t<e.length;){let i=AO(e,t);if(r==B1||i==B1||n&&pZ(i))t+=V1(i),r=i;else if(Z1(i)){let a=0,s=t-2;for(;s>=0&&Z1(AO(e,s));)a++,s-=2;if(a%2==0)break;t+=2}else break}return t}function vZ(e,t,n){for(;t>0;){let r=qP(e,t-2,n);if(r<t)return r;t--}return 0}function AO(e,t){let n=e.charCodeAt(t);if(!XP(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return IP(r)?(n-55296<<10)+(r-56320)+65536:n}function IP(e){return e>=56320&&e<57344}function XP(e){return e>=55296&&e<56320}function V1(e){return e<65536?1:2}var _t=class ZP{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,n,r){[t,n]=pc(this,t,n);let i=[];return this.decompose(0,t,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),jm.from(i,this.length-(n-t)+r.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,n=this.length){[t,n]=pc(this,t,n);let r=[];return this.decompose(t,n,r,0),jm.from(r,n-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let n=this.scanIdentical(t,1),r=this.length-this.scanIdentical(t,-1),i=new od(this),a=new od(t);for(let s=n,l=n;;){if(i.next(s),a.next(s),s=0,i.lineBreak!=a.lineBreak||i.done!=a.done||i.value!=a.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(t=1){return new od(this,t)}iterRange(t,n=this.length){return new BP(this,t,n)}iterLines(t,n){let r;if(t==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(t).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new VP(r)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?ZP.empty:t.length<=32?new Ri(t):jm.from(Ri.split(t,[]))}},Ri=class ta extends _t{constructor(t,n=OZ(t)){super(),this.text=t,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(t,n,r,i){for(let a=0;;a++){let s=this.text[a],l=i+s.length;if((n?r:l)>=t)return new bZ(i,l,r,s);i=l+1,r++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new ta(U1(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let s=r.pop(),l=Tm(a.text,s.text.slice(),0,a.length);if(l.length<=32)r.push(new ta(l,s.length+a.length));else{let c=l.length>>1;r.push(new ta(l.slice(0,c)),new ta(l.slice(c)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof ta))return super.replace(t,n,r);[t,n]=pc(this,t,n);let i=Tm(this.text,Tm(r.text,U1(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new ta(i,a):jm.from(ta.split(i,[]),a)}sliceString(t,n=this.length,r=`
|
|
42
|
+
`){[t,n]=pc(this,t,n);let i="";for(let a=0,s=0;a<=n&&s<this.text.length;s++){let l=this.text[s],c=a+l.length;a>t&&s&&(i+=r),t<c&&n>a&&(i+=l.slice(Math.max(0,t-a),n-a)),a=c+1}return i}flatten(t){for(let n of this.text)t.push(n)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new ta(r,i)),r=[],i=-1);return i>-1&&n.push(new ta(r,i)),n}},jm=class $l extends _t{constructor(t,n){super(),this.children=t,this.length=n,this.lines=0;for(let r of t)this.lines+=r.lines}lineInner(t,n,r,i){for(let a=0;;a++){let s=this.children[a],l=i+s.length,c=r+s.lines-1;if((n?c:l)>=t)return s.lineInner(t,n,r,i);i=l+1,r=c+1}}decompose(t,n,r,i){for(let a=0,s=0;s<=n&&a<this.children.length;a++){let l=this.children[a],c=s+l.length;if(t<=c&&n>=s){let d=i&((s<=t?1:0)|(c>=n?2:0));s>=t&&c<=n&&!d?r.push(l):l.decompose(t-s,n-s,r,d)}s=c+1}}replace(t,n,r){if([t,n]=pc(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let s=this.children[i],l=a+s.length;if(t>=a&&n<=l){let c=s.replace(t-a,n-a,r),d=this.lines-s.lines+c.lines;if(c.lines<d>>4&&c.lines>d>>6){let f=this.children.slice();return f[i]=c,new $l(f,this.length-(n-t)+r.length)}return super.replace(a,l,c)}a=l+1}return super.replace(t,n,r)}sliceString(t,n=this.length,r=`
|
|
43
|
+
`){[t,n]=pc(this,t,n);let i="";for(let a=0,s=0;a<this.children.length&&s<=n;a++){let l=this.children[a],c=s+l.length;s>t&&a&&(i+=r),t<c&&n>s&&(i+=l.sliceString(t-s,n-s,r)),s=c+1}return i}flatten(t){for(let n of this.children)n.flatten(t)}scanIdentical(t,n){if(!(t instanceof $l))return 0;let r=0,[i,a,s,l]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==s||a==l)return r;let c=this.children[i],d=t.children[a];if(c!=d)return r+c.scanIdentical(d,n);r+=c.length+1}}static from(t,n=t.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let O of t)r+=O.lines;if(r<32){let O=[];for(let b of t)b.flatten(O);return new Ri(O,n)}let i=Math.max(32,r>>5),a=i<<1,s=i>>1,l=[],c=0,d=-1,f=[];function m(O){let b;if(O.lines>a&&O instanceof $l)for(let S of O.children)m(S);else O.lines>s&&(c>s||!c)?(p(),l.push(O)):O instanceof Ri&&c&&(b=f[f.length-1])instanceof Ri&&O.lines+b.lines<=32?(c+=O.lines,d+=O.length+1,f[f.length-1]=new Ri(b.text.concat(O.text),b.length+1+O.length)):(c+O.lines>i&&p(),c+=O.lines,d+=O.length+1,f.push(O))}function p(){c!=0&&(l.push(f.length==1?f[0]:$l.from(f,d)),d=-1,c=f.length=0)}for(let O of t)m(O);return p(),l.length==1?l[0]:new $l(l,n)}};_t.empty=new Ri([""],0);function OZ(e){let t=-1;for(let n of e)t+=n.length+1;return t}function Tm(e,t,n=0,r=1e9){for(let i=0,a=0,s=!0;a<e.length&&i<=r;a++){let l=e[a],c=i+l.length;c>=n&&(c>r&&(l=l.slice(0,r-i)),i<n&&(l=l.slice(n-i)),s?(t[t.length-1]+=l,s=!1):t.push(l)),i=c+1}return t}function U1(e,t,n){return Tm(e,[""],t,n)}var od=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Ri?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,s=r instanceof Ri?r.text.length:r.children.length;if(a==(t>0?s:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
44
|
+
`,this;e--}else if(r instanceof Ri){let l=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,l.length>Math.max(0,e))return this.value=e==0?l:t>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[a+(t<0?-1:0)];e>l.length?(e-=l.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(l),this.offsets.push(t>0?1:(l instanceof Ri?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)}},BP=class{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new od(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.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!=""}},VP=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(_t.prototype[Symbol.iterator]=function(){return this.iter()},od.prototype[Symbol.iterator]=BP.prototype[Symbol.iterator]=VP.prototype[Symbol.iterator]=function(){return this});var bZ=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function pc(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function Mi(e,t,n=!0,r=!0){return gZ(e,t,n,r)}function yZ(e){return e>=56320&&e<57344}function SZ(e){return e>=55296&&e<56320}function xZ(e,t){let n=e.charCodeAt(t);if(!SZ(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return yZ(r)?(n-55296<<10)+(r-56320)+65536:n}function _Z(e){return e<65536?1:2}var ay=/\r\n?|\n/,fr=(function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e})(fr||(fr={})),ld=class Cm{constructor(t){this.sections=t}get length(){let t=0;for(let n=0;n<this.sections.length;n+=2)t+=this.sections[n];return t}get newLength(){let t=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];t+=r<0?this.sections[n]:r}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let n=0,r=0,i=0;n<this.sections.length;){let a=this.sections[n++],s=this.sections[n++];s<0?(t(r,i,a),i+=a):i+=s,r+=a}}iterChangedRanges(t,n=!1){sy(this,t,n)}get invertedDesc(){let t=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?t.push(r,i):t.push(i,r)}return new Cm(t)}composeDesc(t){return this.empty?t:t.empty?this:UP(this,t)}mapDesc(t,n=!1){return t.empty?this:oy(this,t,n)}mapPos(t,n=-1,r=fr.Simple){let i=0,a=0;for(let s=0;s<this.sections.length;){let l=this.sections[s++],c=this.sections[s++],d=i+l;if(c<0){if(d>t)return a+(t-i);a+=l}else{if(r!=fr.Simple&&d>=t&&(r==fr.TrackDel&&i<t&&d>t||r==fr.TrackBefore&&i<t||r==fr.TrackAfter&&d>t))return null;if(d>t||d==t&&n<0&&!l)return t==i||n<0?a:a+c;a+=c}i=d}if(t>i)throw new RangeError(`Position ${t} is out of range for changeset of length ${i}`);return a}touchesRange(t,n=t){for(let r=0,i=0;r<this.sections.length&&i<=n;){let a=this.sections[r++],s=this.sections[r++],l=i+a;if(s>=0&&i<=n&&l>=t)return i<t&&l>n?"cover":!0;i=l}return!1}toString(){let t="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];t+=(t?" ":"")+r+(i>=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Cm(t)}static create(t){return new Cm(t)}},ma=class Ps extends ld{constructor(t,n){super(t),this.inserted=n}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return sy(this,(n,r,i,a,s)=>t=t.replace(i,i+(r-n),s),!1),t}mapDesc(t,n=!1){return oy(this,t,n,!0)}invert(t){let n=this.sections.slice(),r=[];for(let i=0,a=0;i<n.length;i+=2){let s=n[i],l=n[i+1];if(l>=0){n[i]=l,n[i+1]=s;let c=i>>1;for(;r.length<c;)r.push(_t.empty);r.push(s?t.slice(a,a+s):_t.empty)}a+=s}return new Ps(n,r)}compose(t){return this.empty?t:t.empty?this:UP(this,t,!0)}map(t,n=!1){return t.empty?this:oy(this,t,n,!0)}iterChanges(t,n=!1){sy(this,t,n)}get desc(){return ld.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new Td(this);e:for(let s=0,l=0;;){let c=s==t.length?1e9:t[s++];for(;l<c||l==c&&a.len==0;){if(a.done)break e;let f=Math.min(a.len,c-l);Jn(i,f,-1);let m=a.ins==-1?-1:a.off==0?a.ins:0;Jn(n,f,m),m>0&&Xs(r,n,a.text),a.forward(f),l+=f}let d=t[s++];for(;l<d;){if(a.done)break e;let f=Math.min(a.len,d-l);Jn(n,f,-1),Jn(i,f,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(f),l+=f}}return{changes:new Ps(n,r),filtered:ld.create(i)}}toJSON(){let t=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?t.push(r):i==0?t.push([r]):t.push([r].concat(this.inserted[n>>1].toJSON()))}return t}static of(t,n,r){let i=[],a=[],s=0,l=null;function c(f=!1){if(!f&&!i.length)return;s<n&&Jn(i,n-s,-1);let m=new Ps(i,a);l=l?l.compose(m.map(l)):m,i=[],a=[],s=0}function d(f){if(Array.isArray(f))for(let m of f)d(m);else if(f instanceof Ps){if(f.length!=n)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${n})`);c(),l=l?l.compose(f.map(l)):f}else{let{from:m,to:p=m,insert:O}=f;if(m>p||m<0||p>n)throw new RangeError(`Invalid change range ${m} to ${p} (in doc of length ${n})`);let b=O?typeof O=="string"?_t.of(O.split(r||ay)):O:_t.empty,S=b.length;if(m==p&&S==0)return;m<s&&c(),m>s&&Jn(i,m-s,-1),Jn(i,p-m,S),Xs(a,i,b),s=p}}return d(t),c(!l),l}static empty(t){return new Ps(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<t.length;i++){let a=t[i];if(typeof a=="number")n.push(a,-1);else{if(!Array.isArray(a)||typeof a[0]!="number"||a.some((s,l)=>l&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(a.length==1)n.push(a[0],0);else{for(;r.length<i;)r.push(_t.empty);r[i]=_t.of(a.slice(1)),n.push(a[0],r[i].length)}}}return new Ps(n,r)}static createSet(t,n){return new Ps(t,n)}};function Jn(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function Xs(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(_t.empty);e.push(n)}}function sy(e,t,n){let r=e.inserted;for(let i=0,a=0,s=0;s<e.sections.length;){let l=e.sections[s++],c=e.sections[s++];if(c<0)i+=l,a+=l;else{let d=i,f=a,m=_t.empty;for(;d+=l,f+=c,c&&r&&(m=m.append(r[s-2>>1])),!(n||s==e.sections.length||e.sections[s+1]<0);)l=e.sections[s++],c=e.sections[s++];t(i,d,a,f,m),i=d,a=f}}}function oy(e,t,n,r=!1){let i=[],a=r?[]:null,s=new Td(e),l=new Td(t);for(let c=-1;;){if(s.done&&l.len||l.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&l.ins==-1){let d=Math.min(s.len,l.len);Jn(i,d,-1),s.forward(d),l.forward(d)}else if(l.ins>=0&&(s.ins<0||c==s.i||s.off==0&&(l.len<s.len||l.len==s.len&&!n))){let d=l.len;for(Jn(i,l.ins,-1);d;){let f=Math.min(s.len,d);s.ins>=0&&c<s.i&&s.len<=f&&(Jn(i,0,s.ins),a&&Xs(a,i,s.text),c=s.i),s.forward(f),d-=f}l.next()}else if(s.ins>=0){let d=0,f=s.len;for(;f;)if(l.ins==-1){let m=Math.min(f,l.len);d+=m,f-=m,l.forward(m)}else if(l.ins==0&&l.len<f)f-=l.len,l.next();else break;Jn(i,d,c<s.i?s.ins:0),a&&c<s.i&&Xs(a,i,s.text),c=s.i,s.forward(s.len-f)}else{if(s.done&&l.done)return a?ma.createSet(i,a):ld.create(i);throw new Error("Mismatched change set lengths")}}}function UP(e,t,n=!1){let r=[],i=n?[]:null,a=new Td(e),s=new Td(t);for(let l=!1;;){if(a.done&&s.done)return i?ma.createSet(r,i):ld.create(r);if(a.ins==0)Jn(r,a.len,0,l),a.next();else if(s.len==0&&!s.done)Jn(r,0,s.ins,l),i&&Xs(i,r,s.text),s.next();else{if(a.done||s.done)throw new Error("Mismatched change set lengths");{let c=Math.min(a.len2,s.len),d=r.length;if(a.ins==-1){let f=s.ins==-1?-1:s.off?0:s.ins;Jn(r,c,f,l),i&&f&&Xs(i,r,s.text)}else s.ins==-1?(Jn(r,a.off?0:a.len,c,l),i&&Xs(i,r,a.textBit(c))):(Jn(r,a.off?0:a.len,s.off?0:s.ins,l),i&&!s.off&&Xs(i,r,s.text));l=(a.ins>c||s.ins>=0&&s.len>c)&&(l||r.length>d),a.forward2(c),s.forward(c)}}}}var Td=class{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,t=this.i-2>>1;return t>=e.length?_t.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?_t.empty:t[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)}},Yh=class ly{constructor(t,n,r){this.from=t,this.to=n,this.flags=r}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 t=this.flags&7;return t==7?null:t}get goalColumn(){let t=this.flags>>6;return t==16777215?void 0:t}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ly(r,i,this.flags)}extend(t,n=t,r=0){if(t<=this.anchor&&n>=this.anchor)return Ce.range(t,n,void 0,void 0,r);let i=Math.abs(t-this.anchor)>Math.abs(n-this.anchor)?t:n;return Ce.range(this.anchor,i,void 0,void 0,r)}eq(t,n=!1){return this.anchor==t.anchor&&this.head==t.head&&this.goalColumn==t.goalColumn&&(!n||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ce.range(t.anchor,t.head)}static create(t,n,r){return new ly(t,n,r)}},Ce=class Xr{constructor(t,n){this.ranges=t,this.mainIndex=n}map(t,n=-1){return t.empty?this:Xr.create(this.ranges.map(r=>r.map(t,n)),this.mainIndex)}eq(t,n=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(t.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Xr([this.main],0)}addRange(t,n=!0){return Xr.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,Xr.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Xr(t.ranges.map(n=>Yh.fromJSON(n)),t.main)}static single(t,n=t){return new Xr([Xr.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return Xr.normalized(t.slice(),n);r=a.to}return new Xr(t,n)}static cursor(t,n=0,r,i){return Yh.create(t,t,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(t,n,r,i,a){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!a&&t!=n&&(a=n<t?1:-1),n<t?Yh.create(n,t,48|s):Yh.create(t,n,(a?a<0?8:16:0)|s)}static normalized(t,n=0){let r=t[n];t.sort((i,a)=>i.from-a.from),n=t.indexOf(r);for(let i=1;i<t.length;i++){let a=t[i],s=t[i-1];if(a.empty?a.from<=s.to:a.from<s.to){let l=s.from,c=Math.max(a.to,s.to);i<=n&&n--,t.splice(--i,2,a.anchor>a.head?Xr.range(c,l):Xr.range(l,c))}}return new Xr(t,n)}};function YP(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}var ES=0,ze=class FP{constructor(t,n,r,i,a){this.combine=t,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=ES++,this.default=t([]),this.extensions=typeof a=="function"?a(this):a}get reader(){return this}static define(t={}){return new FP(t.combine||(n=>n),t.compareInput||((n,r)=>n===r),t.compare||(t.combine?(n,r)=>n===r:AS),!!t.static,t.enables)}of(t){return new Em([],this,0,t)}compute(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Em(t,this,1,n)}computeN(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Em(t,this,2,n)}from(t,n){return n||(n=r=>r),this.compute([t],r=>n(r.field(t)))}};function AS(e,t){return e==t||e.length==t.length&&e.every((n,r)=>n===t[r])}var Em=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=ES++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,a=e[i]>>1,s=this.type==2,l=!1,c=!1,d=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&d.push(e[f.id]);return{create(f){return f.values[a]=n(f),1},update(f,m){if(l&&m.docChanged||c&&(m.docChanged||m.selection)||cy(f,d)){let p=n(f);if(s?!Y1(p,f.values[a],r):!r(p,f.values[a]))return f.values[a]=p,1}return 0},reconfigure:(f,m)=>{let p,O=m.config.address[i];if(O!=null){let b=$m(m,O);if(this.dependencies.every(S=>S instanceof ze?m.facet(S)===f.facet(S):S instanceof no?m.field(S,!1)==f.field(S,!1):!0)||(s?Y1(p=n(f),b,r):r(p=n(f),b)))return f.values[a]=b,0}else p=n(f);return f.values[a]=p,1}}}};function Y1(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function cy(e,t){let n=!1;for(let r of t)cd(e,r)&1&&(n=!0);return n}function wZ(e,t,n){let r=n.map(c=>e[c.id]),i=n.map(c=>c.type),a=r.filter(c=>!(c&1)),s=e[t.id]>>1;function l(c){let d=[];for(let f=0;f<r.length;f++){let m=$m(c,r[f]);if(i[f]==2)for(let p of m)d.push(p);else d.push(m)}return t.combine(d)}return{create(c){for(let d of r)cd(c,d);return c.values[s]=l(c),1},update(c,d){if(!cy(c,a))return 0;let f=l(c);return t.compare(f,c.values[s])?0:(c.values[s]=f,1)},reconfigure(c,d){let f=cy(c,r),m=d.config.facets[t.id],p=d.facet(t);if(m&&!f&&AS(n,m))return c.values[s]=p,0;let O=l(c);return t.compare(O,p)?(c.values[s]=p,0):(c.values[s]=O,1)}}}var Fh=ze.define({static:!0}),no=class $P{constructor(t,n,r,i,a){this.id=t,this.createF=n,this.updateF=r,this.compareF=i,this.spec=a,this.provides=void 0}static define(t){let n=new $P(ES++,t.create,t.update,t.compare||((r,i)=>r===i),t);return t.provide&&(n.provides=t.provide(n)),n}create(t){let n=t.facet(Fh).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(t)}slot(t){let n=t[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let a=r.values[n],s=this.updateF(a,i);return this.compareF(a,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>{let a=r.facet(Fh),s=i.facet(Fh),l;return(l=a.find(c=>c.field==this))&&l!=s.find(c=>c.field==this)?(r.values[n]=l.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(t){return[this,Fh.of({field:this,create:t})]}get extension(){return this}},Ao={lowest:4,low:3,default:2,high:1,highest:0};function qu(e){return t=>new WP(t,e)}var ff={highest:qu(Ao.highest),high:qu(Ao.high),default:qu(Ao.default),low:qu(Ao.low),lowest:qu(Ao.lowest)},WP=class{constructor(e,t){this.inner=e,this.prec=t}},QS=class HP{of(t){return new uy(this,t)}reconfigure(t){return HP.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}},uy=class{constructor(e,t){this.compartment=e,this.inner=t}},F1=class GP{constructor(t,n,r,i,a,s){for(this.base=t,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=a,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(t){let n=this.address[t.id];return n==null?t.default:this.staticValues[n>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),s=new Map;for(let p of kZ(t,n,s))p instanceof no?i.push(p):(a[p.facet.id]||(a[p.facet.id]=[])).push(p);let l=Object.create(null),c=[],d=[];for(let p of i)l[p.id]=d.length<<1,d.push(O=>p.slot(O));let f=r==null?void 0:r.config.facets;for(let p in a){let O=a[p],b=O[0].facet,S=f&&f[p]||[];if(O.every(w=>w.type==0))if(l[b.id]=c.length<<1|1,AS(S,O))c.push(r.facet(b));else{let w=b.combine(O.map(k=>k.value));c.push(r&&b.compare(w,r.facet(b))?r.facet(b):w)}else{for(let w of O)w.type==0?(l[w.id]=c.length<<1|1,c.push(w.value)):(l[w.id]=d.length<<1,d.push(k=>w.dynamicSlot(k)));l[b.id]=d.length<<1,d.push(w=>wZ(w,b,O))}}let m=d.map(p=>p(l));return new GP(t,s,m,l,c,a)}};function kZ(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(s,l){let c=i.get(s);if(c!=null){if(c<=l)return;let d=r[c].indexOf(s);d>-1&&r[c].splice(d,1),s instanceof uy&&n.delete(s.compartment)}if(i.set(s,l),Array.isArray(s))for(let d of s)a(d,l);else if(s instanceof uy){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let d=t.get(s.compartment)||s.inner;n.set(s.compartment,d),a(d,l)}else if(s instanceof WP)a(s.inner,s.prec);else if(s instanceof no)r[l].push(s),s.provides&&a(s.provides,l);else if(s instanceof Em)r[l].push(s),s.facet.extensions&&a(s.facet.extensions,Ao.default);else{let d=s.extension;if(!d)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(d,l)}}return a(e,Ao.default),r.reduce((s,l)=>s.concat(l))}function cd(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function $m(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var KP=ze.define(),dy=ze.define({combine:e=>e.some(t=>t),static:!0}),JP=ze.define({combine:e=>e.length?e[0]:void 0,static:!0}),eN=ze.define(),tN=ze.define(),nN=ze.define(),rN=ze.define({combine:e=>e.length?e[0]:!1}),Jo=class{constructor(e,t){this.type=e,this.value=t}static define(){return new jZ}},jZ=class{of(e){return new Jo(this,e)}},TZ=class{constructor(e){this.map=e}of(e){return new ln(this,e)}},ln=class iN{constructor(t,n){this.type=t,this.value=n}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new iN(this.type,n)}is(t){return this.type==t}static define(t={}){return new TZ(t.map||(n=>n))}static mapEffects(t,n){if(!t.length)return t;let r=[];for(let i of t){let a=i.map(n);a&&r.push(a)}return r}};ln.reconfigure=ln.define();ln.appendConfig=ln.define();var mi=class Wu{constructor(t,n,r,i,a,s){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=s,this._doc=null,this._state=null,r&&YP(r,n.newLength),a.some(l=>l.type==Wu.time)||(this.annotations=a.concat(Wu.time.of(Date.now())))}static create(t,n,r,i,a,s){return new Wu(t,n,r,i,a,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(t){for(let n of this.annotations)if(n.type==t)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(Wu.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]=="."))}};mi.time=Jo.define();mi.userEvent=Jo.define();mi.addToHistory=Jo.define();mi.remote=Jo.define();function CZ(e,t){let n=[];for(let r=0,i=0;;){let a,s;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],s=e[r++];else if(i<t.length)a=t[i++],s=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function aN(e,t,n){var r;let i,a,s;return n?(i=t.changes,a=ma.empty(t.changes.length),s=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),a=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(i)),{changes:s,selection:t.selection?t.selection.map(a):(r=e.selection)===null||r===void 0?void 0:r.map(i),effects:ln.mapEffects(e.effects,i).concat(ln.mapEffects(t.effects,a)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function fy(e,t,n){let r=t.selection,i=tc(t.annotations);return t.userEvent&&(i=i.concat(mi.userEvent.of(t.userEvent))),{changes:t.changes instanceof ma?t.changes:ma.of(t.changes||[],n,e.facet(JP)),selection:r&&(r instanceof Ce?r:Ce.single(r.anchor,r.head)),effects:tc(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function sN(e,t,n){let r=fy(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let a=1;a<t.length;a++){t[a].filter===!1&&(n=!1);let s=!!t[a].sequential;r=aN(r,fy(e,t[a],s?r.changes.newLength:e.doc.length),s)}let i=mi.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return AZ(n?EZ(i):i)}function EZ(e){let t=e.startState,n=!0;for(let i of t.facet(eN)){let a=i(e);if(a===!1){n=!1;break}Array.isArray(a)&&(n=n===!0?a:CZ(n,a))}if(n!==!0){let i,a;if(n===!1)a=e.changes.invertedDesc,i=ma.empty(t.doc.length);else{let s=e.changes.filter(n);i=s.changes,a=s.filtered.mapDesc(s.changes).invertedDesc}e=mi.create(t,i,e.selection&&e.selection.map(a),ln.mapEffects(e.effects,a),e.annotations,e.scrollIntoView)}let r=t.facet(tN);for(let i=r.length-1;i>=0;i--){let a=r[i](e);a instanceof mi?e=a:Array.isArray(a)&&a.length==1&&a[0]instanceof mi?e=a[0]:e=sN(t,tc(a),!1)}return e}function AZ(e){let t=e.startState,n=t.facet(nN),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=aN(r,fy(t,a,e.changes.newLength),!0))}return r==e?e:mi.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var QZ=[];function tc(e){return e==null?QZ:Array.isArray(e)?e:[e]}var Fa=(function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e})(Fa||(Fa={})),PZ=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,hy;try{hy=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function NZ(e){if(hy)return hy.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||PZ.test(n)))return!0}return!1}function RZ(e){return t=>{if(!/\S/.test(t))return Fa.Space;if(NZ(t))return Fa.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Fa.Word;return Fa.Other}}var nn=class Qi{constructor(t,n,r,i,a,s){this.config=t,this.doc=n,this.selection=r,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=a,s&&(s._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)cd(this,l<<1);this.computeSlot=null}field(t,n=!0){let r=this.config.address[t.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return cd(this,r),$m(this,r)}update(...t){return sN(this,t,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let l of t.effects)l.is(QS.reconfigure)?(n&&(i=new Map,n.compartments.forEach((c,d)=>i.set(d,c)),n=null),i.set(l.value.compartment,l.value.extension)):l.is(ln.reconfigure)?(n=null,r=l.value):l.is(ln.appendConfig)&&(n=null,r=tc(r).concat(l.value));let a;n?a=t.startState.values.slice():(n=F1.resolve(r,i,this),a=new Qi(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(c,d)=>d.reconfigure(c,this),null).values);let s=t.startState.facet(dy)?t.newSelection:t.newSelection.asSingle();new Qi(n,t.newDoc,s,a,(l,c)=>c.update(l,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:t},range:Ce.cursor(n.from+t.length)}))}changeByRange(t){let n=this.selection,r=t(n.ranges[0]),i=this.changes(r.changes),a=[r.range],s=tc(r.effects);for(let l=1;l<n.ranges.length;l++){let c=t(n.ranges[l]),d=this.changes(c.changes),f=d.map(i);for(let p=0;p<l;p++)a[p]=a[p].map(f);let m=i.mapDesc(d,!0);a.push(c.range.map(m)),i=i.compose(f),s=ln.mapEffects(s,f).concat(ln.mapEffects(tc(c.effects),m))}return{changes:i,selection:Ce.create(a,n.mainIndex),effects:s}}changes(t=[]){return t instanceof ma?t:ma.of(t,this.doc.length,this.facet(Qi.lineSeparator))}toText(t){return _t.of(t.split(this.facet(Qi.lineSeparator)||ay))}sliceDoc(t=0,n=this.doc.length){return this.doc.sliceString(t,n,this.lineBreak)}facet(t){let n=this.config.address[t.id];return n==null?t.default:(cd(this,n),$m(this,n))}toJSON(t){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let r in t){let i=t[r];i instanceof no&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(t[r]),this))}return n}static fromJSON(t,n={},r){if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let a in r)if(Object.prototype.hasOwnProperty.call(t,a)){let s=r[a],l=t[a];i.push(s.init(c=>s.spec.fromJSON(l,c)))}}return Qi.create({doc:t.doc,selection:Ce.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=F1.resolve(t.extensions||[],new Map),r=t.doc instanceof _t?t.doc:_t.of((t.doc||"").split(n.staticFacet(Qi.lineSeparator)||ay)),i=t.selection?t.selection instanceof Ce?t.selection:Ce.single(t.selection.anchor,t.selection.head):Ce.single(0);return YP(i,r.length),n.staticFacet(dy)||(i=i.asSingle()),new Qi(n,r,i,n.dynamicSlots.map(()=>null),(a,s)=>s.create(a),null)}get tabSize(){return this.facet(Qi.tabSize)}get lineBreak(){return this.facet(Qi.lineSeparator)||`
|
|
45
|
+
`}get readOnly(){return this.facet(rN)}phrase(t,...n){for(let r of this.facet(Qi.phrases))if(Object.prototype.hasOwnProperty.call(r,t)){t=r[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let a=+(i||1);return!a||a>n.length?r:n[a-1]})),t}languageDataAt(t,n,r=-1){let i=[];for(let a of this.facet(KP))for(let s of a(this,n,r))Object.prototype.hasOwnProperty.call(s,t)&&i.push(s[t]);return i}charCategorizer(t){let n=this.languageDataAt("wordChars",t);return RZ(n.length?n[0]:"")}wordAt(t){let{text:n,from:r,length:i}=this.doc.lineAt(t),a=this.charCategorizer(t),s=t-r,l=t-r;for(;s>0;){let c=Mi(n,s,!1);if(a(n.slice(c,s))!=Fa.Word)break;s=c}for(;l<i;){let c=Mi(n,l);if(a(n.slice(l,c))!=Fa.Word)break;l=c}return s==l?null:Ce.range(s+r,l+r)}};nn.allowMultipleSelections=dy;nn.tabSize=ze.define({combine:e=>e.length?e[0]:4});nn.lineSeparator=JP;nn.readOnly=rN;nn.phrases=ze.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(i=>e[i]==t[i])}});nn.languageData=KP;nn.changeFilter=eN;nn.transactionFilter=tN;nn.transactionExtender=nN;QS.reconfigure=ln.define();function MZ(e,t,n={}){let r={};for(let i of e)for(let a of Object.keys(i)){let s=i[a],l=r[a];if(l===void 0)r[a]=s;else if(!(l===s||s===void 0))if(Object.hasOwnProperty.call(n,a))r[a]=n[a](l,s);else throw new Error("Config merge conflict for field "+a)}for(let i in t)r[i]===void 0&&(r[i]=t[i]);return r}var Fs=class{eq(e){return this==e}range(e,t=e){return my.create(e,t,this)}};Fs.prototype.startSide=Fs.prototype.endSide=0;Fs.prototype.point=!1;Fs.prototype.mapMode=fr.TrackDel;function PS(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var my=class oN{constructor(t,n,r){this.from=t,this.to=n,this.value=r}static create(t,n,r){return new oN(t,n,r)}};function py(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var LZ=class lN{constructor(t,n,r,i){this.from=t,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,n,r,i=0){let a=r?this.to:this.from;for(let s=i,l=a.length;;){if(s==l)return s;let c=s+l>>1,d=a[c]-t||(r?this.value[c].endSide:this.value[c].startSide)-n;if(c==s)return d>=0?s:l;d>=0?l=c:s=c+1}}between(t,n,r,i){for(let a=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,a);a<s;a++)if(i(this.from[a]+t,this.to[a]+t,this.value[a])===!1)return!1}map(t,n){let r=[],i=[],a=[],s=-1,l=-1;for(let c=0;c<this.value.length;c++){let d=this.value[c],f=this.from[c]+t,m=this.to[c]+t,p,O;if(f==m){let b=n.mapPos(f,d.startSide,d.mapMode);if(b==null||(p=O=b,d.startSide!=d.endSide&&(O=n.mapPos(f,d.endSide),O<p)))continue}else if(p=n.mapPos(f,d.startSide),O=n.mapPos(m,d.endSide),p>O||p==O&&d.startSide>0&&d.endSide<=0)continue;(O-p||d.endSide-d.startSide)<0||(s<0&&(s=p),d.point&&(l=Math.max(l,O-p)),r.push(d),i.push(p-s),a.push(O-s))}return{mapped:r.length?new lN(i,a,r,l):null,pos:s}}},en=class Za{constructor(t,n,r,i){this.chunkPos=t,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(t,n,r,i){return new Za(t,n,r,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let n of this.chunk)t+=n.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,s=t.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(py)),this.isEmpty)return n.length?Za.of(n):this;let l=new uN(this,null,-1).goto(0),c=0,d=[],f=new Cd;for(;l.value||c<n.length;)if(c<n.length&&(l.from-n[c].from||l.startSide-n[c].value.startSide)>=0){let m=n[c++];f.addInner(m.from,m.to,m.value)||d.push(m)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(l.chunkIndex)<n[c].from)&&(!s||i>this.chunkEnd(l.chunkIndex)||a<this.chunkPos[l.chunkIndex])&&f.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!s||i>l.to||a<l.from||s(l.from,l.to,l.value))&&(f.addInner(l.from,l.to,l.value)||d.push(my.create(l.from,l.to,l.value))),l.next());return f.finishInner(this.nextLayer.isEmpty&&!d.length?Za.empty:this.nextLayer.update({add:d,filter:s,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let l=this.chunkPos[s],c=this.chunk[s],d=t.touchesRange(l,l+c.length);if(d===!1)i=Math.max(i,c.maxPoint),n.push(c),r.push(t.mapPos(l));else if(d===!0){let{mapped:f,pos:m}=c.map(l,t);f&&(i=Math.max(i,f.maxPoint),n.push(f),r.push(m))}}let a=this.nextLayer.map(t);return n.length==0?a:new Za(r,n,a||Za.empty,i)}between(t,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let a=this.chunkPos[i],s=this.chunk[i];if(n>=a&&t<=a+s.length&&s.between(a,t-a,n-a,r)===!1)return}this.nextLayer.between(t,n,r)}}iter(t=0){return gy.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,n=0){return gy.from(t).goto(n)}static compare(t,n,r,i,a=-1){let s=t.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=a),l=n.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=a),c=$1(s,l,r),d=new Iu(s,c,a),f=new Iu(l,c,a);r.iterGaps((m,p,O)=>W1(d,m,f,p,O,i)),r.empty&&r.length==0&&W1(d,0,f,0,0,i)}static eq(t,n,r=0,i){i==null&&(i=999999999);let a=t.filter(f=>!f.isEmpty&&n.indexOf(f)<0),s=n.filter(f=>!f.isEmpty&&t.indexOf(f)<0);if(a.length!=s.length)return!1;if(!a.length)return!0;let l=$1(a,s),c=new Iu(a,l,0).goto(r),d=new Iu(s,l,0).goto(r);for(;;){if(c.to!=d.to||!vy(c.active,d.active)||c.point&&(!d.point||!PS(c.point,d.point)))return!1;if(c.to>i)return!0;c.next(),d.next()}}static spans(t,n,r,i,a=-1){let s=new Iu(t,null,a).goto(n),l=n,c=s.openStart;for(;;){let d=Math.min(s.to,r);if(s.point){let f=s.activeForPoint(s.to),m=s.pointFrom<n?f.length+1:s.point.startSide<0?f.length:Math.min(f.length,c);i.point(l,d,s.point,f,m,s.pointRank),c=Math.min(s.openEnd(d),f.length)}else d>l&&(i.span(l,d,s.active,c),c=s.openEnd(d));if(s.to>r)return c+(s.point&&s.to>r?1:0);l=s.to,s.next()}}static of(t,n=!1){let r=new Cd;for(let i of t instanceof my?[t]:n?DZ(t):t)r.add(i.from,i.to,i.value);return r.finish()}static join(t){if(!t.length)return Za.empty;let n=t[t.length-1];for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=Za.empty;i=i.nextLayer)n=new Za(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};en.empty=new en([],[],null,-1);function DZ(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(py(t,r)>0)return e.slice().sort(py);t=r}return e}en.empty.nextLayer=en.empty;var Cd=class cN{finishChunk(t){this.chunks.push(new LZ(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,t&&(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(t,n,r){this.addInner(t,n,r)||(this.nextLayer||(this.nextLayer=new cN)).add(t,n,r)}addInner(t,n,r){let i=t-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(t-this.lastFrom||r.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=t),this.from.push(t-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=t,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-t)),!0)}addChunk(t,n){if((t-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(t);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+t,this.lastTo=n.to[r]+t,!0}finish(){return this.finishInner(en.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return t;let n=en.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,n}};function $1(e,t,n){let r=new Map;for(let a of e)for(let s=0;s<a.chunk.length;s++)a.chunk[s].maxPoint<=0&&r.set(a.chunk[s],a.chunkPos[s]);let i=new Set;for(let a of t)for(let s=0;s<a.chunk.length;s++){let l=r.get(a.chunk[s]);l!=null&&(n?n.mapPos(l):l)==a.chunkPos[s]&&!(n!=null&&n.touchesRange(l,l+a.chunk[s].length))&&i.add(a.chunk[s])}return i}var uN=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!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],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.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}},gy=class dN{constructor(t){this.heap=t}static from(t,n=null,r=-1){let i=[];for(let a=0;a<t.length;a++)for(let s=t[a];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new uN(s,n,r,a));return i.length==1?i[0]:new dN(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,n=-1e9){for(let r of this.heap)r.goto(t,n);for(let r=this.heap.length>>1;r>=0;r--)QO(this.heap,r);return this.next(),this}forward(t,n){for(let r of this.heap)r.forward(t,n);for(let r=this.heap.length>>1;r>=0;r--)QO(this.heap,r);(this.to-t||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),QO(this.heap,0)}}};function QO(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var Iu=class{constructor(e,t,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=gy.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){$h(this.active,e),$h(this.activeTo,e),$h(this.activeRank,e),this.minActive=H1(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;Wh(this.active,t,n),Wh(this.activeTo,t,r),Wh(this.activeRank,t,i),e&&Wh(e,t,this.cursor.from),this.minActive=H1(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&$h(n,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let i=this.cursor.value;if(!i.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=i,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=i.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 r=n.length-1;r>=0&&n[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];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)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function W1(e,t,n,r,i,a){e.goto(t),n.goto(r);let s=r+i,l=r,c=r-t,d=!!a.boundChange;for(let f=!1;;){let m=e.to+c-n.to,p=m||e.endSide-n.endSide,O=p<0?e.to+c:n.to,b=Math.min(O,s);if(e.point||n.point?(e.point&&n.point&&PS(e.point,n.point)&&vy(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(l,b,e.point,n.point),f=!1):(f&&a.boundChange(l),b>l&&!vy(e.active,n.active)&&a.compareRange(l,b,e.active,n.active),d&&b<s&&(m||e.openEnd(O)!=n.openEnd(O))&&(f=!0)),O>s)break;l=O,p<=0&&e.next(),p>=0&&n.next()}}function vy(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!PS(e[n],t[n]))return!1;return!0}function $h(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function Wh(e,t,n){for(let r=e.length-1;r>=t;r--)e[r+1]=e[r];e[t]=n}function H1(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function Ed(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=Mi(e,i));return r}function zZ(e,t,n,r){for(let i=0,a=0;;){if(a>=t)return i;if(i==e.length)break;a+=e.charCodeAt(i)==9?n-a%n:1,i=Mi(e,i)}return e.length}var Oy="ͼ",G1=typeof Symbol>"u"?"__"+Oy:Symbol.for(Oy),by=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),K1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},$s=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function i(a,s,l,c){let d=[],f=/^@(\w+)\b/.exec(a[0]),m=f&&f[1]=="keyframes";if(f&&s==null)return l.push(a[0]+";");for(let p in s){let O=s[p];if(/&/.test(p))i(p.split(/,\s*/).map(b=>a.map(S=>b.replace(/&/,S))).reduce((b,S)=>b.concat(S)),O,l);else if(O&&typeof O=="object"){if(!f)throw new RangeError("The value of a property ("+p+") should be a primitive value.");i(r(p),O,d,m)}else O!=null&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+O+";")}(d.length||m)&&l.push((n&&!f&&!c?a.map(n):a).join(", ")+" {"+d.join(" ")+"}")}for(let a in e)i(r(a),e[a],this.rules)}getRules(){return this.rules.join(`
|
|
46
|
+
`)}static newName(){let e=K1[G1]||1;return K1[G1]=e+1,Oy+e.toString(36)}static mount(e,t,n){let r=e[by],i=n&&n.nonce;r?i&&r.setNonce(i):r=new qZ(e,i),r.mount(Array.isArray(t)?t:[t],e)}},J1=new Map,qZ=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let i=J1.get(n);if(i)return e[by]=i;this.sheet=new r.CSSStyleSheet,J1.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[by]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let a=0;a<e.length;a++){let s=e[a],l=this.modules.indexOf(s);if(l<i&&l>-1&&(this.modules.splice(l,1),i--,l=-1),l==-1){if(this.modules.splice(i++,0,s),n)for(let c=0;c<s.rules.length;c++)n.insertRule(s.rules[c],r++)}else{for(;i<l;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let a="";for(let l=0;l<this.modules.length;l++)a+=this.modules[l].getRules()+`
|
|
47
|
+
`;this.styleTag.textContent=a;let s=t.head||t;this.styleTag.parentNode!=s&&s.insertBefore(this.styleTag,s.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}},Ws={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:"'"},Ad={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},IZ=typeof navigator<"u"&&/Mac/.test(navigator.platform),XZ=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Tn=0;Tn<10;Tn++)Ws[48+Tn]=Ws[96+Tn]=String(Tn);var Tn;for(Tn=1;Tn<=24;Tn++)Ws[Tn+111]="F"+Tn;var Tn;for(Tn=65;Tn<=90;Tn++)Ws[Tn]=String.fromCharCode(Tn+32),Ad[Tn]=String.fromCharCode(Tn);var Tn;for(Hh in Ws)Ad.hasOwnProperty(Hh)||(Ad[Hh]=Ws[Hh]);var Hh;function ZZ(e){var t=IZ&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||XZ&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Ad:Ws)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var dr=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},yy=typeof document<"u"?document:{documentElement:{style:{}}},Sy=/Edge\/(\d+)/.exec(dr.userAgent),fN=/MSIE \d/.test(dr.userAgent),xy=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(dr.userAgent),Dp=!!(fN||xy||Sy),ej=!Dp&&/gecko\/(\d+)/i.test(dr.userAgent),PO=!Dp&&/Chrome\/(\d+)/.exec(dr.userAgent),BZ="webkitFontSmoothing"in yy.documentElement.style,_y=!Dp&&/Apple Computer/.test(dr.vendor),tj=_y&&(/Mobile\/\w+/.test(dr.userAgent)||dr.maxTouchPoints>2),xe={mac:tj||/Mac/.test(dr.platform),windows:/Win/.test(dr.platform),linux:/Linux|X11/.test(dr.platform),ie:Dp,ie_version:fN?yy.documentMode||6:xy?+xy[1]:Sy?+Sy[1]:0,gecko:ej,gecko_version:ej?+(/Firefox\/(\d+)/.exec(dr.userAgent)||[0,0])[1]:0,chrome:!!PO,chrome_version:PO?+PO[1]:0,ios:tj,android:/Android\b/.test(dr.userAgent),webkit_version:BZ?+(/\bAppleWebKit\/(\d+)/.exec(dr.userAgent)||[0,0])[1]:0,safari:_y,safari_version:_y?+(/\bVersion\/(\d+(\.\d+)?)/.exec(dr.userAgent)||[0,0])[1]:0,tabSize:yy.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function NS(e,t){for(let n in e)n=="class"&&t.class?t.class+=" "+e.class:n=="style"&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}var Wm=Object.create(null);function RS(e,t,n){if(e==t)return!0;e||(e=Wm),t||(t=Wm);let r=Object.keys(e),i=Object.keys(t);if(r.length-0!=i.length-0)return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function VZ(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]==null&&e.removeAttribute(r)}for(let n in t){let r=t[n];n=="style"?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function nj(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i=="style"?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i=="style"?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function UZ(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var Nc=class{eq(e){return!1}updateDOM(e,t,n){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,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},jr=(function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e})(jr||(jr={})),Ut=class extends Fs{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new MS(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Qd(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=gN(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new Qd(e,n,r,t,e.widget||null,!0)}static line(e){return new LS(e)}static set(e,t=!1){return en.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};Ut.none=en.empty;var MS=class hN extends Ut{constructor(t){let{start:n,end:r}=gN(t);super(n?-1:5e8,r?1:-6e8,null,t),this.tagName=t.tagName||"span",this.attrs=t.class&&t.attributes?NS(t.attributes,{class:t.class}):t.class?{class:t.class}:t.attributes||Wm}eq(t){return this==t||t instanceof hN&&this.tagName==t.tagName&&RS(this.attrs,t.attrs)}range(t,n=t){if(t>=n)throw new RangeError("Mark decorations may not be empty");return super.range(t,n)}};MS.prototype.point=!1;var LS=class mN extends Ut{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof mN&&this.spec.class==t.spec.class&&RS(this.spec.attributes,t.spec.attributes)}range(t,n=t){if(n!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,n)}};LS.prototype.mapMode=fr.TrackBefore;LS.prototype.point=!0;var Qd=class pN extends Ut{constructor(t,n,r,i,a,s){super(n,r,a,t),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?fr.TrackBefore:fr.TrackAfter:fr.TrackDel}get type(){return this.startSide!=this.endSide?jr.WidgetRange:this.startSide<=0?jr.WidgetBefore:jr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof pN&&YZ(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,n=t){if(this.isReplace&&(t>n||t==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,n)}};Qd.prototype.point=!0;function gN(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n==null&&(n=e.inclusive),r==null&&(r=e.inclusive),{start:n??t,end:r??t}}function YZ(e,t){return e==t||!!(e&&t&&e.compare(t))}function nc(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var rj=class wy extends Fs{constructor(t,n){super(),this.tagName=t,this.attributes=n}eq(t){return t==this||t instanceof wy&&this.tagName==t.tagName&&RS(this.attributes,t.attributes)}static create(t){return new wy(t.tagName,t.attributes||Wm)}static set(t,n=!1){return en.of(t,n)}};rj.prototype.startSide=rj.prototype.endSide=-1;function Pd(e){let t;return e.nodeType==11?t=e.getSelection?e:e.ownerDocument:t=e,t.getSelection()}function ky(e,t){return t?e==t||e.contains(t.nodeType!=1?t.parentNode:t):!1}function ud(e,t){if(!t.anchorNode)return!1;try{return ky(e,t.anchorNode)}catch{return!1}}function Am(e){return e.nodeType==3?Nd(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function dd(e,t,n,r){return n?ij(e,t,n,r,-1)||ij(e,t,n,r,1):!1}function Hs(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function Hm(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function ij(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Ga(e))){if(e.nodeName=="DIV")return!1;let a=e.parentNode;if(!a||a.nodeType!=1)return!1;t=Hs(e)+(i<0?0:1),e=a}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable=="false")return!1;t=i<0?Ga(e):0}else return!1}}function Ga(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Gm(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function FZ(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function vN(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function $Z(e,t,n,r,i,a,s,l){let c=e.ownerDocument,d=c.defaultView||window;for(let f=e,m=!1;f&&!m;)if(f.nodeType==1){let p,O=f==c.body,b=1,S=1;if(O)p=FZ(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(m=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let j=f.getBoundingClientRect();({scaleX:b,scaleY:S}=vN(f,j)),p={left:j.left,right:j.left+f.clientWidth*b,top:j.top,bottom:j.top+f.clientHeight*S}}let w=0,k=0;if(i=="nearest")t.top<p.top?(k=t.top-(p.top+s),n>0&&t.bottom>p.bottom+k&&(k=t.bottom-p.bottom+s)):t.bottom>p.bottom&&(k=t.bottom-p.bottom+s,n<0&&t.top-k<p.top&&(k=t.top-(p.top+s)));else{let j=t.bottom-t.top,T=p.bottom-p.top;k=(i=="center"&&j<=T?t.top+j/2-T/2:i=="start"||i=="center"&&n<0?t.top-s:t.bottom-T+s)-p.top}if(r=="nearest"?t.left<p.left?(w=t.left-(p.left+a),n>0&&t.right>p.right+w&&(w=t.right-p.right+a)):t.right>p.right&&(w=t.right-p.right+a,n<0&&t.left<p.left+w&&(w=t.left-(p.left+a))):w=(r=="center"?t.left+(t.right-t.left)/2-(p.right-p.left)/2:r=="start"==l?t.left-a:t.right-(p.right-p.left)+a)-p.left,w||k)if(O)d.scrollBy(w,k);else{let j=0,T=0;if(k){let E=f.scrollTop;f.scrollTop+=k/S,T=(f.scrollTop-E)*S}if(w){let E=f.scrollLeft;f.scrollLeft+=w/b,j=(f.scrollLeft-E)*b}t={left:t.left-j,top:t.top-T,right:t.right-j,bottom:t.bottom-T},j&&Math.abs(j-w)<1&&(r="nearest"),T&&Math.abs(T-k)<1&&(i="nearest")}if(O)break;(t.top<p.top||t.bottom>p.bottom||t.left<p.left||t.right>p.right)&&(t={left:Math.max(t.left,p.left),right:Math.min(t.right,p.right),top:Math.max(t.top,p.top),bottom:Math.min(t.bottom,p.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function ON(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var WZ=class{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:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Ga(t):0),n,Math.min(e.focusOffset,n?Ga(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}},To=null;xe.safari&&xe.safari_version>=26&&(To=!1);function bN(e){if(e.setActive)return e.setActive();if(To)return e.focus(To);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(To==null?{get preventScroll(){return To={preventScroll:!0},!0}}:void 0),!To){To=!1;for(let n=0;n<t.length;){let r=t[n++],i=t[n++],a=t[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=a&&(r.scrollLeft=a)}}}var aj;function Nd(e,t,n=t){let r=aj||(aj=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function rc(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent("keydown",i);a.synthetic=!0,e.dispatchEvent(a);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,e.dispatchEvent(s),a.defaultPrevented||s.defaultPrevented}function HZ(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function GZ(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,Ga(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Ga(n))}else{if(n==e)return!0;r=Hs(n),n=n.parentNode}}function yN(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function SN(e,t){for(let n=e,r=t;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Ga(n)}else if(n.parentNode&&!Hm(n))r=Hs(n),n=n.parentNode;else return null}}function xN(e,t){for(let n=e,r=t;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Hm(n))r=Hs(n)+1,n=n.parentNode;else return null}}var Zs=class jy{constructor(t,n,r=!0){this.node=t,this.offset=n,this.precise=r}static before(t,n){return new jy(t.parentNode,Hs(t),n)}static after(t,n){return new jy(t.parentNode,Hs(t)+1,n)}},Cn=(function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e})(Cn||(Cn={})),Zo=Cn.LTR,DS=Cn.RTL;function _N(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}var KZ=_N("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),JZ=_N("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Ty=Object.create(null),Ki=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);Ty[t]=n,Ty[n]=-t}function wN(e){return e<=247?KZ[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?JZ[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var eB=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,ca=class{get dir(){return this.level%2?DS:Zo}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let s=e[a];if(s.from<=t&&s.to>=t){if(s.level==n)return a;(i<0||(r!=0?r<0?s.from<t:s.to>t:e[i].level>s.level))&&(i=a)}}if(i<0)throw new RangeError("Index out of range");return i}};function kN(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!kN(r.inner,i.inner))return!1}return!0}var qt=[];function tB(e,t,n,r,i){for(let a=0;a<=r.length;a++){let s=a?r[a-1].to:t,l=a<r.length?r[a].from:n,c=a?256:i;for(let d=s,f=c,m=c;d<l;d++){let p=wN(e.charCodeAt(d));p==512?p=f:p==8&&m==4&&(p=16),qt[d]=p==4?2:p,p&7&&(m=p),f=p}for(let d=s,f=c,m=c;d<l;d++){let p=qt[d];if(p==128)d<l-1&&f==qt[d+1]&&f&24?p=qt[d]=f:qt[d]=256;else if(p==64){let O=d+1;for(;O<l&&qt[O]==64;)O++;let b=d&&f==8||O<n&&qt[O]==8?m==1?1:8:256;for(let S=d;S<O;S++)qt[S]=b;d=O-1}else p==8&&m==1&&(qt[d]=1);f=p,p&7&&(m=p)}}}function nB(e,t,n,r,i){let a=i==1?2:1;for(let s=0,l=0,c=0;s<=r.length;s++){let d=s?r[s-1].to:t,f=s<r.length?r[s].from:n;for(let m=d,p,O,b;m<f;m++)if(O=Ty[p=e.charCodeAt(m)])if(O<0){for(let S=l-3;S>=0;S-=3)if(Ki[S+1]==-O){let w=Ki[S+2],k=w&2?i:w&4?w&1?a:i:0;k&&(qt[m]=qt[Ki[S]]=k),l=S;break}}else{if(Ki.length==189)break;Ki[l++]=m,Ki[l++]=p,Ki[l++]=c}else if((b=qt[m])==2||b==1){let S=b==i;c=S?0:1;for(let w=l-3;w>=0;w-=3){let k=Ki[w+2];if(k&2)break;if(S)Ki[w+2]|=2;else{if(k&4)break;Ki[w+2]|=4}}}}}function rB(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let s=i?n[i-1].to:e,l=i<n.length?n[i].from:t;for(let c=s;c<l;){let d=qt[c];if(d==256){let f=c+1;for(;;)if(f==l){if(i==n.length)break;f=n[i++].to,l=i<n.length?n[i].from:t}else if(qt[f]==256)f++;else break;let m=a==1,p=(f<t?qt[f]:r)==1,O=m==p?m?1:2:r;for(let b=f,S=i,w=S?n[S-1].to:e;b>c;)b==w&&(b=n[--S].from,w=S?n[S-1].to:e),qt[--b]=O;c=f}else a=d,c++}}}function Cy(e,t,n,r,i,a,s){let l=r%2?2:1;if(r%2==i%2)for(let c=t,d=0;c<n;){let f=!0,m=!1;if(d==a.length||c<a[d].from){let S=qt[c];S!=l&&(f=!1,m=S==16)}let p=!f&&l==1?[]:null,O=f?r:r+1,b=c;e:for(;;)if(d<a.length&&b==a[d].from){if(m)break e;let S=a[d];if(!f)for(let w=S.to,k=d+1;;){if(w==n)break e;if(k<a.length&&a[k].from==w)w=a[k++].to;else{if(qt[w]==l)break e;break}}if(d++,p)p.push(S);else{S.from>c&&s.push(new ca(c,S.from,O));let w=S.direction==Zo!=!(O%2);Ey(e,w?r+1:r,i,S.inner,S.from,S.to,s),c=S.to}b=S.to}else{if(b==n||(f?qt[b]!=l:qt[b]==l))break;b++}p?Cy(e,c,b,r+1,i,p,s):c<b&&s.push(new ca(c,b,O)),c=b}else for(let c=n,d=a.length;c>t;){let f=!0,m=!1;if(!d||c>a[d-1].to){let S=qt[c-1];S!=l&&(f=!1,m=S==16)}let p=!f&&l==1?[]:null,O=f?r:r+1,b=c;e:for(;;)if(d&&b==a[d-1].to){if(m)break e;let S=a[--d];if(!f)for(let w=S.from,k=d;;){if(w==t)break e;if(k&&a[k-1].to==w)w=a[--k].from;else{if(qt[w-1]==l)break e;break}}if(p)p.push(S);else{S.to<c&&s.push(new ca(S.to,c,O));let w=S.direction==Zo!=!(O%2);Ey(e,w?r+1:r,i,S.inner,S.from,S.to,s),c=S.from}b=S.from}else{if(b==t||(f?qt[b-1]!=l:qt[b-1]==l))break;b--}p?Cy(e,b,c,r+1,i,p,s):b<c&&s.push(new ca(b,c,O)),c=b}}function Ey(e,t,n,r,i,a,s){let l=t%2?2:1;tB(e,i,a,r,l),nB(e,i,a,r,l),rB(i,a,r,l),Cy(e,i,a,t,n,r,s)}function iB(e,t,n){if(!e)return[new ca(0,0,t==DS?1:0)];if(t==Zo&&!n.length&&!eB.test(e))return jN(e.length);if(n.length)for(;e.length>qt.length;)qt[qt.length]=256;let r=[],i=t==Zo?0:1;return Ey(e,i,i,n,0,e.length,r),r}function jN(e){return[new ca(0,e,0)]}var TN="";function aB(e,t,n,r,i){var a;let s=r.head-e.from,l=ca.find(t,s,(a=r.bidiLevel)!==null&&a!==void 0?a:-1,r.assoc),c=t[l],d=c.side(i,n);if(s==d){let p=l+=i?1:-1;if(p<0||p>=t.length)return null;c=t[l=p],s=c.side(!i,n),d=c.side(i,n)}let f=Mi(e.text,s,c.forward(i,n));(f<c.from||f>c.to)&&(f=d),TN=e.text.slice(Math.min(s,f),Math.max(s,f));let m=l==(i?t.length-1:0)?null:t[l+(i?1:-1)];return m&&f==d&&m.level+(i?0:1)<c.level?Ce.cursor(m.side(!i,n)+e.from,m.forward(i,n)?1:-1,m.level):Ce.cursor(f+e.from,c.forward(i,n)?-1:1,c.level)}function sB(e,t,n){for(let r=t;r<n;r++){let i=wN(e.charCodeAt(r));if(i==1)return Zo;if(i==2||i==4)return DS}return Zo}var CN=ze.define(),EN=ze.define(),AN=ze.define(),QN=ze.define(),Ay=ze.define(),PN=ze.define(),NN=ze.define(),zS=ze.define(),qS=ze.define(),RN=ze.define({combine:e=>e.some(t=>t)}),oB=ze.define({combine:e=>e.some(t=>t)}),MN=ze.define(),NO=class Qy{constructor(t,n="nearest",r="nearest",i=5,a=5,s=!1){this.range=t,this.y=n,this.x=r,this.yMargin=i,this.xMargin=a,this.isSnapshot=s}map(t){return t.empty?this:new Qy(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new Qy(Ce.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},Gh=ln.define({map:(e,t)=>e.map(t)}),LN=ln.define();function ua(e,t,n){let r=e.facet(QN);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+":",t):console.error(t))}var Va=ze.define({combine:e=>e.length?e[0]:!0}),lB=0,Gl=ze.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),Rd=class Py{constructor(t,n,r,i,a){this.id=t,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=a(this),this.extension=this.baseExtensions.concat(Gl.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(Gl.of({plugin:this,arg:t}))}static define(t,n){const{eventHandlers:r,eventObservers:i,provide:a,decorations:s}=n||{};return new Py(lB++,t,r,i,l=>{let c=[];return s&&c.push(zp.of(d=>{let f=d.plugin(l);return f?s(f):Ut.none})),a&&c.push(a(l)),c})}static fromClass(t,n){return Py.define((r,i)=>new t(r,i),n)}},RO=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(ua(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){ua(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){ua(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}},DN=ze.define(),IS=ze.define(),zp=ze.define(),zN=ze.define(),XS=ze.define(),hf=ze.define(),qN=ze.define();function sj(e,t){let n=e.state.facet(qN);if(!n.length)return n;let r=n.map(a=>a instanceof Function?a(e):a),i=[];return en.spans(r,t.from,t.to,{point(){},span(a,s,l,c){let d=a-t.from,f=s-t.from,m=i;for(let p=l.length-1;p>=0;p--,c--){let O=l[p].spec.bidiIsolate,b;if(O==null&&(O=sB(t.text,d,f)),c>0&&m.length&&(b=m[m.length-1]).to==d&&b.direction==O)b.to=f,m=b.inner;else{let S={from:d,to:f,direction:O,inner:[]};m.push(S),m=S.inner}}}}),i}var IN=ze.define();function XN(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(IN)){let s=a(e);s&&(s.left!=null&&(t=Math.max(t,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:t,right:n,top:r,bottom:i}}var Hu=ze.define(),$a=class Ny{constructor(t,n,r,i){this.fromA=t,this.toA=n,this.fromB=r,this.toB=i}join(t){return new Ny(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let n=t.length,r=this;for(;n>0;n--){let i=t[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),t.splice(n-1,1)}}return t.splice(n,0,r),t}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,s=0;;){let l=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,d=Math.min(l,c);if(d==1e9)break;let f=d+s,m=d,p=f;for(;;)if(a<n.length&&n[a]<=m){let O=n[a+1];a+=2,m=Math.max(m,O);for(let b=i;b<t.length&&t[b].fromB<=m;b++)s=t[b].toA-t[b].toB;p=Math.max(p,O+s)}else if(i<t.length&&t[i].fromB<=m){let O=t[i++];m=Math.max(m,O.toB),p=Math.max(p,O.toA),s=O.toA-O.toB}else break;r.push(new Ny(f,p,d,m))}return r}},oj=class ZN{constructor(t,n,r){this.view=t,this.state=n,this.transactions=r,this.flags=0,this.startState=t.state,this.changes=ma.empty(this.startState.doc.length);for(let a of r)this.changes=this.changes.compose(a.changes);let i=[];this.changes.iterChangedRanges((a,s,l,c)=>i.push(new $a(a,s,l,c))),this.changedRanges=i}static create(t,n,r){return new ZN(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},cB=[],cn=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return cB}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&VZ(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let n=Hs(this.dom),r=this.length?e>0:t>0;return new Zs(this.parent.dom,n+(r?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Ip)return e;return null}static get(e){return e.cmTile}},qp=class extends cn{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=(e==null?void 0:e.node)==t?e:null,a=0;for(let s of this.children){if(s.sync(e),a+=s.length+s.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=s.dom&&(i.written=!0),s.dom.parentNode==t)for(;r&&r!=s.dom;)r=lj(r);else t.insertBefore(s.dom,r);n=s.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=lj(r);this.length=a}};function lj(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var Ip=class extends qp{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=cn.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof qo)t.push(r),n=a,r=0;else{let s=i+a.length,l=e(a,i);if(l!==void 0)return l;i=s+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((s,l)=>{let c=l+s.length;if(e>=l&&e<=c){if(s.isWidget()&&t>=-1&&t<=1){if(s.flags&32)return!0;s.flags&16&&(n=void 0)}(l<e||e==c&&(t<-1?s.length:s.covers(1)))&&(!n||!s.isWidget()&&n.isWidget())&&(n=s,r=e-l),(c>e||e==l&&(t>1?s.length:s.covers(-1)))&&(!i||!s.isWidget()&&i.isWidget())&&(i=s,a=e-l)}}),!n&&!i)throw new Error("No tile at position "+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},qo=class BN extends qp{constructor(t,n){super(t),this.wrapper=n}isBlock(){return!0}covers(t){return this.children.length?t<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new BN(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},Km=class VN extends qp{constructor(t,n){super(t),this.attrs=n}isLine(){return!0}static start(t,n,r){let i=new VN(n||document.createElement("div"),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(t,n,r){let i=null,a=-1,s=null,l=-1;function c(f,m){for(let p=0,O=0;p<f.children.length&&O<=m;p++){let b=f.children[p],S=O+b.length;S>=m&&(b.isComposite()?c(b,m-O):(!s||s.isHidden&&(n>0||r&&dB(s,b)))&&(S>m||b.flags&32)?(s=b,l=m-O):(O<m||b.flags&16&&!b.isHidden)&&(i=b,a=m-O)),O=S}}c(this,t);let d=(n<0?i:s)||i||s;return d?{tile:d,offset:d==i?a:l}:null}coordsIn(t,n){let r=this.resolveInline(t,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n):uB(this)}domIn(t,n){let r=this.resolveInline(t,n);if(r){let{tile:i,offset:a}=r;if(this.dom.contains(i.dom))return i.isText()?new Zs(i.dom,Math.min(i.dom.nodeValue.length,a)):i.domPosFor(a,i.flags&16?1:i.flags&32?-1:n);let s=r.tile.parent,l=!1;for(let c of s.children){if(l)return new Zs(c.dom,0);c==r.tile&&(l=!0)}}return new Zs(this.dom,0)}};function uB(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=Am(t);return n[n.length-1]||null}function dB(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var di=class UN extends qp{constructor(t,n){super(t),this.mark=n}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new UN(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},Gu=class YN extends cn{constructor(t,n){super(t,n.length),this.text=n}sync(t){this.flags&2||(super.sync(t),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(t,n){let r=this.dom.nodeValue.length;t>r&&(t=r);let i=t,a=t,s=0;t==0&&n<0||t==r&&n>=0?xe.chrome||xe.gecko||(t?(i--,s=1):a<r&&(a++,s=-1)):n<0?i--:a<r&&a++;let l=Nd(this.dom,i,a).getClientRects();if(!l.length)return null;let c=l[(s?s<0:n>=0)?0:l.length-1];return xe.safari&&!s&&c.width==0&&(c=Array.prototype.find.call(l,d=>d.width)||c),s?Gm(c,s<0):c||null}static of(t,n){let r=new YN(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},Md=class FN extends cn{constructor(t,n,r,i){super(t,n,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(t){return this.flags&48?!1:(this.flags&(t<0?64:128))>0}coordsIn(t,n){return this.coordsInWidget(t,n,!1)}coordsInWidget(t,n,r){let i=this.widget.coordsAt(this.dom,t,n);if(i)return i;if(r)return Gm(this.dom.getBoundingClientRect(),this.length?t==0:n<=0);{let a=this.dom.getClientRects(),s=null;if(!a.length)return null;let l=this.flags&16?!0:this.flags&32?!1:t>0;for(let c=l?a.length-1:0;s=a[c],!(t>0?c==0:c==a.length-1||s.top<s.bottom);c+=l?-1:1);return Gm(s,!l)}}get overrideDOMText(){if(!this.length)return _t.empty;let{root:t}=this;if(!t)return _t.empty;let n=this.posAtStart;return t.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable="false")),new FN(a,r,t,i)}},Jm=class extends cn{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return _t.empty}coordsIn(e){return this.dom.getBoundingClientRect()}},fB=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:s}=this;for(;e||t>0;)if(r.isComposite())if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!s.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=s.pop(),i++}else{let l=r.children[i],c=l.breakAfter;(t>0?l.length<=e:l.length<e)&&(!n||n.skip(l,0,l.length)!==!1||!l.isComposite)?(a=!!c,i++,e-=l.length):(s.push({tile:r,index:i}),r=l,i=0,n&&l.isComposite()&&n.enter(l))}else if(i==r.length)a=!!r.breakAfter,{tile:r,index:i}=s.pop(),i++;else if(e){let l=Math.min(e,r.length-i);n&&n.skip(r,i,i+l),e-=l,i+=l}else break;return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},hB=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},mB=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){var i;this.flushBuffer();let a=this.ensureMarks(t,n),s=a.lastChild;if(s&&s.isText()&&!(s.flags&8)&&s.length+e.length<512){this.cache.reused.set(s,2);let l=a.children[a.children.length-1]=new Gu(s.dom,s.text+e);l.parent=a}else a.append(r||Gu.of(e,(i=this.cache.find(Gu))===null||i===void 0?void 0:i.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?MO(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let s=t.marks.length-1;s>=0;s--){let l=t.marks[s],c=r.lastChild;if(c instanceof di&&c.mark.eq(l.mark))c.dom!=l.dom&&c.setDOM(MO(l.dom)),r=c;else{if(this.cache.reused.get(l)){let f=cn.get(l.dom);f&&f.setDOM(MO(l.dom))}let d=di.of(l.mark,l.dom);r.append(d),r=d}this.cache.reused.set(l,2)}let i=cn.get(e.text);i&&this.cache.reused.set(i,2);let a=new Gu(e.text,e.text.nodeValue);a.flags|=8,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var n;e||(e=$N);let r=Km.start(e,t||((n=this.cache.find(Km))===null||n===void 0?void 0:n.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var n;let r=this.curLine;for(let i=e.length-1;i>=0;i--){let a=e[i],s;if(t>0&&(s=r.lastChild)&&s instanceof di&&s.mark.eq(a))r=s,t--;else{let l=di.of(a,(n=this.cache.find(di,c=>c.mark.eq(a)))===null||n===void 0?void 0:n.dom);r.append(l),r=l,t=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!cj(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(xe.ios&&cj(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(LO,0,32)||new Md(LO.toDOM(),0,LO,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new hB(e.from,e.to,e.value,e.rank),n=this.wrappers.length;for(;n>0&&(this.wrappers[n-1].rank-t.rank||this.wrappers[n-1].to-t.to)<0;)n--;this.wrappers.splice(n,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let n of this.wrappers){let r=t.lastChild;if(n.from<this.pos&&r instanceof qo&&r.wrapper.eq(n.wrapper))t=r;else{let i=qo.of(n.wrapper,(e=this.cache.find(qo,a=>a.wrapper.eq(n.wrapper)))===null||e===void 0?void 0:e.dom);t.append(i),t=i}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(Jm,void 0,1);return n&&(n.flags=t),n||new Jm(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},pB=class{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:i,done:a}=this.cursor.next(this.skipCount);if(this.skipCount=0,a)throw new Error("Ran out of text content when drawing inline views");this.text=r;let s=this.textOff=Math.min(e,r.length);return i?null:r.slice(0,s)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},ep=[Md,Km,Gu,di,Jm,qo,Ip];for(let e=0;e<ep.length;e++)ep[e].bucket=e;var gB=class{constructor(e){this.view=e,this.buckets=ep.map(()=>[]),this.index=ep.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let s=i.length-1;s>=0;s--){let l=(s+a)%i.length,c=i[l];if((!t||t(c))&&!this.reused.has(c))return i.splice(l,1),l<a&&this.index[r]--,this.reused.set(c,n),c}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let s=r[i];if(!this.reused.has(s)&&(a==0?s.widget.compare(e):s.widget.constructor==e.constructor&&e.updateDOM(s.dom,this.view,s.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,s.widget==e&&s.length==t&&(s.flags&497)==n?(this.reused.set(s,1),s):(this.reused.set(s,2),new Md(s.dom,t,e,s.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},vB=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new gB(e),this.text=new pB(e.state.doc),this.builder=new mB(this.cache,new Ip(e,e.contentDOM),en.iter(n)),this.cache.reused.set(t,2),this.old=new fB(t),this.reuseWalker={skip:(a,s,l)=>{if(this.cache.add(a),a.isComposite())return!1},enter:a=>this.cache.add(a),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let s=a<e.length?e[a++]:null,l=s?s.fromA:this.old.root.length;if(l>r){let c=l-r;this.preserve(c,!a,!s),r=l,i+=c}if(!s)break;t&&s.fromA<=t.range.fromA&&s.toA>=t.range.toA?(this.forward(s.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,s.toA),this.emit(t.range.toB,s.toB)):(this.forward(s.fromA,s.toA),this.emit(i,s.toB)),i=s.toB,r=s.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=yB(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(a,s,l)=>{if(a.isWidget())if(this.openWidget)this.builder.continueWidget(l-s);else{let c=l>0||s<a.length?Md.of(a.widget,this.view,l-s,a.flags&496,this.cache.maybeReuse(a)):this.cache.reuse(a);c.flags&256?(c.flags&=-2,this.builder.addBlockWidget(c)):(this.builder.ensureLine(null),this.builder.addInlineWidget(c,r,i),i=r.length)}else if(a.isText())this.builder.ensureLine(null),!s&&l==a.length&&!this.cache.reused.has(a)?this.builder.addText(a.text,r,i,this.cache.reuse(a)):(this.cache.add(a),this.builder.addText(a.text.slice(s,l),r,i)),i=r.length;else if(a.isLine())a.flags&=-2,this.cache.reused.set(a,1),this.builder.addLine(a);else if(a instanceof Jm)this.cache.add(a);else if(a instanceof di)this.builder.ensureLine(null),this.builder.addMark(a,r,i),this.cache.reused.set(a,1),i=r.length;else return!1;this.openWidget=!1},enter:a=>{a.isLine()?this.builder.addLineStart(a.attrs,this.cache.maybeReuse(a)):(this.cache.add(a),a instanceof di&&r.unshift(a.mark)),this.openWidget=!1},leave:a=>{a.isLine()?r.length&&(r.length=i=0):a instanceof di&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=0,a=en.spans(this.decorations,e,t,{point:(s,l,c,d,f,m)=>{if(c instanceof Qd){if(this.disallowBlockEffectsFor[m]){if(c.block)throw new RangeError("Block decorations may not be specified via plugins");if(l>this.view.state.doc.lineAt(s).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(i=d.length,f>d.length)r.continueWidget(l-s);else{let p=c.widget||(c.block?gc.block:gc.inline),O=OB(c),b=this.cache.findWidget(p,l-s,O)||Md.of(p,this.view,l-s,O);c.block?(c.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(b)):(r.ensureLine(n),r.addInlineWidget(b,d,f))}n=null}else n=bB(n,c);l>s&&this.text.skip(l-s)},span:(s,l,c,d)=>{for(let f=s;f<l;){let m=this.text.next(Math.min(512,l-f));m==null?(r.addLineStartIfNotCovered(n),r.addBreak(),f++):(r.ensureLine(n),r.addText(m,c,f==s?d:c.length),f+=m.length),n=null}}});r.addLineStartIfNotCovered(n),this.openWidget=a>i,this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let i=cn.get(r);if(r==this.view.contentDOM)break;i instanceof di?t.push(i):i!=null&&i.isLine()?n=i:i instanceof qo||(r.nodeName=="DIV"&&!n&&r!=this.view.contentDOM?n=new Km(r,$N):n||t.push(di.of(new MS({tagName:r.nodeName.toLowerCase(),attributes:UZ(r)}),r)))}return{line:n,marks:t}}};function cj(e,t){let n=r=>{for(let i of r.children)if((t?i.isText():i.length)||n(i))return!0;return!1};return n(e)}function OB(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var $N={class:"cm-line"};function bB(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r||(e||(e={class:"cm-line"}),n&&NS(n,e),r&&(e.class+=" "+r)),e}function yB(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof di&&t.push(r.mark)}return t}function MO(e){let t=cn.get(e);return t&&t.setDOM(e.cloneNode()),e}var gc=class extends Nc{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}};gc.inline=new gc("span");gc.block=new gc("div");var LO=new class extends Nc{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}},uj=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Ut.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.updateDeco(),this.tile=new Ip(e,e.contentDOM),this.updateInner([new $a(0,0,0,e.state.doc.length)],null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:d,toA:f})=>f<this.minWidthFrom||d>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 r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?r=this.domChanged.newSel.head:!EB(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let i=r>-1?xB(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:d,to:f}=this.hasComposition;n=new $a(d,f,e.changes.mapPos(d,-1),e.changes.mapPos(f,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(xe.ie||xe.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.blockWrappers;this.updateDeco();let l=kB(a,this.decorations,e.changes);l.length&&(n=$a.extendWithRanges(n,l));let c=TB(s,this.blockWrappers,e.changes);return c.length&&(n=$a.extendWithRanges(n,c)),i&&!n.some(d=>d.fromA<=i.range.fromA&&d.toA>=i.range.toA)&&(n=i.range.addToSet(n.slice())),this.tile.flags&2&&n.length==0?!1:(this.updateInner(n,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let a=this.tile,s=new vB(this.view,a,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&cn.get(t.text)&&s.cache.reused.set(cn.get(t.text),2),this.tile=s.run(e,t),Ry(a,s.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let i=xe.chrome||xe.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(i),i&&(i.written||n.selectionRange.focusNode!=i.node||!this.tile.dom.contains(i.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let i of this.tile.children)i.isWidget()&&i.widget instanceof DO&&r.push(i.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(LN)&&(this.editContextFormatting=n.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(Va)||n.tabIndex>-1)&&ud(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let s=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c,d;if(l.empty?d=c=this.inlineDOMNearPos(l.anchor,l.assoc||1):(d=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),c=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),xe.gecko&&l.empty&&!this.hasComposition&&SB(c)){let m=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(m,c.node.childNodes[c.offset]||null)),c=d=new Zs(m,0),s=!0}let f=this.view.observer.selectionRange;(s||!f.focusNode||(!dd(c.node,c.offset,f.anchorNode,f.anchorOffset)||!dd(d.node,d.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,l))&&(this.view.observer.ignore(()=>{xe.android&&xe.chrome&&n.contains(f.focusNode)&&CB(f.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let m=Pd(this.view.root);if(m)if(l.empty){if(xe.gecko){let p=_B(c.node,c.offset);if(p&&p!=3){let O=(p==1?SN:xN)(c.node,c.offset);O&&(c=new Zs(O.node,O.offset))}}m.collapse(c.node,c.offset),l.bidiLevel!=null&&m.caretBidiLevel!==void 0&&(m.caretBidiLevel=l.bidiLevel)}else if(m.extend){m.collapse(c.node,c.offset);try{m.extend(d.node,d.offset)}catch{}}else{let p=document.createRange();l.anchor>l.head&&([c,d]=[d,c]),p.setEnd(d.node,d.offset),p.setStart(c.node,c.offset),m.removeAllRanges(),m.addRange(p)}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,d)),this.impreciseAnchor=c.precise?null:new Zs(f.anchorNode,f.anchorOffset),this.impreciseHead=d.precise?null:new Zs(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&dd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Pd(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let s=a.posAtStart;if(t.head==s||t.head==s+a.length)return;let l=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!l||!c||l.bottom>c.top)return;let d=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(d.node,d.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let a=Ga(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==n.dom)break;a==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?a=-1:a=1),e=s}a<0?i=e:i=e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!cn.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let a=0,s=r;;a++){let l=n.children[a];if(l.dom==i)return s;s+=l.length+l.breakAfter}}else return n.isText()?e==n.dom?r+t:r+(t?n.length:0):r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(e,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,s=-1,l=!1;return this.tile.blockTiles((c,d)=>{if(c.isWidget()){if(c.flags&32&&d>=e)return!0;c.flags&16&&(i=!0)}else{let f=d+c.length;if(d<=e&&(n=c,r=e-d,i=f<e),f>=e&&!a&&(a=c,s=e-d,l=d>e),d>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:l&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(s,t))}coordsAt(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.widget instanceof DO?null:n.coordsInWidget(r,t,!0):n.coordsIn(r,t)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(i,a){if(i.isComposite())for(let s of i.children){if(s.length>=a){let l=r(s,a);if(l)return l}if(a-=s.length,a<0)break}else if(i.isText()&&a<i.length){let s=Mi(i.text,a);if(s==a)return null;let l=Nd(i.dom,a,s).getClientRects();for(let c=0;c<l.length;c++){let d=l[c];if(c==l.length-1||d.top<d.bottom&&d.left<d.right)return d}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==Cn.LTR,c=0,d=(f,m,p)=>{for(let O=0;O<f.children.length&&!(m>r);O++){let b=f.children[O],S=m+b.length,w=b.dom.getBoundingClientRect(),{height:k}=w;if(p&&!O&&(c+=w.top-p.top),b instanceof qo)S>n&&d(b,m,w);else if(m>=n&&(c>0&&t.push(-c),t.push(k+c),c=0,a)){let j=b.dom.lastChild,T=j?Am(j):[];if(T.length){let E=T[T.length-1],Q=l?E.right-w.left:w.right-E.left;Q>s&&(s=Q,this.minWidth=i,this.minWidthFrom=m,this.minWidthTo=S)}}p&&O==f.children.length-1&&(c+=p.bottom-w.bottom),m=S+b.breakAfter}};return d(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?Cn.RTL:Cn.LTR}measureTextSize(){let e=this.tile.blockTiles(a=>{if(a.isLine()&&a.children.length&&a.length<=20){let s=0,l;for(let c of a.children){if(!c.isText()||/[^ -~]/.test(c.text))return;let d=Am(c.dom);if(d.length!=1)return;s+=d[0].width,l=d[0].height}if(s)return{lineHeight:a.dom.getBoundingClientRect().height,charWidth:s/a.length,textHeight:l}}});if(e)return e;let t=document.createElement("div"),n,r,i;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let a=Am(t.firstChild)[0];n=t.getBoundingClientRect().height,r=a&&a.width?a.width/27:7,i=a&&a.height?a.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let s=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Ut.replace({widget:new DO(s),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return Ut.set(e)}updateDeco(){let e=1,t=this.view.state.facet(zp).map(i=>(this.dynamicDecorationMap[e++]=typeof i=="function")?i(this.view):i),n=!1,r=this.view.state.facet(XS).map((i,a)=>{let s=typeof i=="function";return s&&(n=!0),s?i(this.view):i});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(en.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(zN).map(i=>typeof i=="function"?i(this.view):i)}scrollIntoView(e){var t;if(e.isSnapshot){let d=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=d.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let d of this.view.state.facet(MN))try{if(d(this.view,e.range,e))return!0}catch(f){ua(this.view.state,f,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,(t=n.assoc)!==null&&t!==void 0?t:n.empty?0:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let a=XN(this.view),s={left:r.left-a.left,top:r.top-a.top,right:r.right+a.right,bottom:r.bottom+a.bottom},{offsetWidth:l,offsetHeight:c}=this.view.scrollDOM;if($Z(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==Cn.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(r.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||r.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let d=this.view.docView.lineAt(n.head,1);d&&d.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=n=>n.isWidget()||n.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){Ry(this.tile)}};function Ry(e,t){let n=t==null?void 0:t.get(e);if(n!=1){n==null&&e.destroy();for(let r of e.children)Ry(r,t)}}function SB(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable=="false")&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable=="false")}function WN(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=SN(n.focusNode,n.focusOffset),i=xN(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let l=cn.get(i.node);if(!l||l.isText()&&l.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let c=cn.get(r.node);!c||c.isText()&&c.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let s=t-a.offset;return{from:s,to:s+a.node.nodeValue.length,node:a.node}}function xB(e,t,n){let r=WN(e,n);if(!r)return null;let{node:i,from:a,to:s}=r,l=i.nodeValue;if(/[\n\r]/.test(l)||e.state.doc.sliceString(r.from,r.to)!=l)return null;let c=t.invertedDesc;return{range:new $a(c.mapPos(a),c.mapPos(s),a,s),text:i}}function _B(e,t){return e.nodeType!=1?0:(t&&e.childNodes[t-1].contentEditable=="false"?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable=="false"?2:0)}var wB=class{constructor(){this.changes=[]}compareRange(t,n){nc(t,n,this.changes)}comparePoint(t,n){nc(t,n,this.changes)}boundChange(t){nc(t,t,this.changes)}};function kB(e,t,n){let r=new wB;return en.compare(e,t,n,r),r.changes}var jB=class{constructor(){this.changes=[]}compareRange(e,t){nc(e,t,this.changes)}comparePoint(){}boundChange(e){nc(e,e,this.changes)}};function TB(e,t,n){let r=new jB;return en.compare(e,t,n,r),r.changes}function CB(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function EB(e,t){let n=!1;return t&&e.iterChangedRanges((r,i)=>{r<t.to&&i>t.from&&(n=!0)}),n}var DO=class extends Nc{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 AB(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return Ce.cursor(t);a==0?n=1:a==i.length&&(n=-1);let s=a,l=a;n<0?s=Mi(i.text,a,!1):l=Mi(i.text,a);let c=r(i.text.slice(s,l));for(;s>0;){let d=Mi(i.text,s,!1);if(r(i.text.slice(d,s))!=c)break;s=d}for(;l<i.length;){let d=Mi(i.text,l);if(r(i.text.slice(l,d))!=c)break;l=d}return Ce.range(s+i.from,l+i.from)}function QB(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let l=e.viewState.heightOracle.textHeight,c=Math.floor((i-n.top-(e.defaultLineHeight-l)*.5)/l);a+=c*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+zZ(s,a,e.state.tabSize)}function PB(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let i;for(let a of r.type){if(a.from>t)break;if(!(a.to<t)){if(a.from<t&&a.to>t)return a;(!i||a.type==jr.Text&&(i.type!=a.type||(n<0?a.from<t:a.to>t)))&&(i=a)}}return i||r}return r}function NB(e,t,n,r){let i=PB(e,t.head,t.assoc||-1),a=!r||i.type!=jr.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let s=e.dom.getBoundingClientRect(),l=e.textDirectionAt(i.from),c=e.posAtCoords({x:n==(l==Cn.LTR)?s.right-1:s.left+1,y:(a.top+a.bottom)/2});if(c!=null)return Ce.cursor(c,n?-1:1)}return Ce.cursor(n?i.to:i.from,n?-1:1)}function dj(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let l=t,c=null;;){let d=aB(i,a,s,l,n),f=TN;if(!d){if(i.number==(n?e.state.doc.lines:1))return l;f=`
|
|
48
|
+
`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),d=e.visualLineSide(i,!n)}if(c){if(!c(f))return l}else{if(!r)return d;c=r(f)}l=d}}function RB(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return a=>{let s=r(a);return i==Fa.Space&&(i=s),i==s}}function MB(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return Ce.cursor(i,t.assoc);let s=t.goalColumn,l,c=e.contentDOM.getBoundingClientRect(),d=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),f=e.documentTop;if(d)s==null&&(s=d.left-c.left),l=a<0?d.top:d.bottom;else{let b=e.viewState.lineBlockAt(i);s==null&&(s=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-b.from))),l=(a<0?b.top:b.bottom)+f}let m=c.left+s,p=e.viewState.heightOracle.textHeight>>1,O=r??p;for(let b=0;;b+=p){let S=l+(O+b)*a,w=My(e,{x:m,y:S},!1,a);if(n?S>c.bottom:S<c.top)return Ce.cursor(w.pos,w.assoc);let k=e.coordsAtPos(w.pos,w.assoc),j=k?(k.top+k.bottom)/2:0;if(!k||(n?j>l:j<l))return Ce.cursor(w.pos,w.assoc,void 0,s)}}function fd(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(a,s,l)=>{if(t>a&&t<s){let c=r||n||(t-a<s-t?-1:1);t=c<0?a:s,r=c}});if(!r)return t}}function HN(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let s=fd(e,i.from,0);s!=i.from&&(a=Ce.cursor(s,-1))}else{let s=fd(e,i.from,-1),l=fd(e,i.to,1);(s!=i.from||l!=i.to)&&(a=Ce.range(i.from==i.anchor?s:l,i.from==i.head?s:l))}a&&(n||(n=t.ranges.slice()),n[r]=a)}return n?Ce.create(n,t.mainIndex):t}function zO(e,t,n){let r=fd(e.state.facet(hf).map(i=>i(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:Ce.cursor(r,r<n.from?1:-1)}var la=class{constructor(e,t){this.pos=e,this.assoc=t}};function My(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:s,y:l}=t,c=l-a,d;for(;;){if(c<0)return new la(0,1);if(c>e.viewState.docHeight)return new la(e.state.doc.length,-1);if(d=e.elementAtHeight(c),r==null)break;if(d.type==jr.Text){if(r<0?d.to<e.viewport.from:d.from>e.viewport.to)break;let p=e.docView.coordsAt(r<0?d.from:d.to,r>0?-1:1);if(p&&(r<0?p.top<=c+a:p.bottom>=c+a))break}let m=e.viewState.heightOracle.textHeight/2;c=r>0?d.bottom+m:d.top-m}if(e.viewport.from>=d.to||e.viewport.to<=d.from){if(n)return null;if(d.type==jr.Text){let m=QB(e,i,d,s,l);return new la(m,m==d.from?1:-1)}}if(d.type!=jr.Text)return c<(d.top+d.bottom)/2?new la(d.from,1):new la(d.to,-1);let f=e.docView.lineAt(d.from,2);return(!f||f.length!=d.length)&&(f=e.docView.lineAt(d.from,-2)),new LB(e,s,l,e.textDirectionAt(d.from)).scanTile(f,d.from)}var LB=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[ca.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[ca.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t){let n=0,r=e.length-1,i=new Set,a=this.bidiIn(e[0],e[r]),s,l,c=-1,d=1e9,f;e:for(;n<r;){let p=r-n,O=n+r>>1;t:if(i.has(O)){let S=n+Math.floor(Math.random()*p);for(let w=0;w<p;w++){if(!i.has(S)){O=S;break t}S++,S==r&&(S=n)}break e}i.add(O);let b=t(O);if(b)for(let S=0;S<b.length;S++){let w=b[S],k=0;if(!(w.width==0&&b.length>1)){if(w.bottom<this.y)(!s||s.bottom<w.bottom)&&(s=w),k=1;else if(w.top>this.y)(!l||l.top>w.top)&&(l=w),k=-1;else{let j=w.left>this.x?this.x-w.left:w.right<this.x?this.x-w.right:0,T=Math.abs(j);T<d&&(c=O,d=T,f=w),j&&(k=j<0==(this.baseDir==Cn.LTR)?-1:1)}k==-1&&(!a||this.baseDirAt(e[O],1))?r=O:k==1&&(!a||this.baseDirAt(e[O+1],-1))&&(n=O+1)}}}if(!f){let p=s&&(!l||this.y-s.bottom<l.top-this.y)?s:l;return this.y=(p.top+p.bottom)/2,this.scan(e,t)}let m=(a?this.dirAt(e[c],1):this.baseDir)==Cn.LTR;return{i:c,after:this.x>(f.left+f.right)/2==m}}scanText(e,t){let n=[];for(let i=0;i<e.length;i=Mi(e.text,i))n.push(t+i);n.push(t+e.length);let r=this.scan(n,i=>{let a=n[i]-t,s=n[i+1]-t;return Nd(e.dom,a,s).getClientRects()});return r.after?new la(n[r.i+1],-1):new la(n[r.i],1)}scanTile(e,t){if(!e.length)return new la(t,1);if(e.children.length==1){let s=e.children[0];if(s.isText())return this.scanText(s,t);if(s.isComposite())return this.scanTile(s,t)}let n=[t];for(let s=0,l=t;s<e.children.length;s++)n.push(l+=e.children[s].length);let r=this.scan(n,s=>{let l=e.children[s];return l.flags&48?null:(l.dom.nodeType==1?l.dom:Nd(l.dom,0,l.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new la(n[r.i+1],-1):new la(a,1)}},Wl="",DB=class{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(nn.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Wl}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let i=this.text.length;this.readNode(r);let a=cn.get(r),s=r.nextSibling;if(s==t){a!=null&&a.breakAfter&&!s&&n!=this.view.contentDOM&&this.lineBreak();break}let l=cn.get(s);(a&&l?a.breakAfter:(a?a.breakAfter:Hm(r))||Hm(s)&&(r.nodeName!="BR"||a!=null&&a.isWidget())&&this.text.length>i)&&!qB(s,t)&&this.lineBreak(),r=s}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,s;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(s=r.exec(t))&&(i=s.index,a=s[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);n=i+a}}readNode(e){let t=cn.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let r=n.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.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,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(zB(e,n.node,n.offset)?t:0))}};function zB(e,t,n){for(;;){if(!t||n<Ga(t))return!1;if(t==e)return!0;n=Hs(t)+1,t=t.parentNode}}function qB(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let r=cn.get(e);if(!(r!=null&&r.isWidget()))return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}var fj=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},IB=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,s=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=GN(e.docView.tile,t,n,0))){let l=i||a?[]:ZB(e),c=new DB(l,e);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=BB(l,this.bounds.from)}else{let l=e.observer.selectionRange,c=i&&i.node==l.focusNode&&i.offset==l.focusOffset||!ky(e.contentDOM,l.focusNode)?s.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),d=a&&a.node==l.anchorNode&&a.offset==l.anchorOffset||!ky(e.contentDOM,l.anchorNode)?s.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),f=e.viewport;if((xe.ios||xe.chrome)&&s.main.empty&&c!=d&&(f.from>0||f.to<e.state.doc.length)){let m=Math.min(c,d),p=Math.max(c,d),O=f.from-m,b=f.to-p;(O==0||O==1||m==0)&&(b==0||b==-1||p==e.state.doc.length)&&(c=0,d=e.state.doc.length)}if(e.inputState.composing>-1&&s.ranges.length>1)this.newSel=s.replaceRange(Ce.range(d,c));else if(e.lineWrapping&&d==c&&!(s.main.empty&&s.main.head==c)&&e.inputState.lastTouchTime>Date.now()-100){let m=e.coordsAtPos(c,-1),p=0;m&&(p=e.inputState.lastTouchY<=m.bottom?-1:1),this.newSel=Ce.create([Ce.cursor(c,p)])}else this.newSel=Ce.single(d,c)}}};function GN(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,s=-1,l=-1;for(let c=0,d=r,f=r;c<e.children.length;c++){let m=e.children[c],p=d+m.length;if(d<t&&p>n)return GN(m,t,n,d);if(p>=t&&i==-1&&(i=c,a=d),d>n&&m.dom.parentNode==e.dom){s=c,l=f;break}f=p,d=p+m.breakAfter}return{from:a,to:l<0?r+e.length:l,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:s<e.children.length&&s>=0?e.children[s].dom:null}}else return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function KN(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,s=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:l,to:c}=t.bounds,d=a.from,f=null;(s===8||xe.android&&t.text.length<c-l)&&(d=a.to,f="end");let m=i.doc.sliceString(l,c,Wl),p,O;!a.empty&&a.from>=l&&a.to<=c&&(t.typeOver||m!=t.text)&&m.slice(0,a.from-l)==t.text.slice(0,a.from-l)&&m.slice(a.to-l)==t.text.slice(p=t.text.length-(m.length-(a.to-l)))?n={from:a.from,to:a.to,insert:_t.of(t.text.slice(a.from-l,p).split(Wl))}:(O=JN(m,t.text,d-l,f))&&(xe.chrome&&s==13&&O.toB==O.from+2&&t.text.slice(O.from,O.toB)==Wl+Wl&&O.toB--,n={from:l+O.from,to:l+O.toA,insert:_t.of(t.text.slice(O.from,O.toB).split(Wl))})}else r&&(!e.hasFocus&&i.facet(Va)||tp(r,a))&&(r=null);if(!n&&!r)return!1;if((xe.mac||xe.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Ce.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:_t.of([n.insert.toString().replace("."," ")])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:xe.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
|
|
49
|
+
`&&e.lineWrapping&&(r&&(r=Ce.single(r.main.anchor-1,r.main.head-1)),n={from:a.from,to:a.to,insert:_t.of([" "])}),n)return ZS(e,n,r,s);if(r&&!tp(r,a)){let l=!1,c="select";return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin=="select"&&(l=!0),c=e.inputState.lastSelectionOrigin,c=="select.pointer"&&(r=HN(i.facet(hf).map(d=>d(e)),r))),e.dispatch({selection:r,scrollIntoView:l,userEvent:c}),!0}else return!1}function ZS(e,t,n,r=-1){if(xe.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(xe.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&rc(e.contentDOM,"Enter",13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&rc(e.contentDOM,"Backspace",8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&rc(e.contentDOM,"Delete",46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s,l=()=>s||(s=XB(e,t,n));return e.state.facet(PN).some(c=>c(e,t.from,t.to,a,l))||e.dispatch(l()),!0}function XB(e,t,n){let r,i=e.state,a=i.selection.main,s=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let c=t.from<a.from?-1:1,d=c<0?a.from:a.to,f=fd(i.facet(hf).map(m=>m(e)),d,c);t.from==f&&(s=f)}if(s>-1)r={changes:t,selection:Ce.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let c=a.from<t.from?i.sliceDoc(a.from,t.from):"",d=a.to>t.to?i.sliceDoc(t.to,a.to):"";r=i.replaceSelection(e.state.toText(c+t.insert.sliceString(0,void 0,e.state.lineBreak)+d))}else{let c=i.changes(t),d=n&&n.main.to<=c.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let f=e.state.sliceDoc(t.from,t.to),m,p=n&&WN(e,n.main.head);if(p){let b=t.insert.length-(t.to-t.from);m={from:p.from,to:p.to-b}}else m=e.state.doc.lineAt(a.head);let O=a.to-t.to;r=i.changeByRange(b=>{if(b.from==a.from&&b.to==a.to)return{changes:c,range:d||b.map(c)};let S=b.to-O,w=S-f.length;if(e.state.sliceDoc(w,S)!=f||S>=m.from&&w<=m.to)return{range:b};let k=i.changes({from:w,to:S,insert:t.insert}),j=b.to-a.to;return{changes:k,range:d?Ce.range(Math.max(0,d.anchor+j),Math.max(0,d.head+j)):b.map(k)}})}else r={changes:c,selection:d&&i.selection.replaceRange(d)}}let l="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,l+=".compose",e.inputState.compositionFirstChange&&(l+=".start",e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:l,scrollIntoView:!0})}function JN(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let s=e.length,l=t.length;for(;s>0&&l>0&&e.charCodeAt(s-1)==t.charCodeAt(l-1);)s--,l--;if(r=="end"){let c=Math.max(0,a-Math.min(s,l));n-=s+c-a}if(s<a&&e.length<t.length){let c=n<=a&&n>=s?a-n:0;a-=c,l=a+(l-s),s=a}else if(l<a){let c=n<=a&&n>=l?a-n:0;a-=c,s=a+(s-l),l=a}return{from:a,toA:s,toB:l}}function ZB(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new fj(n,r)),(i!=n||a!=r)&&t.push(new fj(i,a))),t}function BB(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?Ce.single(n+t,r+t):null}function tp(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var VB=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=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.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,xe.safari&&e.contentDOM.addEventListener("input",()=>null),xe.gecko&&a2(e.contentDOM.ownerDocument)}handleEvent(e){!KB(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let r of n.observers)r(this.view,t);for(let r of n.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=UB(e),n=this.handlers,r=this.view.contentDOM;for(let i in t)if(i!="scroll"){let a=!t[i].handlers.length,s=n[i];s&&a!=!s.handlers.length&&(r.removeEventListener(i,this.handleEvent),s=null),s||r.addEventListener(i,this.handleEvent,{passive:a})}for(let i in n)i!="scroll"&&!t[i]&&r.removeEventListener(i,this.handleEvent);this.handlers=t}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&&tR.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),xe.android&&xe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return xe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=eR.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||YB.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,rc(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:xe.safari&&!xe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!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 hj(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(i){ua(n.state,i)}}}function UB(e){let t=Object.create(null);function n(r){return t[r]||(t[r]={observers:[],handlers:[]})}for(let r of e){let i=r.spec,a=i&&i.plugin.domEventHandlers,s=i&&i.plugin.domEventObservers;if(a)for(let l in a){let c=a[l];c&&n(l).handlers.push(hj(r.value,c))}if(s)for(let l in s){let c=s[l];c&&n(l).observers.push(hj(r.value,c))}}for(let r in Xi)n(r).handlers.push(Xi[r]);for(let r in Cr)n(r).observers.push(Cr[r]);return t}var eR=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],YB="dthko",tR=[16,17,18,20,91,92,224,225],Kh=6;function Jh(e){return Math.max(0,e)*.7+8}function FB(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var $B=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=ON(e.contentDOM),this.atoms=e.state.facet(hf).map(a=>a(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(nn.allowMultipleSelections)&&WB(e,t),this.dragging=GB(e,t)&&iR(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&FB(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=XN(this.view);e.clientX-l.left<=r+Kh?t=-Jh(r-e.clientX):e.clientX+l.right>=a-Kh&&(t=Jh(e.clientX-a)),e.clientY-l.top<=i+Kh?n=-Jh(i-e.clientY):e.clientY+l.bottom>=s-Kh&&(n=Jh(e.clientY-s)),this.setScrollSpeed(t,n)}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,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=HN(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function WB(e,t){let n=e.state.facet(CN);return n.length?n[0](t):xe.mac?t.metaKey:t.ctrlKey}function HB(e,t){let n=e.state.facet(EN);return n.length?n[0](t):xe.mac?!t.altKey:!t.ctrlKey}function GB(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=Pd(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let a=0;a<i.length;a++){let s=i[a];if(s.left<=t.clientX&&s.right>=t.clientX&&s.top<=t.clientY&&s.bottom>=t.clientY)return!0}return!1}function KB(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=cn.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var Xi=Object.create(null),Cr=Object.create(null),nR=xe.ie&&xe.ie_version<15||xe.ios&&xe.webkit_version<604;function JB(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),rR(e,n.value)},50)}function Xp(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function rR(e,t){t=Xp(e.state,zS,t);let{state:n}=e,r,i=1,a=n.toText(t),s=a.lines==n.selection.ranges.length;if(Ly!=null&&n.selection.ranges.every(c=>c.empty)&&Ly==a.toString()){let c=-1;r=n.changeByRange(d=>{let f=n.doc.lineAt(d.from);if(f.from==c)return{range:d};c=f.from;let m=n.toText((s?a.line(i++).text:t)+n.lineBreak);return{changes:{from:f.from,insert:m},range:Ce.cursor(d.from+m.length)}})}else s?r=n.changeByRange(c=>{let d=a.line(i++);return{changes:{from:c.from,to:c.to,insert:d.text},range:Ce.cursor(c.from+d.length)}}):r=n.replaceSelection(a);e.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Cr.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft};Cr.wheel=Cr.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()};Xi.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1);Cr.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin("select.pointer")};Cr.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")};Xi.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(AN))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=t2(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new $B(e,t,n,r)),r&&e.observer.ignore(()=>{bN(e.contentDOM);let a=e.root.activeElement;a&&!a.contains(e.contentDOM)&&a.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin("select.pointer");return!1};function mj(e,t,n,r){if(r==1)return Ce.cursor(t,n);if(r==2)return AB(e.state,t,n);{let i=e.docView.lineAt(t,n),a=e.state.doc.lineAt(i?i.posAtEnd:t),s=i?i.posAtStart:a.from,l=i?i.posAtEnd:a.to;return l<e.state.doc.length&&l==a.to&&l++,Ce.range(s,l)}}var e2=xe.ie&&xe.ie_version<=11,pj=null,gj=0,vj=0;function iR(e){if(!e2)return e.detail;let t=pj,n=vj;return pj=e,vj=Date.now(),gj=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(gj+1)%3:1}function t2(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=iR(t),i=e.state.selection;return{update(a){a.docChanged&&(n.pos=a.changes.mapPos(n.pos),i=i.map(a.changes))},get(a,s,l){let c=e.posAndSideAtCoords({x:a.clientX,y:a.clientY},!1),d,f=mj(e,c.pos,c.assoc,r);if(n.pos!=c.pos&&!s){let m=mj(e,n.pos,n.assoc,r),p=Math.min(m.from,f.from),O=Math.max(m.to,f.to);f=p<f.from?Ce.range(p,O,f.assoc):Ce.range(O,p,f.assoc)}return s?i.replaceRange(i.main.extend(f.from,f.to,f.assoc)):l&&r==1&&i.ranges.length>1&&(d=n2(i,c.pos))?d:l?i.addRange(f):Ce.create([f])}}}function n2(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return Ce.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}Xi.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let i=e.docView.tile.nearest(t.target);if(i&&i.isWidget()){let a=i.posAtStart,s=a+i.length;(a>=n.to||s<=n.from)&&(n=Ce.range(a,s))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",Xp(e.state,qS,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1};Xi.dragend=e=>(e.inputState.draggedContent=null,!1);function Oj(e,t,n,r){if(n=Xp(e.state,zS,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,s=r&&a&&HB(e,t)?{from:a.from,to:a.to}:null,l={from:i,insert:n},c=e.state.changes(s?[s,l]:l);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}Xi.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&Oj(e,t,r.filter(s=>s!=null).join(e.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let l=new FileReader;l.onerror=a,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[s]=l.result),a()},l.readAsText(n[s])}return!0}else{let r=t.dataTransfer.getData("Text");if(r)return Oj(e,t,r,!0),!0}return!1};Xi.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=nR?null:t.clipboardData;return n?(rR(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(JB(e),!1)};function r2(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function i2(e){let t=[],n=[],r=!1;for(let i of e.selection.ranges)i.empty||(t.push(e.sliceDoc(i.from,i.to)),n.push(i));if(!t.length){let i=-1;for(let{from:a}of e.selection.ranges){let s=e.doc.lineAt(a);s.number>i&&(t.push(s.text),n.push({from:s.from,to:Math.min(e.doc.length,s.to+1)})),i=s.number}r=!0}return{text:Xp(e,qS,t.join(e.lineBreak)),ranges:n,linewise:r}}var Ly=null;Xi.copy=Xi.cut=(e,t)=>{if(!ud(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=i2(e.state);if(!n&&!i)return!1;Ly=i?n:null,t.type=="cut"&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let a=nR?null:t.clipboardData;return a?(a.clearData(),a.setData("text/plain",n),!0):(r2(e,n),!1)};var aR=Jo.define();function sR(e,t){let n=[];for(let r of e.facet(NN)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:aR.of(!0)}):null}function oR(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=sR(e.state,t);n?e.dispatch(n):e.update([])}},10)}Cr.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),oR(e)};Cr.blur=e=>{e.observer.clearSelectionRange(),oR(e)};Cr.compositionstart=Cr.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange==null&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))};Cr.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,xe.chrome&&xe.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))};Cr.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()};Xi.beforeinput=(e,t)=>{var n,r;if((t.inputType=="insertText"||t.inputType=="insertCompositionText")&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType=="insertReplacementText"&&e.observer.editContext){let a=(n=t.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),s=t.getTargetRanges();if(a&&s.length){let l=s[0],c=e.posAtDOM(l.startContainer,l.startOffset),d=e.posAtDOM(l.endContainer,l.endOffset);return ZS(e,{from:c,to:d,insert:e.state.toText(a)},null),!0}}let i;if(xe.chrome&&xe.android&&(i=eR.find(a=>a.inputType==t.inputType))&&(e.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let a=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>a+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return xe.ios&&t.inputType=="deleteContentForward"&&e.observer.flushSoon(),xe.safari&&t.inputType=="insertText"&&e.inputState.composing>=0&&setTimeout(()=>Cr.compositionend(e,t),20),!1};var bj=new Set;function a2(e){bj.has(e)||(bj.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}var yj=["pre-wrap","normal","pre-line","break-spaces"],vc=!1;function Sj(){vc=!1}var s2=class{constructor(e){this.lineWrapping=e,this.doc=_t.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return yj.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let s=yj.indexOf(e)>-1,l=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=s||Math.abs(n-this.charWidth)>.1;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,l){this.heightSamples={};for(let c=0;c<a.length;c++){let d=a[c];d<0?c++:this.heightSamples[Math.floor(d*10)]=!0}}return l}},o2=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},Ua=class lR{constructor(t,n,r,i,a){this.from=t,this.length=n,this.top=r,this.height=i,this._content=a}get type(){return typeof this._content=="number"?jr.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 Qd?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new lR(this.from,this.length+t.length,this.top,this.height+t.height,n)}},Vt=(function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e})(Vt||(Vt={})),Qm=.001,zi=class Pm{constructor(t,n,r=2){this.length=t,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(t){this.flags=(t?2:0)|this.flags&-3}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>Qm&&(vc=!0),this.height=t)}replace(t,n,r){return Pm.of(r)}decomposeLeft(t,n){n.push(this)}decomposeRight(t,n){n.push(this)}applyChanges(t,n,r,i){let a=this,s=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:c,toA:d,fromB:f,toB:m}=i[l],p=a.lineAt(c,Vt.ByPosNoHeight,r.setDoc(n),0,0),O=p.to>=d?p:a.lineAt(d,Vt.ByPosNoHeight,r,0,0);for(m+=O.to-d,d=O.to;l>0&&p.from<=i[l-1].toA;)c=i[l-1].fromA,f=i[l-1].fromB,l--,c<p.from&&(p=a.lineAt(c,Vt.ByPosNoHeight,r,0,0));f+=p.from-c,c=p.from;let b=d2.build(r.setDoc(s),t,f,m);a=np(a,a.replace(c,d,b))}return a.updateHeight(r,0)}static empty(){return new aa(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r)if(i>a*2){let l=t[n-1];l.break?t.splice(--n,1,l.left,null,l.right):t.splice(--n,1,l.left,l.right),r+=1+l.break,i-=l.size}else if(a>i*2){let l=t[r];l.break?t.splice(r,1,l.left,null,l.right):t.splice(r,1,l.left,l.right),r+=2+l.break,a-=l.size}else break;else if(i<a){let l=t[n++];l&&(i+=l.size)}else{let l=t[--r];l&&(a+=l.size)}let s=0;return t[n-1]==null?(s=1,n--):t[n]==null&&(s=1,r++),new c2(Pm.of(t.slice(0,n)),s,Pm.of(t.slice(r)))}};function np(e,t){return e==t?e:(e.constructor!=t.constructor&&(vc=!0),t)}zi.prototype.size=1;var l2=Ut.replace({}),cR=class extends zi{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new Ua(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new Ua(r,0,n,this.spaceAbove,l2):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,Vt.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},aa=class Dy extends cR{constructor(t,n,r){super(t,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(t,n){return new Ua(n,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof Dy||i instanceof ic&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof ic?i=new Dy(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):zi.of(r)}updateHeight(t,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}},ic=class Pi extends zi{constructor(t){super(t,0)}heightMetrics(t,n){let r=t.doc.lineAt(n).number,i=t.doc.lineAt(n+this.length).number,a=i-r+1,s,l=0;if(t.lineWrapping){let c=Math.min(this.height,t.lineHeight*a);s=c/a,this.length>a+1&&(l=(this.height-c)/(this.length-a-1))}else s=this.height/a;return{firstLine:r,lastLine:i,perLine:s,perChar:l}}blockAt(t,n,r,i){let{firstLine:a,lastLine:s,perLine:l,perChar:c}=this.heightMetrics(n,i);if(n.lineWrapping){let d=i+(t<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-r)/this.height))*this.length)),f=n.doc.lineAt(d),m=l+f.length*c,p=Math.max(r,t-m/2);return new Ua(f.from,f.length,p,m,0)}else{let d=Math.max(0,Math.min(s-a,Math.floor((t-r)/l))),{from:f,length:m}=n.doc.line(a+d);return new Ua(f,m,r+l*d,l,0)}}lineAt(t,n,r,i,a){if(n==Vt.ByHeight)return this.blockAt(t,r,i,a);if(n==Vt.ByPosNoHeight){let{from:O,to:b}=r.doc.lineAt(t);return new Ua(O,b-O,0,0,0)}let{firstLine:s,perLine:l,perChar:c}=this.heightMetrics(r,a),d=r.doc.lineAt(t),f=l+d.length*c,m=d.number-s,p=i+l*m+c*(d.from-a-m);return new Ua(d.from,d.length,Math.max(i,Math.min(p,i+this.height-f)),f,0)}forEachLine(t,n,r,i,a,s){t=Math.max(t,a),n=Math.min(n,a+this.length);let{firstLine:l,perLine:c,perChar:d}=this.heightMetrics(r,a);for(let f=t,m=i;f<=n;){let p=r.doc.lineAt(f);if(f==t){let b=p.number-l;m+=c*b+d*(t-a-b)}let O=c+d*p.length;s(new Ua(p.from,p.length,m,O,0)),m+=O,f=p.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let a=r[r.length-1];a instanceof Pi?r[r.length-1]=new Pi(a.length+i):r.push(null,new Pi(i-1))}if(t>0){let a=r[0];a instanceof Pi?r[0]=new Pi(t+a.length):r.unshift(new Pi(t-1),null)}return zi.of(r)}decomposeLeft(t,n){n.push(new Pi(t-1),null)}decomposeRight(t,n){n.push(null,new Pi(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],l=Math.max(n,i.from),c=-1;for(i.from>n&&s.push(new Pi(i.from-n-1).updateHeight(t,n));l<=a&&i.more;){let f=t.doc.lineAt(l).length;s.length&&s.push(null);let m=i.heights[i.index++],p=0;m<0&&(p=-m,m=i.heights[i.index++]),c==-1?c=m:Math.abs(m-c)>=Qm&&(c=-2);let O=new aa(f,m,p);O.outdated=!1,s.push(O),l+=f+1}l<=a&&s.push(null,new Pi(a-l).updateHeight(t,l));let d=zi.of(s);return(c<0||Math.abs(d.height-this.height)>=Qm||Math.abs(c-this.heightMetrics(t,n).perLine)>=Qm)&&(vc=!0),np(this,d)}else(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},c2=class extends zi{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(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,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,s=i+this.left.length+this.break,l=t==Vt.ByHeight?e<a:e<s,c=l?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,s);if(this.break||(l?c.to<s:c.from>s))return c;let d=t==Vt.ByPosNoHeight?Vt.ByPosNoHeight:Vt.ByPos;return l?c.join(this.right.lineAt(s,d,n,a,s)):this.left.lineAt(s,d,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let s=r+this.left.height,l=i+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,t,n,r,i,a),t>=l&&this.right.forEachLine(e,t,n,s,l,a);else{let c=this.lineAt(l,Vt.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,s,l,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let s of n)i.push(s);if(e>0&&xj(i,a-1),t<this.length){let s=i.length;this.decomposeRight(t,i),xj(i,s)}return zi.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?zi.of(this.break?[e,null,t]:[e,t]):(this.left=np(this.left,e),this.right=np(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,s=t+i.length+this.break,l=null;return r&&r.from<=t+i.length&&r.more?l=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+a.length&&r.more?l=a=a.updateHeight(e,s,n,r):a.updateHeight(e,s,n),l?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};function xj(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof ic&&(r=e[t+1])instanceof ic&&e.splice(t-1,3,new ic(n.length+1+r.length))}var u2=5,d2=class uR{constructor(t,n){this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof aa?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new aa(r-this.pos,-1,0)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(t,n,r){if(t<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,a=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-t;r.block?this.addBlock(new cR(s,i,r)):(s||a||i>=u2)&&this.addLineDeco(i,a,s)}else n>t&&this.span(t,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=n,this.writtenTo<t&&((this.writtenTo<t-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new aa(this.pos-t,-1,0)),this.writtenTo=this.pos}blankContent(t,n){let r=new ic(n-t);return this.oracle.doc.lineAt(t).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof aa)return t;let n=new aa(0,-1,0);return this.nodes.push(n),n}addBlock(t){this.enterLine();let n=t.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,n&&n.endSide>0&&(this.covering=t)}addLineDeco(t,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,t),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(t){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof aa)&&!this.isCovered?this.nodes.push(new aa(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=t;for(let i of this.nodes)i instanceof aa&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(t,n,r,i){let a=new uR(r,t);return en.spans(n,r,i,a,0),a.finish(r)}};function f2(e,t,n){let r=new h2;return en.compare(e,t,n,r,0),r.changes}var h2=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&nc(e,t,this.changes,5)}};function m2(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),l=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let d=e.parentNode;d&&d!=r.body;)if(d.nodeType==1){let f=d,m=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&m.overflow!="visible"){let p=f.getBoundingClientRect();a=Math.max(a,p.left),s=Math.min(s,p.right),l=Math.max(l,p.top),c=Math.min(d==e.parentNode?i.innerHeight:c,p.bottom)}d=m.position=="absolute"||m.position=="fixed"?f.offsetParent:f.parentNode}else if(d.nodeType==11)d=d.host;else break;return{left:a-n.left,right:Math.max(a,s)-n.left,top:l-(n.top+t),bottom:Math.max(l,c)-(n.top+t)}}function p2(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function g2(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var qO=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return Ut.replace({widget:new v2(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},v2=class extends Nc{constructor(e,t){super(),this.size=e,this.vertical=t}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}},_j=class{constructor(e,t){this.view=e,this.state=t,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.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=wj,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Cn.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(IS).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new s2(n),this.stateDeco=kj(t),this.heightMap=zi.empty().applyChanges(this.stateDeco,_t.empty,this.heightOracle.setDoc(t.doc),[new $a(0,0,0,t.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ut.set(this.lineGaps.map(r=>r.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:i,to:a})=>r>=i&&r<=a)){let{from:i,to:a}=this.lineBlockAt(r);e.push(new em(i,a))}}return this.viewports=e.sort((n,r)=>n.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?wj:new y2(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(Ku(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=kj(this.state);let r=e.changedRanges,i=$a.extendWithRanges(r,f2(n,this.stateDeco,e?e.changes:ma.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);Sj(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||vc)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let l=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<l.from||t.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));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(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(oB)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?Cn.RTL:Cn.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent==="refresh",s=t.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let c=0,d=0;if(s.width&&s.height){let{scaleX:E,scaleY:Q}=vN(t,s);(E>.005&&Math.abs(this.scaleX-E)>.005||Q>.005&&Math.abs(this.scaleY-Q)>.005)&&(this.scaleX=E,this.scaleY=Q,c|=16,a=l=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,m=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=m)&&(this.paddingTop=f,this.paddingBottom=m,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let p=ON(this.view.contentDOM,!1).y;p!=this.scrollParent&&(this.scrollParent=p,this.scrollAnchorHeight=-1,this.scrollOffset=0);let O=this.getScrollOffset();this.scrollOffset!=O&&(this.scrollAnchorHeight=-1,this.scrollOffset=O),this.scrolledToBottom=yN(this.scrollParent||e.win);let b=(this.printing?g2:m2)(t,this.paddingTop),S=b.top-this.pixelViewport.top,w=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let k=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(k!=this.inView&&(this.inView=k,k&&(l=!0)),!this.inView&&!this.scrollTarget&&!p2(e.dom))return 0;let j=s.width;if((this.contentDOMWidth!=j||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let E=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(E)&&(a=!0),a||r.lineWrapping&&Math.abs(j-this.contentDOMWidth)>r.charWidth){let{lineHeight:Q,charWidth:A,textHeight:N}=e.docView.measureTextSize();a=Q>0&&r.refresh(i,Q,A,N,Math.max(5,j/A),E),a&&(e.docView.minWidth=0,c|=16)}S>0&&w>0?d=Math.max(S,w):S<0&&w<0&&(d=Math.min(S,w)),Sj();for(let Q of this.viewports){let A=Q.from==this.viewport.from?E:e.docView.measureVisibleLineHeights(Q);this.heightMap=(a?zi.empty().applyChanges(this.stateDeco,_t.empty,this.heightOracle,[new $a(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new o2(Q.from,A))}vc&&(c|=2)}let T=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return T&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),c|=this.updateForViewport()),(c&2||T)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]: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,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new em(r.lineAt(a-n*1e3,Vt.ByHeight,i,0,0).from,r.lineAt(s+(1-n)*1e3,Vt.ByHeight,i,0,0).to);if(t){let{head:c}=t.range;if(c<l.from||c>l.to){let d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=r.lineAt(c,Vt.ByPos,i,0,0),m;t.y=="center"?m=(f.top+f.bottom)/2-d/2:t.y=="start"||t.y=="nearest"&&c<l.from?m=f.top:m=f.bottom-d,l=new em(r.lineAt(m-1e3/2,Vt.ByHeight,i,0,0).from,r.lineAt(m+d+1e3/2,Vt.ByHeight,i,0,0).to)}}return l}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new em(this.heightMap.lineAt(n,Vt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Vt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,Vt.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,Vt.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:s}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=s+Math.max(10,Math.min(n,250)))&&r>a-2*1e3&&i<s+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new qO(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=Cn.LTR&&!n)return[];let s=[],l=(d,f,m,p)=>{if(f-d<i)return;let O=this.state.selection.main,b=[O.from];O.empty||b.push(O.to);for(let w of b)if(w>d&&w<f){l(d,w-10,m,p),l(w+10,f,m,p);return}let S=b2(e,w=>w.from>=m.from&&w.to<=m.to&&Math.abs(w.from-d)<i&&Math.abs(w.to-f)<i&&!b.some(k=>w.from<k&&w.to>k));if(!S){if(f<m.to&&t&&n&&t.visibleRanges.some(j=>j.from<=f&&j.to>=f)){let j=t.moveToLineBoundary(Ce.cursor(f),!1,!0).head;j>d&&(f=j)}let w=this.gapSize(m,d,f,p),k=n||w<2e6?w:2e6;S=new qO(d,f,w,k)}s.push(S)},c=d=>{if(d.length<a||d.type!=jr.Text)return;let f=O2(d.from,d.to,this.stateDeco);if(f.total<a)return;let m=this.scrollTarget?this.scrollTarget.range.head:null,p,O;if(n){let b=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,S,w;if(m!=null){let k=nm(f,m),j=((this.visibleBottom-this.visibleTop)/2+b)/d.height;S=k-j,w=k+j}else S=(this.visibleTop-d.top-b)/d.height,w=(this.visibleBottom-d.top+b)/d.height;p=tm(f,S),O=tm(f,w)}else{let b=f.total*this.heightOracle.charWidth,S=r*this.heightOracle.charWidth,w=0;if(b>2e6)for(let Q of e)Q.from>=d.from&&Q.from<d.to&&Q.size!=Q.displaySize&&Q.from*this.heightOracle.charWidth+w<this.pixelViewport.left&&(w=Q.size-Q.displaySize);let k=this.pixelViewport.left+w,j=this.pixelViewport.right+w,T,E;if(m!=null){let Q=nm(f,m),A=((j-k)/2+S)/b;T=Q-A,E=Q+A}else T=(k-S)/b,E=(j+S)/b;p=tm(f,T),O=tm(f,E)}p>d.from&&l(d.from,p,d,f),O<d.to&&l(O,d.to,d,f)};for(let d of this.viewportLines)Array.isArray(d.type)?d.type.forEach(c):c(d);return s}gapSize(e,t,n,r){let i=nm(r,n)-nm(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){qO.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Ut.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];en.spans(t,this.viewport.from,this.viewport.to,{span(i,a){n.push({from:i,to:a})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let i=0;i<n.length&&!(r&8);i++){let a=this.visibleRanges[i],s=n[i];(a.from!=s.from||a.to!=s.to)&&(r|=4,e&&e.mapPos(a.from,-1)==s.from&&e.mapPos(a.to,1)==s.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Ku(this.heightMap.lineAt(e,Vt.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(t=>t.top<=e&&t.bottom>=e)||Ku(this.heightMap.lineAt(this.scaler.fromDOM(e),Vt.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Ku(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}},em=class{constructor(e,t){this.from=e,this.to=t}};function O2(e,t,n){let r=[],i=e,a=0;return en.spans(n,e,t,{span(){},point(s,l){s>i&&(r.push({from:i,to:s}),a+=s-i),i=l}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function tm({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let i=0;;i++){let{from:a,to:s}=t[i],l=s-a;if(r<=l)return a+r;r-=l}}function nm(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function b2(e,t){for(let n of e)if(t(n))return n}var wj={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function kj(e){let t=e.facet(zp).filter(r=>typeof r!="function"),n=e.facet(XS).filter(r=>typeof r!="function");return n.length&&t.push(en.join(n)),t}var y2=class dR{constructor(t,n,r){let i=0,a=0,s=0;this.viewports=r.map(({from:l,to:c})=>{let d=n.lineAt(l,Vt.ByPos,t,0,0).top,f=n.lineAt(c,Vt.ByPos,t,0,0).bottom;return i+=f-d,{from:l,to:c,top:d,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let l of this.viewports)l.domTop=s+(l.top-a)*this.scale,s=l.domBottom=l.domTop+(l.bottom-l.top),a=l.bottom}toDOM(t){for(let n=0,r=0,i=0;;n++){let a=n<this.viewports.length?this.viewports[n]:null;if(!a||t<a.top)return i+(t-r)*this.scale;if(t<=a.bottom)return a.domTop+(t-a.top);r=a.bottom,i=a.domBottom}}fromDOM(t){for(let n=0,r=0,i=0;;n++){let a=n<this.viewports.length?this.viewports[n]:null;if(!a||t<a.domTop)return r+(t-i)/this.scale;if(t<=a.domBottom)return a.top+(t-a.domTop);r=a.bottom,i=a.domBottom}}eq(t){return t instanceof dR?this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((n,r)=>n.from==t.viewports[r].from&&n.to==t.viewports[r].to):!1}};function Ku(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new Ua(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(i=>Ku(i,t)):e._content)}var rm=ze.define({combine:e=>e.join(" ")}),zy=ze.define({combine:e=>e.indexOf(!0)>-1}),qy=$s.newName(),fR=$s.newName(),hR=$s.newName(),mR={"&light":"."+fR,"&dark":"."+hR};function Iy(e,t,n){return new $s(t,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return e;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):e+" "+r}})}var S2=Iy("."+qy,{"&":{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,overflowAnchor:"none"},".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:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".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",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&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,zIndex:300},"&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-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".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",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".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"}},mR),x2={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},IO=xe.ie&&xe.ie_version<=11,_2=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new WZ,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(t=>{for(let n of t)this.queue.push(n);(xe.ie&&xe.ie_version<=11||xe.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&xe.android&&e.constructor.EDIT_CONTEXT!==!1&&!(xe.chrome&&xe.chrome_version<126)&&(this.editContext=new k2(e),e.state.facet(Va)&&(e.contentDOM.editContext=this.editContext.editContext)),IO&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.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 t;((t=this.view.docView)===null||t===void 0?void 0:t.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(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.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(t=>{t.length>0&&t[t.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.type)&&!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((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Va)?n.root.activeElement!=this.dom:!ud(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(xe.ie&&xe.ie_version<=11||xe.android&&xe.chrome)&&!n.state.selection.main.empty&&r.focusNode&&dd(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Pd(e.root);if(!t)return!1;let n=xe.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&w2(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=ud(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&GZ(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)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,x2),IO&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),IO&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let r=()=>{let i=this.delayedAndroidKey;i&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=i.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&i.force&&rc(this.dom,i.key,i.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,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 t=-1,n=-1,r=!1;for(let i of e){let a=this.readMutation(i);a&&(a.typeOver&&(r=!0),t==-1?{from:t,to:n}=a:(t=Math.min(a.from,t),n=Math.max(a.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&ud(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new IB(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=KN(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!tp(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let n=jj(t,e.previousSibling||e.target.previousSibling,-1),r=jj(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.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?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(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?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Va)!=e.state.facet(Va)&&(e.view.contentDOM.editContext=e.state.facet(Va)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function jj(e,t,n){for(;t;){let r=cn.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}function Tj(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor,1);return dd(s.node,s.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function w2(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return Tj(e,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?Tj(e,n):null}var k2=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=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)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,s=this.toEditorPos(n.updateRangeStart),l=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:s,drifted:!1});let c=l-s>n.text.length;s==this.from&&i<this.from?s=i:l==this.to&&i>this.to&&(l=i);let d=JN(e.state.sliceDoc(s,l),n.text,(c?r.from:r.to)-s,c?"end":null);if(!d){let m=Ce.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));tp(m,r)||e.dispatch({selection:m,userEvent:"select"});return}let f={from:d.from+s,to:d.toA+s,insert:_t.of(n.text.slice(d.from,d.toB).split(`
|
|
50
|
+
`))};if((xe.mac||xe.android)&&f.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:s,to:l,insert:_t.of([n.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let m=this.to-this.from+(f.to-f.from+f.insert.length);ZS(e,f,Ce.single(this.toEditorPos(n.selectionStart,m),this.toEditorPos(n.selectionEnd,m)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let a=this.toEditorPos(n.rangeStart),s=this.toEditorPos(n.rangeEnd);a<s;a++){let l=e.coordsForChar(a);i=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=n=>{let r=[];for(let i of n.getTextFormats()){let a=i.underlineStyle,s=i.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(s)){let l=this.toEditorPos(i.rangeStart),c=this.toEditorPos(i.rangeEnd);if(l<c){let d=`text-decoration: underline ${/^[a-z]/.test(a)?a+" ":a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${/thin/i.test(s)?1:2}px`;r.push(Ut.mark({attributes:{style:d}}).range(l,c))}}}e.dispatch({effects:LN.of(Ut.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let r=Pd(n.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,s,l,c)=>{if(n)return;let d=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=d,this.to+=d;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=d,this.to+=d;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=d}t+=d}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},De=class Xy{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&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var n;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),t.parent&&t.parent.appendChild(this.dom);let{dispatch:r}=t;this.dispatchTransactions=t.dispatchTransactions||r&&(i=>i.forEach(a=>r(a,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=t.root||HZ(t.parent)||document,this.viewState=new _j(this,t.state||nn.create(t)),t.scrollTo&&t.scrollTo.is(Gh)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Gl).map(i=>new RO(i));for(let i of this.plugins)i.update(this);this.observer=new _2(this),this.inputState=new VB(this),this.inputState.ensureHandlers(this.plugins),this.docView=new uj(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...t){let n=t.length==1&&t[0]instanceof mi?t:t.length==1&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(n,this)}update(t){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,a=this.state;for(let p of t){if(p.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=p.state}if(this.destroyed){this.viewState.state=a;return}let s=this.hasFocus,l=0,c=null;t.some(p=>p.annotation(aR))?(this.inputState.notifiedFocused=s,l=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,c=sR(a,s),c||(l=1));let d=this.observer.delayedAndroidKey,f=null;if(d?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(f=null)):this.observer.clear(),a.facet(nn.phrases)!=this.state.facet(nn.phrases))return this.setState(a);i=oj.create(this,a,t),i.flags|=l;let m=this.viewState.scrollTarget;try{this.updateState=2;for(let p of t){if(m&&(m=m.map(p.changes)),p.scrollIntoView){let{main:O}=p.state.selection;m=new NO(O.empty?O:Ce.cursor(O.head,O.head>O.anchor?-1:1))}for(let O of p.effects)O.is(Gh)&&(m=O.value.clip(this.state))}this.viewState.update(i,m),this.bidiCache=Ej.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Hu)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(p=>p.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(rm)!=i.state.facet(rm)&&(this.viewState.mustMeasureContent=!0),(n||r||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let p of this.state.facet(Ay))try{p(i)}catch(O){ua(this.state,O,"update listener")}(c||f)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),f&&!KN(this,f)&&d.force&&rc(this.contentDOM,d.key,d.keyCode)})}setState(t){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=t;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new _j(this,t),this.plugins=t.facet(Gl).map(r=>new RO(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new uj(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(t){let n=t.startState.facet(Gl),r=t.state.facet(Gl);if(n!=r){let i=[];for(let a of r){let s=n.indexOf(a);if(s<0)i.push(new RO(a));else{let l=this.plugins[s];l.mustUpdate=t,i.push(l)}}for(let a of this.plugins)a.mustUpdate!=t&&a.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=t;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let n=t.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){ua(this.state,r,"doc view update listener")}}}measure(t=!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,t&&this.observer.forceFlush();let n=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:a,scrollAnchorHeight:s}=this.viewState;Math.abs(i-this.viewState.scrollOffset)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(s<0)if(yN(r||this.win))a=-1,s=this.viewState.heightMap.height;else{let O=this.viewState.scrollAnchorAt(i);a=O.from,s=O.top}this.updateState=1;let c=this.viewState.measure();if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let d=[];c&4||([this.measureRequests,d]=[d,this.measureRequests]);let f=d.map(O=>{try{return O.read(this)}catch(b){return ua(this.state,b),Cj}}),m=oj.create(this,this.state,[]),p=!1;m.flags|=c,n?n.flags|=c:n=m,this.updateState=2,m.empty||(this.updatePlugins(m),this.inputState.update(m),this.updateAttrs(),p=this.docView.update(m),p&&this.docViewUpdate());for(let O=0;O<d.length;O++)if(f[O]!=Cj)try{let b=d[O];b.write&&b.write(f[O],this)}catch(b){ua(this.state,b)}if(p&&this.docView.updateSelection(!0),!m.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 b=((a<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(a).top)-s)/this.scaleY;if((b>1||b<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){i=i+b,r?r.scrollTop+=b:this.win.scrollBy(0,b),s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(Ay))l(n)}get themeClasses(){return qy+" "+(this.state.facet(zy)?hR:fR)+" "+this.state.facet(rm)}updateAttrs(){let t=Aj(this,DN,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Va)?"true":"false",class:"cm-content",style:`${xe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Aj(this,IS,n);let r=this.observer.ignore(()=>{let i=nj(this.contentDOM,this.contentAttrs,n),a=nj(this.dom,this.editorAttrs,t);return i||a});return this.editorAttrs=t,this.contentAttrs=n,r}showAnnouncements(t){let n=!0;for(let r of t)for(let i of r.effects)if(i.is(Xy.announce)){n&&(this.announceDOM.textContent=""),n=!1;let a=this.announceDOM.appendChild(document.createElement("div"));a.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Hu);let t=this.state.facet(Xy.cspNonce);$s.mount(this.root,this.styleModules.concat(S2).reverse(),t?{nonce:t}: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(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===t.key){this.measureRequests[n]=t;return}}this.measureRequests.push(t)}}plugin(t){let n=this.pluginMap.get(t);return(n===void 0||n&&n.plugin!=t)&&this.pluginMap.set(t,n=this.plugins.find(r=>r.plugin==t)||null),n&&n.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(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,n,r){return zO(this,t,dj(this,t,n,r))}moveByGroup(t,n){return zO(this,t,dj(this,t,n,r=>RB(this,t.head,r)))}visualLineSide(t,n){let r=this.bidiSpans(t),i=this.textDirectionAt(t.from),a=r[n?r.length-1:0];return Ce.cursor(a.side(n,i)+t.from,a.forward(!n,i)?1:-1)}moveToLineBoundary(t,n,r=!0){return NB(this,t,n,r)}moveVertically(t,n,r){return zO(this,t,MB(this,t,n,r))}domAtPos(t,n=1){return this.docView.domAtPos(t,n)}posAtDOM(t,n=0){return this.docView.posFromDOM(t,n)}posAtCoords(t,n=!0){this.readMeasured();let r=My(this,t,n);return r&&r.pos}posAndSideAtCoords(t,n=!0){return this.readMeasured(),My(this,t,n)}coordsAtPos(t,n=1){this.readMeasured();let r=this.docView.coordsAt(t,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(t),a=this.bidiSpans(i),s=a[ca.find(a,t-i.from,-1,n)];return Gm(r,s.dir==Cn.LTR==n>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(RN)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>j2)return jN(t.length);let n=this.textDirectionAt(t.from),r;for(let a of this.bidiCache)if(a.from==t.from&&a.dir==n&&(a.fresh||kN(a.isolates,r=sj(this,t))))return a.order;r||(r=sj(this,t));let i=iB(t.text,n,r);return this.bidiCache.push(new Ej(t.from,t.to,n,r,!0,i)),i}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||xe.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{bN(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.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(t,n={}){return Gh.of(new NO(typeof t=="number"?Ce.cursor(t):t,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(t);return Gh.of(new NO(Ce.cursor(r.from),"start","start",r.top-t,n,!0))}setTabFocusMode(t){t==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof t=="boolean"?this.inputState.tabFocusMode=t?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return Rd.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return Rd.define(()=>({}),{eventObservers:t})}static theme(t,n){let r=$s.newName(),i=[rm.of(r),Hu.of(Iy(`.${r}`,t))];return n&&n.dark&&i.push(zy.of(!0)),i}static baseTheme(t){return ff.lowest(Hu.of(Iy("."+qy,t,mR)))}static findFromDOM(t){var n;let r=t.querySelector(".cm-content"),i=r&&cn.get(r)||cn.get(t);return((n=i==null?void 0:i.root)===null||n===void 0?void 0:n.view)||null}};De.styleModule=Hu;De.inputHandler=PN;De.clipboardInputFilter=zS;De.clipboardOutputFilter=qS;De.scrollHandler=MN;De.focusChangeEffect=NN;De.perLineTextDirection=RN;De.exceptionSink=QN;De.updateListener=Ay;De.editable=Va;De.mouseSelectionStyle=AN;De.dragMovesSelection=EN;De.clickAddsSelectionRange=CN;De.decorations=zp;De.blockWrappers=zN;De.outerDecorations=XS;De.atomicRanges=hf;De.bidiIsolatedRanges=qN;De.scrollMargins=IN;De.darkTheme=zy;De.cspNonce=ze.define({combine:e=>e.length?e[0]:""});De.contentAttributes=IS;De.editorAttributes=DN;De.lineWrapping=De.contentAttributes.of({class:"cm-lineWrapping"});De.announce=ln.define();var j2=4096,Cj={},Ej=class pR{constructor(t,n,r,i,a,s){this.from=t,this.to=n,this.dir=r,this.isolates=i,this.fresh=a,this.order=s}static update(t,n){if(n.empty&&!t.some(a=>a.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:Cn.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let s=t[a];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new pR(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return r}};function Aj(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let a=r[i],s=typeof a=="function"?a(e):a;s&&NS(s,n)}return n}var T2=xe.mac?"mac":xe.windows?"win":xe.linux?"linux":"key";function C2(e,t){const n=e.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,a,s,l;for(let c=0;c<n.length-1;++c){const d=n[c];if(/^(cmd|meta|m)$/i.test(d))l=!0;else if(/^a(lt)?$/i.test(d))i=!0;else if(/^(c|ctrl|control)$/i.test(d))a=!0;else if(/^s(hift)?$/i.test(d))s=!0;else if(/^mod$/i.test(d))t=="mac"?l=!0:a=!0;else throw new Error("Unrecognized modifier name: "+d)}return i&&(r="Alt-"+r),a&&(r="Ctrl-"+r),l&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function im(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n!==!1&&t.shiftKey&&(e="Shift-"+e),e}var E2=ff.default(De.domEventHandlers({keydown(e,t){return N2(A2(t.state),e,t,"editor")}})),BS=ze.define({enables:E2}),Qj=new WeakMap;function A2(e){let t=e.facet(BS),n=Qj.get(t);return n||Qj.set(t,n=P2(t.reduce((r,i)=>r.concat(i),[]))),n}var Ds=null,Q2=4e3;function P2(e,t=T2){let n=Object.create(null),r=Object.create(null),i=(s,l)=>{let c=r[s];if(c==null)r[s]=l;else if(c!=l)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},a=(s,l,c,d,f)=>{var m,p;let O=n[s]||(n[s]=Object.create(null)),b=l.split(/ (?!$)/).map(k=>C2(k,t));for(let k=1;k<b.length;k++){let j=b.slice(0,k).join(" ");i(j,!0),O[j]||(O[j]={preventDefault:!0,stopPropagation:!1,run:[T=>{let E=Ds={view:T,prefix:j,scope:s};return setTimeout(()=>{Ds==E&&(Ds=null)},Q2),!0}]})}let S=b.join(" ");i(S,!1);let w=O[S]||(O[S]={preventDefault:!1,stopPropagation:!1,run:((p=(m=O._any)===null||m===void 0?void 0:m.run)===null||p===void 0?void 0:p.slice())||[]});c&&w.run.push(c),d&&(w.preventDefault=!0),f&&(w.stopPropagation=!0)};for(let s of e){let l=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let d of l){let f=n[d]||(n[d]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:m}=s;for(let p in f)f[p].run.push(O=>m(O,Zy))}let c=s[t]||s.key;if(c)for(let d of l)a(d,c,s.run,s.preventDefault,s.stopPropagation),s.shift&&a(d,"Shift-"+c,s.shift,s.preventDefault,s.stopPropagation)}return n}var Zy=null;function N2(e,t,n,r){Zy=t;let i=ZZ(t),a=xZ(i,0),s=_Z(a)==i.length&&i!=" ",l="",c=!1,d=!1,f=!1;Ds&&Ds.view==n&&Ds.scope==r&&(l=Ds.prefix+" ",tR.indexOf(t.keyCode)<0&&(d=!0,Ds=null));let m=new Set,p=w=>{if(w){for(let k of w.run)if(!m.has(k)&&(m.add(k),k(n)))return w.stopPropagation&&(f=!0),!0;w.preventDefault&&(w.stopPropagation&&(f=!0),d=!0)}return!1},O=e[r],b,S;return O&&(p(O[l+im(i,t,!s)])?c=!0:s&&(t.altKey||t.metaKey||t.ctrlKey)&&!(xe.windows&&t.ctrlKey&&t.altKey)&&!(xe.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(b=Ws[t.keyCode])&&b!=i?(p(O[l+im(b,t,!0)])||t.shiftKey&&(S=Ad[t.keyCode])!=i&&S!=b&&p(O[l+im(S,t,!1)]))&&(c=!0):s&&t.shiftKey&&p(O[l+im(i,t,!0)])&&(c=!0),!c&&p(O._any)&&(c=!0)),d&&(c=!0),c&&f&&t.stopPropagation(),Zy=null,c}var Bo=class extends Fs{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};Bo.prototype.elementClass="";Bo.prototype.toDOM=void 0;Bo.prototype.mapMode=fr.TrackBefore;Bo.prototype.startSide=Bo.prototype.endSide=-1;Bo.prototype.point=!0;var XO=ze.define(),R2=ze.define(),Nm=ze.define(),Pj=ze.define({combine:e=>e.some(t=>t)});function M2(e){return[L2]}var L2=Rd.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(Nm).map(t=>new Rj(e,t)),this.fixed=!e.state.facet(Pj);for(let t of this.gutters)t.config.side=="after"?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let t=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=t,this.domAfter&&(this.domAfter.style.minHeight=t)}this.view.state.facet(Pj)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=en.iter(this.view.state.facet(XO),this.view.viewport.from),r=[],i=this.gutters.map(a=>new D2(a,this.view.viewport,-this.view.documentPadding.top));for(let a of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(a.type)){let s=!0;for(let l of a.type)if(l.type==jr.Text&&s){By(n,r,l.from);for(let c of i)c.line(this.view,l,r);s=!1}else if(l.widget)for(let c of i)c.widget(this.view,l)}else if(a.type==jr.Text){By(n,r,a.from);for(let s of i)s.line(this.view,a,r)}else if(a.widget)for(let s of i)s.widget(this.view,a);for(let a of i)a.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(Nm),n=e.state.facet(Nm),r=e.docChanged||e.heightChanged||e.viewportChanged||!en.eq(e.startState.facet(XO),e.state.facet(XO),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let i of this.gutters)i.update(e)&&(r=!0);else{r=!0;let i=[];for(let a of n){let s=t.indexOf(a);s<0?i.push(new Rj(this.view,a)):(this.gutters[s].update(e),i.push(this.gutters[s]))}for(let a of this.gutters)a.dom.remove(),i.indexOf(a)<0&&a.destroy();for(let a of i)a.config.side=="after"?this.getDOMAfter().appendChild(a.dom):this.dom.appendChild(a.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>De.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==Cn.LTR?{left:r,right:i}:{right:r,left:i}})});function Nj(e){return Array.isArray(e)?e:[e]}function By(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var D2=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=en.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let s=new gR(e,a,i,n);r.elements.push(s),r.dom.appendChild(s.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];By(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let i of e.state.facet(R2)){let a=i(e,t.widget,t);a&&(r||(r=[])).push(a)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},Rj=class{constructor(e,t){this.view=e,this.config=t,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 t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let l=i.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=r.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,s,r)&&r.preventDefault()});this.markers=Nj(t.markers(e)),t.initialSpacer&&(this.spacer=new gR(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Nj(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let n=e.view.viewport;return!en.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},gR=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),z2(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let i=0,a=0;;){let s=a,l=i<t.length?t[i++]:null,c=!1;if(l){let d=l.elementClass;d&&(n+=" "+d);for(let f=a;f<this.markers.length;f++)if(this.markers[f].compare(l)){s=f,c=!0;break}}else s=this.markers.length;for(;a<s;){let d=this.markers[a++];if(d.toDOM){d.destroy(r);let f=r.nextSibling;r.remove(),r=f}}if(!l)break;l.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(l.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function z2(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var q2=ze.define(),I2=ze.define(),Kl=ze.define({combine(e){return MZ(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,n){let r=Object.assign({},t);for(let i in n){let a=r[i],s=n[i];r[i]=a?(l,c,d)=>a(l,c,d)||s(l,c,d):s}return r}})}}),ZO=class extends Bo{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function BO(e,t){return e.state.facet(Kl).formatNumber(t,e.state)}var X2=Nm.compute([Kl],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(t){return t.state.facet(q2)},lineMarker(t,n,r){return r.some(i=>i.toDOM)?null:new ZO(BO(t,t.state.doc.lineAt(n.from).number))},widgetMarker:(t,n,r)=>{for(let i of t.state.facet(I2)){let a=i(t,n,r);if(a)return a}return null},lineMarkerChange:t=>t.startState.facet(Kl)!=t.state.facet(Kl),initialSpacer(t){return new ZO(BO(t,Mj(t.state.doc.lines)))},updateSpacer(t,n){let r=BO(n.view,Mj(n.view.state.doc.lines));return r==t.number?t:new ZO(r)},domEventHandlers:e.facet(Kl).domEventHandlers,side:"before"}));function rp(e={}){return[Kl.of(e),M2(),X2]}function Mj(e){let t=9;for(;t<e;)t=t*10+9;return t}var vR=1024,Z2=0,fi=class{constructor(e,t){this.from=e,this.to=t}},Ke=class{constructor(e={}){this.id=Z2++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Fn.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};Ke.closedBy=new Ke({deserialize:e=>e.split(" ")});Ke.openedBy=new Ke({deserialize:e=>e.split(" ")});Ke.group=new Ke({deserialize:e=>e.split(" ")});Ke.isolate=new Ke({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}});Ke.contextHash=new Ke({perNode:!0});Ke.lookAhead=new Ke({perNode:!0});Ke.mounted=new Ke({perNode:!0});var ac=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[Ke.mounted.id]}},B2=Object.create(null),Fn=class OR{constructor(t,n,r,i=0){this.name=t,this.props=n,this.id=r,this.flags=i}static define(t){let n=t.props&&t.props.length?Object.create(null):B2,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new OR(t.name||"",n,t.id,r);if(t.props){for(let a of t.props)if(Array.isArray(a)||(a=a(i)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[a[0].id]=a[1]}}return i}prop(t){return this.props[t.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(t){if(typeof t=="string"){if(this.name==t)return!0;let n=this.prop(Ke.group);return n?n.indexOf(t)>-1:!1}return this.id==t}static match(t){let n=Object.create(null);for(let r in t)for(let i of r.split(" "))n[i]=t[r];return r=>{for(let i=r.prop(Ke.group),a=-1;a<(i?i.length:0);a++){let s=n[a<0?r.name:i[a]];if(s)return s}}}};Fn.none=new Fn("",Object.create(null),0,8);var VS=class bR{constructor(t){this.types=t;for(let n=0;n<t.length;n++)if(t[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let n=[];for(let r of this.types){let i=null;for(let a of t){let s=a(r);if(s){i||(i=Object.assign({},r.props));let l=s[1],c=s[0];c.combine&&c.id in i&&(l=c.combine(i[c.id],l)),i[c.id]=l}}n.push(i?new Fn(r.name,i,r.id,r.flags):r)}return new bR(n)}},am=new WeakMap,Lj=new WeakMap,St;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays",e[e.EnterBracketed=16]="EnterBracketed"})(St||(St={}));var Pt=class Vy{constructor(t,n,r,i,a){if(this.type=t,this.children=n,this.positions=r,this.length=i,this.props=null,a&&a.length){this.props=Object.create(null);for(let[s,l]of a)this.props[typeof s=="number"?s:s.id]=l}}toString(){let t=ac.get(this);if(t&&!t.overlay)return t.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(t=0){return new ip(this.topNode,t)}cursorAt(t,n=0,r=0){let i=am.get(this)||this.topNode,a=new ip(i);return a.moveTo(t,n),am.set(this,a._tree),a}get topNode(){return new vi(this,0,0,null)}resolve(t,n=0){let r=Ld(am.get(this)||this.topNode,t,n,!1);return am.set(this,r),r}resolveInner(t,n=0){let r=Ld(Lj.get(this)||this.topNode,t,n,!0);return Lj.set(this,r),r}resolveStack(t,n=0){return F2(this,t,n)}iterate(t){let{enter:n,leave:r,from:i=0,to:a=this.length}=t,s=t.mode||0,l=(s&St.IncludeAnonymous)>0;for(let c=this.cursor(s|St.IncludeAnonymous);;){let d=!1;if(c.from<=a&&c.to>=i&&(!l&&c.type.isAnonymous||n(c)!==!1)){if(c.firstChild())continue;d=!0}for(;d&&r&&(l||!c.type.isAnonymous)&&r(c),!c.nextSibling();){if(!c.parent())return;d=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let n in this.props)t.push([+n,this.props[n]]);return t}balance(t={}){return this.children.length<=8?this:YS(Fn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Vy(this.type,n,r,i,this.propValues),t.makeTree||((n,r,i)=>new Vy(Fn.none,n,r,i)))}static build(t){return $2(t)}};Pt.empty=new Pt(Fn.none,[],[],0);var V2=class yR{constructor(t,n){this.buffer=t,this.index=n}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 yR(this.buffer,this.index)}},Oc=class SR{constructor(t,n,r){this.buffer=t,this.length=n,this.set=r}get type(){return Fn.none}toString(){let t=[];for(let n=0;n<this.buffer.length;)t.push(this.childString(n)),n=this.buffer[n+3];return t.join(",")}childString(t){let n=this.buffer[t],r=this.buffer[t+3],i=this.set.types[n],a=i.name;if(/\W/.test(a)&&!i.isError&&(a=JSON.stringify(a)),t+=4,r==t)return a;let s=[];for(;t<r;)s.push(this.childString(t)),t=this.buffer[t+3];return a+"("+s.join(",")+")"}findChild(t,n,r,i,a){let{buffer:s}=this,l=-1;for(let c=t;c!=n&&!(xR(a,i,s[c+1],s[c+2])&&(l=c,r>0));c=s[c+3]);return l}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),s=0;for(let l=t,c=0;l<n;){a[c++]=i[l++],a[c++]=i[l++]-r;let d=a[c++]=i[l++]-r;a[c++]=i[l++]-t,s=Math.max(s,d)}return new SR(a,s,this.set)}};function xR(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Ld(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let s=!r&&e instanceof vi&&e.index<0?null:e.parent;if(!s)return e;e=s}let a=r?0:St.IgnoreOverlays;if(r)for(let s=e,l=s.parent;l;s=l,l=s.parent)s instanceof vi&&s.index<0&&((i=l.enter(t,n,a))===null||i===void 0?void 0:i.from)!=s.from&&(e=l);for(;;){let s=e.enter(t,n,a);if(!s)return e;e=s}}var _R=class{cursor(e=0){return new ip(this,e)}getChild(e,t=null,n=null){let r=Dj(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return Dj(this,e,t,n)}resolve(e,t=0){return Ld(this,e,t,!1)}resolveInner(e,t=0){return Ld(this,e,t,!0)}matchContext(e){return Uy(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(n=t,t=r.prevSibling):t=r}return n}get node(){return this}get next(){return this.parent}},vi=class Rm extends _R{constructor(t,n,r,i){super(),this._tree=t,this.from=n,this.index=r,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(t,n,r,i,a=0){for(let s=this;;){for(let{children:l,positions:c}=s._tree,d=n>0?l.length:-1;t!=d;t+=n){let f=l[t],m=c[t]+s.from,p;if(!(!(a&St.EnterBracketed&&f instanceof Pt&&(p=ac.get(f))&&!p.overlay&&p.bracketed&&r>=m&&r<=m+f.length)&&!xR(i,r,m,m+f.length))){if(f instanceof Oc){if(a&St.ExcludeBuffers)continue;let O=f.findChild(0,f.buffer.length,n,r-m,i);if(O>-1)return new Dd(new U2(s,f,t,m),null,O)}else if(a&St.IncludeAnonymous||!f.type.isAnonymous||US(f)){let O;if(!(a&St.IgnoreMounts)&&(O=ac.get(f))&&!O.overlay)return new Rm(O.tree,m,t,s);let b=new Rm(f,m,t,s);return a&St.IncludeAnonymous||!b.type.isAnonymous?b:b.nextChild(n<0?f.children.length-1:0,n,r,i,a)}}}if(a&St.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?t=s.index+n:t=n<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(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}prop(t){return this._tree.prop(t)}enter(t,n,r=0){let i;if(!(r&St.IgnoreOverlays)&&(i=ac.get(this._tree))&&i.overlay){let a=t-this.from,s=r&St.EnterBracketed&&i.bracketed;for(let{from:l,to:c}of i.overlay)if((n>0||s?l<=a:l<a)&&(n<0||s?c>=a:c>a))return new Rm(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}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 Dj(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function Uy(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var U2=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},Dd=class Ju extends _R{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(t,n,r){super(),this.context=t,this._parent=n,this.index=r,this.type=t.buffer.set.types[t.buffer.buffer[r]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new Ju(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}prop(t){return this.type.prop(t)}enter(t,n,r=0){if(r&St.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new Ju(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Ju(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Ju(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],n=[],{buffer:r}=this.context,i=this.index+4,a=r.buffer[this.index+3];if(a>i){let s=r.buffer[this.index+1];t.push(r.slice(i,a,s)),n.push(0)}return new Pt(this.type,t,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function wR(e){if(!e.length)return null;let t=0,n=e[0];for(let a=1;a<e.length;a++){let s=e[a];(s.from>n.from||s.to<n.to)&&(n=s,t=a)}let r=n instanceof vi&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new Y2(i,n)}var Y2=class{constructor(e,t){this.heads=e,this.node=t}get next(){return wR(this.heads)}};function F2(e,t,n){let r=e.resolveInner(t,n),i=null;for(let a=r instanceof vi?r:r.context.parent;a;a=a.parent)if(a.index<0){let s=a.parent;(i||(i=[r])).push(s.resolve(t,n)),a=s}else{let s=ac.get(a.tree);if(s&&s.overlay&&s.overlay[0].from<=t&&s.overlay[s.overlay.length-1].to>=t){let l=new vi(s.tree,s.overlay[0].from+a.from,-1,a);(i||(i=[r])).push(Ld(l,t,n,!1))}}return i?wR(i):r}var ip=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~St.EnterBracketed,e instanceof vi)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,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof vi?(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,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}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,t,n=this.mode){return this.buffer?n&St.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&St.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&St.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:t}=this.buffer,n=this.stack.length-1;if(e<0){let r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(r)}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 t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let i=0;i<this.index;i++)if(r.buffer.buffer[i+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let i=t+e,a=e<0?-1:n._tree.children.length;i!=a;i+=e){let s=n._tree.children[i];if(this.mode&St.IncludeAnonymous||s instanceof Oc||!s.type.isAnonymous||US(s))return!1}return!0}move(e,t){if(t&&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,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break e}r=this.stack[--i]}for(let r=n;r<this.stack.length;r++)t=new Dd(this.buffer,t,this.stack[r]);return this.bufferNode=new Dd(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return Uy(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return Uy(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function US(e){return e.children.some(t=>t instanceof Oc||!t.type.isAnonymous||US(t))}function $2(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=vR,reused:a=[],minRepeatType:s=r.types.length}=e,l=Array.isArray(n)?new V2(n,n.length):n,c=r.types,d=0,f=0;function m(Q,A,N,D,q,P){let{id:V,start:Z,end:Y,size:X}=l,H=f,I=d;if(X<0)if(l.next(),X==-1){let G=a[V];N.push(G),D.push(Z-Q);return}else if(X==-3){d=V;return}else if(X==-4){f=V;return}else throw new RangeError(`Unrecognized record size: ${X}`);let L=c[V],$,ne,z=Z-Q;if(Y-Z<=i&&(ne=w(l.pos-A,q))){let G=new Uint16Array(ne.size-ne.skip),re=l.pos-ne.size,R=G.length;for(;l.pos>re;)R=k(ne.start,G,R);$=new Oc(G,Y-ne.start,r),z=ne.start-Q}else{let G=l.pos-X;l.next();let re=[],R=[],me=V>=s?V:-1,Se=0,ve=Y;for(;l.pos>G;)me>=0&&l.id==me&&l.size>=0?(l.end<=ve-i&&(b(re,R,Z,Se,l.end,ve,me,H,I),Se=re.length,ve=l.end),l.next()):P>2500?p(Z,G,re,R):m(Z,G,re,R,me,P+1);if(me>=0&&Se>0&&Se<re.length&&b(re,R,Z,Se,Z,ve,me,H,I),re.reverse(),R.reverse(),me>-1&&Se>0){let Xe=O(L,I);$=YS(L,re,R,0,re.length,0,Y-Z,Xe,Xe)}else $=S(L,re,R,Y-Z,H-Y,I)}N.push($),D.push(z)}function p(Q,A,N,D){let q=[],P=0,V=-1;for(;l.pos>A;){let{id:Z,start:Y,end:X,size:H}=l;if(H>4)l.next();else{if(V>-1&&Y<V)break;V<0&&(V=X-i),q.push(Z,Y,X),P++,l.next()}}if(P){let Z=new Uint16Array(P*4),Y=q[q.length-2];for(let X=q.length-3,H=0;X>=0;X-=3)Z[H++]=q[X],Z[H++]=q[X+1]-Y,Z[H++]=q[X+2]-Y,Z[H++]=H;N.push(new Oc(Z,q[2]-Y,r)),D.push(Y-Q)}}function O(Q,A){return(N,D,q)=>{let P=0,V=N.length-1,Z,Y;if(V>=0&&(Z=N[V])instanceof Pt){if(!V&&Z.type==Q&&Z.length==q)return Z;(Y=Z.prop(Ke.lookAhead))&&(P=D[V]+Z.length+Y)}return S(Q,N,D,q,P,A)}}function b(Q,A,N,D,q,P,V,Z,Y){let X=[],H=[];for(;Q.length>D;)X.push(Q.pop()),H.push(A.pop()+N-q);Q.push(S(r.types[V],X,H,P-q,Z-P,Y)),A.push(q-N)}function S(Q,A,N,D,q,P,V){if(P){let Z=[Ke.contextHash,P];V=V?[Z].concat(V):[Z]}if(q>25){let Z=[Ke.lookAhead,q];V=V?[Z].concat(V):[Z]}return new Pt(Q,A,N,D,V)}function w(Q,A){let N=l.fork(),D=0,q=0,P=0,V=N.end-i,Z={size:0,start:0,skip:0};e:for(let Y=N.pos-Q;N.pos>Y;){let X=N.size;if(N.id==A&&X>=0){Z.size=D,Z.start=q,Z.skip=P,P+=4,D+=4,N.next();continue}let H=N.pos-X;if(X<0||H<Y||N.start<V)break;let I=N.id>=s?4:0,L=N.start;for(N.next();N.pos>H;){if(N.size<0)if(N.size==-3||N.size==-4)I+=4;else break e;else N.id>=s&&(I+=4);N.next()}q=L,D+=X,P+=I}return(A<0||D==Q)&&(Z.size=D,Z.start=q,Z.skip=P),Z.size>4?Z:void 0}function k(Q,A,N){let{id:D,start:q,end:P,size:V}=l;if(l.next(),V>=0&&D<s){let Z=N;if(V>4){let Y=l.pos-(V-4);for(;l.pos>Y;)N=k(Q,A,N)}A[--N]=Z,A[--N]=P-Q,A[--N]=q-Q,A[--N]=D}else V==-3?d=D:V==-4&&(f=D);return N}let j=[],T=[];for(;l.pos>0;)m(e.start||0,e.bufferStart||0,j,T,-1,0);let E=(t=e.length)!==null&&t!==void 0?t:j.length?T[0]+j[0].length:0;return new Pt(c[e.topID],j.reverse(),T.reverse(),E)}var zj=new WeakMap;function Mm(e,t){if(!e.isAnonymous||t instanceof Oc||t.type!=e)return 1;let n=zj.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof Pt)){n=1;break}n+=Mm(e,r)}zj.set(t,n)}return n}function YS(e,t,n,r,i,a,s,l,c){let d=0;for(let b=r;b<i;b++)d+=Mm(e,t[b]);let f=Math.ceil(d*1.5/8),m=[],p=[];function O(b,S,w,k,j){for(let T=w;T<k;){let E=T,Q=S[T],A=Mm(e,b[T]);for(T++;T<k;T++){let N=Mm(e,b[T]);if(A+N>=f)break;A+=N}if(T==E+1){if(A>f){let N=b[E];O(N.children,N.positions,0,N.children.length,S[E]+j);continue}m.push(b[E])}else{let N=S[T-1]+b[T-1].length-Q;m.push(YS(e,b,S,E,T,Q,N,null,c))}p.push(Q+j-a)}}return O(t,n,r,i,0),(l||c)(m,p,s)}var kR=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof Dd?this.setBuffer(e.context.buffer,e.index,t):e instanceof vi&&this.map.set(e.tree,t)}get(e){return e instanceof Dd?this.getBuffer(e.context.buffer,e.index):e instanceof vi?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},sc=class Yy{constructor(t,n,r,i,a=!1,s=!1){this.from=t,this.to=n,this.tree=r,this.offset=i,this.open=(a?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new Yy(0,t.length,t,0,!1,r)];for(let a of n)a.to>t.length&&i.push(a);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,s=t.length?t[0]:null;for(let l=0,c=0,d=0;;l++){let f=l<n.length?n[l]:null,m=f?f.fromA:1e9;if(m-c>=r)for(;s&&s.from<m;){let p=s;if(c>=p.from||m<=p.to||d){let O=Math.max(p.from,c)-d,b=Math.min(p.to,m)-d;p=O>=b?null:new Yy(O,b,p.tree,p.offset+d,l>0,!!f)}if(p&&i.push(p),s.to>m)break;s=a<t.length?t[a++]:null}if(!f)break;c=f.toA,d=f.toA-f.toB}return i}},FS=class{startParse(e,t,n){return typeof e=="string"&&(e=new W2(e)),n=n?n.length?n.map(r=>new fi(r.from,r.to)):[new fi(0,0)]:[new fi(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let i=r.advance();if(i)return i}}},W2=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};function jR(e){return(t,n,r,i)=>new G2(t,e,n,r,i)}var qj=class{constructor(e,t,n,r,i,a){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=r,this.target=i,this.from=a}};function Ij(e){if(!e.length||e.some(t=>t.from>=t.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}var H2=class{constructor(e,t,n,r,i,a,s,l){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.bracketed=a,this.target=s,this.prev=l,this.depth=0,this.ranges=[]}},Fy=new Ke({perNode:!0}),G2=class{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,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 r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new Pt(n.type,n.children,n.positions,n.length,n.propValues.concat([[Fy,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[Ke.mounted.id]=new ac(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new e6(this.fragments),t=null,n=null,r=new ip(new vi(this.baseTree,this.ranges[0].from,0,null),St.IncludeAnonymous|St.IgnoreMounts);e:for(let i,a;;){let s=!0,l;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)s=!1;else if(e.hasNode(r)){if(t){let c=t.mounts.find(d=>d.frag.from<=r.from&&d.frag.to>=r.to&&d.mount.overlay);if(c)for(let d of c.mount.overlay){let f=d.from+c.pos,m=d.to+c.pos;f>=r.from&&m<=r.to&&!t.ranges.some(p=>p.from<m&&p.to>f)&&t.ranges.push({from:f,to:m})}}s=!1}else if(n&&(a=K2(n.ranges,r.from,r.to)))s=a!=2;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||(J2(r),t&&t.depth++,n&&n.depth++);let c=e.findMounts(r.from,i.parser);if(typeof i.overlay=="function")t=new H2(i.parser,i.overlay,c,this.inner.length,r.from,!!i.bracketed,r.tree,t);else{let d=Bj(this.ranges,i.overlay||(r.from<r.to?[new fi(r.from,r.to)]:[]));d.length&&Ij(d),(d.length||!i.overlay)&&this.inner.push(new qj(i.parser,d.length?i.parser.startParse(this.input,Vj(c,d),d):i.parser.startParse(""),i.overlay?i.overlay.map(f=>new fi(f.from-r.from,f.to-r.from)):null,!!i.bracketed,r.tree,d.length?d[0].from:r.from)),i.overlay?d.length&&(n={ranges:d,depth:0,prev:n}):s=!1}}else if(t&&(l=t.predicate(r))&&(l===!0&&(l=new fi(r.from,r.to)),l.from<l.to)){let c=t.ranges.length-1;c>=0&&t.ranges[c].to==l.from?t.ranges[c]={from:t.ranges[c].from,to:l.to}:t.ranges.push(l)}if(s&&r.firstChild())t&&t.depth++,n&&n.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let c=Bj(this.ranges,t.ranges);c.length&&(Ij(c),this.inner.splice(t.index,0,new qj(t.parser,t.parser.startParse(this.input,Vj(t.mounts,c),c),t.ranges.map(d=>new fi(d.from-t.start,d.to-t.start)),t.bracketed,t.target,c[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}};function K2(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function Xj(e,t,n,r,i,a){if(t<n){let s=e.buffer[t+1];r.push(e.slice(t,n,s)),i.push(s-a)}}function J2(e){let{node:t}=e,n=[],r=t.context.buffer;do n.push(e.index),e.parent();while(!e.tree);let i=e.tree,a=i.children.indexOf(r),s=i.children[a],l=s.buffer,c=[a];function d(f,m,p,O,b,S){let w=n[S],k=[],j=[];Xj(s,f,w,k,j,O);let T=l[w+1],E=l[w+2];c.push(k.length);let Q=S?d(w+4,l[w+3],s.set.types[l[w]],T,E-T,S-1):t.toTree();return k.push(Q),j.push(T-O),Xj(s,l[w+3],m,k,j,O),new Pt(p,k,j,b)}i.children[a]=d(0,l.length,Fn.none,0,s.length,n.length-1);for(let f of c){let m=e.tree.children[f],p=e.tree.positions[f];e.yield(new vi(m,p+e.from,f,e._tree))}}var Zj=class{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(St.IncludeAnonymous|St.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,St.IgnoreOverlays|St.ExcludeBuffers)||t.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 t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof Pt)t=t.children[0];else break}return!1}},e6=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(Fy))!==null&&t!==void 0?t:n.to,this.inner=new Zj(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 t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(Fy))!==null&&e!==void 0?e:t.to,this.inner=new Zj(t.tree,-t.offset)}}findMounts(e,t){var n;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let i=this.inner.cursor.node;i;i=i.parent){let a=(n=i.tree)===null||n===void 0?void 0:n.prop(Ke.mounted);if(a&&a.parser==t)for(let s=this.fragI;s<this.fragments.length;s++){let l=this.fragments[s];if(l.from>=i.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:i.from-l.offset,mount:a})}}}return r}};function Bj(e,t){let n=null,r=t;for(let i=1,a=0;i<e.length;i++){let s=e[i-1].to,l=e[i].from;for(;a<r.length;a++){let c=r[a];if(c.from>=l)break;c.to<=s||(n||(r=n=t.slice()),c.from<s?(n[a]=new fi(c.from,s),c.to>l&&n.splice(a+1,0,new fi(l,c.to))):c.to>l?n[a--]=new fi(l,c.to):n.splice(a--,1))}}return r}function t6(e,t,n,r){let i=0,a=0,s=!1,l=!1,c=-1e9,d=[];for(;;){let f=i==e.length?1e9:s?e[i].to:e[i].from,m=a==t.length?1e9:l?t[a].to:t[a].from;if(s!=l){let p=Math.max(c,n),O=Math.min(f,m,r);p<O&&d.push(new fi(p,O))}if(c=Math.min(f,m),c==1e9)break;f==c&&(s?(s=!1,i++):s=!0),m==c&&(l?(l=!1,a++):l=!0)}return d}function Vj(e,t){let n=[];for(let{pos:r,mount:i,frag:a}of e){let s=r+(i.overlay?i.overlay[0].from:0),l=s+i.tree.length,c=Math.max(a.from,s),d=Math.min(a.to,l);if(i.overlay){let f=i.overlay.map(p=>new fi(p.from+r,p.to+r)),m=t6(t,f,c,d);for(let p=0,O=c;;p++){let b=p==m.length,S=b?d:m[p].from;if(S>O&&n.push(new sc(O,S,i.tree,-s,a.from>=O||a.openStart,a.to<=S||a.openEnd)),b)break;O=m[p].to}}else n.push(new sc(c,d,i.tree,-s,a.from>=s||a.openStart,a.to<=l||a.openEnd))}return n}var n6=0,oa=class $y{constructor(t,n,r,i){this.name=t,this.set=n,this.base=r,this.modified=i,this.id=n6++}toString(){let{name:t}=this;for(let n of this.modified)n.name&&(t=`${n.name}(${t})`);return t}static define(t,n){let r=typeof t=="string"?t:"?";if(t instanceof $y&&(n=t),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new $y(r,[],null,[]);if(i.set.push(i),n)for(let a of n.set)i.set.push(a);return i}static defineModifier(t){let n=new Uj(t);return r=>r.modified.indexOf(n)>-1?r:Uj.get(r.base||r,r.modified.concat(n).sort((i,a)=>i.id-a.id))}},r6=0,Uj=class TR{constructor(t){this.name=t,this.instances=[],this.id=r6++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(l=>l.base==t&&i6(n,l.modified));if(r)return r;let i=[],a=new oa(t.name,i,t,n);for(let l of n)l.instances.push(a);let s=a6(n);for(let l of t.set)if(!l.modified.length)for(let c of s)i.push(TR.get(l,c));return a}};function i6(e,t){return e.length==t.length&&e.every((n,r)=>n==t[r])}function a6(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((n,r)=>r.length-n.length)}function el(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let a=[],s=2,l=i;for(let m=0;;){if(l=="..."&&m>0&&m+3==i.length){s=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!p)throw new RangeError("Invalid path: "+i);if(a.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),m+=p[0].length,m==i.length)break;let O=i[m++];if(m==i.length&&O=="!"){s=0;break}if(O!="/")throw new RangeError("Invalid path: "+i);l=i.slice(m)}let c=a.length-1,d=a[c];if(!d)throw new RangeError("Invalid path: "+i);let f=new zd(r,s,c>0?a.slice(0,c):null);t[d]=f.sort(t[d])}}return CR.add(t)}var CR=new Ke({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new zd(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),zd=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}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}};zd.empty=new zd([],2,null);function ER(e,t){let n=Object.create(null);for(let a of e)if(!Array.isArray(a.tag))n[a.tag.id]=a.class;else for(let s of a.tag)n[s.id]=a.class;let{scope:r,all:i=null}=t||{};return{style:a=>{let s=i;for(let l of a)for(let c of l.set){let d=n[c.id];if(d){s=s?s+" "+d:d;break}}return s},scope:r}}function s6(e,t){let n=null;for(let r of e){let i=r.style(t);i&&(n=n?n+" "+i:i)}return n}function o6(e,t,n,r=0,i=e.length){let a=new l6(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,"",a.highlighters),a.flush(i)}var l6=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:s,to:l}=e;if(s>=n||l<=t)return;a.isTop&&(i=this.highlighters.filter(p=>!p.scope||p.scope(a)));let c=r,d=c6(e)||zd.empty,f=s6(i,d.tags);if(f&&(c&&(c+=" "),c+=f,d.mode==1&&(r+=(r?" ":"")+f)),this.startSpan(Math.max(t,s),c),d.opaque)return;let m=e.tree&&e.tree.prop(Ke.mounted);if(m&&m.overlay){let p=e.node.enter(m.overlay[0].from+s,1),O=this.highlighters.filter(S=>!S.scope||S.scope(m.tree.type)),b=e.firstChild();for(let S=0,w=s;;S++){let k=S<m.overlay.length?m.overlay[S]:null,j=k?k.from+s:l,T=Math.max(t,w),E=Math.min(n,j);if(T<E&&b)for(;e.from<E&&(this.highlightRange(e,T,E,r,i),this.startSpan(Math.min(E,e.to),c),!(e.to>=j||!e.nextSibling())););if(!k||j>n)break;w=k.to+s,w>t&&(this.highlightRange(p.cursor(),Math.max(t,k.from+s),Math.min(n,w),"",O),this.startSpan(Math.min(n,w),c))}b&&e.parent()}else if(e.firstChild()){m&&(r="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function c6(e){let t=e.type.prop(CR);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var ge=oa.define,sm=ge(),Ns=ge(),Yj=ge(Ns),Fj=ge(Ns),Rs=ge(),om=ge(Rs),VO=ge(Rs),na=ge(),wo=ge(na),Ji=ge(),ea=ge(),Wy=ge(),Xu=ge(Wy),lm=ge(),B={comment:sm,lineComment:ge(sm),blockComment:ge(sm),docComment:ge(sm),name:Ns,variableName:ge(Ns),typeName:Yj,tagName:ge(Yj),propertyName:Fj,attributeName:ge(Fj),className:ge(Ns),labelName:ge(Ns),namespace:ge(Ns),macroName:ge(Ns),literal:Rs,string:om,docString:ge(om),character:ge(om),attributeValue:ge(om),number:VO,integer:ge(VO),float:ge(VO),bool:ge(Rs),regexp:ge(Rs),escape:ge(Rs),color:ge(Rs),url:ge(Rs),keyword:Ji,self:ge(Ji),null:ge(Ji),atom:ge(Ji),unit:ge(Ji),modifier:ge(Ji),operatorKeyword:ge(Ji),controlKeyword:ge(Ji),definitionKeyword:ge(Ji),moduleKeyword:ge(Ji),operator:ea,derefOperator:ge(ea),arithmeticOperator:ge(ea),logicOperator:ge(ea),bitwiseOperator:ge(ea),compareOperator:ge(ea),updateOperator:ge(ea),definitionOperator:ge(ea),typeOperator:ge(ea),controlOperator:ge(ea),punctuation:Wy,separator:ge(Wy),bracket:Xu,angleBracket:ge(Xu),squareBracket:ge(Xu),paren:ge(Xu),brace:ge(Xu),content:na,heading:wo,heading1:ge(wo),heading2:ge(wo),heading3:ge(wo),heading4:ge(wo),heading5:ge(wo),heading6:ge(wo),contentSeparator:ge(na),list:ge(na),quote:ge(na),emphasis:ge(na),strong:ge(na),link:ge(na),monospace:ge(na),strikethrough:ge(na),inserted:ge(),deleted:ge(),changed:ge(),invalid:ge(),meta:lm,documentMeta:ge(lm),annotation:ge(lm),processingInstruction:ge(lm),definition:oa.defineModifier("definition"),constant:oa.defineModifier("constant"),function:oa.defineModifier("function"),standard:oa.defineModifier("standard"),local:oa.defineModifier("local"),special:oa.defineModifier("special")};for(let e in B){let t=B[e];t instanceof oa&&(t.name=e)}ER([{tag:B.link,class:"tok-link"},{tag:B.heading,class:"tok-heading"},{tag:B.emphasis,class:"tok-emphasis"},{tag:B.strong,class:"tok-strong"},{tag:B.keyword,class:"tok-keyword"},{tag:B.atom,class:"tok-atom"},{tag:B.bool,class:"tok-bool"},{tag:B.url,class:"tok-url"},{tag:B.labelName,class:"tok-labelName"},{tag:B.inserted,class:"tok-inserted"},{tag:B.deleted,class:"tok-deleted"},{tag:B.literal,class:"tok-literal"},{tag:B.string,class:"tok-string"},{tag:B.number,class:"tok-number"},{tag:[B.regexp,B.escape,B.special(B.string)],class:"tok-string2"},{tag:B.variableName,class:"tok-variableName"},{tag:B.local(B.variableName),class:"tok-variableName tok-local"},{tag:B.definition(B.variableName),class:"tok-variableName tok-definition"},{tag:B.special(B.variableName),class:"tok-variableName2"},{tag:B.definition(B.propertyName),class:"tok-propertyName tok-definition"},{tag:B.typeName,class:"tok-typeName"},{tag:B.namespace,class:"tok-namespace"},{tag:B.className,class:"tok-className"},{tag:B.macroName,class:"tok-macroName"},{tag:B.propertyName,class:"tok-propertyName"},{tag:B.operator,class:"tok-operator"},{tag:B.comment,class:"tok-comment"},{tag:B.meta,class:"tok-meta"},{tag:B.invalid,class:"tok-invalid"},{tag:B.punctuation,class:"tok-punctuation"}]);var UO,Ro=new Ke;function $S(e){return ze.define({combine:e?t=>t.concat(e):void 0})}var WS=new Ke,hi=class{constructor(e,t,n=[],r=""){this.data=e,this.name=r,nn.prototype.hasOwnProperty("tree")||Object.defineProperty(nn.prototype,"tree",{get(){return $n(this)}}),this.parser=t,this.extension=[bc.of(this),nn.languageData.of((i,a,s)=>{let l=$j(i,a,s),c=l.type.prop(Ro);if(!c)return[];let d=i.facet(c),f=l.type.prop(WS);if(f){let m=l.resolve(a-l.from,s);for(let p of f)if(p.test(m,i)){let O=i.facet(p.facet);return p.type=="replace"?O:O.concat(d)}}return d})].concat(n)}isActiveAt(e,t,n=-1){return $j(e,t,n).type.prop(Ro)==this.data}findRegions(e){let t=e.facet(bc);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(i,a)=>{if(i.prop(Ro)==this.data){n.push({from:a,to:a+i.length});return}let s=i.prop(Ke.mounted);if(s){if(s.tree.prop(Ro)==this.data){if(s.overlay)for(let l of s.overlay)n.push({from:l.from+a,to:l.to+a});else n.push({from:a,to:a+i.length});return}else if(s.overlay){let l=n.length;if(r(s.tree,s.overlay[0].from+a),n.length>l)return}}for(let l=0;l<i.children.length;l++){let c=i.children[l];c instanceof Pt&&r(c,i.positions[l]+a)}};return r($n(e),0),n}get allowsNesting(){return!0}};hi.setState=ln.define();function $j(e,t,n){let r=e.facet(bc),i=$n(e).topNode;if(!r||r.allowsNesting)for(let a=i;a;a=a.enter(t,n,St.ExcludeBuffers|St.EnterBracketed))a.type.isTop&&(i=a);return i}var Zp=class Hy extends hi{constructor(t,n,r){super(t,n,[],r),this.parser=n}static define(t){let n=$S(t.languageData);return new Hy(n,t.parser.configure({props:[Ro.add(r=>r.isTop?n:void 0)]}),t.name)}configure(t,n){return new Hy(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function $n(e){let t=e.field(hi.state,!1);return t?t.tree:Pt.empty}var u6=class{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,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},Zu=null,AR=class Gy{constructor(t,n,r=[],i,a,s,l,c){this.parser=t,this.state=n,this.fragments=r,this.tree=i,this.treeLen=a,this.viewport=s,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new Gy(t,n,[],Pt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new u6(this.state.doc),this.fragments)}work(t,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Pt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof t=="number"){let i=Date.now()+t;t=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(sc.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,n;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=t,this.tree=n,this.fragments=this.withoutTempSkipped(sc.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let n=Zu;Zu=this;try{return t()}finally{Zu=n}}withoutTempSkipped(t){for(let n;n=this.tempSkipped.pop();)t=Wj(t,n.from,n.to);return t}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:s,skipped:l}=this;if(this.takeTree(),!t.empty){let c=[];if(t.iterChangedRanges((d,f,m,p)=>c.push({fromA:d,toA:f,fromB:m,toB:p})),r=sc.applyChanges(r,c),i=Pt.empty,a=0,s={from:t.mapPos(s.from,-1),to:t.mapPos(s.to,1)},this.skipped.length){l=[];for(let d of this.skipped){let f=t.mapPos(d.from,1),m=t.mapPos(d.to,-1);f<m&&l.push({from:f,to:m})}}}return new Gy(this.parser,n,r,i,a,s,l,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:a}=this.skipped[r];i<t.to&&a>t.from&&(this.fragments=Wj(this.fragments,i,a),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,n){this.skipped.push({from:t,to:n})}static getSkippingParser(t){return new class extends FS{createParse(n,r,i){let a=i[0].from,s=i[i.length-1].to;return{parsedPos:a,advance(){let c=Zu;if(c){for(let d of i)c.tempSkipped.push(d);t&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,t]):t)}return this.parsedPos=s,new Pt(Fn.none,[],[],s-a)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let n=this.fragments;return this.treeLen>=t&&n.length&&n[0].from==0&&n[0].to>=t}static get(){return Zu}};function Wj(e,t,n){return sc.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var Ky=class Jy{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Jy(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=AR.create(t.facet(bc).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Jy(r)}};hi.state=no.define({create:Ky.init,update(e,t){for(let n of t.effects)if(n.is(hi.setState))return n.value;return t.startState.facet(bc)!=t.state.facet(bc)?Ky.init(t.state):e.apply(t)}});var QR=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(QR=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var YO=typeof navigator<"u"&&(!((UO=navigator.scheduling)===null||UO===void 0)&&UO.isInputPending)?()=>navigator.scheduling.isInputPending():null,d6=Rd.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let n=this.view.state.field(hi.state).context;(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:t}=this.view,n=t.field(hi.state);(n.tree!=n.context.tree||!n.context.isDone(t.doc.length))&&(this.working=QR(this.work))}work(t){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,a=r.field(hi.state);if(a.tree==a.context.tree&&a.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,t&&!YO?Math.max(25,t.timeRemaining()-5):1e9),l=a.context.treeLen<i&&r.doc.length>i+1e3,c=a.context.work(()=>YO&&YO()||Date.now()>s,i+(l?0:1e5));this.chunkBudget-=Date.now()-n,(c||this.chunkBudget<=0)&&(a.context.takeTree(),this.view.dispatch({effects:hi.setState.of(new Ky(a.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(a.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(n=>ua(this.view.state,n)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),bc=ze.define({combine(e){return e.length?e[0]:null},enables:e=>[hi.state,d6,De.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),yc=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},Hj=class PR{constructor(t,n,r,i,a,s=void 0){this.name=t,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=a,this.support=s,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:n,support:r}=t;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(r)}return new PR(t.name,(t.alias||[]).concat(t.name).map(i=>i.toLowerCase()),t.extensions||[],t.filename,n,r)}static matchFilename(t,n){for(let i of t)if(i.filename&&i.filename.test(n))return i;let r=/\.([^.]+)$/.exec(n);if(r){for(let i of t)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(t,n,r=!0){n=n.toLowerCase();for(let i of t)if(i.alias.some(a=>a==n))return i;if(r)for(let i of t)for(let a of i.alias){let s=n.indexOf(a);if(s>-1&&(a.length>2||!/\w/.test(n[s-1])&&!/\w/.test(n[s+a.length])))return i}return null}},NR=ze.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(n=>n!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}}),mf=new Ke;function f6(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),s=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let l=n.to;;){let c=t.childAfter(l);if(!c||c==r)return null;if(!c.type.isSkipped){if(c.from>=s)return null;let d=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+d}}l=c.to}}function h6({closing:e,align:t=!0,units:n=1}){return r=>m6(r,t,n,e)}function m6(e,t,n,r,i){let a=e.textAfter,s=a.match(/^\s*/)[0].length,l=a.slice(s,s+r.length)==r||i==e.pos+s,c=t?f6(e):null;return c?l?e.column(c.from):e.column(c.to):e.baseIndent+(l?0:e.unit*n)}var p6=e=>e.baseIndent;function oc({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var g6=ze.define(),Rc=new Ke;function HS(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}var GS=class RR{constructor(t,n){this.specs=t;let r;function i(l){let c=$s.newName();return(r||(r=Object.create(null)))["."+c]=l,c}const a=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof hi?l=>l.prop(Ro)==s.data:s?l=>l==s:void 0,this.style=ER(t.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:a}).style,this.module=r?new $s(r):null,this.themeType=n.themeType}static define(t,n){return new RR(t,n||{})}},e0=ze.define(),v6=ze.define({combine(e){return e.length?[e[0]]:null}});function FO(e){let t=e.facet(e0);return t.length?t:e.facet(v6)}function KS(e,t){let n=[b6],r;return e instanceof GS&&(e.module&&n.push(De.styleModule.of(e.module)),r=e.themeType),r?n.push(e0.computeN([De.darkTheme],i=>i.facet(De.darkTheme)==(r=="dark")?[e]:[])):n.push(e0.of(e)),n}var O6=class{constructor(e){this.markCache=Object.create(null),this.tree=$n(e.state),this.decorations=this.buildDeco(e,FO(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=$n(e.state),n=FO(e.state),r=n!=FO(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ut.none;let n=new Cd;for(let{from:r,to:i}of e.visibleRanges)o6(this.tree,t,(a,s,l)=>{n.add(a,s,this.markCache[l]||(this.markCache[l]=Ut.mark({class:l})))},r,i);return n.finish()}},b6=ff.high(Rd.fromClass(O6,{decorations:e=>e.decorations})),y6=new Ke,S6=Object.create(null),Gj=[Fn.none],Kj=[],Jj=Object.create(null),x6=Object.create(null);for(let[e,t]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"]])x6[e]=_6(S6,t);function $O(e,t){Kj.indexOf(e)>-1||(Kj.push(e),console.warn(t))}function _6(e,t){let n=[];for(let l of t.split(" ")){let c=[];for(let d of l.split(".")){let f=e[d]||B[d];f?typeof f=="function"?c.length?c=c.map(f):$O(d,`Modifier ${d} used at start of tag`):c.length?$O(d,`Tag ${d} used as modifier`):c=Array.isArray(f)?f:[f]:$O(d,`Unknown highlighting tag ${d}`)}for(let d of c)n.push(d)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),i=r+" "+n.map(l=>l.id),a=Jj[i];if(a)return a.id;let s=Jj[i]=Fn.define({id:Gj.length,name:r,props:[el({[r]:n})]});return Gj.push(s),s.id}Cn.RTL,Cn.LTR;var MR=De.theme({"&":{backgroundColor:"#ffffff",color:"#24292e"},".cm-content":{caretColor:"#0550ae"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"#0550ae"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#b3d7ff"},".cm-gutters":{backgroundColor:"#f6f8fa",color:"#57606a",border:"none"}},{dark:!1}),LR=GS.define([{tag:B.string,color:"#0a3069"},{tag:B.number,color:"#0550ae"},{tag:B.bool,color:"#8250df"},{tag:B.null,color:"#cf222e"},{tag:B.keyword,color:"#cf222e"},{tag:B.propertyName,color:"#116329"},{tag:B.punctuation,color:"#57606a"},{tag:B.bracket,color:"#6e7781"}]),w6=class extends Nc{constructor(e,t,n){super(),this.annotation=e,this.targetDocumentName=t,this.isGenerating=n}eq(e){const t=Wa(this.annotation.body),n=Wa(e.annotation.body);return e.annotation.id===this.annotation.id&&n===t&&e.targetDocumentName===this.targetDocumentName&&e.isGenerating===this.isGenerating}toDOM(){const e=document.createElement("span");e.className="reference-preview-widget",e.style.cssText=`
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
margin-left: 4px;
|
|
54
|
+
position: relative;
|
|
55
|
+
`;const t=U0(this.annotation),n=Wa(this.annotation.body);e.dataset.widgetAnnotationId=this.annotation.id,e.dataset.widgetMotivation=this.annotation.motivation,e.dataset.widgetResolved=t?"true":"false",n&&(e.dataset.widgetBodySource=n),this.targetDocumentName&&(e.dataset.widgetTargetName=this.targetDocumentName),this.isGenerating&&(e.dataset.widgetGenerating="true");const r=document.createElement("button");if(r.className="reference-indicator",r.type="button",t)r.innerHTML='<span aria-hidden="true">🔗</span>',r.setAttribute("aria-label",this.targetDocumentName?`Reference link to ${this.targetDocumentName}`:"Reference link to document"),r.title=this.targetDocumentName?`Links to: ${this.targetDocumentName}`:"Links to document",r.style.cssText=`
|
|
56
|
+
font-size: 10px;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
opacity: 0.6;
|
|
59
|
+
transition: opacity 0.2s ease;
|
|
60
|
+
background: none;
|
|
61
|
+
border: none;
|
|
62
|
+
padding: 0;
|
|
63
|
+
margin: 0;
|
|
64
|
+
vertical-align: baseline;
|
|
65
|
+
`;else if(this.isGenerating){if(r.innerHTML=`
|
|
66
|
+
<span style="position: relative; display: inline-flex; align-items: center; justify-content: center;" aria-hidden="true">
|
|
67
|
+
<span style="position: absolute; inset: 0; border-radius: 9999px; background: rgb(250, 204, 21); opacity: 0.75; animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;"></span>
|
|
68
|
+
<span style="position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 9999px; background: white; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); border: 2px solid rgb(250, 204, 21);">
|
|
69
|
+
<span style="font-size: 14px;">✨</span>
|
|
70
|
+
</span>
|
|
71
|
+
</span>
|
|
72
|
+
`,r.setAttribute("aria-label","Generating document"),r.setAttribute("aria-busy","true"),r.title="Generating document...",r.disabled=!0,r.style.cssText=`
|
|
73
|
+
cursor: default;
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
vertical-align: middle;
|
|
76
|
+
background: none;
|
|
77
|
+
border: none;
|
|
78
|
+
padding: 0;
|
|
79
|
+
margin: 0;
|
|
80
|
+
`,document.documentElement.classList.contains("dark")){const i=r.querySelector("span > span:last-child");i&&(i.style.background="rgb(31, 41, 55)",i.style.borderColor="rgb(234, 179, 8)");const a=r.querySelector("span > span:first-child");a&&(a.style.background="rgb(234, 179, 8)")}}else r.innerHTML='<span aria-hidden="true">❓</span>',r.setAttribute("aria-label","Stub reference - click to resolve"),r.title="Stub reference. Click to resolve.",r.style.cssText=`
|
|
81
|
+
font-size: 10px;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
opacity: 0.6;
|
|
84
|
+
transition: opacity 0.2s ease;
|
|
85
|
+
background: none;
|
|
86
|
+
border: none;
|
|
87
|
+
padding: 0;
|
|
88
|
+
margin: 0;
|
|
89
|
+
vertical-align: baseline;
|
|
90
|
+
`;return e.appendChild(r),e}ignoreEvent(e){return e.type==="click"}};function k6(e,t){if(!t||t.trim()==="")return;const n=document.createElement("div");n.className="reference-tooltip",n.textContent=`→ ${t}`,n.style.cssText=`
|
|
91
|
+
position: absolute;
|
|
92
|
+
bottom: 100%;
|
|
93
|
+
left: 50%;
|
|
94
|
+
transform: translateX(-50%) translateY(-4px);
|
|
95
|
+
padding: 4px 8px;
|
|
96
|
+
background: rgba(0, 0, 0, 0.8);
|
|
97
|
+
color: white;
|
|
98
|
+
border-radius: 4px;
|
|
99
|
+
font-size: 11px;
|
|
100
|
+
white-space: nowrap;
|
|
101
|
+
pointer-events: none;
|
|
102
|
+
z-index: 1000;
|
|
103
|
+
animation: fadeIn 0.2s ease;
|
|
104
|
+
`,e.appendChild(n)}function j6(e){const t=e.querySelector(".reference-tooltip");t&&t.remove()}function T6(e){return e?Ec(e)?["rectangle"]:e.startsWith("image/")?["rectangle","circle","polygon"]:["rectangle","circle","polygon"]:["rectangle","circle","polygon"]}function C6(e){return e?Ec(e)?"fragment":e.startsWith("image/")?"svg":"text":"text"}function eT(e){if(e==="fragment"||e==="text")return"rectangle";if(typeof window<"u"){const t=localStorage.getItem("semiont-toolbar-shape-svg");if(t&&["rectangle","circle","polygon"].includes(t))return t}return"rectangle"}function E6(e,t){e==="svg"&&typeof window<"u"&&localStorage.setItem("semiont-toolbar-shape-svg",t)}var tT=Ac(iZ()),ko=Ac(CS());function A6(e,t={}){const n=t.debounceMs??250,r=t.initialQuery??"",i=new tT.Subject,a=i.pipe((0,ko.startWith)(r)),s=i.pipe((0,ko.startWith)(r),(0,ko.debounceTime)(n),(0,ko.distinctUntilChanged)(),(0,ko.switchMap)(l=>{const c=l.trim();return c?e(c).pipe((0,ko.map)(d=>({results:d??[],isSearching:d===void 0})),(0,ko.startWith)({results:[],isSearching:!0})):(0,tT.of)({results:[],isSearching:!1})}));return{query$:a,state$:s,setQuery:l=>i.next(l),dispose:()=>i.complete()}}function Q6(e,t){const n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let r="";for(;n.nextNode();)r+=n.currentNode.textContent??"";const i=new Map;let a=0,s=0;for(;s<e.length&&a<r.length;)e[s]===r[a]&&(i.set(s,a),a++),s++;for(;s<e.length;)i.set(s,a),s++;return i}function P6(e){var i;const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);let r=0;for(;n.nextNode();){const a=n.currentNode,s=((i=a.textContent)==null?void 0:i.length)??0;t.push({node:a,start:r,end:r+s}),r+=s}return t}function nT(e,t){let n=0,r=e.length-1;for(;n<=r;){const i=n+r>>>1,a=e[i];if(t<a.start)r=i-1;else if(t>=a.end)n=i+1;else return{node:a.node,localOffset:t-a.start}}return null}function N6(e,t,n){const r=new Map;for(const i of e){const a=t.get(i.offset),s=t.get(i.offset+i.length-1);if(a===void 0||s===void 0)continue;const l=nT(n,a),c=nT(n,s+1);if(!l||!c)continue;const d=document.createRange();d.setStart(l.node,l.localOffset),d.setEnd(c.node,c.localOffset),r.set(i.id,{range:d,annotation:i})}return r}function R6(e){for(const[t,{range:n,annotation:r}]of e){const i=`annotation-${r.type}`;if(n.startContainer===n.endContainer){const a=document.createElement("span");a.className=i,a.dataset.annotationId=t,a.dataset.annotationType=r.type;try{n.surroundContents(a)}catch{rT(n,t,r)}continue}rT(n,t,r)}}function rT(e,t,n){const r=`annotation-${n.type}`,i=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT),a=[];for(;i.nextNode();){const s=i.currentNode;e.intersectsNode(s)&&a.push(s)}for(const s of a){const l=document.createRange();l.selectNodeContents(s),s===e.startContainer&&l.setStart(s,e.startOffset),s===e.endContainer&&l.setEnd(s,e.endOffset);const c=document.createElement("span");c.className=r,c.dataset.annotationId=t,c.dataset.annotationType=n.type;try{l.surroundContents(c)}catch{}}}function M6(e){const t=e.querySelectorAll("[data-annotation-id]");for(const n of t){const r=n.parentNode;if(r){for(;n.firstChild;)r.insertBefore(n.firstChild,n);r.removeChild(n),r.normalize()}}}function L6(e){return e.map(t=>{var l;const n=qn(t.target),r=gi(n),i=(r==null?void 0:r.start)??0,a=(r==null?void 0:r.end)??0,s=((l=Object.values(tr).find(c=>c.matchesAnnotation(t)))==null?void 0:l.internalType)||"highlight";return{id:t.id,exact:Is(n),offset:i,length:a-i,type:s,source:Wa(t.body)}})}function DR(e){var n;if(!e)return"📄";const t=((n=e.split(";")[0])==null?void 0:n.trim().toLowerCase())||"";if(t.startsWith("image/"))return"🖼️";switch(t){case"text/markdown":return"📝";case"text/html":return"🌐";case"text/plain":return"📄";default:return"📄"}}var zR={"legal-irac":{id:"legal-irac",name:"Legal Analysis (IRAC)",description:"Issue, Rule, Application, Conclusion framework for legal reasoning",domain:"legal",tags:[{name:"Issue",description:"The legal question or problem to be resolved",examples:["What is the central legal question?","What must the court decide?","What is the dispute about?"]},{name:"Rule",description:"The relevant law, statute, or legal principle",examples:["What law applies?","What is the legal standard?","What statute governs this case?"]},{name:"Application",description:"How the rule applies to the specific facts",examples:["How does the law apply to these facts?","Analysis of the case","How do the facts satisfy the legal standard?"]},{name:"Conclusion",description:"The resolution or outcome based on the analysis",examples:["What is the court's decision?","What is the final judgment?","What is the holding?"]}]},"scientific-imrad":{id:"scientific-imrad",name:"Scientific Paper (IMRAD)",description:"Introduction, Methods, Results, Discussion structure for research papers",domain:"scientific",tags:[{name:"Introduction",description:"Background, context, and research question",examples:["What is the research question?","Why is this important?","What is the hypothesis?"]},{name:"Methods",description:"Experimental design and procedures",examples:["How was the study conducted?","What methods were used?","What was the experimental design?"]},{name:"Results",description:"Findings and observations",examples:["What did the study find?","What are the data?","What were the observations?"]},{name:"Discussion",description:"Interpretation and implications of results",examples:["What do the results mean?","What are the implications?","How do these findings relate to prior work?"]}]},"argument-toulmin":{id:"argument-toulmin",name:"Argument Structure (Toulmin)",description:"Claim, Evidence, Warrant, Counterargument, Rebuttal framework for argumentation",domain:"general",tags:[{name:"Claim",description:"The main assertion or thesis",examples:["What is being argued?","What is the main point?","What position is being taken?"]},{name:"Evidence",description:"Data or facts supporting the claim",examples:["What supports this claim?","What are the facts?","What data is provided?"]},{name:"Warrant",description:"Reasoning connecting evidence to claim",examples:["Why does this evidence support the claim?","What is the logic?","How does this reasoning work?"]},{name:"Counterargument",description:"Opposing viewpoints or objections",examples:["What are the objections?","What do critics say?","What are alternative views?"]},{name:"Rebuttal",description:"Response to counterarguments",examples:["How is the objection addressed?","Why is the counterargument wrong?","How is the criticism answered?"]}]}};function D6(e){return zR[e]||null}function z6(){return Object.values(zR)}function qR(e){if(Array.isArray(e.body)){const t=[];for(const n of e.body)if(typeof n=="object"&&n!==null&&"type"in n&&"value"in n&&"purpose"in n){const r=n.type,i=n.value,a=n.purpose;r==="TextualBody"&&a==="tagging"&&typeof i=="string"&&i.length>0&&t.push(i)}return t}return[]}function IR(e){return e.motivation==="tagging"}function q6(e){if(!IR(e))return;const n=(Array.isArray(e.body)?e.body:[e.body]).find(r=>r!==null&&typeof r=="object"&&"purpose"in r&&r.purpose==="tagging");if(n&&"value"in n)return n.value}function I6(e){if(!IR(e))return;const n=(Array.isArray(e.body)?e.body:[e.body]).find(r=>r!==null&&typeof r=="object"&&"purpose"in r&&r.purpose==="classifying");if(n&&"value"in n)return n.value}var X6={parse(e){if(typeof e!="string")throw new Error("URL must be a string");let t;try{t=new URL(e)}catch{throw new Error("Invalid image URL")}if(t.hostname!=="localhost"&&t.protocol!=="https:")throw new Error("External images must use HTTPS");const n=["javascript:","data:text/html","<script","onerror=","onload=","onclick="],r=e.toLowerCase();if(n.some(l=>r.includes(l)))throw new Error("Invalid or potentially unsafe image URL");const a=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico"].some(l=>r.includes(l)),s=r.includes("googleusercontent.com")||r.includes("avatars.githubusercontent.com");if(!a&&!s)throw new Error("URL must point to an image file");return e},safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(t){return{success:!1,error:t instanceof Error?t.message:"Invalid image URL"}}}};function xre(e){try{const t=X6.safeParse(e);if(!t.success)return console.warn("Invalid image URL:",t.error),null;const n=new URL(e);return`${n.protocol}//${n.hostname}${n.pathname}${n.search}`}catch(t){return console.error("Error sanitizing image URL:",t),null}}function _re(e){if(!e||e<=0)return null;const t=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3);return t>0?`${t}h ${n}m`:n>0?`${n}m`:r>30?"1m":"Less than 1m"}var Z6=typeof window<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function wre(e){const t=_.useRef(e);t.current=e;const n=_.useCallback(r=>{if(!r.key)return;const i=r.target;if(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.contentEditable==="true")return;const a=t.current.filter(s=>s.enabled!==!1);for(const s of a){if(r.key.toLowerCase()!==s.key.toLowerCase())continue;const l=Z6?r.metaKey:r.ctrlKey;if(!(s.ctrlOrCmd&&!l)&&!(!s.ctrlOrCmd&&l)&&!(s.shift&&!r.shiftKey)&&!(!s.shift&&r.shiftKey)&&!(s.alt&&!r.altKey)&&!(!s.alt&&r.altKey)){r.preventDefault(),r.stopPropagation(),s.handler(r);break}}},[]);_.useEffect(()=>(window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n)}),[n])}function kre(e,t,n=300){const r=_.useRef(0),i=_.useRef(t);i.current=t;const a=_.useCallback(s=>{if(s.key!==e)return;const l=Date.now();l-r.current<n?(i.current(),r.current=0):r.current=l},[e,n]);_.useEffect(()=>(window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}),[a])}function JS(){const[e,t]=_.useState(()=>typeof window<"u"?localStorage.getItem("showLineNumbers")==="true":!1),n=_.useCallback(()=>{const r=!e;t(r),typeof window<"u"&&localStorage.setItem("showLineNumbers",r.toString())},[e]);return{showLineNumbers:e,toggleLineNumbers:n}}function XR(){const[e,t]=_.useState(()=>{if(typeof window<"u"){const r=localStorage.getItem("hoverDelayMs");return r?Number(r):Jb}return Jb}),n=_.useCallback(r=>{t(r),typeof window<"u"&&localStorage.setItem("hoverDelayMs",r.toString())},[]);return{hoverDelayMs:e,setHoverDelayMs:n}}function ZR(){const e=gt();return _.useCallback((t,n)=>{const r=setTimeout(()=>{console.warn("[Observable Navigation] No handler cancelled browse:external-navigate fallback. Falling back to window.location.href. For better UX, subscribe to this event in your app, call cancelFallback(), and use client-side routing."),window.location.href=t},10);e.get("browse:external-navigate").next({url:t,resourceId:n==null?void 0:n.resourceId,cancelFallback:()=>clearTimeout(r)})},[])}function B6({defaultWidth:e=384,minWidth:t=256,maxWidth:n=800,storageKey:r="semiont-panel-width"}={}){const[i,a]=_.useState(e),s=_.useRef(!1);_.useEffect(()=>{if(typeof window>"u")return;const c=localStorage.getItem(r);if(c){const d=parseInt(c,10),f=Math.max(t,Math.min(n,d));a(f)}},[]);const l=c=>{const d=Math.max(t,Math.min(n,c));s.current=!0,a(d)};return _.useEffect(()=>{s.current&&localStorage.setItem(r,i.toString())},[i,r]),{width:i,setWidth:l,minWidth:t,maxWidth:n}}function V6({rUri:e,onEvent:t,onAnnotationAdded:n,onAnnotationRemoved:r,onAnnotationBodyUpdated:i,onEntityTagAdded:a,onEntityTagRemoved:s,onDocumentArchived:l,onDocumentUnarchived:c,onError:d,autoConnect:f=!0}){const m=In(),p=Wt(),O=gt(),[b,S]=_.useState("disconnected"),[w,k]=_.useState(null),[j,T]=_.useState(0),E=_.useRef(p),Q=_.useRef(t),A=_.useRef(n),N=_.useRef(r),D=_.useRef(i),q=_.useRef(a),P=_.useRef(s),V=_.useRef(l),Z=_.useRef(c),Y=_.useRef(d);_.useEffect(()=>{E.current=p,Q.current=t,A.current=n,N.current=r,D.current=i,q.current=a,P.current=s,V.current=l,Z.current=c,Y.current=d});const X=_.useCallback($=>{var ne,z,G,re,R,me,Se,ve;switch(k($),T(Xe=>Xe+1),(ne=Q.current)==null||ne.call(Q,$),$.type){case"mark:added":(z=A.current)==null||z.call(A,$);break;case"mark:removed":(G=N.current)==null||G.call(N,$);break;case"mark:body-updated":(re=D.current)==null||re.call(D,$);break;case"mark:entity-tag-added":(R=q.current)==null||R.call(q,$);break;case"mark:entity-tag-removed":(me=P.current)==null||me.call(P,$);break;case"mark:archived":(Se=V.current)==null||Se.call(V,$);break;case"mark:unarchived":(ve=Z.current)==null||ve.call(Z,$);break}},[]);_.useEffect(()=>{const ne=["mark:added","mark:removed","mark:body-updated","mark:archived","mark:unarchived","mark:entity-tag-added","mark:entity-tag-removed"].map(z=>O.getDomainEvent(z).subscribe(G=>{const{metadata:re,signature:R,...me}=G;X(me)}));return()=>ne.forEach(z=>z.unsubscribe())},[O,X]);const H=_.useRef(null),I=_.useCallback(()=>{var $;if(!H.current){S("connecting");try{const ne=m.sse.resourceEvents(e,{auth:E.current?E.current:void 0,eventBus:O});H.current={unsubscribe:()=>ne.close()},S("connected")}catch(ne){console.error("[ResourceEvents] Failed to connect:",ne),S("error"),($=Y.current)==null||$.call(Y,"Failed to connect to event stream")}}},[e,m,O]),L=_.useCallback(()=>{H.current&&(H.current.unsubscribe(),H.current=null),S("disconnected")},[]);return _.useEffect(()=>(f&&I(),()=>L()),[f,e,m]),{status:b,lastEvent:w,eventCount:j,connect:I,disconnect:L,isConnected:b==="connected"}}function jre({autoConnect:e=!0}={}){const t=In(),n=Wt(),r=gt(),i=kc(),[a,s]=_.useState("disconnected"),l=_.useRef(null),c=_.useRef(!1),d=_.useCallback(p=>{switch(p.type){case"mark:entity-type-added":i.invalidateQueries({queryKey:xt.entityTypes.all()});break}},[i]);_.useEffect(()=>{const p=r.get("mark:entity-type-added").subscribe(O=>{const{metadata:b,signature:S,...w}=O;d(w)});return()=>p.unsubscribe()},[r,d]);const f=_.useCallback(async()=>{if(!(c.current||l.current)){if(c.current=!0,!t){s("error"),c.current=!1;return}s("connecting");try{const p=t.sse.globalEvents({...n?{auth:n}:{},eventBus:r});l.current=p,s("connected"),c.current=!1}catch(p){console.error("[GlobalEvents] Failed to connect:",p),s("error"),c.current=!1}}},[t,n,r]),m=_.useCallback(()=>{l.current&&(l.current.close(),l.current=null),s("disconnected"),c.current=!1},[]);return _.useEffect(()=>(e&&t&&f(),()=>m()),[e,t]),{status:a,connect:f,disconnect:m,isConnected:a==="connected"}}function iT(e,t={}){const{orientation:n="horizontal",loop:r=!0,cols:i=1}=t,a=_.useRef(null),s=_.useRef(0),l=_.useCallback(()=>a.current?Array.from(a.current.querySelectorAll('[role="button"]:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])')):[],[]),c=_.useCallback(f=>{var O;const m=l();if(m.length===0)return;let p=f;r?p=(f%m.length+m.length)%m.length:p=Math.max(0,Math.min(f,m.length-1)),m.forEach((b,S)=>{b.setAttribute("tabindex",S===p?"0":"-1")}),(O=m[p])==null||O.focus(),s.current=p},[l,r]),d=_.useCallback(f=>{const m=l();if(m.length===0)return;const p=s.current;let O=p;switch(f.key){case"ArrowRight":(n==="horizontal"||n==="grid")&&(f.preventDefault(),O=p+1);break;case"ArrowLeft":(n==="horizontal"||n==="grid")&&(f.preventDefault(),O=p-1);break;case"ArrowDown":n==="vertical"?(f.preventDefault(),O=p+1):n==="grid"&&(f.preventDefault(),O=p+i);break;case"ArrowUp":n==="vertical"?(f.preventDefault(),O=p-1):n==="grid"&&(f.preventDefault(),O=p-i);break;case"Home":f.preventDefault(),O=0;break;case"End":f.preventDefault(),O=m.length-1;break;default:return}c(O)},[n,i,l,c]);return _.useEffect(()=>{const f=l();if(f.length===0)return;f.forEach((O,b)=>{O.setAttribute("tabindex",b===0?"0":"-1")});const m=O=>()=>{s.current=O,l().forEach((S,w)=>{S.setAttribute("tabindex",w===O?"0":"-1")})},p=f.map((O,b)=>{const S=m(b);return O.addEventListener("click",S),S});return()=>{f.forEach((O,b)=>{const S=p[b];S&&O.removeEventListener("click",S)})}},[e,l]),{containerRef:a,handleKeyDown:d,focusItem:c}}function Tre(){const{expiresAt:e}=G0(),[t,n]=_.useState(null),[r,i]=_.useState(!1);return _.useEffect(()=>{if(!e){n(null),i(!1);return}const a=()=>{const l=e.getTime()-Date.now();n(l>0?l:0),i(l<300*1e3&&l>0)};a();const s=setInterval(a,1e3);return()=>clearInterval(s)},[e]),{timeRemaining:t,isExpiringSoon:r}}var BR=_.createContext(null);function Cre({children:e}){const[t,n]=_.useState(()=>typeof window<"u"&&localStorage.getItem("theme")||"system"),[r,i]=_.useState(()=>typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),a=t==="system"?r:t;_.useEffect(()=>{window.document.documentElement.setAttribute("data-theme",a)},[a]),_.useEffect(()=>{const l=window.matchMedia("(prefers-color-scheme: dark)"),c=d=>{i(d.matches?"dark":"light")};return l.addEventListener("change",c),()=>l.removeEventListener("change",c)},[]);const s=l=>{n(l),typeof window<"u"&&localStorage.setItem("theme",l)};return g.jsx(BR.Provider,{value:{theme:t,setTheme:s,resolvedTheme:a,systemTheme:r},children:e})}function U6(){const e=_.useContext(BR);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function Y6(){const[e,t]=_.useState(!1),n=_.useRef(null),r=_.useCallback(()=>{t(s=>!s)},[]),i=_.useCallback(()=>{t(!0)},[]),a=_.useCallback(()=>{t(!1)},[]);return _.useEffect(()=>{function s(l){n.current&&!n.current.contains(l.target)&&a()}if(e)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[e,a]),_.useEffect(()=>{function s(l){l.key==="Escape"&&a()}if(e)return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,a]),{isOpen:e,toggle:r,open:i,close:a,dropdownRef:n}}function F6(e,t,n=!0){const{showError:r}=Jd(),i=Lp(),a=n?Gb(t)||"text/plain":"",{data:s,isLoading:l,error:c}=i.representation.useQuery(e,a);return _.useEffect(()=>{c&&(console.error("Failed to fetch representation:",c),r("Failed to load resource representation"))},[c,r]),{content:s??"",loading:l}}_.createContext(void 0);var VR=_.createContext(void 0);function Ere({cacheManager:e,children:t}){return g.jsx(VR.Provider,{value:e,children:t})}function $6(){const e=_.useContext(VR);if(!e)throw new Error("useCacheManager must be used within a CacheProvider");return e}var UR=_.createContext(null);function Mc(){const e=_.useContext(UR);return e||{announce:()=>{}}}function Are({children:e}){const[t,n]=_.useState(""),[r,i]=_.useState(""),a=_.useCallback((s,l="polite")=>{l==="assertive"?(i(s),setTimeout(()=>i(""),1e3)):(n(s),setTimeout(()=>n(""),1e3))},[]);return g.jsxs(UR.Provider,{value:{announce:a},children:[e,g.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"semiont-sr-only",children:t}),g.jsx("div",{role:"alert","aria-live":"assertive","aria-atomic":"true",className:"semiont-sr-only",children:r})]})}function W6(){const{announce:e}=Mc(),t=_.useCallback(a=>{const s=a?`Loading ${a}...`:"Loading resource...";e(s,"polite")},[e]),n=_.useCallback(a=>{e(`${a} loaded successfully`,"polite")},[e]),r=_.useCallback(a=>{const s=a?`Failed to load ${a}`:"Failed to load resource";e(s,"assertive")},[e]),i=_.useCallback(a=>{e(`Updating ${a}...`,"polite")},[e]);return{announceResourceLoading:t,announceResourceLoaded:n,announceResourceLoadError:r,announceResourceUpdating:i}}function H6(){const{announce:e}=Mc(),t=_.useCallback(()=>{e("Submitting form...","polite")},[e]),n=_.useCallback(a=>{e(a||"Form submitted successfully","polite")},[e]),r=_.useCallback(a=>{e(a||"Form submission failed. Please check your entries and try again.","assertive")},[e]),i=_.useCallback(a=>{const s=a===1?"There is 1 field with an error":`There are ${a} fields with errors`;e(s,"assertive")},[e]);return{announceFormSubmitting:t,announceFormSuccess:n,announceFormError:r,announceFormValidationError:i}}function G6(){const{announce:e}=Mc(),t=_.useCallback(r=>{e(`Changing language to ${r}...`,"polite")},[e]),n=_.useCallback(r=>{e(`Language changed to ${r}`,"polite")},[e]);return{announceLanguageChanging:t,announceLanguageChanged:n}}var YR=_.createContext(void 0);function Qre({children:e}){const[t,n]=_.useState(new Set),{announce:r}=Mc(),a=fZ().create.useMutation(),s=_.useCallback(async(f,m,p,O=[])=>{try{const b={motivation:m,target:{source:f,selector:p},body:O},S=await a.mutateAsync({resourceId:f,data:b});return S.annotationId&&(n(w=>new Set(w).add(S.annotationId)),setTimeout(()=>{n(w=>{const k=new Set(w);return k.delete(S.annotationId),k})},6e3),r("Annotation created","polite")),S.annotationId}catch(b){throw console.error("Failed to create annotation:",b),r("Failed to create annotation","assertive"),b}},[a,r]),l=_.useCallback(f=>{n(m=>{const p=new Set(m);return p.delete(f),p})},[]),c=_.useCallback(f=>{n(m=>new Set(m).add(f)),setTimeout(()=>{n(m=>{const p=new Set(m);return p.delete(f),p})},6e3)},[]),d=_.useMemo(()=>({newAnnotationIds:t,markAnnotation:s,clearNewAnnotationId:l,triggerSparkleAnimation:c}),[t,s,l,c]);return g.jsx(YR.Provider,{value:d,children:e})}function ex(){const e=_.useContext(YR);if(!e)throw new Error("useResourceAnnotations must be used within ResourceAnnotationsProvider");return e}var K6=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=$n(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(n9(e));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function aT(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function J6(e){let t=Object.create(null),n=Object.create(null);for(let{label:i}of e){t[i[0]]=!0;for(let a=1;a<i.length;a++)n[i[a]]=!0}let r=aT(t)+aT(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function e9(e){let t=e.map(i=>typeof i=="string"?{label:i}:i),[n,r]=t.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:J6(t);return i=>{let a=i.matchBefore(r);return a||i.explicit?{from:a?a.from:i.pos,options:t,validFor:n}:null}}function t9(e,t){return n=>{for(let r=$n(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(e.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return t(n)}}function n9(e,t){var n;let{source:r}=e,i=r[r.length-1]!="$";return i?new RegExp(`(?:${r})${i?"$":""}`,(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":""):e}var r9=Jo.define(),i9=De.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",whiteSpace:"pre-line"},".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"}}}),a9=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},s9=class FR{constructor(t,n,r){this.field=t,this.from=n,this.to=r}map(t){let n=t.mapPos(this.from,-1,fr.TrackDel),r=t.mapPos(this.to,1,fr.TrackDel);return n==null||r==null?null:new FR(this.field,n,r)}},o9=class $R{constructor(t,n){this.lines=t,this.fieldPositions=n}instantiate(t,n){let r=[],i=[n],a=t.doc.lineAt(n),s=/^\s*/.exec(a.text)[0];for(let c of this.lines){if(r.length){let d=s,f=/^\t*/.exec(c)[0].length;for(let m=0;m<f;m++)d+=t.facet(NR);i.push(n+d.length-f),c=d+c.slice(f)}r.push(c),n+=c.length+1}let l=this.fieldPositions.map(c=>new s9(c.field,i[c.line]+c.from,i[c.line]+c.to));return{text:r,ranges:l}}static parse(t){let n=[],r=[],i=[],a;for(let s of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(s);){let l=a[1]?+a[1]:null,c=a[2]||a[3]||"",d=-1,f=c.replace(/\\[{}]/g,m=>m[1]);for(let m=0;m<n.length;m++)(l!=null?n[m].seq==l:f&&n[m].name==f)&&(d=m);if(d<0){let m=0;for(;m<n.length&&(l==null||n[m].seq!=null&&n[m].seq<l);)m++;n.splice(m,0,{seq:l,name:f}),d=m;for(let p of i)p.field>=d&&p.field++}for(let m of i)if(m.line==r.length&&m.from>a.index){let p=a[2]?3+(a[1]||"").length:2;m.from-=p,m.to-=p}i.push(new a9(d,r.length,a.index,a.index+f.length)),s=s.slice(0,a.index)+c+s.slice(a.index+a[0].length)}s=s.replace(/\\([{}])/g,(l,c,d)=>{for(let f of i)f.line==r.length&&f.from>d&&(f.from--,f.to--);return c}),r.push(s)}return new $R(r,i)}},l9=Ut.widget({widget:new class extends Nc{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),c9=Ut.mark({class:"cm-snippetField"}),Bp=class WR{constructor(t,n){this.ranges=t,this.active=n,this.deco=Ut.set(t.map(r=>(r.from==r.to?l9:c9).range(r.from,r.to)),!0)}map(t){let n=[];for(let r of this.ranges){let i=r.map(t);if(!i)return null;n.push(i)}return new WR(n,this.active)}selectionInsideField(t){return t.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}},pf=ln.define({map(e,t){return e&&e.map(t)}}),u9=ln.define(),qd=no.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(pf))return n.value;if(n.is(u9)&&e)return new Bp(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>De.decorations.from(e,t=>t?t.deco:Ut.none)});function tx(e,t){return Ce.create(e.filter(n=>n.field==t).map(n=>Ce.range(n.from,n.to)))}function d9(e){let t=o9.parse(e);return(n,r,i,a)=>{let{text:s,ranges:l}=t.instantiate(n.state,i),{main:c}=n.state.selection,d={changes:{from:i,to:a==c.from?c.to:a,insert:_t.of(s)},scrollIntoView:!0,annotations:r?[r9.of(r),mi.userEvent.of("input.complete")]:void 0};if(l.length&&(d.selection=tx(l,0)),l.some(f=>f.field>0)){let f=new Bp(l,0),m=d.effects=[pf.of(f)];n.state.field(qd,!1)===void 0&&m.push(ln.appendConfig.of([qd,g9,v9,i9]))}n.dispatch(n.state.update(d))}}function HR(e){return({state:t,dispatch:n})=>{let r=t.field(qd,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(s=>s.field==i+e);return n(t.update({selection:tx(r.ranges,i),effects:pf.of(a?null:new Bp(r.ranges,i)),scrollIntoView:!0})),!0}}var f9=({state:e,dispatch:t})=>e.field(qd,!1)?(t(e.update({effects:pf.of(null)})),!0):!1,h9=HR(1),m9=HR(-1),p9=[{key:"Tab",run:h9,shift:m9},{key:"Escape",run:f9}],sT=ze.define({combine(e){return e.length?e[0]:p9}}),g9=ff.highest(BS.compute([sT],e=>e.facet(sT)));function kr(e,t){return{...t,apply:d9(e)}}var v9=De.domEventHandlers({mousedown(e,t){let n=t.state.field(qd,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(a=>a.from<=r&&a.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:tx(n.ranges,i.field),effects:pf.of(n.ranges.some(a=>a.field>i.field)?new Bp(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),GR=new class extends Fs{};GR.startSide=1;GR.endSide=-1;var oT=class KR{static create(t,n,r,i,a){let s=i+(i<<8)+t+(n<<4)|0;return new KR(t,n,r,s,a,[],[])}constructor(t,n,r,i,a,s,l){this.type=t,this.value=n,this.from=r,this.hash=i,this.end=a,this.children=s,this.positions=l,this.hashProp=[[Ke.contextHash,i]]}addChild(t,n){t.prop(Ke.contextHash)!=this.hash&&(t=new Pt(t.type,t.children,t.positions,t.length,this.hashProp)),this.children.push(t),this.positions.push(n)}toTree(t,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new Pt(t.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,a,s)=>new Pt(Fn.none,i,a,s,this.hashProp)})}},pe;(function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.Autolink=33]="Autolink",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel",e[e.URL=44]="URL"})(pe||(pe={}));var O9=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},b9=class{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 hd(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,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}};function lT(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==pe.OrderedList?ix:rx)(n,t,!1);return r>0&&(e.type!=pe.BulletList||nx(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var JR={[pe.Blockquote](e,t,n){return n.next!=62?!1:(n.markers.push(ct(pe.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(bi(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0)},[pe.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[pe.OrderedList]:lT,[pe.BulletList]:lT,[pe.Document](){return!0}};function bi(e){return e==32||e==9||e==10||e==13}function hd(e,t=0){for(;t<e.length&&bi(e.charCodeAt(t));)t++;return t}function cT(e,t,n){for(;t>n&&bi(e.charCodeAt(t-1));)t--;return t}function eM(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function tM(e){return e.next!=62?-1:e.text.charCodeAt(e.pos+1)==32?2:1}function nx(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let i=e.pos+1;i<e.text.length;i++){let a=e.text.charCodeAt(i);if(a==e.next)r++;else if(!bi(a))return-1}return n&&e.next==45&&iM(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(lM.SetextHeading)>-1||r<3?-1:1}function nM(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function rx(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||bi(e.text.charCodeAt(e.pos+1)))&&(!n||nM(t,pe.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function ix(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){r++;if(r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!bi(e.text.charCodeAt(r+1))||n&&!nM(t,pe.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function rM(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function iM(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&bi(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var t0=/^[ \t]*$/,aM=/-->/,sM=/\?>/,n0=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,aM],[/^\s*<\?/,sM],[/^\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,t0],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,t0]];function oM(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let i=0,a=n0.length-(n?1:0);i<a;i++)if(n0[i][0].test(r))return i;return-1}function uT(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.countIndent(e.skipSpace(t),t,n);return r>=n+5?n+1:r}function Es(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==pe.CodeText?e[r].to=n:e.push(ct(pe.CodeText,t,n))}var cm={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,s=[],l=[];for(Es(s,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){Es(l,e.lineStart-1,e.lineStart);for(let c of t.markers)l.push(c)}else{if(t.indent<n)break;{if(l.length){for(let d of l)d.type==pe.CodeText?Es(s,d.from,d.to):s.push(d);l=[]}Es(s,e.lineStart-1,e.lineStart);for(let d of t.markers)s.push(d);a=e.lineStart+t.text.length;let c=e.lineStart+t.findColumn(t.baseIndent+4);c<a&&Es(s,c,a)}}return l.length&&(l=l.filter(c=>c.type!=pe.CodeText),l.length&&(t.markers=l.concat(t.markers))),e.addNode(e.buffer.writeElements(s,-i).finish(pe.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=eM(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,s=t.skipSpace(n),l=cT(t.text,t.text.length,s),c=[ct(pe.CodeMark,r,r+a)];s<l&&c.push(ct(pe.CodeInfo,e.lineStart+s,e.lineStart+l));for(let d=!0,f=!0,m=!1;e.nextLine()&&t.depth>=e.stack.length;d=!1){let p=t.pos;if(t.indent-t.baseIndent<4)for(;p<t.text.length&&t.text.charCodeAt(p)==i;)p++;if(p-t.pos>=a&&t.skipSpace(p)==t.text.length){for(let O of t.markers)c.push(O);f&&m&&Es(c,e.lineStart-1,e.lineStart),c.push(ct(pe.CodeMark,e.lineStart+t.pos,e.lineStart+p)),e.nextLine();break}else{m=!0,d||(Es(c,e.lineStart-1,e.lineStart),f=!1);for(let S of t.markers)c.push(S);let O=e.lineStart+t.basePos,b=e.lineStart+t.text.length;O<b&&(Es(c,O,b),f=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(pe.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=tM(t);return n<0?!1:(e.startContext(pe.Blockquote,t.pos),e.addNode(pe.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(nx(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(pe.HorizontalRule,n),!0},BulletList(e,t){let n=rx(t,e,!1);if(n<0)return!1;e.block.type!=pe.BulletList&&e.startContext(pe.BulletList,t.basePos,t.next);let r=uT(t,t.pos+1);return e.startContext(pe.ListItem,t.basePos,r-t.baseIndent),e.addNode(pe.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=ix(t,e,!1);if(n<0)return!1;e.block.type!=pe.OrderedList&&e.startContext(pe.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=uT(t,t.pos+n);return e.startContext(pe.ListItem,t.basePos,r-t.baseIndent),e.addNode(pe.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=rM(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=cT(t.text,t.text.length,r),s=a;for(;s>r&&t.text.charCodeAt(s-1)==t.next;)s--;(s==a||s==r||!bi(t.text.charCodeAt(s-1)))&&(s=t.text.length);let l=e.buffer.write(pe.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,s),i+n+1),-i);s<t.text.length&&l.write(pe.HeaderMark,s-r,a-r);let c=l.finish(pe.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=oM(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=n0[n][1],a=[],s=i!=t0;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){s=!1;break}for(let d of t.markers)a.push(d)}s&&e.nextLine();let l=i==aM?pe.CommentBlock:i==sM?pe.ProcessingInstructionBlock:pe.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(l,c-r),r),!0},SetextHeading:void 0},y9=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
|
|
105
|
+
`+t.scrub(),i=this.advance(r);return i>-1&&i<r.length?this.complete(e,n,i):!1}finish(e,t){return(this.stage==2||this.stage==3)&&hd(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,n){return e.addLeafElement(t,ct(pe.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(bM(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(ct(pe.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(vM(e,hd(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=hd(e,this.pos),n=0;if(t>this.pos){let r=OM(e,t,this.start);if(r){let i=WO(e,r.to-this.start);i>0&&(this.nextStage(r),n=i)}}return n||(n=WO(e,this.pos)),n>0&&n<e.length?n:-1}else return WO(e,this.pos)}}};function WO(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!bi(n))return-1}return t}var S9=class{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:iM(t),i=t.next;if(r<0)return!1;let a=ct(pe.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,ct(i==61?pe.SetextHeading1:pe.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},lM={LinkReference(e,t){return t.content.charCodeAt(0)==91?new y9(t):null},SetextHeading(){return new S9}},x9=[(e,t)=>rM(t)>=0,(e,t)=>eM(t)>=0,(e,t)=>tM(t)>=0,(e,t)=>rx(t,e,!0)>=0,(e,t)=>ix(t,e,!0)>=0,(e,t)=>nx(t,e,!0)>=0,(e,t)=>oM(t,e,!0)>=0],_9={text:"",end:0},w9=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new b9,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=oT.create(pe.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new T9(n,t):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 r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!r||e.markers[n].from<r.end);){let i=e.markers[n++];this.addNode(i.type,i.from,i.to)}if(!r)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 r=n(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}let t=new O9(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let r=n(this,t);r&&t.parsers.push(r)}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,t))break e}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
|
|
106
|
+
`+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),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 t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=yM(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)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}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 t=_9;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let n=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<t.end;){r++;let i=this.ranges[r].from,a=this.lineChunkAt(i);t.end=i+a.length,t.text=t.text.slice(0,this.ranges[r-1].to-n)+a,n=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],i=this.parser.skipContextMarkup[r.type];if(!i)throw new Error("Unhandled block context "+pe[r.type]);let a=this.line.markers.length;if(!i(r,this,e)){this.line.markers.length>a&&(r.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
|
|
107
|
+
`?"":t;else{let r=t.indexOf(`
|
|
108
|
+
`);n=r<0?t:t.slice(0,r)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=oT.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e=="number"&&(e=new Pt(this.parser.nodeSet.types[e],Sc,Sc,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(i0(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}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?cM(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 t=i0(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(pe.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e=="string"?ct(this.parser.getNodeType(e),t,n,r):new mM(e,t)}get buffer(){return new hM(this.parser.nodeSet)}};function cM(e,t,n,r,i){let a=e[t].to,s=[],l=[],c=n.from+r;function d(f,m){for(;m?f>=a:f>a;){let p=e[t+1].from-a;r+=p,f+=p,t++,a=e[t].to}}for(let f=n.firstChild;f;f=f.nextSibling){d(f.from+r,!0);let m=f.from+r,p,O=i.get(f.tree);O?p=O:f.to+r>a?(p=cM(e,t,f,r,i),d(f.to+r,!1)):p=f.toTree(),s.push(p),l.push(m-c)}return d(n.to+r,!1),new Pt(n.type,s,l,n.to+r-c,n.tree?n.tree.propValues:void 0)}var uM=class dM extends FS{constructor(t,n,r,i,a,s,l,c,d){super(),this.nodeSet=t,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=a,this.skipContextMarkup=s,this.inlineParsers=l,this.inlineNames=c,this.wrappers=d,this.nodeTypes=Object.create(null);for(let f of t.types)this.nodeTypes[f.name]=f.id}createParse(t,n,r){let i=new w9(this,t,n,r);for(let a of this.wrappers)i=a(i,t,n,r);return i}configure(t){let n=r0(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),l=this.blockNames.slice(),c=this.inlineParsers.slice(),d=this.inlineNames.slice(),f=this.endLeafBlock.slice(),m=this.wrappers;if(Bu(n.defineNodes)){i=Object.assign({},i);let p=r.types.slice(),O;for(let b of n.defineNodes){let{name:S,block:w,composite:k,style:j}=typeof b=="string"?{name:b}:b;if(p.some(Q=>Q.name==S))continue;k&&(i[p.length]=(Q,A,N)=>k(A,N,Q.value));let T=p.length,E=k?["Block","BlockContext"]:w?T>=pe.ATXHeading1&&T<=pe.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;p.push(Fn.define({id:T,name:S,props:E&&[[Ke.group,E]]})),j&&(O||(O={}),Array.isArray(j)||j instanceof oa?O[S]=j:Object.assign(O,j))}r=new VS(p),O&&(r=r.extend(el(O)))}if(Bu(n.props)&&(r=r.extend(...n.props)),Bu(n.remove))for(let p of n.remove){let O=this.blockNames.indexOf(p),b=this.inlineNames.indexOf(p);O>-1&&(a[O]=s[O]=void 0),b>-1&&(c[b]=void 0)}if(Bu(n.parseBlock))for(let p of n.parseBlock){let O=l.indexOf(p.name);if(O>-1)a[O]=p.parse,s[O]=p.leaf;else{let b=p.before?um(l,p.before):p.after?um(l,p.after)+1:l.length-1;a.splice(b,0,p.parse),s.splice(b,0,p.leaf),l.splice(b,0,p.name)}p.endLeaf&&f.push(p.endLeaf)}if(Bu(n.parseInline))for(let p of n.parseInline){let O=d.indexOf(p.name);if(O>-1)c[O]=p.parse;else{let b=p.before?um(d,p.before):p.after?um(d,p.after)+1:d.length-1;c.splice(b,0,p.parse),d.splice(b,0,p.name)}}return n.wrap&&(m=m.concat(n.wrap)),new dM(r,a,s,l,f,i,c,d,m)}getNodeType(t){let n=this.nodeTypes[t];if(n==null)throw new RangeError(`Unknown node type '${t}'`);return n}parseInline(t,n){let r=new ax(this,t,n);e:for(let i=n;i<r.end;){let a=r.char(i);for(let s of this.inlineParsers)if(s){let l=s(r,a,i);if(l>=0){i=l;continue e}}i++}return r.resolveMarkers(0)}};function Bu(e){return e!=null&&e.length>0}function r0(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=r0(e[0]);if(e.length==1)return t;let n=r0(e.slice(1));if(!n||!t)return t||n;let r=(s,l)=>(s||Sc).concat(l||Sc),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(s,l,c,d)=>i(a(s,l,c,d),l,c,d):i:a}}function um(e,t){let n=e.indexOf(t);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${t}`);return n}var fM=[Fn.none];for(let e=1,t;t=pe[e];e++)fM[e]=Fn.define({id:e,name:t,props:e>=pe.Escape?[]:[[Ke.group,e in JR?["Block","BlockContext"]:["Block","LeafBlock"]]],top:t=="Document"});var Sc=[],hM=class{constructor(t){this.nodeSet=t,this.content=[],this.nodes=[]}write(t,n,r,i=0){return this.content.push(t,n,r,4+i*4),this}writeElements(t,n=0){for(let r of t)r.writeTo(this,n);return this}finish(t,n){return Pt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:n})}},Id=class{constructor(e,t,n,r=Sc){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new hM(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},mM=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Sc}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function ct(e,t,n,r){return new Id(e,t,n,r)}var pM={resolve:"Emphasis",mark:"EmphasisMark"},gM={resolve:"Emphasis",mark:"EmphasisMark"},Qo={},ap={},Br=class{constructor(e,t,n,r){this.type=e,this.from=t,this.to=n,this.side=r}},dT="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",Xd=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Xd=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}var HO={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let i=0;i<dT.length;i++)if(dT.charCodeAt(i)==r)return e.append(ct(pe.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(ct(pe.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(ct(pe.InlineCode,n,r+1,[ct(pe.CodeMark,n,n+i),ct(pe.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.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(r);if(i)return e.append(ct(pe.Autolink,n,n+1+i[0].length,[ct(pe.LinkMark,n,n+1),ct(pe.URL,n+1,n+i[0].length),ct(pe.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(ct(pe.Comment,n,n+1+a[0].length));let s=/^\?[^]*?\?>/.exec(r);if(s)return e.append(ct(pe.ProcessingInstruction,n,n+1+s[0].length));let l=/^(?:![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(r);return l?e.append(ct(pe.HTMLTag,n,n+1+l[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),s=Xd.test(i),l=Xd.test(a),c=/\s|^$/.test(i),d=/\s|^$/.test(a),f=!d&&(!l||c||s),m=!c&&(!s||d||l),p=f&&(t==42||!m||s),O=m&&(t==42||!f||l);return e.append(new Br(t==95?pM:gM,n,r,(p?1:0)|(O?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(ct(pe.HardBreak,n,n+2));if(t==32){let r=n+1;for(;e.char(r)==32;)r++;if(e.char(r)==10&&r>=n+2)return e.append(ct(pe.HardBreak,n,r+1))}return-1},Link(e,t,n){return t==91?e.append(new Br(Qo,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new Br(ap,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let r=e.parts.length-1;r>=0;r--){let i=e.parts[r];if(i instanceof Br&&(i.type==Qo||i.type==ap)){if(!i.side||e.skipSpace(i.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[r]=null,-1;let a=e.takeContent(r),s=e.parts[r]=k9(e,a,i.type==Qo?pe.Link:pe.Image,i.from,n+1);if(i.type==Qo)for(let l=0;l<r;l++){let c=e.parts[l];c instanceof Br&&c.type==Qo&&(c.side=0)}return s.to}}return-1}};function k9(e,t,n,r,i){let{text:a}=e,s=e.char(i),l=i;if(t.unshift(ct(pe.LinkMark,r,r+(n==pe.Image?2:1))),t.push(ct(pe.LinkMark,i-1,i)),s==40){let c=e.skipSpace(i+1),d=vM(a,c-e.offset,e.offset),f;d&&(c=e.skipSpace(d.to),c!=d.to&&(f=OM(a,c-e.offset,e.offset),f&&(c=e.skipSpace(f.to)))),e.char(c)==41&&(t.push(ct(pe.LinkMark,i,i+1)),l=c+1,d&&t.push(d),f&&t.push(f),t.push(ct(pe.LinkMark,c,l)))}else if(s==91){let c=bM(a,i-e.offset,e.offset,!1);c&&(t.push(c),l=c.to)}return ct(n,r,l,t)}function vM(e,t,n){if(e.charCodeAt(t)==60){for(let i=t+1;i<e.length;i++){let a=e.charCodeAt(i);if(a==62)return ct(pe.URL,t+n,i+1+n);if(a==60||a==10)return!1}return null}else{let i=0,a=t;for(let s=!1;a<e.length;a++){let l=e.charCodeAt(a);if(bi(l))break;if(s)s=!1;else if(l==40)i++;else if(l==41){if(!i)break;i--}else l==92&&(s=!0)}return a>t?ct(pe.URL,t+n,a+n):a==e.length?null:!1}}function OM(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let a=t+1,s=!1;a<e.length;a++){let l=e.charCodeAt(a);if(s)s=!1;else{if(l==i)return ct(pe.LinkTitle,t+n,a+1+n);l==92&&(s=!0)}}return null}function bM(e,t,n,r){for(let i=!1,a=t+1,s=Math.min(e.length,a+999);a<s;a++){let l=e.charCodeAt(a);if(i)i=!1;else{if(l==93)return r?!1:ct(pe.LinkLabel,t+n,a+1+n);if(r&&!bi(l)&&(r=!1),l==91)return!1;l==92&&(i=!0)}}return null}var ax=class{constructor(e,t,n){this.parser=e,this.text=t,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,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new Br(e,t,n,(r?1:0)|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Br&&(t.type==Qo||t.type==ap))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n<this.parts.length;n++){let r=this.parts[n];if(!(r instanceof Br&&r.type.resolve&&r.side&2))continue;let i=r.type==pM||r.type==gM,a=r.to-r.from,s,l=n-1;for(;l>=e;l--){let b=this.parts[l];if(b instanceof Br&&b.side&1&&b.type==r.type&&!(i&&(r.side&1||b.side&2)&&(b.to-b.from+a)%3==0&&((b.to-b.from)%3||a%3))){s=b;break}}if(!s)continue;let c=r.type.resolve,d=[],f=s.from,m=r.to;if(i){let b=Math.min(2,s.to-s.from,a);f=s.to-b,m=r.from+b,c=b==1?"Emphasis":"StrongEmphasis"}s.type.mark&&d.push(this.elt(s.type.mark,f,s.to));for(let b=l+1;b<n;b++)this.parts[b]instanceof Id&&d.push(this.parts[b]),this.parts[b]=null;r.type.mark&&d.push(this.elt(r.type.mark,r.from,m));let p=this.elt(c,f,m,d);this.parts[l]=i&&s.from!=f?new Br(s.type,s.from,f,s.side):null,(this.parts[n]=i&&r.to!=m?new Br(r.type,m,r.to,r.side):null)?this.parts.splice(n,0,p):this.parts[n]=p}let t=[];for(let n=e;n<this.parts.length;n++){let r=this.parts[n];r instanceof Id&&t.push(r)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof Br&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Br?t:null}skipSpace(e){return hd(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e=="string"?ct(this.parser.getNodeType(e),t,n,r):new mM(e,t)}};ax.linkStart=Qo;ax.imageStart=ap;function i0(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let i of t){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let a=n[r];a instanceof Id&&(n[r]=new Id(a.type,a.from,a.to,i0(a.children,[i])))}else n.splice(r++,0,i)}return n}var j9=[pe.CodeBlock,pe.ListItem,pe.OrderedList,pe.BulletList],T9=class{constructor(e,t){this.fragments=e,this.input=t,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,t){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 i=this.fragment.to;for(;i>0&&this.input.read(i-1,i)!=`
|
|
109
|
+
`;)i--;this.fragmentEnd=i?i-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(Ke.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),i=e.absoluteLineStart,a=i,s=e.block.children.length,l=a,c=s;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let d=yM(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,d);else{let f=new Pt(e.parser.nodeSet.types[pe.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,t.tree),e.addNode(f,d)}if(t.type.is("Block")&&(j9.indexOf(t.type.id)<0?(a=t.to-n,s=e.block.children.length):(a=l,s=c),l=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>s;)e.block.children.pop(),e.block.positions.pop();return a-i}};function yM(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var C9=el({"Blockquote/...":B.quote,HorizontalRule:B.contentSeparator,"ATXHeading1/... SetextHeading1/...":B.heading1,"ATXHeading2/... SetextHeading2/...":B.heading2,"ATXHeading3/...":B.heading3,"ATXHeading4/...":B.heading4,"ATXHeading5/...":B.heading5,"ATXHeading6/...":B.heading6,"Comment CommentBlock":B.comment,Escape:B.escape,Entity:B.character,"Emphasis/...":B.emphasis,"StrongEmphasis/...":B.strong,"Link/... Image/...":B.link,"OrderedList/... BulletList/...":B.list,"BlockQuote/...":B.quote,"InlineCode CodeText":B.monospace,"URL Autolink":B.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":B.processingInstruction,"CodeInfo LinkLabel":B.labelName,LinkTitle:B.string,Paragraph:B.content}),E9=new uM(new VS(fM).extend(C9),Object.keys(cm).map(e=>cm[e]),Object.keys(cm).map(e=>lM[e]),Object.keys(cm),x9,JR,Object.keys(HO).map(e=>HO[e]),Object.keys(HO),[]);function A9(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let s=i?i.from:n;if(s>a&&r.push({from:a,to:s}),!i)break;a=i.to}return r}function Q9(e){let{codeParser:t,htmlParser:n}=e;return{wrap:jR((i,a)=>{let s=i.type.id;if(t&&(s==pe.CodeBlock||s==pe.FencedCode)){let l="";if(s==pe.FencedCode){let d=i.node.getChild(pe.CodeInfo);d&&(l=a.read(d.from,d.to))}let c=t(l);if(c)return{parser:c,overlay:d=>d.type.id==pe.CodeText,bracketed:s==pe.FencedCode}}else if(n&&(s==pe.HTMLBlock||s==pe.HTMLTag||s==pe.CommentBlock))return{parser:n,overlay:A9(i.node,i.from,i.to)};return null})}}var P9={resolve:"Strikethrough",mark:"StrikethroughMark"},N9={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":B.strikethrough}},{name:"StrikethroughMark",style:B.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),s=/\s|^$/.test(i),l=Xd.test(r),c=Xd.test(i);return e.addDelimiter(P9,n,n+2,!s&&(!c||a||l),!a&&(!l||s||c))},after:"Emphasis"}]};function md(e,t,n=0,r,i=0){let a=0,s=!0,l=-1,c=-1,d=!1,f=()=>{r.push(e.elt("TableCell",i+l,i+c,e.parser.parseInline(t.slice(l,c),i+l)))};for(let m=n;m<t.length;m++){let p=t.charCodeAt(m);p==124&&!d?((!s||l>-1)&&a++,s=!1,r&&(l>-1&&f(),r.push(e.elt("TableDelimiter",m+i,m+i+1))),l=c=-1):(d||p!=32&&p!=9)&&(l<0&&(l=m),c=m+1),d=!d&&p==92}return l>-1&&(a++,r&&f()),a}function fT(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}var SM=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,hT=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&SM.test(r=t.text.slice(t.pos))){let i=[];md(e,n.content,0,i,n.start)==md(e,r,t.pos)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,i),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let r=[];md(e,t.text,t.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,r))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}},R9={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":B.heading}},"TableRow",{name:"TableCell",style:B.content},{name:"TableDelimiter",style:B.processingInstruction}],parseBlock:[{name:"Table",leaf(e,t){return fT(t.content,0)?new hT:null},endLeaf(e,t,n){if(n.parsers.some(i=>i instanceof hT)||!fT(t.text,t.basePos))return!1;let r=e.peekLine();return SM.test(r)&&md(e,t.text,t.basePos)==md(e,r,t.basePos)},before:"SetextHeading"}]},M9=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},L9={defineNodes:[{name:"Task",block:!0,style:B.list},{name:"TaskMarker",style:B.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new M9:null},after:"SetextHeading"}]},mT=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,pT=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,D9=/[\w-]+\.[\w-]+($|\/)/,gT=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,vT=/\/[a-zA-Z\d@.]+/gy;function OT(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function z9(e,t){pT.lastIndex=t;let n=pT.exec(e);if(!n||D9.exec(n[0])[0].indexOf("_")>-1)return-1;let r=t+n[0].length;for(;;){let i=e[r-1],a;if(/[?!.,:*_~]/.test(i)||i==")"&&OT(e,t,r,")")>OT(e,t,r,"("))r--;else if(i==";"&&(a=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+a.index;else break}return r}function bT(e,t){gT.lastIndex=t;let n=gT.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:t+n[0].length-(r=="."?1:0)}var q9={parseInline:[{name:"Autolink",parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;mT.lastIndex=r;let i=mT.exec(e.text),a=-1;if(!i)return-1;if(i[1]||i[2]){if(a=z9(e.text,r+i[0].length),a>-1&&e.hasOpenLink){let s=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a));a=r+s[0].length}}else i[3]?a=bT(e.text,r):(a=bT(e.text,r+i[0].length),a>-1&&i[0]=="xmpp:"&&(vT.lastIndex=a,i=vT.exec(e.text),i&&(a=i.index+i[0].length)));return a<0?-1:(e.addElement(e.elt("URL",n,a+e.offset)),a+e.offset)}}]},I9=[R9,L9,N9,q9];function xM(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let s=[r.elt(n,a,a+1)];for(let l=a+1;l<r.end;l++){let c=r.char(l);if(c==e)return r.addElement(r.elt(t,a,l+1,s.concat(r.elt(n,l,l+1))));if(c==92&&s.push(r.elt("Escape",l,l+++2)),bi(c))break}return-1}}var X9={defineNodes:[{name:"Superscript",style:B.special(B.content)},{name:"SuperscriptMark",style:B.processingInstruction}],parseInline:[{name:"Superscript",parse:xM(94,"Superscript","SuperscriptMark")}]},Z9={defineNodes:[{name:"Subscript",style:B.special(B.content)},{name:"SubscriptMark",style:B.processingInstruction}],parseInline:[{name:"Subscript",parse:xM(126,"Subscript","SubscriptMark")}]},B9={defineNodes:[{name:"Emoji",style:B.character}],parseInline:[{name:"Emoji",parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt("Emoji",n,n+1+r[0].length))}}]},V9=class a0{constructor(t,n,r,i,a,s,l,c,d,f=0,m){this.p=t,this.stack=n,this.state=r,this.reducePos=i,this.pos=a,this.score=s,this.buffer=l,this.bufferBase=c,this.curContext=d,this.lookAhead=f,this.parent=m}toString(){return`[${this.stack.filter((t,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,n,r=0){let i=t.parser.context;return new a0(t,[],n,r,r,0,[],0,i?new yT(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var n;let r=t>>19,i=t&65535,{parser:a}=this.p,s=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),l=a.dynamicPrecedence(i);if(l&&(this.score+=l),r==0){this.pushState(a.getGoto(this.state,i,!0),this.reducePos),i<a.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(i,this.reducePos);return}let c=this.stack.length-(r-1)*3-(t&262144?6:0),d=c?this.stack[c-2]:this.p.ranges[0].from,f=this.reducePos-d;f>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(d==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=d,this.p.lastBigReductionSize=f));let m=c?this.stack[c-1]:0,p=this.bufferBase+this.buffer.length-m;if(i<a.minRepeatTerm||t&131072){let O=a.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,d,O,p+4,!0)}if(t&262144)this.state=this.stack[c];else{let O=this.stack[c-3];this.state=a.getGoto(O,i,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(i,d)}storeNode(t,n,r,i=4,a=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,l=this.buffer.length;if(l==0&&s.parent&&(l=s.bufferBase-s.parent.bufferBase,s=s.parent),l>0&&s.buffer[l-4]==0&&s.buffer[l-1]>-1){if(n==r)return;if(s.buffer[l-2]>=n){s.buffer[l-2]=r;return}}}if(!a||this.pos==r)this.buffer.push(t,n,r,i);else{let s=this.buffer.length;if(s>0&&(this.buffer[s-4]!=0||this.buffer[s-1]<0)){let l=!1;for(let c=s;c>0&&this.buffer[c-2]>r;c-=4)if(this.buffer[c-1]>=0){l=!0;break}if(l)for(;s>0&&this.buffer[s-2]>r;)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]=t,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(t,n,r,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let a=t,{parser:s}=this.p;this.pos=i;let l=s.stateFlag(a,1);!l&&(i>r||n<=s.maxNode)&&(this.reducePos=i),this.pushState(a,l?r:Math.min(r,this.reducePos)),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(t,n,r,i){t&65536?this.reduce(t):this.shift(t,n,r,i)}useNode(t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=t)&&(this.p.reused.push(t),r++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,n=t.buffer.length;for(;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new a0(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,n){let r=t<=this.p.parser.maxNode;r&&this.storeNode(t,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(t){for(let n=new U9(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,t);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(t){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let a=0,s;a<n.length;a+=2)(s=n[a+1])!=this.state&&this.p.parser.hasAction(s,t)&&i.push(n[a],s);if(this.stack.length<120)for(let a=0;i.length<8&&a<n.length;a+=2){let s=n[a+1];i.some((l,c)=>c&1&&l==s)||i.push(n[a],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let a=n[i+1];if(a==this.state)continue;let s=this.split();s.pushState(a,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:t}=this.p,n=t.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!t.validAction(this.state,n)){let r=n>>19,i=n&65535,a=this.stack.length-r*3;if(a<0||t.getGoto(this.stack[a],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:t}=this.p,n=[],r=(i,a)=>{if(!n.includes(i))return n.push(i),t.allActions(i,s=>{if(!(s&393216))if(s&65536){let l=(s>>19)-a;if(l>1){let c=s&65535,d=this.stack.length-l*3;if(d>=0&&t.getGoto(this.stack[d],c,!1)>=0)return l<<19|65536|c}}else{let l=r(s,a+1);if(l!=null)return l}})};return r(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:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=t.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(n)))}reduceContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(n)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let n=new yT(this.curContext.tracker,t);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},yT=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},U9=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=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 r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},Y9=class s0{constructor(t,n,r){this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new s0(t,n,n-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.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 s0(this.stack,this.pos,this.index)}};function ed(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let s=e.charCodeAt(r++),l=!1;if(s==126){a=65535;break}s>=92&&s--,s>=34&&s--;let c=s-32;if(c>=46&&(c-=46,l=!0),a+=c,l)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var Lm=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},ST=new Lm,F9=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=ST,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let a=this.ranges[--r];i-=n.from-a.to,n=a}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];i+=a.from-n.to,n=a}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let i=this.resolveOffset(e,1);if(i==null)return-1;if(n=i,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let a=this.rangeIndex,s=this.range;for(;s.to<=n;)s=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>s.to&&(this.chunk2=this.chunk2.slice(0,s.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-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,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>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,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=ST,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,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},lc=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;_M(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};lc.prototype.contextual=lc.prototype.fallback=lc.prototype.extend=!1;var sp=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?ed(e):e}token(e,t){let n=e.pos,r=0;for(;;){let i=e.next<0,a=e.resolveOffset(1,1);if(_M(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(i||r++,a==null)break;e.reset(a,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};sp.prototype.contextual=lc.prototype.fallback=lc.prototype.extend=!1;var Fr=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function _M(e,t,n,r,i,a){let s=0,l=1<<r,{dialect:c}=n.p.parser;e:for(;(l&e[s])!=0;){let d=e[s+1];for(let O=s+3;O<d;O+=2)if((e[O+1]&l)>0){let b=e[O];if(c.allows(b)&&(t.token.value==-1||t.token.value==b||$9(b,t.token.value,i,a))){t.acceptToken(b);break}}let f=t.next,m=0,p=e[s+2];if(t.next<0&&p>m&&e[d+p*3-3]==65535){s=e[d+p*3-1];continue e}for(;m<p;){let O=m+p>>1,b=d+O+(O<<1),S=e[b],w=e[b+1]||65536;if(f<S)p=O;else if(f>=w)m=O+1;else{s=e[b+2],t.advance();continue e}}break}}function xT(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function $9(e,t,n,r){let i=xT(n,r,t);return i<0||xT(n,r,e)<i}var qr=typeof process<"u"&&ry&&/\bparse\b/.test(ry.LOG),GO=null;function _T(e,t,n){let r=e.cursor(St.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var W9=class{constructor(e,t){this.fragments=e,this.nodeSet=t,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?_T(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?_T(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 t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof Pt){if(a==e){if(a<this.safeFrom)return null;let s=a+i.length;if(s<=this.safeTo){let l=i.prop(Ke.lookAhead);if(!l||s+l<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},H9=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new Lm)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<i.length;c++){if((1<<c&a)==0)continue;let d=i[c],f=this.tokens[c];if(!(n&&!d.fallback)&&((d.contextual||f.start!=e.pos||f.mask!=a||f.context!=s)&&(this.updateCachedToken(f,d,e),f.mask=a,f.context=s),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let m=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!d.extend&&(n=f,t>m))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),!n&&e.pos==this.stream.end&&(n=new Lm,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Lm,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:i}=n.p;for(let a=0;a<i.specialized.length;a++)if(i.specialized[a]==e.value){let s=i.specializers[a](this.stream.read(e.start,e.end),n);if(s>=0&&n.p.parser.dialect.allows(s>>1)){(s&1)==0?e.value=s>>1:e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let i=0;i<r;i+=3)if(this.actions[i]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:s}=a;for(let l=0;l<2;l++)for(let c=a.stateSlot(i,l?2:1);;c+=3){if(s[c]==65535)if(s[c+1]==1)c=Ba(s,c+2);else{r==0&&s[c+1]==2&&(r=this.putAction(Ba(s,c+2),t,n,r));break}s[c]==t&&(r=this.putAction(Ba(s,c+1),t,n,r))}return r}},G9=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,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 F9(t,r),this.tokens=new H9(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[V9.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new W9(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let s=e[a];for(;;){if(this.tokens.mainToken=null,s.pos>t)n.push(s);else{if(this.advanceStack(s,n,e))continue;{r||(r=[],i=[]),r.push(s);let l=this.tokens.getMainToken(s);i.push(l.value,l.end)}}break}}if(!n.length){let a=r&&J9(r);if(a)return qr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw qr&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(a)return qr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(n.length>a)for(n.sort((s,l)=>l.score-s.score);n.length>a;)n.pop();n.some(s=>s.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let a=0;a<n.length-1;a++){let s=n[a];for(let l=a+1;l<n.length;l++){let c=n[l];if(s.sameState(c)||s.buffer.length>500&&c.buffer.length>500)if((s.score-c.score||s.buffer.length-c.buffer.length)>0)n.splice(l--,1);else{n.splice(a--,1);continue e}}}n.length>12&&(n.sort((a,s)=>s.score-a.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let a=1;a<n.length;a++)n[a].pos<this.minStackPos&&(this.minStackPos=n[a].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,t,n){let r=e.pos,{parser:i}=this,a=qr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,d=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(r);f;){let m=this.parser.nodeSet.types[f.type.id]==f.type?i.getGoto(e.state,f.type.id):-1;if(m>-1&&f.length&&(!c||(f.prop(Ke.contextHash)||0)==d))return e.useNode(f,m),qr&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(f.type.id)})`),!0;if(!(f instanceof Pt)||f.children.length==0||f.positions[0]>0)break;let p=f.children[0];if(p instanceof Pt&&f.positions[0]==0)f=p;else break}}let s=i.stateSlot(e.state,4);if(s>0)return e.reduce(s),qr&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(s&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 d=l[c++],f=l[c++],m=l[c++],p=c==l.length||!n,O=p?e:e.split(),b=this.tokens.mainToken;if(O.apply(d,f,b?b.start:O.pos,m),qr&&console.log(a+this.stackID(O)+` (via ${(d&65536)==0?"shift":`reduce of ${i.getName(d&65535)}`} for ${i.getName(f)} @ ${r}${O==e?"":", split"})`),p)return!0;O.pos>r?t.push(O):n.push(O)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return wT(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let s=e[a],l=t[a<<1],c=t[(a<<1)+1],d=qr?this.stackID(s)+" -> ":"";if(s.deadEnd&&(i||(i=!0,s.restart(),qr&&console.log(d+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))))continue;let f=s.split(),m=d;for(let p=0;p<10&&f.forceReduce()&&(qr&&console.log(m+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));p++)qr&&(m=this.stackID(f)+" -> ");for(let p of s.recoverByInsert(l))qr&&console.log(d+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,n);this.stream.end>s.pos?(c==s.pos&&(c++,l=0),s.recoverByDelete(l,c),qr&&console.log(d+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),wT(s,n)):(!r||r.score<f.score)&&(r=f)}return r}stackToTree(e){return e.close(),Pt.build({buffer:Y9.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 t=(GO||(GO=new WeakMap)).get(e);return t||GO.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function wT(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var K9=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},KO=e=>e,wM=class{constructor(e){this.start=e.start,this.shift=e.shift||KO,this.reduce=e.reduce||KO,this.reuse=e.reuse||KO,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},Vp=class o0 extends FS{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let n=t.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;l<t.repeatNodeCount;l++)n.push("");let r=Object.keys(t.topRules).map(l=>t.topRules[l][1]),i=[];for(let l=0;l<n.length;l++)i.push([]);function a(l,c,d){i[l].push([c,c.deserialize(String(d))])}if(t.nodeProps)for(let l of t.nodeProps){let c=l[0];typeof c=="string"&&(c=Ke[c]);for(let d=1;d<l.length;){let f=l[d++];if(f>=0)a(f,c,l[d++]);else{let m=l[d+-f];for(let p=-f;p>0;p--)a(l[d++],c,m);d++}}}this.nodeSet=new VS(n.map((l,c)=>Fn.define({name:c>=this.minRepeatTerm?void 0:l,id:c,props:i[c],top:r.indexOf(c)>-1,error:c==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(c)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=vR;let s=ed(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(kT),this.states=ed(t.states,Uint32Array),this.data=ed(t.stateData),this.goto=ed(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(l=>typeof l=="number"?new lc(s,l):l),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,n,r){let i=new G9(this,t,n,r);for(let a of this.wrappers)i=a(i,t,n,r);return i}getGoto(t,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let a=i[n+1];;){let s=i[a++],l=s&1,c=i[a++];if(l&&r)return c;for(let d=a+(s>>1);a<d;a++)if(i[a]==t)return c;if(l)return-1}}hasAction(t,n){let r=this.data;for(let i=0;i<2;i++)for(let a=this.stateSlot(t,i?2:1),s;;a+=3){if((s=r[a])==65535)if(r[a+1]==1)s=r[a=Ba(r,a+2)];else{if(r[a+1]==2)return Ba(r,a+2);break}if(s==n||s==0)return Ba(r,a+1)}return 0}stateSlot(t,n){return this.states[t*6+n]}stateFlag(t,n){return(this.stateSlot(t,0)&n)>0}validAction(t,n){return!!this.allActions(t,r=>r==n?!0:null)}allActions(t,n){let r=this.stateSlot(t,4),i=r?n(r):void 0;for(let a=this.stateSlot(t,1);i==null;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=Ba(this.data,a+2);else break;i=n(Ba(this.data,a+1))}return i}nextStates(t){let n=[];for(let r=this.stateSlot(t,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ba(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((a,s)=>s&1&&a==i)||n.push(this.data[r],i)}}return n}configure(t){let n=Object.assign(Object.create(o0.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let r=this.topRules[t.top];if(!r)throw new RangeError(`Invalid top rule name ${t.top}`);n.top=r}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=t.tokenizers.find(a=>a.from==r);return i?i.to:r})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let a=t.specializers.find(l=>l.from==r.external);if(!a)return r;let s=Object.assign(Object.assign({},r),{external:a.to});return n.specializers[i]=kT(s),s})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let n=this.dynamicPrecedences;return n==null?0:n[t]||0}parseDialect(t){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(t)for(let a of t.split(" ")){let s=n.indexOf(a);s>=0&&(r[s]=!0)}let i=null;for(let a=0;a<n.length;a++)if(!r[a])for(let s=this.dialects[n[a]],l;(l=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new K9(t,r,i)}static deserialize(t){return new o0(t)}};function Ba(e,t){return e[t]|e[t+1]<<16}function J9(e){let t=null;for(let n of e){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function kT(e){if(e.external){let t=e.extend?1:0;return(n,r)=>e.external(n,r)<<1|t}return e.get}var e7=55,t7=1,n7=56,r7=2,i7=57,a7=3,jT=4,s7=5,sx=6,kM=7,jM=8,TM=9,CM=10,o7=11,l7=12,c7=13,JO=58,u7=14,d7=15,TT=59,EM=21,f7=23,AM=24,h7=25,l0=27,QM=28,m7=29,p7=32,g7=35,v7=37,O7=38,b7=0,y7=1,S7={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},x7={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},CT={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 _7(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var ET=null,AT=null,QT=0;function c0(e,t){let n=e.pos+t;if(QT==n&&AT==e)return ET;let r=e.peek(t),i="";for(;_7(r);)i+=String.fromCharCode(r),r=e.peek(++t);return AT=e,QT=n,ET=i?i.toLowerCase():r==w7||r==k7?void 0:null}var PM=60,op=62,ox=47,w7=63,k7=33,j7=45;function PT(e,t){this.name=e,this.parent=t}var T7=[sx,CM,kM,jM,TM],C7=new wM({start:null,shift(e,t,n,r){return T7.indexOf(t)>-1?new PT(c0(r,1)||"",e):e},reduce(e,t){return t==EM&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==sx||i==v7?new PT(c0(r,1)||"",e):e},strict:!1}),E7=new Fr((e,t)=>{if(e.next!=PM){e.next<0&&t.context&&e.acceptToken(JO);return}e.advance();let n=e.next==ox;n&&e.advance();let r=c0(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?d7:u7);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(o7);if(i&&x7[i])return e.acceptToken(JO,-2);if(t.dialectEnabled(b7))return e.acceptToken(l7);for(let a=t.context;a;a=a.parent)if(a.name==r)return;e.acceptToken(c7)}else{if(r=="script")return e.acceptToken(kM);if(r=="style")return e.acceptToken(jM);if(r=="textarea")return e.acceptToken(TM);if(S7.hasOwnProperty(r))return e.acceptToken(CM);i&&CT[i]&&CT[i][r]?e.acceptToken(JO,-1):e.acceptToken(sx)}},{contextual:!0}),A7=new Fr(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(TT);break}if(e.next==j7)t++;else if(e.next==op&&t>=2){n>=3&&e.acceptToken(TT,-2);break}else t=0;e.advance()}});function Q7(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}var P7=new Fr((e,t)=>{if(e.next==ox&&e.peek(1)==op){let n=t.dialectEnabled(y7)||Q7(t.context);e.acceptToken(n?s7:jT,2)}else e.next==op&&e.acceptToken(jT,1)});function lx(e,t,n){let r=2+e.length;return new Fr(i=>{for(let a=0,s=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(t);break}if(a==0&&i.next==PM||a==1&&i.next==ox||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,s++;else if(a==r&&i.next==op){l>s?i.acceptToken(t,-s):i.acceptToken(n,-(s-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(t,1);break}else a=s=0;i.advance()}})}var N7=lx("script",e7,t7),R7=lx("style",n7,r7),M7=lx("textarea",i7,a7),L7=el({"Text RawText IncompleteTag IncompleteCloseTag":B.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":B.angleBracket,TagName:B.tagName,"MismatchedCloseTag/TagName":[B.tagName,B.invalid],AttributeName:B.attributeName,"AttributeValue UnquotedAttributeValue":B.attributeValue,Is:B.definitionOperator,"EntityReference CharacterReference":B.character,Comment:B.blockComment,ProcessingInst:B.processingInstruction,DoctypeDecl:B.documentMeta}),D7=Vp.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOO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RnWR!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 IncompleteTag 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:68,context:C7,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[L7],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnM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N7,R7,M7,P7,E7,A7,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function NM(e,t){let n=Object.create(null);for(let r of e.getChildren(AM)){let i=r.getChild(h7),a=r.getChild(l0)||r.getChild(QM);i&&(n[t.read(i.from,i.to)]=a?a.type.id==l0?t.read(a.from+1,a.to-1):t.read(a.from,a.to):"")}return n}function NT(e,t){let n=e.getChild(f7);return n?t.read(n.from,n.to):" "}function eb(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=NM(e.node.parent.firstChild,t))))return{parser:i.parser,bracketed:!0};return null}function RM(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let l of e)(l.tag=="script"?n:l.tag=="style"?r:l.tag=="textarea"?i:a).push(l);let s=t.length?Object.create(null):null;for(let l of t)(s[l.name]||(s[l.name]=[])).push(l);return jR((l,c)=>{let d=l.type.id;if(d==m7)return eb(l,c,n);if(d==p7)return eb(l,c,r);if(d==g7)return eb(l,c,i);if(d==EM&&a.length){let f=l.node,m=f.firstChild,p=m&&NT(m,c),O;if(p){for(let b of a)if(b.tag==p&&(!b.attrs||b.attrs(O||(O=NM(m,c))))){let S=f.lastChild,w=S.type.id==O7?S.from:f.to;if(w>m.to)return{parser:b.parser,overlay:[{from:m.to,to:w}]}}}}if(s&&d==AM){let f=l.node,m;if(m=f.firstChild){let p=s[c.read(m.from,m.to)];if(p)for(let O of p){if(O.tagName&&O.tagName!=NT(f.parent,c))continue;let b=f.lastChild;if(b.type.id==l0){let S=b.from+1,w=b.lastChild,k=b.to-(w&&w.isError?0:1);if(k>S)return{parser:O.parser,overlay:[{from:S,to:k}],bracketed:!0}}else if(b.type.id==QM)return{parser:O.parser,overlay:[{from:b.from,to:b.to}]}}}}return null})}var z7=122,RT=1,q7=123,I7=124,MM=2,X7=125,Z7=3,B7=4,LM=[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],V7=58,U7=40,DM=95,Y7=91,Dm=45,F7=46,$7=35,W7=37,H7=38,G7=92,K7=10,J7=42;function Zd(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function cx(e){return e>=48&&e<=57}function MT(e){return cx(e)||e>=97&&e<=102||e>=65&&e<=70}var zM=(e,t,n)=>(r,i)=>{for(let a=!1,s=0,l=0;;l++){let{next:c}=r;if(Zd(c)||c==Dm||c==DM||a&&cx(c))!a&&(c!=Dm||l>0)&&(a=!0),s===l&&c==Dm&&s++,r.advance();else if(c==G7&&r.peek(1)!=K7){if(r.advance(),MT(r.next)){do r.advance();while(MT(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(s==2&&i.canShift(MM)?t:c==U7?n:e);break}}},eV=new Fr(zM(q7,MM,I7)),tV=new Fr(zM(X7,Z7,B7)),nV=new Fr(e=>{if(LM.includes(e.peek(-1))){let{next:t}=e;(Zd(t)||t==DM||t==$7||t==F7||t==J7||t==Y7||t==V7&&Zd(e.peek(1))||t==Dm||t==H7)&&e.acceptToken(z7)}}),rV=new Fr(e=>{if(!LM.includes(e.peek(-1))){let{next:t}=e;if(t==W7&&(e.advance(),e.acceptToken(RT)),Zd(t)){do e.advance();while(Zd(e.next)||cx(e.next));e.acceptToken(RT)}}}),iV=el({"AtKeyword import charset namespace keyframes media supports":B.definitionKeyword,"from to selector":B.keyword,NamespaceName:B.namespace,KeyframeName:B.labelName,KeyframeRangeName:B.operatorKeyword,TagName:B.tagName,ClassName:B.className,PseudoClassName:B.constant(B.className),IdName:B.labelName,"FeatureName PropertyName":B.propertyName,AttributeName:B.attributeName,NumberLiteral:B.number,KeywordQuery:B.keyword,UnaryQueryOp:B.operatorKeyword,"CallTag ValueName":B.atom,VariableName:B.variableName,Callee:B.operatorKeyword,Unit:B.unit,"UniversalSelector NestingSelector":B.definitionOperator,"MatchOp CompareOp":B.compareOperator,"ChildOp SiblingOp, LogicOp":B.logicOperator,BinOp:B.arithmeticOperator,Important:B.modifier,Comment:B.blockComment,ColorLiteral:B.color,"ParenthesizedContent StringLiteral":B.string,":":B.punctuation,"PseudoOp #":B.derefOperator,"; ,":B.separator,"( )":B.paren,"[ ]":B.squareBracket,"{ }":B.brace}),aV={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},sV={__proto__:null,or:98,and:98,not:106,only:106,layer:170},oV={__proto__:null,selector:112,layer:166},lV={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},cV={__proto__:null,to:207},uV=Vp.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-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$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[iV],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/it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b(){if(!tb&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!="cssText"&&r!="cssFloat"&&typeof e[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));tb=t.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return tb||[]}var LT=["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(e=>({type:"class",label:e})),DT=["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(e=>({type:"keyword",label:e})).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(e=>({type:"constant",label:e}))),dV=["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(e=>({type:"type",label:e})),fV=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),Xa=/^(\w[\w-]*|-\w[\w-]*|)$/,hV=/^-(-[\w-]*)?$/;function mV(e,t){var n;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let r=(n=e.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:t.sliceString(r.from,r.to)=="var"}var zT=new kR,pV=["Declaration"];function gV(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function qM(e,t,n){if(t.to-t.from>4096){let r=zT.get(t);if(r)return r;let i=[],a=new Set,s=t.cursor(St.IncludeAnonymous);if(s.firstChild())do for(let l of qM(e,s.node,n))a.has(l.label)||(a.add(l.label),i.push(l));while(s.nextSibling());return zT.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(a=>{var s;if(n(a)&&a.matchContext(pV)&&((s=a.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let l=e.sliceString(a.from,a.to);i.has(l)||(i.add(l),r.push({label:l,type:"variable"}))}}),r}}var vV=e=>t=>{let{state:n,pos:r}=t,i=$n(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(a||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:nb(),validFor:Xa};if(i.name=="ValueName")return{from:i.from,options:DT,validFor:Xa};if(i.name=="PseudoClassName")return{from:i.from,options:LT,validFor:Xa};if(e(i)||(t.explicit||a)&&mV(i,n.doc))return{from:e(i)||a?i.from:r,options:qM(n.doc,gV(i),e),validFor:hV};if(i.name=="TagName"){for(let{parent:c}=i;c;c=c.parent)if(c.name=="Block")return{from:i.from,options:nb(),validFor:Xa};return{from:i.from,options:dV,validFor:Xa}}if(i.name=="AtKeyword")return{from:i.from,options:fV,validFor:Xa};if(!t.explicit)return null;let s=i.resolve(r),l=s.childBefore(r);return l&&l.name==":"&&s.name=="PseudoClassSelector"?{from:r,options:LT,validFor:Xa}:l&&l.name==":"&&s.name=="Declaration"||s.name=="ArgList"?{from:r,options:DT,validFor:Xa}:s.name=="Block"||s.name=="Styles"?{from:r,options:nb(),validFor:Xa}:null},OV=vV(e=>e.name=="VariableName"),lp=Zp.define({name:"css",parser:uV.configure({props:[mf.add({Declaration:oc()}),Rc.add({"Block KeyframeList":HS})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function bV(){return new yc(lp,lp.data.of({autocomplete:OV}))}var yV=316,SV=317,qT=1,xV=2,_V=3,wV=4,kV=318,jV=320,TV=321,CV=5,EV=6,AV=0,u0=[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],IM=125,QV=59,d0=47,PV=42,NV=43,RV=45,MV=60,LV=44,DV=63,zV=46,qV=91,IV=new wM({start:!1,shift(e,t){return t==CV||t==EV||t==jV?e:t==TV},strict:!1}),XV=new Fr((e,t)=>{let{next:n}=e;(n==IM||n==-1||t.context)&&e.acceptToken(kV)},{contextual:!0,fallback:!0}),ZV=new Fr((e,t)=>{let{next:n}=e,r;u0.indexOf(n)>-1||n==d0&&((r=e.peek(1))==d0||r==PV)||n!=IM&&n!=QV&&n!=-1&&!t.context&&e.acceptToken(yV)},{contextual:!0}),BV=new Fr((e,t)=>{e.next==qV&&!t.context&&e.acceptToken(SV)},{contextual:!0}),VV=new Fr((e,t)=>{let{next:n}=e;if(n==NV||n==RV){if(e.advance(),n==e.next){e.advance();let r=!t.context&&t.canShift(qT);e.acceptToken(r?qT:xV)}}else n==DV&&e.peek(1)==zV&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(_V))},{contextual:!0});function rb(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var UV=new Fr((e,t)=>{if(e.next!=MV||!t.dialectEnabled(AV)||(e.advance(),e.next==d0))return;let n=0;for(;u0.indexOf(e.next)>-1;)e.advance(),n++;if(rb(e.next,!0)){for(e.advance(),n++;rb(e.next,!1);)e.advance(),n++;for(;u0.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==LV)return;for(let r=0;;r++){if(r==7){if(!rb(e.next,!0))return;break}if(e.next!="extends".charCodeAt(r))break;e.advance(),n++}}e.acceptToken(wV,-n)}),YV=el({"get set async static":B.modifier,"for while do if else switch try catch finally return throw break continue default case defer":B.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":B.operatorKeyword,"let var const using function class extends":B.definitionKeyword,"import export from":B.moduleKeyword,"with debugger new":B.keyword,TemplateString:B.special(B.string),super:B.atom,BooleanLiteral:B.bool,this:B.self,null:B.null,Star:B.modifier,VariableName:B.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":B.function(B.variableName),VariableDefinition:B.definition(B.variableName),Label:B.labelName,PropertyName:B.propertyName,PrivatePropertyName:B.special(B.propertyName),"CallExpression/MemberExpression/PropertyName":B.function(B.propertyName),"FunctionDeclaration/VariableDefinition":B.function(B.definition(B.variableName)),"ClassDeclaration/VariableDefinition":B.definition(B.className),"NewExpression/VariableName":B.className,PropertyDefinition:B.definition(B.propertyName),PrivatePropertyDefinition:B.definition(B.special(B.propertyName)),UpdateOp:B.updateOperator,"LineComment Hashbang":B.lineComment,BlockComment:B.blockComment,Number:B.number,String:B.string,Escape:B.escape,ArithOp:B.arithmeticOperator,LogicOp:B.logicOperator,BitOp:B.bitwiseOperator,CompareOp:B.compareOperator,RegExp:B.regexp,Equals:B.definitionOperator,Arrow:B.function(B.punctuation),": Spread":B.punctuation,"( )":B.paren,"[ ]":B.squareBracket,"{ }":B.brace,"InterpolationStart InterpolationEnd":B.special(B.brace),".":B.derefOperator,", ;":B.separator,"@":B.meta,TypeName:B.typeName,TypeDefinition:B.definition(B.typeName),"type enum interface implements namespace module declare":B.definitionKeyword,"abstract global Privacy readonly override":B.modifier,"is keyof unique infer asserts":B.operatorKeyword,JSXAttributeValue:B.attributeValue,JSXText:B.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":B.angleBracket,"JSXIdentifier JSXNameSpacedName":B.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":B.attributeName,"JSXBuiltin/JSXIdentifier":B.standard(B.tagName)}),FV={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},$V={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},WV={__proto__:null,"<":193},HV=Vp.deserialize({version:14,states:"$F|Q%TQlOOO%[QlO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ition > < TypeParamList in out const 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 : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < 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 CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression 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 InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts 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 defer 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:380,context:IV,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[YV],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!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#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A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&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[ZV,BV,VV,UV,2,3,4,5,6,7,8,9,10,11,12,13,14,XV,new sp("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new sp("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>FV[e]||-1},{term:343,get:e=>$V[e]||-1},{term:95,get:e=>WV[e]||-1}],tokenPrec:15201}),XM=[kr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),kr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),kr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),kr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),kr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),kr(`try {
|
|
110
|
+
\${}
|
|
111
|
+
} catch (\${error}) {
|
|
112
|
+
\${}
|
|
113
|
+
}`,{label:"try",detail:"/ catch block",type:"keyword"}),kr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),kr(`if (\${}) {
|
|
114
|
+
\${}
|
|
115
|
+
} else {
|
|
116
|
+
\${}
|
|
117
|
+
}`,{label:"if",detail:"/ else block",type:"keyword"}),kr(`class \${name} {
|
|
118
|
+
constructor(\${params}) {
|
|
119
|
+
\${}
|
|
120
|
+
}
|
|
121
|
+
}`,{label:"class",detail:"definition",type:"keyword"}),kr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),kr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],GV=XM.concat([kr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),kr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),kr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),IT=new kR,ZM=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Vu(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}var KV=["FunctionDeclaration"],JV={FunctionDeclaration:Vu("function"),ClassDeclaration:Vu("class"),ClassExpression:()=>!0,EnumDeclaration:Vu("constant"),TypeAliasDeclaration:Vu("type"),NamespaceDeclaration:Vu("namespace"),VariableDefinition(e,t){e.matchContext(KV)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function BM(e,t){let n=IT.get(t);if(n)return n;let r=[],i=!0;function a(s,l){let c=e.sliceString(s.from,s.to);r.push({label:c,type:l})}return t.cursor(St.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let l=JV[s.name];if(l&&l(s,a)||ZM.has(s.name))return!1}else if(s.to-s.from>8192){for(let l of BM(e,s.node))r.push(l);return!1}}),IT.set(t,r),r}var XT=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,VM=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function eU(e){let t=$n(e.state).resolveInner(e.pos,-1);if(VM.indexOf(t.name)>-1)return null;let n=t.name=="VariableName"||t.to-t.from<20&&XT.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let i=t;i;i=i.parent)ZM.has(i.name)&&(r=r.concat(BM(e.state.doc,i)));return{options:r,from:n?t.from:e.pos,validFor:XT}}var da=Zp.define({name:"javascript",parser:HV.configure({props:[mf.add({IfStatement:oc({except:/^\s*({|else\b)/}),TryStatement:oc({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:p6,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:h6({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":oc({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Rc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":HS,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name=="JSXSelfClosingTag")return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){var t;let n=(t=e.firstChild)===null||t===void 0?void 0:t.nextSibling,r=e.lastChild;return!n||n.type.isError?null:{from:n.to,to:r.type.isError?e.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),UM={test:e=>/^JSX/.test(e.name),facet:$S({commentTokens:{block:{open:"{/*",close:"*/}"}}})},YM=da.configure({dialect:"ts"},"typescript"),FM=da.configure({dialect:"jsx",props:[WS.add(e=>e.isTop?[UM]:void 0)]}),$M=da.configure({dialect:"jsx ts",props:[WS.add(e=>e.isTop?[UM]:void 0)]},"typescript"),WM=e=>({label:e,type:"keyword"}),HM="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(WM),tU=HM.concat(["declare","implements","private","protected","public"].map(WM));function nU(e={}){let t=e.jsx?e.typescript?$M:FM:e.typescript?YM:da,n=e.typescript?GV.concat(tU):XM.concat(HM);return new yc(t,[da.data.of({autocomplete:t9(VM,e9(n))}),da.data.of({autocomplete:eU}),e.jsx?aU:[]])}function rU(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(e.name=="JSXEscape"||!e.parent)return null;e=e.parent}}function ZT(e,t,n=e.length){for(let r=t==null?void 0:t.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return e.sliceString(r.from,Math.min(r.to,n));return""}var iU=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),aU=De.inputHandler.of((e,t,n,r,i)=>{if((iU?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=">"&&r!="/"||!da.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:s}=a,l=s.changeByRange(c=>{var d;let{head:f}=c,m=$n(s).resolveInner(f-1,-1),p;if(m.name=="JSXStartTag"&&(m=m.parent),!(s.doc.sliceString(f-1,f)!=r||m.name=="JSXAttributeValue"&&m.to>f)){if(r==">"&&m.name=="JSXFragmentTag")return{range:c,changes:{from:f,insert:"</>"}};if(r=="/"&&m.name=="JSXStartCloseTag"){let O=m.parent,b=O.parent;if(b&&O.from==f-2&&((p=ZT(s.doc,b.firstChild,f))||((d=b.firstChild)===null||d===void 0?void 0:d.name)=="JSXFragmentTag")){let S=`${p}>`;return{range:Ce.cursor(f+S.length,-1),changes:{from:f,insert:S}}}}else if(r==">"){let O=rU(m);if(O&&O.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(s.doc.sliceString(f,f+2))&&(p=ZT(s.doc,O,f)))return{range:c,changes:{from:f,insert:`</${p}>`}}}}return{range:c}});return l.changes.empty?!1:(e.dispatch([a,s.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Uu=["_blank","_self","_top","_parent"],ib=["ascii","utf-8","utf-16","latin1","latin1"],ab=["get","post","put","delete"],sb=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Ir=["true","false"],Ee={},sU={a:{attrs:{href:null,ping:null,type:null,media:null,target:Uu,hreflang:null}},abbr:Ee,address:Ee,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ee,aside:Ee,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ee,base:{attrs:{href:null,target:Uu}},bdi:Ee,bdo:Ee,blockquote:{attrs:{cite:null}},body:Ee,br:Ee,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:sb,formmethod:ab,formnovalidate:["novalidate"],formtarget:Uu,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ee,center:Ee,cite:Ee,code:Ee,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:Ee,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ee,div:Ee,dl:Ee,dt:Ee,em:Ee,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ee,figure:Ee,footer:Ee,form:{attrs:{action:null,name:null,"accept-charset":ib,autocomplete:["on","off"],enctype:sb,method:ab,novalidate:["novalidate"],target:Uu}},h1:Ee,h2:Ee,h3:Ee,h4:Ee,h5:Ee,h6:Ee,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ee,hgroup:Ee,hr:Ee,html:{attrs:{manifest:null}},i:Ee,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:sb,formmethod:ab,formnovalidate:["novalidate"],formtarget:Uu,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:Ee,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ee,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:Ee,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:ib,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:Ee,noscript:Ee,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:Ee,param:{attrs:{name:null,value:null}},pre:Ee,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ee,rt:Ee,ruby:Ee,samp:Ee,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:ib}},section:Ee,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ee,source:{attrs:{src:null,type:null,media:null}},span:Ee,strong:Ee,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ee,summary:Ee,sup:Ee,table:Ee,tbody:Ee,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ee,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:Ee,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ee,time:{attrs:{datetime:null}},title:Ee,tr:Ee,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ee,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:Ee},GM={accesskey:null,class:null,contenteditable:Ir,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:Ir,autocorrect:Ir,autocapitalize:Ir,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":Ir,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Ir,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Ir,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Ir,"aria-hidden":Ir,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Ir,"aria-multiselectable":Ir,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Ir,"aria-relevant":null,"aria-required":Ir,"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},KM="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(e=>"on"+e);for(let e of KM)GM[e]=null;var Bd=class{constructor(e,t){this.tags={...sU,...e},this.globalAttrs={...GM,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};Bd.default=new Bd;function xc(e,t,n=e.length){if(!t)return"";let r=t.firstChild,i=r&&r.getChild("TagName");return i?e.sliceString(i.from,Math.min(i.to,n)):""}function _c(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function JM(e,t,n){let r=n.tags[xc(e,_c(t))];return(r==null?void 0:r.children)||n.allTags}function ux(e,t){let n=[];for(let r=_c(t);r&&!r.type.isTop;r=_c(r.parent)){let i=xc(e,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(t.name=="EndTag"||t.from>=r.firstChild.to)&&n.push(i)}return n}var e5=/^[:\-\.\w\u00b7-\uffff]*$/;function BT(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?"":">",s=_c(n,n.name=="StartTag"||n.name=="TagName");return{from:r,to:i,options:JM(e.doc,s,t).map(l=>({label:l,type:"type"})).concat(ux(e.doc,n).map((l,c)=>({label:"/"+l,apply:"/"+l+a,type:"type",boost:99-c}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function VT(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:ux(e.doc,t).map((a,s)=>({label:a,apply:a+i,type:"type",boost:99-s})),validFor:e5}}function oU(e,t,n,r){let i=[],a=0;for(let s of JM(e.doc,n,t))i.push({label:"<"+s,type:"type"});for(let s of ux(e.doc,n))i.push({label:"</"+s+">",type:"type",boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function lU(e,t,n,r,i){let a=_c(n),s=a?t.tags[xc(e.doc,a)]:null,l=s&&s.attrs?Object.keys(s.attrs):[],c=s&&s.globalAttrs===!1?l:l.length?l.concat(t.globalAttrNames):t.globalAttrNames;return{from:r,to:i,options:c.map(d=>({label:d,type:"property"})),validFor:e5}}function cU(e,t,n,r,i){var a;let s=(a=n.parent)===null||a===void 0?void 0:a.getChild("AttributeName"),l=[],c;if(s){let d=e.sliceDoc(s.from,s.to),f=t.globalAttrs[d];if(!f){let m=_c(n),p=m?t.tags[xc(e.doc,m)]:null;f=(p==null?void 0:p.attrs)&&p.attrs[d]}if(f){let m=e.sliceDoc(r,i).toLowerCase(),p='"',O='"';/^['"]/.test(m)?(c=m[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",O=e.sliceDoc(i,i+1)==m[0]?"":m[0],m=m.slice(1),r++):c=/^[^\s<>='"]*$/;for(let b of f)l.push({label:b,apply:p+b+O,type:"constant"})}}return{from:r,to:i,options:l,validFor:c}}function t5(e,t){let{state:n,pos:r}=t,i=$n(n).resolveInner(r,-1),a=i.resolve(r);for(let s=r,l;a==i&&(l=i.childBefore(s));){let c=l.lastChild;if(!c||!c.type.isError||c.from<c.to)break;a=i=l,s=c.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?VT(n,i,i.from,r):BT(n,e,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?BT(n,e,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?VT(n,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?lU(n,e,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?cU(n,e,i,i.name=="Is"?r:i.from,r):t.explicit&&(a.name=="Element"||a.name=="Text"||a.name=="Document")?oU(n,e,i,r):null}function uU(e){return t5(Bd.default,e)}function dU(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new Bd(t,n):Bd.default;return i=>t5(r,i)}var fU=da.parser.configure({top:"SingleExpression"}),n5=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:YM.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:FM.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:$M.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:fU},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:da.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:lp.parser}],r5=[{name:"style",parser:lp.parser.configure({top:"Styles"})}].concat(KM.map(e=>({name:e,parser:da.parser}))),i5=Zp.define({name:"html",parser:D7.configure({props:[mf.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let r=e.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;t=r=i}return t&&!((n=t.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?e.lineIndent(t.from)+e.unit:null}}),Rc.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:n.name=="CloseTag"?n.from:e.to}}}),y6.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),zm=i5.configure({wrap:RM(n5,r5)});function hU(e={}){let t="",n;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=RM((e.nestedLanguages||[]).concat(n5),(e.nestedAttributes||[]).concat(r5)));let r=n?i5.configure({wrap:n,dialect:t}):t?zm.configure({dialect:t}):zm;return new yc(r,[zm.data.of({autocomplete:dU(e)}),e.autoCloseTags!==!1?mU:[],nU().support,bV().support])}var UT=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),mU=De.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=">"&&r!="/"||!zm.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:s}=a,l=s.changeByRange(c=>{var d,f,m;let p=s.doc.sliceString(c.from-1,c.to)==r,{head:O}=c,b=$n(s).resolveInner(O,-1),S;if(p&&r==">"&&b.name=="EndTag"){let w=b.parent;if(((f=(d=w.parent)===null||d===void 0?void 0:d.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(S=xc(s.doc,w.parent,O))&&!UT.has(S)){let k=O+(s.doc.sliceString(O,O+1)===">"?1:0),j=`</${S}>`;return{range:c,changes:{from:O,to:k,insert:j}}}}else if(p&&r=="/"&&b.name=="IncompleteCloseTag"){let w=b.parent;if(b.from==O-2&&((m=w.lastChild)===null||m===void 0?void 0:m.name)!="CloseTag"&&(S=xc(s.doc,w,O))&&!UT.has(S)){let k=O+(s.doc.sliceString(O,O+1)===">"?1:0),j=`${S}>`;return{range:Ce.cursor(O+j.length,-1),changes:{from:O,to:k,insert:j}}}}return{range:c}});return l.changes.empty?!1:(e.dispatch([a,s.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),a5=$S({commentTokens:{block:{open:"<!--",close:"-->"}}}),s5=new Ke,o5=E9.configure({props:[Rc.add(e=>!e.is("Block")||e.is("Document")||f0(e)!=null||pU(e)?void 0:(t,n)=>({from:n.doc.lineAt(t.from).to,to:t.to})),s5.add(f0),mf.add({Document:()=>null}),Ro.add({Document:a5})]});function f0(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function pU(e){return e.name=="OrderedList"||e.name=="BulletList"}function gU(e,t){let n=e;for(;;){let r=n.nextSibling,i;if(!r||(i=f0(r.type))!=null&&i<=t)break;n=r}return n.to}var vU=g6.of((e,t,n)=>{for(let r=$n(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let i=r.type.prop(s5);if(i==null)continue;let a=gU(r,i);if(a>n)return{from:n,to:a}}return null});function dx(e){return new hi(a5,e,[],"markdown")}var OU=dx(o5),bU=o5.configure([I9,Z9,X9,B9,{props:[Rc.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),cp=dx(bU);function yU(e,t){return n=>{if(n&&e){let r=null;if(n=/\S*/.exec(n)[0],typeof e=="function"?r=e(n):r=Hj.matchLanguageName(e,n,!0),r instanceof Hj)return r.support?r.support.language.parser:AR.getSkippingParser(r.load());if(r)return r.parser}return t?t.parser:null}}var ob=class{constructor(e,t,n,r,i,a,s){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=s}blank(e,t=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length<e;)n+=" ";return n}else{for(let r=this.to-this.from-n.length-this.spaceAfter.length;r>0;r--)n+=" ";return n+(t?this.spaceAfter:"")}}marker(e,t){let n=this.node.name=="OrderedList"?String(+c5(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}};function l5(e,t){let n=[],r=[];for(let i=e;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&n.push(i)}for(let i=n.length-1;i>=0;i--){let a=n[i],s,l=t.lineAt(a.from),c=a.from-l.from;if(a.name=="Blockquote"&&(s=/^ *>( ?)/.exec(l.text.slice(c))))r.push(new ob(a,c,c+s[0].length,"",s[1],">",null));else if(a.name=="ListItem"&&a.parent.name=="OrderedList"&&(s=/^( *)\d+([.)])( *)/.exec(l.text.slice(c)))){let d=s[3],f=s[0].length;d.length>=4&&(d=d.slice(0,d.length-4),f-=4),r.push(new ob(a.parent,c,c+f,s[1],d,s[2],a))}else if(a.name=="ListItem"&&a.parent.name=="BulletList"&&(s=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(c)))){let d=s[4],f=s[0].length;d.length>4&&(d=d.slice(0,d.length-4),f-=4);let m=s[2];s[3]&&(m+=s[3].replace(/[xX]/," ")),r.push(new ob(a.parent,c,c+f,s[1],d,m,a))}}return r}function c5(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function lb(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name=="ListItem"){let l=c5(a,t),c=+l[2];if(i>=0){if(c!=i+1)return;n.push({from:a.from+l[1].length,to:a.from+l[0].length,insert:String(i+2+r)})}i=c}let s=a.nextSibling;if(!s)break;a=s}}function fx(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(NR)!=" ")return e;let r=Ed(e,4,n),i="";for(let a=r;a>0;)a>=4?(i+=" ",a-=4):(i+=" ",a--);return i+e.slice(n)}var SU=(e={})=>({state:t,dispatch:n})=>{let r=$n(t),{doc:i}=t,a=null,s=t.changeByRange(l=>{if(!l.empty||!cp.isActiveAt(t,l.from,-1)&&!cp.isActiveAt(t,l.from,1))return a={range:l};let c=l.from,d=i.lineAt(c),f=l5(r.resolveInner(c,-1),i);for(;f.length&&f[f.length-1].from>c-d.from;)f.pop();if(!f.length)return a={range:l};let m=f[f.length-1];if(m.to-m.spaceAfter.length>c-d.from)return a={range:l};let p=c>=m.to-m.spaceAfter.length&&!/\S/.test(d.text.slice(m.to));if(m.item&&p){let k=m.node.firstChild,j=m.node.getChild("ListItem","ListItem");if(k.to>=c||j&&j.to<c||d.from>0&&!/[^\s>]/.test(i.lineAt(d.from-1).text)||e.nonTightLists===!1){let T=f.length>1?f[f.length-2]:null,E,Q="";T&&T.item?(E=d.from+T.from,Q=T.marker(i,1)):E=d.from+(T?T.to:0);let A=[{from:E,to:c,insert:Q}];return m.node.name=="OrderedList"&&lb(m.item,i,A,-2),T&&T.node.name=="OrderedList"&&lb(T.item,i,A),{range:Ce.cursor(E+Q.length),changes:A}}else{let T=FT(f,t,d);return{range:Ce.cursor(c+T.length+1),changes:{from:d.from,insert:T+t.lineBreak}}}}if(m.node.name=="Blockquote"&&p&&d.from){let k=i.lineAt(d.from-1),j=/>\s*$/.exec(k.text);if(j&&j.index==m.from){let T=t.changes([{from:k.from+j.index,to:k.to},{from:d.from+m.from,to:d.to}]);return{range:l.map(T),changes:T}}}let O=[];m.node.name=="OrderedList"&&lb(m.item,i,O);let b=m.item&&m.item.from<d.from,S="";if(!b||/^[\s\d.)\-+*>]*/.exec(d.text)[0].length>=m.to)for(let k=0,j=f.length-1;k<=j;k++)S+=k==j&&!b?f[k].marker(i,1):f[k].blank(k<j?Ed(d.text,4,f[k+1].from)-S.length:null);let w=c;for(;w>d.from&&/\s/.test(d.text.charAt(w-d.from-1));)w--;return S=fx(S,t),_U(m.node,t.doc)&&(S=FT(f,t,d)+t.lineBreak+S),O.push({from:w,to:c,insert:t.lineBreak+S}),{range:Ce.cursor(w+S.length+1),changes:O}});return a?!1:(n(t.update(s,{scrollIntoView:!0,userEvent:"input"})),!0)},xU=SU();function YT(e){return e.name=="QuoteMark"||e.name=="ListMark"}function _U(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let n=e.firstChild,r=e.getChild("ListItem","ListItem");if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),s=/^[\s>]*$/.test(i.text);return i.number+(s?0:1)<a.number}function FT(e,t,n){let r="";for(let i=0,a=e.length-2;i<=a;i++)r+=e[i].blank(i<a?Ed(n.text,4,e[i+1].from)-r.length:null,i<a);return fx(r,t)}function wU(e,t){let n=e.resolveInner(t,-1),r=t;YT(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if(YT(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}var kU=({state:e,dispatch:t})=>{let n=$n(e),r=null,i=e.changeByRange(a=>{let s=a.from,{doc:l}=e;if(a.empty&&cp.isActiveAt(e,a.from)){let c=l.lineAt(s),d=l5(wU(n,s),l);if(d.length){let f=d[d.length-1],m=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(s-c.from>m&&!/\S/.test(c.text.slice(m,s-c.from)))return{range:Ce.cursor(c.from+m),changes:{from:c.from+m,to:s}};if(s-c.from==m&&(!f.item||c.from<=f.item.from||!/\S/.test(c.text.slice(0,f.to)))){let p=c.from+f.from;if(f.item&&f.node.from<f.item.from&&/\S/.test(c.text.slice(f.from,f.to))){let O=f.blank(Ed(c.text,4,f.to)-Ed(c.text,4,f.from));return p==c.from&&(O=fx(O,e)),{range:Ce.cursor(p+O.length),changes:{from:p,to:c.from+f.to,insert:O}}}if(p<s)return{range:Ce.cursor(p),changes:{from:p,to:s}}}}}return r={range:a}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},jU=[{key:"Enter",run:xU},{key:"Backspace",run:kU}],u5=hU({matchClosingTags:!1});function TU(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=OU,completeHTMLTags:a=!0,pasteURLAsLink:s=!0,htmlTagLanguage:l=u5}=e;if(!(i instanceof uM))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],d=[l.support,vU],f;s&&d.push(QU),n instanceof yc?(d.push(n.support),f=n.language):n&&(f=n);let m=t||f?yU(t,f):void 0;c.push(Q9({codeParser:m,htmlParser:l.language.parser})),r&&d.push(ff.high(BS.of(jU)));let p=dx(i.configure(c));return a&&d.push(p.data.of({autocomplete:CU})),new yc(p,d)}function CU(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=$n(t).resolveInner(n,-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:n-r[0].length,to:n,options:EU(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var cb=null;function EU(){if(cb)return cb;let e=uU(new K6(nn.create({extensions:u5}),0,!0));return cb=e?e.options:[]}var AU=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,QU=De.domEventHandlers({paste:(e,t)=>{var n;let{main:r}=t.state.selection;if(r.empty)return!1;let i=(n=e.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!cp.isActiveAt(t.state,r.from,1)))return!1;let a=$n(t.state),s=!1;return a.iterate({from:r.from,to:r.to,enter:l=>{(l.from>r.from||AU.test(l.name))&&(s=!0)},leave:l=>{l.to<r.to&&(s=!0)}}),s?!1:(t.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});function d5(e,t,n={}){if(!e)return!1;const{pulse:r=!1,behavior:i="smooth"}=n,a=t.querySelector(`[data-annotation-id="${CSS.escape(e)}"]`);if(!a)return!1;const s=a.closest(".semiont-browse-view__content")||a.closest(".semiont-annotate-view__content")||a.closest(".semiont-document-viewer__scrollable-body");if(s){const l=a.getBoundingClientRect(),c=s.getBoundingClientRect();if(!(l.top>=c.top&&l.bottom<=c.bottom)){const f=a.offsetTop,m=s.clientHeight,p=a.offsetHeight,O=f-m/2+p/2;s.scrollTo({top:O,behavior:i})}}return r&&(a.classList.add("annotation-pulse"),setTimeout(()=>{a.classList.remove("annotation-pulse")},2e3)),!0}function PU(e,t){if(!t.includes(`\r
|
|
122
|
+
`))return e;const n=[];for(let i=0;i<t.length-1;i++)t[i]==="\r"&&t[i+1]===`
|
|
123
|
+
`&&n.push(i);const r=i=>{let a=0,s=n.length;for(;a<s;){const l=a+s>>>1;n[l]<i?a=l+1:s=l}return i-a};return e.map(i=>({...i,start:r(i.start),end:r(i.end)}))}function NU(e){const t=$o(e),n=Tc(e),r=Hd(e),i=Cc(e),a=Ii(e),s=U0(e);return t?"Comment":n?"Highlight":r?"Assessment":i?"Tag":s?"Resolved Reference":a?"Unresolved Reference":"Annotation"}function RU(e,t){var f;const n=((f=Object.values(tr).find(m=>m.matchesAnnotation(e)))==null?void 0:f.className)||"annotation-highlight",r=t?`${n} annotation-sparkle`:n,i=Tc(e),a=Ii(e),s=$o(e),l=Hd(e),c=Cc(e);let d="highlight";return s?d="comment":a?d="reference":l?d="assessment":c?d="tag":i&&(d="highlight"),{className:r,annotationType:d,annotationId:e.id,tooltip:NU(e)}}function MU(e,t){return e.filter(n=>n.annotation).sort((n,r)=>n.start-r.start).map(n=>{const r=n.annotation,i=(t==null?void 0:t.has(r.id))||!1;return{start:n.start,end:n.end,meta:RU(r,i)}})}function LU(e,t,n){return e.filter(r=>r.annotation&&Ii(r.annotation)).sort((r,i)=>r.end-i.end).map(r=>{const i=r.annotation,a=Wa(i.body),s=a?n==null?void 0:n(a):void 0,l=t?i.id===t:!1;return{annotationId:i.id,position:r.end,targetName:s,isGenerating:l,bodySource:a??void 0}})}function DU(e,t,n){const r=e.closest("[data-annotation-id]"),i=r==null?void 0:r.getAttribute("data-annotation-id");if(!i)return!1;const a=t.get(i);return a!=null&&a.annotation?(n.get("browse:click").next({annotationId:i,motivation:a.annotation.motivation}),!0):!1}function zU(e){const t=e.closest(".reference-preview-widget");if(!t||t.dataset.widgetGenerating==="true")return{handled:!1};const n=t.dataset.widgetAnnotationId,r=t.dataset.widgetBodySource,i=t.dataset.widgetResolved==="true";return n?i&&r?{handled:!0,action:"navigate",resourceId:r,annotationId:n}:{handled:!0,action:"browse-click",annotationId:n,motivation:t.dataset.widgetMotivation||"linking"}:{handled:!1}}function qU(e,t){e.handled&&(e.action==="navigate"&&e.resourceId?t.get("browse:reference-navigate").next({resourceId:e.resourceId}):e.action==="browse-click"&&e.annotationId&&t.get("browse:click").next({annotationId:e.annotationId,motivation:e.motivation||"linking"}))}function IU(e){const t=e.closest(".reference-preview-widget");if(!t||t.dataset.widgetGenerating==="true")return{showPreview:!1,widget:null};const n=t.querySelector(".reference-indicator");return n&&(n.style.opacity="1"),t.dataset.widgetResolved==="true"&&t.dataset.widgetTargetName?{showPreview:!0,targetName:t.dataset.widgetTargetName,widget:t}:{showPreview:!1,widget:t}}function XU(e){const t=e.closest(".reference-preview-widget");if(!t)return{hidePreview:!1,widget:null};const n=t.querySelector(".reference-indicator");return n&&(n.style.opacity="0.6"),t.dataset.widgetResolved==="true"?{hidePreview:!0,widget:t}:{hidePreview:!1,widget:t}}var f5=ln.define(),h5=ln.define();function ZU(e,t){const n=new Cd,r=MU(e,t);for(const{start:i,end:a,meta:s}of r){const l=Ut.mark({class:s.className,attributes:{"data-annotation-id":s.annotationId,"data-annotation-type":s.annotationType,title:s.tooltip}});n.add(i,a,l)}return n.finish()}function BU(){return no.define({create(){return Ut.none},update(e,t){e=e.map(t.changes);for(const n of t.effects)n.is(f5)&&(e=ZU(n.value.segments,n.value.newAnnotationIds));return e},provide:e=>De.decorations.from(e)})}function VU(e,t,n,r){const i=new Cd,a=LU(t,n,r),s=new Map;for(const l of t)l.annotation&&Ii(l.annotation)&&s.set(l.end,l);for(const l of a){const c=s.get(l.position);if(!(c!=null&&c.annotation))continue;const d=new w6(c.annotation,l.targetName,l.isGenerating);i.add(l.position,l.position,Ut.widget({widget:d,side:1}))}return i.finish()}var UU=no.define({create(){return Ut.none},update(e,t){e=e.map(t.changes);for(const n of t.effects)n.is(h5)&&(e=VU(n.value.content,n.value.segments,n.value.generatingReferenceId,n.value.getTargetResourceName));return e},provide:e=>De.decorations.from(e)});function m5({content:e,segments:t=[],onChange:n,editable:r=!1,newAnnotationIds:i,hoveredAnnotationId:a,scrollToAnnotationId:s,sourceView:l=!1,showLineNumbers:c=!1,enableWidgets:d=!1,eventBus:f,getTargetResourceName:m,generatingReferenceId:p,hoverDelayMs:O}){const b=_.useRef(null),S=_.useRef(null),w=_.useRef(e),k=PU(t,e),j=_.useRef(k),T=_.useRef(new Map),E=_.useRef(new QS),Q=_.useRef(f),A=_.useRef(m);j.current=t;const N=new Map;for(const q of t)q.annotation&&N.set(q.annotation.id,q);T.current=N,Q.current=f,A.current=m,_.useEffect(()=>{if(!b.current||S.current)return;const q=BU(),P=nn.create({doc:e,extensions:[TU(),E.current.of(c?rp():[]),De.editable.of(r),De.lineWrapping,q,d?UU:[],De.updateListener.of(G=>{if(G.docChanged&&n){const re=G.state.doc.toString();w.current=re,n(re)}}),De.domEventHandlers({click:(G,re)=>{const R=G.target;return Q.current&&DU(R,T.current,Q.current)?(G.preventDefault(),!0):!1}}),De.baseTheme({"&.cm-editor":{height:"100%",outline:"none"},"&.cm-editor.cm-focused":{outline:"none"},".cm-scroller":{overflow:"visible !important",height:"auto !important"},".cm-content, .cm-gutters":{minHeight:"0 !important"},".cm-content":{padding:l?"1rem":"0",fontFamily:l?"ui-monospace, monospace":"inherit",fontSize:l?"0.875rem":"inherit",lineHeight:"1.6",whiteSpace:l?"pre-wrap":"pre",caretColor:"var(--cm-cursor-color, #000000)"},".cm-line":{padding:"0",wordBreak:l?"break-word":"normal"},".cm-gutters":{backgroundColor:"transparent",border:"none",paddingRight:"0.5rem"},".cm-lineNumbers .cm-gutterElement":{minWidth:"2rem",color:"rgb(156, 163, 175)",opacity:"0.7"}})]}),V=new De({state:P,parent:b.current});S.current=V,w.current=e,b.current.__cmView=V;const Z=V.dom,{handleMouseEnter:Y,handleMouseLeave:X,cleanup:H}=W0(G=>{var re;return(re=Q.current)==null?void 0:re.get("beckon:hover").next({annotationId:G})},O),I=G=>{const R=G.target.closest("[data-annotation-id]"),me=R==null?void 0:R.getAttribute("data-annotation-id");me&&Y(me)},L=G=>{G.target.closest("[data-annotation-id]")&&X()},$=G=>{const re=G.target,R=zU(re);R.handled&&(G.preventDefault(),G.stopPropagation(),Q.current&&qU(R,Q.current))},ne=G=>{const re=G.target,R=IU(re);R.showPreview&&R.targetName&&R.widget&&k6(R.widget,R.targetName)},z=G=>{const re=G.target,R=XU(re);R.hidePreview&&R.widget&&j6(R.widget)};return Z.addEventListener("mouseover",I),Z.addEventListener("mouseout",L),Z.addEventListener("click",$),Z.addEventListener("mouseenter",ne,!0),Z.addEventListener("mouseleave",z,!0),()=>{Z.removeEventListener("mouseover",I),Z.removeEventListener("mouseout",L),Z.removeEventListener("click",$),Z.removeEventListener("mouseenter",ne,!0),Z.removeEventListener("mouseleave",z,!0),H(),V.destroy(),S.current=null}},[O]),_.useEffect(()=>{if(!S.current)return;const q=S.current.state.doc.toString();if(e===q)return;const P=S.current.state.selection.main;S.current.dispatch({changes:{from:0,to:S.current.state.doc.length,insert:e},selection:P.from<=e.length?P:void 0}),w.current=e},[e]),_.useEffect(()=>{S.current&&S.current.dispatch({effects:E.current.reconfigure(c?rp():[])})},[c]),_.useEffect(()=>{S.current&&S.current.dispatch({effects:f5.of({segments:k,...i&&{newAnnotationIds:i}})})},[k,i]),_.useEffect(()=>{!S.current||!d||S.current.dispatch({effects:h5.of({content:e,segments:k,generatingReferenceId:p,getTargetResourceName:A.current})})},[e,k,d,p]),_.useEffect(()=>{if(!S.current||!a)return;const P=S.current.contentDOM.querySelector(`[data-annotation-id="${CSS.escape(a)}"]`);if(!P)return;const V=P.closest(".semiont-annotate-view__content")||P.closest(".semiont-document-viewer__scrollable-body");if(V){const Y=P.getBoundingClientRect(),X=V.getBoundingClientRect();if(!(Y.top>=X.top&&Y.bottom<=X.bottom)){const I=P.offsetTop,L=V.clientHeight,$=P.offsetHeight,ne=I-L/2+$/2;V.scrollTo({top:ne,behavior:"smooth"})}}const Z=setTimeout(()=>{P.classList.add("annotation-pulse")},100);return()=>{clearTimeout(Z),P.classList.remove("annotation-pulse")}},[a]),_.useEffect(()=>{!S.current||!s||d5(s,S.current.contentDOM)},[s]);const D=l?"semiont-codemirror semiont-codemirror--source":"semiont-codemirror";return g.jsx("div",{ref:b,className:D,"data-markdown-container":!0})}function YU({progress:e,annotationType:t="reference"}){const n=hn("ReferencesPanel"),r=gt(),i=()=>{r.get("job:cancel-requested").next({jobType:"annotation"})};return e?g.jsxs("div",{className:"semiont-annotation-progress","data-status":e.status,"data-type":t,children:[g.jsxs("div",{className:"semiont-annotation-header",children:[g.jsxs("h3",{className:"semiont-annotation-title",children:[g.jsx("span",{className:"semiont-annotation-sparkle",children:"✨"}),n("annotationProgressTitle")]}),e.status!=="complete"&&g.jsx("button",{onClick:i,className:"semiont-annotation-cancel",title:n("cancelAnnotation"),children:"✕"})]}),(()=>{const a=e;return a.requestParams&&a.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params",children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),a.requestParams.map((s,l)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[s.label,":"]})," ",s.value]},l))]})})(),e.completedEntityTypes&&e.completedEntityTypes.length>0&&g.jsx("div",{className:"semiont-annotation-log",children:e.completedEntityTypes.map((a,s)=>g.jsxs("div",{className:"semiont-annotation-log-item",children:[g.jsx("span",{className:"semiont-annotation-check",children:"✓"}),g.jsxs("span",{className:"semiont-annotation-entity-type",children:[a.entityType,":"]}),g.jsx("span",{children:n("found",{count:a.foundCount})})]},s))}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[e.status==="complete"?g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✅"}),g.jsx("span",{children:n("complete")})]}):e.status==="error"?g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"❌"}),g.jsx("span",{children:e.message||n("failed")})]}):g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:e.message||(e.currentEntityType?n("current",{entityType:e.currentEntityType}):n("annotating"))})]}),e.currentEntityType&&e.status!=="complete"&&e.status!=="error"&&g.jsxs("div",{className:"semiont-annotation-progress__details",children:["Processing: ",e.currentEntityType]})]})]}):null}var FU=class extends _.Component{constructor(t){super(t);Me(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null})});this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t,errorInfo:null}}componentDidCatch(t,n){this.props.onError&&this.props.onError(t,n),this.setState({errorInfo:n})}render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback(this.state.error,this.handleReset):g.jsx($U,{error:this.state.error,reset:this.handleReset}):this.props.children}};function $U({error:e,reset:t}){return g.jsx("div",{className:"semiont-error-boundary-container",children:g.jsxs("div",{className:"semiont-error-boundary-content",children:[g.jsxs("div",{className:"semiont-error-boundary-header",children:[g.jsx("h2",{className:"semiont-error-boundary-title",children:"Oops! Something went wrong"}),g.jsx("p",{className:"semiont-error-boundary-message",children:"We encountered an unexpected error. Please try again."})]}),!1,g.jsxs("div",{className:"semiont-error-boundary-actions",children:[g.jsx("button",{onClick:t,className:"semiont-button","data-variant":"primary",children:"Try Again"}),g.jsx("button",{onClick:()=>window.location.href="/",className:"semiont-button","data-variant":"secondary",children:"Go Home"})]})]})})}function WU({children:e,resetKeys:t}){return g.jsx(uX,{FallbackComponent:HU,onError:(n,r)=>{},...t&&{resetKeys:t},children:e})}function HU({error:e,resetErrorBoundary:t}){return g.jsx("div",{className:"min-h-[400px] flex items-center justify-center p-4",children:g.jsxs("div",{className:"max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[g.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[g.jsx("div",{className:"flex-shrink-0 w-10 h-10 bg-red-100 dark:bg-red-900/30 rounded-full flex items-center justify-center",children:g.jsx("svg",{className:"w-6 h-6 text-red-600 dark:text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),g.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Something went wrong"})]}),g.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:"An unexpected error occurred. Try again, or refresh the page."}),!1,g.jsxs("div",{className:"flex gap-3",children:[g.jsx("button",{onClick:t,className:"flex-1 px-4 py-2 text-gray-700 dark:text-gray-200 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:"Try Again"}),g.jsx("button",{onClick:()=>window.location.reload(),className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Refresh Page"})]})]})})}function GU({onResize:e,minWidth:t,maxWidth:n,position:r="left",ariaLabel:i="Resize panel"}){const[a,s]=_.useState(!1),l=_.useRef(0),c=_.useRef(0),d=_.useRef(e);_.useEffect(()=>{d.current=e});const f=_.useCallback(b=>{b.preventDefault(),s(!0),l.current=b.clientX;const S=b.target.parentElement;S&&(c.current=S.offsetWidth)},[]),m=_.useCallback(b=>{if(!a)return;const S=b.clientX-l.current,w=r==="left"?-S:S,k=c.current+w,j=Math.max(t,Math.min(n,k));d.current(j)},[a,t,n,r]),p=_.useCallback(()=>{s(!1)},[]),O=_.useCallback(b=>{const S=b.target.parentElement;if(!S)return;const w=S.offsetWidth,k=b.shiftKey?50:10;let j=w;if(r==="left"?b.key==="ArrowLeft"?(j=w+k,b.preventDefault()):b.key==="ArrowRight"&&(j=w-k,b.preventDefault()):b.key==="ArrowRight"?(j=w+k,b.preventDefault()):b.key==="ArrowLeft"&&(j=w-k,b.preventDefault()),j!==w){const T=Math.max(t,Math.min(n,j));d.current(T)}},[t,n,r]);return _.useEffect(()=>{if(a)return document.addEventListener("mousemove",m),document.addEventListener("mouseup",p),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",p),document.body.style.userSelect="",document.body.style.cursor=""}},[a,m,p]),g.jsx("button",{type:"button",className:`semiont-resize-handle semiont-resize-handle--${r} ${a?"semiont-resize-handle--dragging":""}`,onMouseDown:f,onKeyDown:O,"aria-label":i,role:"separator","aria-orientation":"vertical",tabIndex:0})}function p5({context:e,activePanel:t,isArchived:n=!1}){const r=hn("Toolbar"),i=gt(),a=s=>{i.get("browse:panel-toggle").next({panel:s})};return g.jsxs("div",{className:"semiont-toolbar","data-context":e,children:[e==="document"&&g.jsxs(g.Fragment,{children:[!n&&g.jsx("button",{onClick:()=>a("annotations"),className:"semiont-toolbar-button","data-active":t==="annotations","data-panel":"annotations","aria-label":r("annotations"),"aria-pressed":t==="annotations",title:r("annotations"),children:g.jsx("span",{className:"semiont-toolbar-icon semiont-toolbar-icon-large","aria-hidden":"true",children:"A"})}),g.jsx("button",{onClick:()=>a("info"),className:"semiont-toolbar-button","data-active":t==="info","data-panel":"info","aria-label":r("resourceInfo"),"aria-pressed":t==="info",title:r("resourceInfo"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"ℹ️"})}),g.jsx("button",{onClick:()=>a("history"),className:"semiont-toolbar-button","data-active":t==="history","data-panel":"history","aria-label":r("history"),"aria-pressed":t==="history",title:r("history"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"📒"})}),g.jsx("button",{onClick:()=>a("jsonld"),className:"semiont-toolbar-button","data-active":t==="jsonld","data-panel":"jsonld","aria-label":"JSON-LD","aria-pressed":t==="jsonld",title:"JSON-LD",children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"🌐"})}),g.jsx("button",{onClick:()=>a("collaboration"),className:"semiont-toolbar-button","data-active":t==="collaboration","data-panel":"collaboration","aria-label":r("collaboration"),"aria-pressed":t==="collaboration",title:r("collaboration"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"👥"})})]}),g.jsx("button",{onClick:()=>a("knowledge-base"),className:"semiont-toolbar-button","data-active":t==="knowledge-base","data-panel":"knowledge-base","aria-label":r("knowledgeBase"),"aria-pressed":t==="knowledge-base",title:r("knowledgeBase"),children:g.jsx("svg",{className:"semiont-toolbar-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",width:"20",height:"20",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 5.625c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})})}),g.jsx("button",{onClick:()=>a("user"),className:"semiont-toolbar-button","data-active":t==="user","data-panel":"user","aria-label":r("userAccount"),"aria-pressed":t==="user",title:r("userAccount"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"👤"})}),g.jsx("button",{onClick:()=>a("settings"),className:"semiont-toolbar-button","data-active":t==="settings","data-panel":"settings","aria-label":r("settings"),"aria-pressed":t==="settings",title:r("settings"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"⚙️"})})]})}function Nre({showLineNumbers:e,theme:t,locale:n,isPendingLocaleChange:r=!1,hoverDelayMs:i}){const a=hn("Settings"),s=gt(),{announceLanguageChanging:l,announceLanguageChanged:c}=G6(),[d,f]=ue.useState(n),m=p=>{var b;const O=((b=ec.find(S=>S.code===p))==null?void 0:b.nativeName)||p;l(O),s.get("settings:locale-changed").next({locale:p})};return _.useEffect(()=>{var p;if(n!==d&&!r){const O=((p=ec.find(b=>b.code===n))==null?void 0:p.nativeName)||n;c(O),f(n)}},[n,d,r]),g.jsxs("div",{className:"semiont-settings-panel",children:[g.jsx("h3",{className:"semiont-settings-panel__title",children:a("title")}),g.jsxs("div",{className:"semiont-settings-panel__content",children:[g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsxs("label",{className:"semiont-toggle-label",children:[g.jsx("span",{className:"semiont-toggle-label__text",children:a("lineNumbers")}),g.jsx("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>s.get("settings:line-numbers-toggled").next(void 0),className:`semiont-toggle ${e?"semiont-toggle--active":""}`,children:g.jsx("span",{className:`semiont-toggle__slider ${e?"semiont-toggle__slider--active":""}`})})]}),g.jsx("p",{className:"semiont-form__help",children:a(e?"lineNumbersVisible":"lineNumbersHidden")})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{className:"semiont-form__label",children:a("theme")}),g.jsxs("div",{className:"semiont-settings-panel__button-group",children:[g.jsxs("button",{onClick:()=>s.get("settings:theme-changed").next({theme:"light"}),className:`semiont-panel-button ${t==="light"?"semiont-panel-button-active":""}`,"aria-pressed":t==="light",children:["☀️ ",a("themeLight")]}),g.jsxs("button",{onClick:()=>s.get("settings:theme-changed").next({theme:"dark"}),className:`semiont-panel-button ${t==="dark"?"semiont-panel-button-active":""}`,"aria-pressed":t==="dark",children:["🌙 ",a("themeDark")]}),g.jsxs("button",{onClick:()=>s.get("settings:theme-changed").next({theme:"system"}),className:`semiont-panel-button ${t==="system"?"semiont-panel-button-active":""}`,"aria-pressed":t==="system",children:["💻 ",a("themeSystem")]})]}),g.jsx("p",{className:"semiont-form__help","aria-live":"polite",children:t==="system"?a("themeSystemActive"):a("themeModeActive",{mode:t.charAt(0).toUpperCase()+t.slice(1)})})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{htmlFor:"language-select",className:"semiont-form__label",children:a("language")}),g.jsx("select",{id:"language-select",value:n,onChange:p=>m(p.target.value),disabled:r,className:"semiont-select","aria-busy":r,"aria-describedby":"language-hint",children:ec.map(p=>g.jsx("option",{value:p.code,children:p.nativeName},p.code))}),g.jsx("p",{id:"language-hint",className:"semiont-form__help",children:a("languageHint")}),r&&g.jsx("p",{className:"semiont-settings-panel__loading",role:"status","aria-live":"polite",children:a("languageChanging")})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{htmlFor:"hover-delay-slider",className:"semiont-form__label",children:a("hoverDelay")}),g.jsx("input",{id:"hover-delay-slider",type:"range",min:"0",max:"500",step:"50",value:i,onChange:p=>s.get("settings:hover-delay-changed").next({hoverDelayMs:Number(p.target.value)}),className:"semiont-slider","aria-describedby":"hover-delay-description"}),g.jsxs("div",{className:"semiont-slider__labels",children:[g.jsx("span",{children:a("hoverDelayFast")}),g.jsx("span",{children:a("hoverDelaySlow")})]}),g.jsx("p",{id:"hover-delay-description",className:"semiont-form__help",children:a("hoverDelayDescription",{delay:i})})]})]})]})}function dm({label:e,collapsedContent:t,expandedContent:n,isExpanded:r,onHoverChange:i,onPin:a,containerRef:s}){const l=_.useRef(null),c=d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),a())};return g.jsxs("div",{className:"semiont-dropdown-group",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[g.jsx("div",{ref:s,role:"button",tabIndex:0,"aria-haspopup":"true","aria-expanded":r,"aria-label":e,className:"semiont-dropdown-trigger",onClick:a,onKeyDown:c,children:t}),r&&g.jsx("div",{ref:l,role:"menu","aria-orientation":"vertical",className:"semiont-dropdown-menu",children:g.jsxs("div",{className:"semiont-dropdown-content",children:[g.jsx("div",{className:"semiont-dropdown-header",children:e}),n]})})]})}function cc({selectedMotivation:e,selectedClick:t,showSelectionGroup:n=!0,showDeleteButton:r=!0,showShapeGroup:i=!1,selectedShape:a="rectangle",mediaType:s,annotateMode:l=!1,annotators:c}){var we,Ze,Fe,ft,Rt,mn;const d=hn("AnnotateToolbar"),f=gt(),m=ke=>{const de=Object.values(c).find(Ue=>Ue.motivation===ke);return(de==null?void 0:de.iconEmoji)||"❓"},[p,O]=_.useState(!1),[b,S]=_.useState(!1),[w,k]=_.useState(!1),[j,T]=_.useState(!1),[E,Q]=_.useState(!1),[A,N]=_.useState(!1),[D,q]=_.useState(!1),[P,V]=_.useState(!1),Z=_.useRef(null),Y=_.useRef(null),X=_.useRef(null),H=_.useRef(null),I=p||b,L=w||j,$=E||A,ne=D||P;_.useEffect(()=>{const ke=de=>{b&&Z.current&&!Z.current.contains(de.target)&&S(!1),j&&Y.current&&!Y.current.contains(de.target)&&T(!1),A&&X.current&&!X.current.contains(de.target)&&N(!1),P&&H.current&&!H.current.contains(de.target)&&V(!1)};return document.addEventListener("mousedown",ke),()=>document.removeEventListener("mousedown",ke)},[b,j,A,P]),_.useEffect(()=>{const ke=de=>{de.key==="Escape"&&(S(!1),T(!1),N(!1),V(!1))};return document.addEventListener("keydown",ke),()=>document.removeEventListener("keydown",ke)},[]);const z=ke=>{ke===null?f.get("mark:selection-changed").next({motivation:null}):f.get("mark:selection-changed").next({motivation:e===ke?null:ke}),N(!1),Q(!1)},G=ke=>{f.get("mark:click-changed").next({action:ke}),T(!1),k(!1)},re=ke=>{f.get("mark:shape-changed").next({shape:ke}),V(!1),q(!1)},R=()=>{f.get("mark:mode-toggled").next(void 0),S(!1),O(!1)},me=()=>{l&&R()},Se=()=>{l||R()},ve=(ke,de,Ue,ht,Tt=!1)=>g.jsxs("button",{role:"menuitem",onClick:Ot=>{Ot.stopPropagation(),ht()},className:"semiont-toolbar-menu-button","data-selected":Ue,"data-delete":Tt,"aria-pressed":Ue,"aria-label":de,children:[g.jsx("span",{className:"semiont-toolbar-menu-icon","aria-hidden":"true",children:ke}),g.jsx("span",{className:"semiont-toolbar-menu-label",children:de})]}),Xe=[{action:"detail",icon:"🔍",label:d("detail")},{action:"follow",icon:"➡️",label:d("follow")},{action:"jsonld",icon:"🌐",label:d("jsonld")}];r&&Xe.push({action:"deleting",icon:"🗑️",label:d("deleting"),isDelete:!0});const qe=[{motivation:"linking",label:d("linking")},{motivation:"highlighting",label:d("highlighting")},{motivation:"assessing",label:d("assessing")},{motivation:"commenting",label:d("commenting")},{motivation:"tagging",label:d("tagging")}],Pe=[{shape:"rectangle",icon:"▭",label:d("rectangle")},{shape:"circle",icon:"○",label:d("circle")},{shape:"polygon",icon:"⬡",label:d("polygon")}],Oe=T6(s),Ve=Pe.filter(ke=>Oe.includes(ke.shape));return g.jsxs("div",{className:"semiont-annotate-toolbar",children:[g.jsx(dm,{label:d("clickGroup"),isExpanded:L,onHoverChange:k,onPin:()=>T(!j),containerRef:Y,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display","data-delete":(we=Xe.find(ke=>ke.action===t))!=null&&we.isDelete?"true":"false",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:(Ze=Xe.find(ke=>ke.action===t))==null?void 0:Ze.icon}),g.jsx("span",{className:"semiont-dropdown-label",children:(Fe=Xe.find(ke=>ke.action===t))==null?void 0:Fe.label})]}),expandedContent:g.jsx(g.Fragment,{children:Xe.map(({action:ke,icon:de,label:Ue,isDelete:ht})=>g.jsx(ue.Fragment,{children:ve(de,Ue,t===ke,()=>G(ke),ht)},ke))})}),g.jsx("div",{className:"semiont-toolbar-separator"}),g.jsx(dm,{label:d("modeGroup"),isExpanded:I,onHoverChange:O,onPin:()=>S(!b),containerRef:Z,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:l?"✏️":"📖"}),g.jsx("span",{className:"semiont-dropdown-label",children:d(l?"annotate":"browse")})]}),expandedContent:g.jsxs(g.Fragment,{children:[ve("📖",d("browse"),!l,me),ve("✏️",d("annotate"),l,Se)]})}),n&&g.jsx("div",{className:"semiont-toolbar-separator"}),n&&g.jsx(dm,{label:d("selectionGroup"),isExpanded:$,onHoverChange:Q,onPin:()=>N(!A),containerRef:X,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:e?m(e):"—"}),g.jsx("span",{className:"semiont-dropdown-label",children:e?(ft=qe.find(ke=>ke.motivation===e))==null?void 0:ft.label:d("none")})]}),expandedContent:g.jsxs(g.Fragment,{children:[ve("—",d("none"),e===null,()=>z(null)),qe.map(({motivation:ke,label:de})=>g.jsx(ue.Fragment,{children:ve(m(ke),de,e===ke,()=>z(ke))},ke))]})}),i&&g.jsx("div",{className:"semiont-toolbar-separator"}),i&&Ve.length>0&&g.jsx(dm,{label:d("shapeGroup"),isExpanded:ne,onHoverChange:q,onPin:()=>V(!P),containerRef:H,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:(Rt=Ve.find(ke=>ke.shape===a))==null?void 0:Rt.icon}),g.jsx("span",{className:"semiont-dropdown-label",children:(mn=Ve.find(ke=>ke.shape===a))==null?void 0:mn.label})]}),expandedContent:g.jsx(g.Fragment,{children:Ve.map(({shape:ke,icon:de,label:Ue})=>g.jsx(ue.Fragment,{children:ve(de,Ue,a===ke,()=>re(ke))},ke))})})]})}var KU=el({String:B.string,Number:B.number,"True False":B.bool,PropertyName:B.propertyName,Null:B.null,", :":B.separator,"[ ]":B.squareBracket,"{ }":B.brace}),JU=Vp.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!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,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[KU],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~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#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!]~$zO]~~$}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~&yO[~~'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}),eY=Zp.define({name:"json",parser:JU.configure({props:[mf.add({Object:oc({except:/^\s*\}/}),Array:oc({except:/^\s*\]/})}),Rc.add({"Object Array":HS})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function g5(){return new yc(eY)}var tY="#e5c07b",$T="#e06c75",nY="#56b6c2",rY="#ffffff",qm="#abb2bf",h0="#7d8799",iY="#61afef",aY="#98c379",WT="#d19a66",sY="#c678dd",oY="#21252b",HT="#2c313a",GT="#282c34",ub="#353a42",lY="#3E4451",KT="#528bff",cY=De.theme({"&":{color:qm,backgroundColor:GT},".cm-content":{caretColor:KT},".cm-cursor, .cm-dropCursor":{borderLeftColor:KT},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:lY},".cm-panels":{backgroundColor:oY,color:qm},".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:GT,color:h0,border:"none"},".cm-activeLineGutter":{backgroundColor:HT},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ub},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ub,borderBottomColor:ub},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:HT,color:qm}}},{dark:!0}),uY=GS.define([{tag:B.keyword,color:sY},{tag:[B.name,B.deleted,B.character,B.propertyName,B.macroName],color:$T},{tag:[B.function(B.variableName),B.labelName],color:iY},{tag:[B.color,B.constant(B.name),B.standard(B.name)],color:WT},{tag:[B.definition(B.name),B.separator],color:qm},{tag:[B.typeName,B.className,B.number,B.changed,B.annotation,B.modifier,B.self,B.namespace],color:tY},{tag:[B.operator,B.operatorKeyword,B.url,B.escape,B.regexp,B.link,B.special(B.string)],color:nY},{tag:[B.meta,B.comment],color:h0},{tag:B.strong,fontWeight:"bold"},{tag:B.emphasis,fontStyle:"italic"},{tag:B.strikethrough,textDecoration:"line-through"},{tag:B.link,color:h0,textDecoration:"underline"},{tag:B.heading,fontWeight:"bold",color:$T},{tag:[B.atom,B.bool,B.special(B.variableName)],color:WT},{tag:[B.processingInstruction,B.string,B.inserted],color:aY},{tag:B.invalid,color:rY}]),v5=[cY,KS(uY)];function dY({annotation:e,onBack:t}){const n=_.useRef(null),r=_.useRef(null),{showLineNumbers:i}=JS(),a=_.useRef(t);_.useEffect(()=>{a.current=t}),_.useEffect(()=>{const l=c=>{c.key==="Escape"&&a.current()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[]),_.useEffect(()=>{if(!n.current)return;const l=document.documentElement.classList.contains("dark"),c=JSON.stringify(e,null,2),d=[g5(),De.editable.of(!1),nn.readOnly.of(!0)];i&&d.push(rp()),l?d.push(v5):(d.push(MR),d.push(KS(LR)));const f=nn.create({doc:c,extensions:d}),m=new De({state:f,parent:n.current});return r.current=m,()=>{m.destroy(),r.current=null}},[e,i]);const s=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(l){console.error("Failed to copy JSON-LD:",l)}};return g.jsxs("div",{className:"semiont-jsonld-view",children:[g.jsxs("div",{className:"semiont-jsonld-view__header",children:[g.jsx("button",{onClick:t,className:"semiont-jsonld-view__back-button",title:"Go back (Escape)",children:"<"}),g.jsx("h3",{className:"semiont-jsonld-view__title",children:"JSON-LD"}),g.jsx("button",{onClick:s,className:"semiont-jsonld-view__copy-button",title:"Copy to clipboard",children:"📋 Copy"})]}),g.jsx("div",{ref:n,className:"semiont-jsonld-view__editor"})]})}var fY=Object.defineProperty,hY=(e,t,n)=>t in e?fY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,db=(e,t,n)=>(hY(e,typeof t!="symbol"?t+"":t,n),n),mY=class{constructor(){db(this,"current",this.detect()),db(this,"handoffState","pending"),db(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},fa=new mY;function gf(e){var t;return fa.isServer?null:e==null?document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function m0(e){var t,n;return fa.isServer?null:e==null?document:(n=(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))!=null?n:document}function O5(e){var t,n;return(n=(t=m0(e))==null?void 0:t.activeElement)!=null?n:null}function pY(e){return O5(e)===e}function Up(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function es(){let e=[],t={addEventListener(n,r,i,a){return n.addEventListener(r,i,a),t.add(()=>n.removeEventListener(r,i,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Up(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=es();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function Yp(){let[e]=_.useState(es);return _.useEffect(()=>()=>e.dispose(),[e]),e}var Tr=(e,t)=>{fa.isServer?_.useEffect(e,t):_.useLayoutEffect(e,t)};function tl(e){let t=_.useRef(e);return Tr(()=>{t.current=e},[e]),t}var It=function(e){let t=tl(e);return ue.useCallback((...n)=>t.current(...n),[t])};function vf(e){return _.useMemo(()=>e,Object.values(e))}var gY=_.createContext(void 0);function vY(){return _.useContext(gY)}function p0(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Ka(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ka),r}var up=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(up||{}),Bs=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Bs||{});function yi(){let e=bY();return _.useCallback(t=>OY({mergeRefs:e,...t}),[e])}function OY({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:s,mergeRefs:l}){l=l??yY;let c=b5(t,e);if(a)return fm(c,n,r,s,l);let d=i??0;if(d&2){let{static:f=!1,...m}=c;if(f)return fm(m,n,r,s,l)}if(d&1){let{unmount:f=!0,...m}=c;return Ka(f?0:1,{0(){return null},1(){return fm({...m,hidden:!0,style:{display:"none"}},n,r,s,l)}})}return fm(c,n,r,s,l)}function fm(e,t={},n,r,i){let{as:a=n,children:s,refName:l="ref",...c}=fb(e,["unmount","static"]),d=e.ref!==void 0?{[l]:e.ref}:{},f=typeof s=="function"?s(t):s;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let m={};if(t){let p=!1,O=[];for(let[b,S]of Object.entries(t))typeof S=="boolean"&&(p=!0),S===!0&&O.push(b.replace(/([A-Z])/g,w=>`-${w.toLowerCase()}`));if(p){m["data-headlessui-state"]=O.join(" ");for(let b of O)m[`data-${b}`]=""}}if(pd(a)&&(Object.keys(Co(c)).length>0||Object.keys(Co(m)).length>0))if(!_.isValidElement(f)||Array.isArray(f)&&f.length>1||xY(f)){if(Object.keys(Co(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Co(c)).concat(Object.keys(Co(m))).map(p=>` - ${p}`).join(`
|
|
124
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>` - ${p}`).join(`
|
|
125
|
+
`)].join(`
|
|
126
|
+
`))}else{let p=f.props,O=p==null?void 0:p.className,b=typeof O=="function"?(...k)=>p0(O(...k),c.className):p0(O,c.className),S=b?{className:b}:{},w=b5(f.props,Co(fb(c,["ref"])));for(let k in m)k in w&&delete m[k];return _.cloneElement(f,Object.assign({},w,m,d,{ref:i(SY(f),d.ref)},S))}return _.createElement(a,Object.assign({},fb(c,["ref"]),!pd(a)&&d,!pd(a)&&m),f)}function bY(){let e=_.useRef([]),t=_.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function yY(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function b5(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var a;return(a=i==null?void 0:i.preventDefault)==null?void 0:a.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...a){let s=n[r];for(let l of s){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;l(i,...a)}}});return t}function Er(e){var t;return Object.assign(_.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Co(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function fb(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function SY(e){return ue.version.split(".")[0]>="19"?e.props.ref:e.ref}function pd(e){return e===_.Fragment||e===Symbol.for("react.fragment")}function xY(e){return pd(e.type)}var _Y="span",dp=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(dp||{});function wY(e,t){var n;let{features:r=1,...i}=e,a={ref:t,"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return yi()({ourProps:a,theirProps:i,slot:{},defaultTag:_Y,name:"Hidden"})}var g0=Er(wY);function kY(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function Us(e){return kY(e)&&"tagName"in e}function Vo(e){return Us(e)&&"accessKey"in e}function Vs(e){return Us(e)&&"tabIndex"in e}function jY(e){return Us(e)&&"style"in e}function TY(e){return Vo(e)&&e.nodeName==="IFRAME"}function CY(e){return Vo(e)&&e.nodeName==="INPUT"}var y5=Symbol();function EY(e,t=!0){return Object.assign(e,{[y5]:t})}function ga(...e){let t=_.useRef(e);_.useEffect(()=>{t.current=e},[e]);let n=It(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[y5]))?void 0:n}var hx=_.createContext(null);hx.displayName="DescriptionContext";function S5(){let e=_.useContext(hx);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,S5),t}return e}function AY(){let[e,t]=_.useState([]);return[e.length>0?e.join(" "):void 0,_.useMemo(()=>function(n){let r=It(a=>(t(s=>[...s,a]),()=>t(s=>{let l=s.slice(),c=l.indexOf(a);return c!==-1&&l.splice(c,1),l}))),i=_.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return ue.createElement(hx.Provider,{value:i},n.children)},[t])]}var QY="p";function PY(e,t){let n=_.useId(),r=vY(),{id:i=`headlessui-description-${n}`,...a}=e,s=S5(),l=ga(t);Tr(()=>s.register(i),[i,s.register]);let c=vf({...s.slot,disabled:r||!1}),d={ref:l,...s.props,id:i};return yi()({ourProps:d,theirProps:a,slot:c,defaultTag:QY,name:s.name||"Description"})}var NY=Er(PY),RY=Object.assign(NY,{}),x5=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(x5||{}),MY=_.createContext(()=>{});function LY({value:e,children:t}){return ue.createElement(MY.Provider,{value:e},t)}var _5=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}},DY=Object.defineProperty,zY=(e,t,n)=>t in e?DY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qY=(e,t,n)=>(zY(e,t+"",n),n),w5=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},si=(e,t,n)=>(w5(e,t,"read from private field"),n?n.call(e):t.get(e)),hb=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},JT=(e,t,n,r)=>(w5(e,t,"write to private field"),t.set(e,n),n),ra,td,nd,IY=class{constructor(e){hb(this,ra,{}),hb(this,td,new _5(()=>new Set)),hb(this,nd,new Set),qY(this,"disposables",es()),JT(this,ra,e),fa.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return si(this,ra)}subscribe(e,t){if(fa.isServer)return()=>{};let n={selector:e,callback:t,current:e(si(this,ra))};return si(this,nd).add(n),this.disposables.add(()=>{si(this,nd).delete(n)})}on(e,t){return fa.isServer?()=>{}:(si(this,td).get(e).add(t),this.disposables.add(()=>{si(this,td).get(e).delete(t)}))}send(e){let t=this.reduce(si(this,ra),e);if(t!==si(this,ra)){JT(this,ra,t);for(let n of si(this,nd)){let r=n.selector(si(this,ra));k5(n.current,r)||(n.current=r,n.callback(r))}for(let n of si(this,td).get(e.type))n(si(this,ra),e)}}};ra=new WeakMap,td=new WeakMap,nd=new WeakMap;function k5(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:mb(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:mb(e.entries(),t.entries()):eC(e)&&eC(t)?mb(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function mb(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function eC(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var XY=Object.defineProperty,ZY=(e,t,n)=>t in e?XY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tC=(e,t,n)=>(ZY(e,typeof t!="symbol"?t+"":t,n),n),BY=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(BY||{}),VY={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let a=e.stack.slice();return a.splice(i,1),a.push(n),r=a,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}},UY=class j5 extends IY{constructor(){super(...arguments),tC(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),tC(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new j5({stack:[]})}reduce(t,n){return Ka(n.type,VY,t,n)}},T5=new _5(()=>UY.new());function C5(e,t,n=k5){return mX.useSyncExternalStoreWithSelector(It(r=>e.subscribe(YY,r)),It(()=>e.state),It(()=>e.state),It(t),n)}function YY(e){return e}function Of(e,t){let n=_.useId(),r=T5.get(t),[i,a]=C5(r,_.useCallback(s=>[r.selectors.isTop(s,n),r.selectors.inStack(s,n)],[r,n]));return Tr(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?a?i:!0:!1}var v0=new Map,gd=new Map;function nC(e){var t;let n=(t=gd.get(e))!=null?t:0;return gd.set(e,n+1),n!==0?()=>rC(e):(v0.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>rC(e))}function rC(e){var t;let n=(t=gd.get(e))!=null?t:1;if(n===1?gd.delete(e):gd.set(e,n-1),n!==1)return;let r=v0.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,v0.delete(e))}function FY(e,{allowed:t,disallowed:n}={}){let r=Of(e,"inert-others");Tr(()=>{var i,a;if(!r)return;let s=es();for(let c of(i=n==null?void 0:n())!=null?i:[])c&&s.add(nC(c));let l=(a=t==null?void 0:t())!=null?a:[];for(let c of l){if(!c)continue;let d=gf(c);if(!d)continue;let f=c.parentElement;for(;f&&f!==d.body;){for(let m of f.children)l.some(p=>m.contains(p))||s.add(nC(m));f=f.parentElement}}return s.dispose},[r,t,n])}function $Y(e,t,n){let r=tl(i=>{let a=i.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&n()});_.useEffect(()=>{if(!e)return;let i=t===null?null:Vo(t)?t:t.current;if(!i)return;let a=es();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(i));s.observe(i),a.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(i));s.observe(i),a.add(()=>s.disconnect())}return()=>a.dispose()},[t,r,e])}var fp=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),WY=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Ya=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Ya||{}),O0=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(O0||{}),HY=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(HY||{});function GY(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(fp)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function KY(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(WY)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var E5=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(E5||{});function JY(e,t=0){var n;return e===((n=gf(e))==null?void 0:n.body)?!1:Ka(t,{0(){return e.matches(fp)},1(){let r=e;for(;r!==null;){if(r.matches(fp))return!0;r=r.parentElement}return!1}})}var eF=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(eF||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Ha(e){e==null||e.focus({preventScroll:!0})}var tF=["textarea","input"].join(",");function nF(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,tF))!=null?n:!1}function rF(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);if(i===null||a===null)return 0;let s=i.compareDocumentPosition(a);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function vd(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?m0(e[0]):document:m0(e),s=Array.isArray(e)?n?rF(e):e:t&64?KY(e):GY(e);i.length>0&&s.length>1&&(s=s.filter(O=>!i.some(b=>b!=null&&"current"in b?(b==null?void 0:b.current)===O:b===O))),r=r??(a==null?void 0:a.activeElement);let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},f=0,m=s.length,p;do{if(f>=m||f+m<=0)return 0;let O=c+f;if(t&16)O=(O+m)%m;else{if(O<0)return 3;if(O>=m)return 1}p=s[O],p==null||p.focus(d),f+=l}while(p!==O5(p));return t&6&&nF(p)&&p.select(),2}function A5(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function iF(){return/Android/gi.test(window.navigator.userAgent)}function iC(){return A5()||iF()}function hm(e,t,n,r){let i=tl(n);_.useEffect(()=>{if(!e)return;function a(s){i.current(s)}return document.addEventListener(t,a,r),()=>document.removeEventListener(t,a,r)},[e,t,r])}function Q5(e,t,n,r){let i=tl(n);_.useEffect(()=>{if(!e)return;function a(s){i.current(s)}return window.addEventListener(t,a,r),()=>window.removeEventListener(t,a,r)},[e,t,r])}var aC=30;function aF(e,t,n){let r=tl(n),i=_.useCallback(function(l,c){if(l.defaultPrevented)return;let d=c(l);if(d===null||!d.getRootNode().contains(d)||!d.isConnected)return;let f=(function m(p){return typeof p=="function"?m(p()):Array.isArray(p)||p instanceof Set?p:[p]})(t);for(let m of f)if(m!==null&&(m.contains(d)||l.composed&&l.composedPath().includes(m)))return;return!JY(d,E5.Loose)&&d.tabIndex!==-1&&l.preventDefault(),r.current(l,d)},[r,t]),a=_.useRef(null);hm(e,"pointerdown",l=>{var c,d;iC()||(a.current=((d=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:d[0])||l.target)},!0),hm(e,"pointerup",l=>{if(iC()||!a.current)return;let c=a.current;return a.current=null,i(l,()=>c)},!0);let s=_.useRef({x:0,y:0});hm(e,"touchstart",l=>{s.current.x=l.touches[0].clientX,s.current.y=l.touches[0].clientY},!0),hm(e,"touchend",l=>{let c={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(c.x-s.current.x)>=aC||Math.abs(c.y-s.current.y)>=aC))return i(l,()=>Vs(l.target)?l.target:null)},!0),Q5(e,"blur",l=>i(l,()=>TY(window.document.activeElement)?window.document.activeElement:null),!0)}function mx(...e){return _.useMemo(()=>gf(...e),[...e])}function P5(e,t,n,r){let i=tl(n);_.useEffect(()=>{e=e??window;function a(s){i.current(s)}return e.addEventListener(t,a,r),()=>e.removeEventListener(t,a,r)},[e,t,r])}function sF(e){return _.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function oF(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...a){let s=t[i].call(n,...a);s&&(n=s,r.forEach(l=>l()))}}}function lF(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=(n=t.defaultView)!=null?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),a=Math.max(0,e-i);n.style(r,"paddingRight",`${a}px`)}}}function cF(){return A5()?{before({doc:e,d:t,meta:n}){function r(i){for(let a of n().containers)for(let s of a())if(s.contains(i))return!0;return!1}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=es();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let a=(i=window.scrollY)!=null?i:window.pageYOffset,s=null;t.addEventListener(e,"click",l=>{if(Vs(l.target))try{let c=l.target.closest("a");if(!c)return;let{hash:d}=new URL(c.href),f=e.querySelector(d);Vs(f)&&!r(f)&&(s=f)}catch{}},!0),t.group(l=>{t.addEventListener(e,"touchstart",c=>{if(l.dispose(),Vs(c.target)&&jY(c.target))if(r(c.target)){let d=c.target;for(;d.parentElement&&r(d.parentElement);)d=d.parentElement;l.style(d,"overscrollBehavior","contain")}else l.style(c.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",l=>{if(Vs(l.target)){if(CY(l.target))return;if(r(l.target)){let c=l.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let c=(l=window.scrollY)!=null?l:window.pageYOffset;a!==c&&window.scrollTo(0,a),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function uF(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function sC(e){let t={};for(let n of e)Object.assign(t,n(t));return t}var Mo=oF(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:es(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=sC(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=sC(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[cF(),lF(),uF()];n.forEach(({before:r})=>r==null?void 0:r(t)),n.forEach(({after:r})=>r==null?void 0:r(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Mo.subscribe(()=>{let e=Mo.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&Mo.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Mo.dispatch("TEARDOWN",n)}});function dF(e,t,n=()=>({containers:[]})){let r=sF(Mo),i=t?r.get(t):void 0,a=i?i.count>0:!1;return Tr(()=>{if(!(!t||!e))return Mo.dispatch("PUSH",t,n),()=>Mo.dispatch("POP",t,n)},[e,t]),a}function fF(e,t,n=()=>[document.body]){let r=Of(e,"scroll-lock");dF(r,t,i=>{var a;return{containers:[...(a=i.containers)!=null?a:[],n]}})}function hF(e=0){let[t,n]=_.useState(e),r=_.useCallback(c=>n(c),[]),i=_.useCallback(c=>n(d=>d|c),[]),a=_.useCallback(c=>(t&c)===c,[t]),s=_.useCallback(c=>n(d=>d&~c),[]),l=_.useCallback(c=>n(d=>d^c),[]);return{flags:t,setFlag:r,addFlag:i,hasFlag:a,removeFlag:s,toggleFlag:l}}var oC,lC;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((oC=process==null?void 0:ry)==null?void 0:oC.NODE_ENV)==="test"&&typeof((lC=Element==null?void 0:Element.prototype)==null?void 0:lC.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
127
|
+
`)),[]});var mF=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(mF||{});function pF(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function gF(e,t,n,r){let[i,a]=_.useState(n),{hasFlag:s,addFlag:l,removeFlag:c}=hF(e&&i?3:0),d=_.useRef(!1),f=_.useRef(!1),m=Yp();return Tr(()=>{var p;if(e){if(n&&a(!0),!t){n&&l(3);return}return(p=r==null?void 0:r.start)==null||p.call(r,n),vF(t,{inFlight:d,prepare(){f.current?f.current=!1:f.current=d.current,d.current=!0,!f.current&&(n?(l(3),c(4)):(l(4),c(2)))},run(){f.current?n?(c(3),l(4)):(c(4),l(3)):n?c(1):l(1)},done(){var O;f.current&&yF(t)||(d.current=!1,c(7),n||a(!1),(O=r==null?void 0:r.end)==null||O.call(r,n))}})}},[e,n,t,m]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function vF(e,{prepare:t,run:n,done:r,inFlight:i}){let a=es();return bF(e,{prepare:t,inFlight:i}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(OF(e,r))})}),a.dispose}function OF(e,t){var n,r;let i=es();if(!e)return i.dispose;let a=!1;i.add(()=>{a=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(l=>l instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),i.dispose):(Promise.allSettled(s.map(l=>l.finished)).then(()=>{a||t()}),i.dispose)}function bF(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function yF(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function px(e,t){let n=_.useRef([]),r=It(e);_.useEffect(()=>{let i=[...n.current];for(let[a,s]of t.entries())if(n.current[a]!==s){let l=r(t,i);return n.current=t,l}},[r,...t])}var Fp=_.createContext(null);Fp.displayName="OpenClosedContext";var Li=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Li||{});function $p(){return _.useContext(Fp)}function SF({value:e,children:t}){return ue.createElement(Fp.Provider,{value:e},t)}function xF({children:e}){return ue.createElement(Fp.Provider,{value:null},e)}function _F(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}var zs=[];_F(()=>{function e(t){if(!Vs(t.target)||t.target===document.body||zs[0]===t.target)return;let n=t.target;n=n.closest(fp),zs.unshift(n??t.target),zs=zs.filter(r=>r!=null&&r.isConnected),zs.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function N5(e){let t=It(e),n=_.useRef(!1);_.useEffect(()=>(n.current=!1,()=>{n.current=!0,Up(()=>{n.current&&t()})}),[t])}var R5=_.createContext(!1);function wF(){return _.useContext(R5)}function cC(e){return ue.createElement(R5.Provider,{value:e.force},e.children)}function kF(e){let t=wF(),n=_.useContext(L5),[r,i]=_.useState(()=>{var a;if(!t&&n!==null)return(a=n.current)!=null?a:null;if(fa.isServer)return null;let s=e==null?void 0:e.getElementById("headlessui-portal-root");if(s)return s;if(e===null)return null;let l=e.createElement("div");return l.setAttribute("id","headlessui-portal-root"),e.body.appendChild(l)});return _.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),_.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}var M5=_.Fragment,jF=Er(function(e,t){let{ownerDocument:n=null,...r}=e,i=_.useRef(null),a=ga(EY(p=>{i.current=p}),t),s=mx(i.current),l=n??s,c=kF(l),d=_.useContext(b0),f=Yp(),m=yi();return N5(()=>{var p;c&&c.childNodes.length<=0&&((p=c.parentElement)==null||p.removeChild(c))}),c?No.createPortal(ue.createElement("div",{"data-headlessui-portal":"",ref:p=>{f.dispose(),d&&p&&f.add(d.register(p))}},m({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:M5,name:"Portal"})),c):null});function TF(e,t){let n=ga(t),{enabled:r=!0,ownerDocument:i,...a}=e,s=yi();return r?ue.createElement(jF,{...a,ownerDocument:i,ref:n}):s({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:M5,name:"Portal"})}var CF=_.Fragment,L5=_.createContext(null);function EF(e,t){let{target:n,...r}=e,i={ref:ga(t)},a=yi();return ue.createElement(L5.Provider,{value:n},a({ourProps:i,theirProps:r,defaultTag:CF,name:"Popover.Group"}))}var b0=_.createContext(null);function AF(){let e=_.useContext(b0),t=_.useRef([]),n=It(a=>(t.current.push(a),e&&e.register(a),()=>r(a))),r=It(a=>{let s=t.current.indexOf(a);s!==-1&&t.current.splice(s,1),e&&e.unregister(a)}),i=_.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,_.useMemo(()=>function({children:a}){return ue.createElement(b0.Provider,{value:i},a)},[i])]}var QF=Er(TF),D5=Er(EF),PF=Object.assign(QF,{Group:D5});function NF(e,t=typeof document<"u"?document.defaultView:null,n){let r=Of(e,"escape");P5(t,"keydown",i=>{r&&(i.defaultPrevented||i.key===x5.Escape&&n(i))})}function RF(){var e;let[t]=_.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=_.useState((e=t==null?void 0:t.matches)!=null?e:!1);return Tr(()=>{if(!t)return;function i(a){r(a.matches)}return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[t]),n}function MF({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=It(()=>{var i,a;let s=gf(n),l=[];for(let c of e)c!==null&&(Us(c)?l.push(c):"current"in c&&Us(c.current)&&l.push(c.current));if(t!=null&&t.current)for(let c of t.current)l.push(c);for(let c of(i=s==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?i:[])c!==document.body&&c!==document.head&&Us(c)&&c.id!=="headlessui-portal-root"&&(n&&(c.contains(n)||c.contains((a=n==null?void 0:n.getRootNode())==null?void 0:a.host))||l.some(d=>c.contains(d))||l.push(c));return l});return{resolveContainers:r,contains:It(i=>r().some(a=>a.contains(i)))}}var z5=_.createContext(null);function uC({children:e,node:t}){let[n,r]=_.useState(null),i=q5(t??n);return ue.createElement(z5.Provider,{value:i},e,i===null&&ue.createElement(g0,{features:dp.Hidden,ref:a=>{var s,l;if(a){for(let c of(l=(s=gf(a))==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?l:[])if(c!==document.body&&c!==document.head&&Us(c)&&c!=null&&c.contains(a)){r(c);break}}}}))}function q5(e=null){var t;return(t=_.useContext(z5))!=null?t:e}function LF(){let e=typeof document>"u";return"useSyncExternalStore"in y1?(t=>t.useSyncExternalStore)(y1)(()=>()=>{},()=>!1,()=>!e):!1}function Wp(){let e=LF(),[t,n]=_.useState(fa.isHandoffComplete);return t&&fa.isHandoffComplete===!1&&n(!1),_.useEffect(()=>{t!==!0&&n(!0)},[t]),_.useEffect(()=>fa.handoff(),[]),e?!1:t}function gx(){let e=_.useRef(!1);return Tr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var rd=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(rd||{});function DF(){let e=_.useRef(0);return Q5(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function I5(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)Us(n.current)&&t.add(n.current);return t}var zF="div",Po=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Po||{});function qF(e,t){let n=_.useRef(null),r=ga(n,t),{initialFocus:i,initialFocusFallback:a,containers:s,features:l=15,...c}=e;Wp()||(l=0);let d=mx(n.current);BF(l,{ownerDocument:d});let f=VF(l,{ownerDocument:d,container:n,initialFocus:i,initialFocusFallback:a});UF(l,{ownerDocument:d,container:n,containers:s,previousActiveElement:f});let m=DF(),p=It(j=>{if(!Vo(n.current))return;let T=n.current;(E=>E())(()=>{Ka(m.current,{[rd.Forwards]:()=>{vd(T,Ya.First,{skipElements:[j.relatedTarget,a]})},[rd.Backwards]:()=>{vd(T,Ya.Last,{skipElements:[j.relatedTarget,a]})}})})}),O=Of(!!(l&2),"focus-trap#tab-lock"),b=Yp(),S=_.useRef(!1),w={ref:r,onKeyDown(j){j.key=="Tab"&&(S.current=!0,b.requestAnimationFrame(()=>{S.current=!1}))},onBlur(j){if(!(l&4))return;let T=I5(s);Vo(n.current)&&T.add(n.current);let E=j.relatedTarget;Vs(E)&&E.dataset.headlessuiFocusGuard!=="true"&&(X5(T,E)||(S.current?vd(n.current,Ka(m.current,{[rd.Forwards]:()=>Ya.Next,[rd.Backwards]:()=>Ya.Previous})|Ya.WrapAround,{relativeTo:j.target}):Vs(j.target)&&Ha(j.target)))}},k=yi();return ue.createElement(ue.Fragment,null,O&&ue.createElement(g0,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:dp.Focusable}),k({ourProps:w,theirProps:c,defaultTag:zF,name:"FocusTrap"}),O&&ue.createElement(g0,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:dp.Focusable}))}var IF=Er(qF),XF=Object.assign(IF,{features:Po});function ZF(e=!0){let t=_.useRef(zs.slice());return px(([n],[r])=>{r===!0&&n===!1&&Up(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=zs.slice())},[e,zs,t]),It(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function BF(e,{ownerDocument:t}){let n=!!(e&8),r=ZF(n);px(()=>{n||pY(t==null?void 0:t.body)&&Ha(r())},[n]),N5(()=>{n&&Ha(r())})}function VF(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let a=_.useRef(null),s=Of(!!(e&1),"focus-trap#initial-focus"),l=gx();return px(()=>{if(e===0)return;if(!s){i!=null&&i.current&&Ha(i.current);return}let c=n.current;c&&Up(()=>{if(!l.current)return;let d=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===d){a.current=d;return}}else if(c.contains(d)){a.current=d;return}if(r!=null&&r.current)Ha(r.current);else{if(e&16){if(vd(c,Ya.First|Ya.AutoFocus)!==O0.Error)return}else if(vd(c,Ya.First)!==O0.Error)return;if(i!=null&&i.current&&(Ha(i.current),(t==null?void 0:t.activeElement)===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=t==null?void 0:t.activeElement})},[i,s,e]),a}function UF(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let a=gx(),s=!!(e&4);P5(t==null?void 0:t.defaultView,"focus",l=>{if(!s||!a.current)return;let c=I5(r);Vo(n.current)&&c.add(n.current);let d=i.current;if(!d)return;let f=l.target;Vo(f)?X5(c,f)?(i.current=f,Ha(f)):(l.preventDefault(),l.stopPropagation(),Ha(d)):Ha(i.current)},!0)}function X5(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function Z5(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!pd((t=e.as)!=null?t:V5)||ue.Children.count(e.children)===1}var Hp=_.createContext(null);Hp.displayName="TransitionContext";var YF=(e=>(e.Visible="visible",e.Hidden="hidden",e))(YF||{});function FF(){let e=_.useContext(Hp);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function $F(){let e=_.useContext(Gp);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}var Gp=_.createContext(null);Gp.displayName="NestingContext";function Kp(e){return"children"in e?Kp(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function B5(e,t){let n=tl(e),r=_.useRef([]),i=gx(),a=Yp(),s=It((O,b=Bs.Hidden)=>{let S=r.current.findIndex(({el:w})=>w===O);S!==-1&&(Ka(b,{[Bs.Unmount](){r.current.splice(S,1)},[Bs.Hidden](){r.current[S].state="hidden"}}),a.microTask(()=>{var w;!Kp(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),l=It(O=>{let b=r.current.find(({el:S})=>S===O);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:O,state:"visible"}),()=>s(O,Bs.Unmount)}),c=_.useRef([]),d=_.useRef(Promise.resolve()),f=_.useRef({enter:[],leave:[]}),m=It((O,b,S)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([w])=>w!==O)),t==null||t.chains.current[b].push([O,new Promise(w=>{c.current.push(w)})]),t==null||t.chains.current[b].push([O,new Promise(w=>{Promise.all(f.current[b].map(([k,j])=>j)).then(()=>w())})]),b==="enter"?d.current=d.current.then(()=>t==null?void 0:t.wait.current).then(()=>S(b)):S(b)}),p=It((O,b,S)=>{Promise.all(f.current[b].splice(0).map(([w,k])=>k)).then(()=>{var w;(w=c.current.shift())==null||w()}).then(()=>S(b))});return _.useMemo(()=>({children:r,register:l,unregister:s,onStart:m,onStop:p,wait:d,chains:f}),[l,s,r,m,p,f,d])}var V5=_.Fragment,U5=up.RenderStrategy;function WF(e,t){var n,r;let{transition:i=!0,beforeEnter:a,afterEnter:s,beforeLeave:l,afterLeave:c,enter:d,enterFrom:f,enterTo:m,entered:p,leave:O,leaveFrom:b,leaveTo:S,...w}=e,[k,j]=_.useState(null),T=_.useRef(null),E=Z5(e),Q=ga(...E?[T,t,j]:t===null?[]:[t]),A=(n=w.unmount)==null||n?Bs.Unmount:Bs.Hidden,{show:N,appear:D,initial:q}=FF(),[P,V]=_.useState(N?"visible":"hidden"),Z=$F(),{register:Y,unregister:X}=Z;Tr(()=>Y(T),[Y,T]),Tr(()=>{if(A===Bs.Hidden&&T.current){if(N&&P!=="visible"){V("visible");return}return Ka(P,{hidden:()=>X(T),visible:()=>Y(T)})}},[P,T,Y,X,N,A]);let H=Wp();Tr(()=>{if(E&&H&&P==="visible"&&T.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[T,P,H,E]);let I=q&&!D,L=D&&N&&q,$=_.useRef(!1),ne=B5(()=>{$.current||(V("hidden"),X(T))},Z),z=It(Xe=>{$.current=!0;let qe=Xe?"enter":"leave";ne.onStart(T,qe,Pe=>{Pe==="enter"?a==null||a():Pe==="leave"&&(l==null||l())})}),G=It(Xe=>{let qe=Xe?"enter":"leave";$.current=!1,ne.onStop(T,qe,Pe=>{Pe==="enter"?s==null||s():Pe==="leave"&&(c==null||c())}),qe==="leave"&&!Kp(ne)&&(V("hidden"),X(T))});_.useEffect(()=>{E&&i||(z(N),G(N))},[N,E,i]);let re=!(!i||!E||!H||I),[,R]=gF(re,k,N,{start:z,end:G}),me=Co({ref:Q,className:((r=p0(w.className,L&&d,L&&f,R.enter&&d,R.enter&&R.closed&&f,R.enter&&!R.closed&&m,R.leave&&O,R.leave&&!R.closed&&b,R.leave&&R.closed&&S,!R.transition&&N&&p))==null?void 0:r.trim())||void 0,...pF(R)}),Se=0;P==="visible"&&(Se|=Li.Open),P==="hidden"&&(Se|=Li.Closed),N&&P==="hidden"&&(Se|=Li.Opening),!N&&P==="visible"&&(Se|=Li.Closing);let ve=yi();return ue.createElement(Gp.Provider,{value:ne},ue.createElement(SF,{value:Se},ve({ourProps:me,theirProps:w,defaultTag:V5,features:U5,visible:P==="visible",name:"Transition.Child"})))}function HF(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,s=_.useRef(null),l=Z5(e),c=ga(...l?[s,t]:t===null?[]:[t]);Wp();let d=$p();if(n===void 0&&d!==null&&(n=(d&Li.Open)===Li.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,m]=_.useState(n?"visible":"hidden"),p=B5(()=>{n||m("hidden")}),[O,b]=_.useState(!0),S=_.useRef([n]);Tr(()=>{O!==!1&&S.current[S.current.length-1]!==n&&(S.current.push(n),b(!1))},[S,n]);let w=_.useMemo(()=>({show:n,appear:r,initial:O}),[n,r,O]);Tr(()=>{n?m("visible"):!Kp(p)&&s.current!==null&&m("hidden")},[n,p]);let k={unmount:i},j=It(()=>{var Q;O&&b(!1),(Q=e.beforeEnter)==null||Q.call(e)}),T=It(()=>{var Q;O&&b(!1),(Q=e.beforeLeave)==null||Q.call(e)}),E=yi();return ue.createElement(Gp.Provider,{value:p},ue.createElement(Hp.Provider,{value:w},E({ourProps:{...k,as:_.Fragment,children:ue.createElement(Y5,{ref:c,...k,...a,beforeEnter:j,beforeLeave:T})},theirProps:{},defaultTag:_.Fragment,features:U5,visible:f==="visible",name:"Transition"})))}function GF(e,t){let n=_.useContext(Hp)!==null,r=$p()!==null;return ue.createElement(ue.Fragment,null,!n&&r?ue.createElement(y0,{ref:t,...e}):ue.createElement(Y5,{ref:t,...e}))}var y0=Er(HF),Y5=Er(WF),pr=Er(GF),nl=Object.assign(y0,{Child:pr,Root:y0}),KF=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(KF||{}),JF=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(JF||{}),e$={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},vx=_.createContext(null);vx.displayName="DialogContext";function Jp(e){let t=_.useContext(vx);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Jp),n}return t}function t$(e,t){return Ka(t.type,e$,e,t)}var dC=Er(function(e,t){let n=_.useId(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:a,initialFocus:s,role:l="dialog",autoFocus:c=!0,__demoMode:d=!1,unmount:f=!1,...m}=e,p=_.useRef(!1);l=(function(){return l==="dialog"||l==="alertdialog"?l:(p.current||(p.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let O=$p();i===void 0&&O!==null&&(i=(O&Li.Open)===Li.Open);let b=_.useRef(null),S=ga(b,t),w=mx(b.current),k=i?0:1,[j,T]=_.useReducer(t$,{titleId:null,descriptionId:null,panelRef:_.createRef()}),E=It(()=>a(!1)),Q=It(R=>T({type:0,id:R})),A=Wp()?k===0:!1,[N,D]=AF(),q={get current(){var R;return(R=j.panelRef.current)!=null?R:b.current}},P=q5(),{resolveContainers:V}=MF({mainTreeNode:P,portals:N,defaultContainers:[q]}),Z=O!==null?(O&Li.Closing)===Li.Closing:!1;FY(d||Z?!1:A,{allowed:It(()=>{var R,me;return[(me=(R=b.current)==null?void 0:R.closest("[data-headlessui-portal]"))!=null?me:null]}),disallowed:It(()=>{var R;return[(R=P==null?void 0:P.closest("body > *:not(#headlessui-portal-root)"))!=null?R:null]})});let Y=T5.get(null);Tr(()=>{if(A)return Y.actions.push(r),()=>Y.actions.pop(r)},[Y,r,A]);let X=C5(Y,_.useCallback(R=>Y.selectors.isTop(R,r),[Y,r]));aF(X,V,R=>{R.preventDefault(),E()}),NF(X,w==null?void 0:w.defaultView,R=>{R.preventDefault(),R.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),E()}),fF(d||Z?!1:A,w,V),$Y(A,b,E);let[H,I]=AY(),L=_.useMemo(()=>[{dialogState:k,close:E,setTitleId:Q,unmount:f},j],[k,E,Q,f,j]),$=vf({open:k===0}),ne={ref:S,id:r,role:l,tabIndex:-1,"aria-modal":d?void 0:k===0?!0:void 0,"aria-labelledby":j.titleId,"aria-describedby":H,unmount:f},z=!RF(),G=Po.None;A&&!d&&(G|=Po.RestoreFocus,G|=Po.TabLock,c&&(G|=Po.AutoFocus),z&&(G|=Po.InitialFocus));let re=yi();return ue.createElement(xF,null,ue.createElement(cC,{force:!0},ue.createElement(PF,null,ue.createElement(vx.Provider,{value:L},ue.createElement(D5,{target:b},ue.createElement(cC,{force:!1},ue.createElement(I,{slot:$},ue.createElement(D,null,ue.createElement(XF,{initialFocus:s,initialFocusFallback:b,containers:V,features:G},ue.createElement(LY,{value:E},re({ourProps:ne,theirProps:m,slot:$,defaultTag:n$,features:r$,visible:k===0,name:"Dialog"})))))))))))}),n$="div",r$=up.RenderStrategy|up.Static;function i$(e,t){let{transition:n=!1,open:r,...i}=e,a=$p(),s=e.hasOwnProperty("open")||a!==null,l=e.hasOwnProperty("onClose");if(!s&&!l)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!l)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?ue.createElement(uC,null,ue.createElement(nl,{show:r,transition:n,unmount:i.unmount},ue.createElement(dC,{ref:t,...i}))):ue.createElement(uC,null,ue.createElement(dC,{ref:t,open:r,...i}))}var a$="div";function s$(e,t){let n=_.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...a}=e,[{dialogState:s,unmount:l},c]=Jp("Dialog.Panel"),d=ga(t,c.panelRef),f=vf({open:s===0}),m=It(w=>{w.stopPropagation()}),p={ref:d,id:r,onClick:m},O=i?pr:_.Fragment,b=i?{unmount:l}:{},S=yi();return ue.createElement(O,{...b},S({ourProps:p,theirProps:a,slot:f,defaultTag:a$,name:"Dialog.Panel"}))}var o$="div";function l$(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:a}]=Jp("Dialog.Backdrop"),s=vf({open:i===0}),l={ref:t,"aria-hidden":!0},c=n?pr:_.Fragment,d=n?{unmount:a}:{},f=yi();return ue.createElement(c,{...d},f({ourProps:l,theirProps:r,slot:s,defaultTag:o$,name:"Dialog.Backdrop"}))}var c$="h2";function u$(e,t){let n=_.useId(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:a,setTitleId:s}]=Jp("Dialog.Title"),l=ga(t);_.useEffect(()=>(s(r),()=>s(null)),[r,s]);let c=vf({open:a===0}),d={ref:l,id:r};return yi()({ourProps:d,theirProps:i,slot:c,defaultTag:c$,name:"Dialog.Title"})}var d$=Er(i$),rl=Er(s$);Er(l$);var bf=Er(u$),Lc=Object.assign(d$,{Panel:rl,Title:bf,Description:RY});function fC({children:e,position:t,onClose:n,isOpen:r,wide:i=!1}){const a=i?800:400,s=i?700:500,l={position:"fixed",left:`${Math.min(t.x,typeof window<"u"?window.innerWidth-a:t.x)}px`,top:`${Math.min(t.y,typeof window<"u"?window.innerHeight-s:t.y)}px`};return g.jsx(nl,{appear:!0,show:r,children:g.jsxs(Lc,{as:"div",className:"semiont-popup-overlay",onClose:n,children:[g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-popup-backdrop"})}),g.jsx("div",{className:"semiont-popup-container",children:g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsx(rl,{className:"semiont-popup-panel",style:l,"data-annotation-ui":!0,"data-wide":i?"true":"false",children:g.jsx(g.Fragment,{children:e})})})})]})})}function f$(e){return Tc(e)?{stroke:"rgb(250, 204, 21)",fill:"rgba(250, 204, 21, 0.2)"}:Ii(e)?{stroke:"rgb(59, 130, 246)",fill:"rgba(59, 130, 246, 0.2)"}:Hd(e)?{stroke:"rgb(239, 68, 68)",fill:"rgba(239, 68, 68, 0.2)"}:$o(e)?{stroke:"rgb(255, 255, 255)",fill:"rgba(255, 255, 255, 0.2)"}:Cc(e)?{stroke:"rgb(234, 88, 12)",fill:"rgba(234, 88, 12, 0.2)"}:{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"}}function pb(e){return $o(e)?"Comment":Tc(e)?"Highlight":Hd(e)?"Assessment":Cc(e)?"Tag":U0(e)?"Resolved Reference":Ii(e)?"Unresolved Reference":"Annotation"}function h$({annotations:e,imageWidth:t,imageHeight:n,displayWidth:r,displayHeight:i,eventBus:a,hoveredAnnotationId:s,selectedAnnotationId:l,hoverDelayMs:c}){const d=r/t,f=i/n,{handleMouseEnter:m,handleMouseLeave:p}=_.useMemo(()=>W0(O=>a==null?void 0:a.get("beckon:hover").next({annotationId:O}),c),[a,c]);return g.jsx("svg",{className:"semiont-annotation-overlay",style:{width:r,height:i},children:e.map(O=>{if(typeof O.target=="string")return null;const b=$E(O.target.selector);if(!b)return null;const S=F0(b.value);if(!S)return null;const w=O.id===s,k=O.id===l,j=f$(O),T=Ii(O),E=T&&jd(O.body),Q=T?E?"🔗":"❓":null;switch(S.type){case"rect":{const{x:A,y:N,width:D,height:q}=S.data,P=(A+D)*d+8,V=(N+q)*f+4;return g.jsxs("g",{children:[g.jsx("title",{children:pb(O)}),g.jsx("rect",{x:A*d,y:N*f,width:D*d,height:q*f,fill:w||k?j.fill:"transparent",stroke:j.stroke,strokeWidth:w||k?3:2,opacity:w||k?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":w?"true":"false","data-selected":k?"true":"false",onClick:()=>a==null?void 0:a.get("browse:click").next({annotationId:O.id,motivation:O.motivation}),onMouseEnter:()=>m(O.id),onMouseLeave:p}),Q&&g.jsx("text",{x:P,y:V,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:Z=>{Z.stopPropagation(),a==null||a.get("browse:click").next({annotationId:O.id,motivation:O.motivation})},onMouseEnter:()=>m(O.id),onMouseLeave:p,children:Q})]},O.id)}case"circle":{const{cx:A,cy:N,r:D}=S.data,q=D*Math.min(d,f),P=Math.PI/4,V=A*d+q*Math.cos(P)+8,Z=N*f+q*Math.sin(P)+4;return g.jsxs("g",{children:[g.jsx("title",{children:pb(O)}),g.jsx("circle",{cx:A*d,cy:N*f,r:q,fill:w||k?j.fill:"transparent",stroke:j.stroke,strokeWidth:w||k?3:2,opacity:w||k?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":w?"true":"false","data-selected":k?"true":"false",onClick:()=>a==null?void 0:a.get("browse:click").next({annotationId:O.id,motivation:O.motivation}),onMouseEnter:()=>m(O.id),onMouseLeave:p}),Q&&g.jsx("text",{x:V,y:Z,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:Y=>{Y.stopPropagation(),a==null||a.get("browse:click").next({annotationId:O.id,motivation:O.motivation})},onMouseEnter:()=>m(O.id),onMouseLeave:p,children:Q})]},O.id)}case"polygon":{const A=S.data.points.map(Y=>`${Y.x*d},${Y.y*f}`).join(" "),D=[...S.data.points.map(Y=>({x:Y.x*d,y:Y.y*f,sum:Y.x*d+Y.y*f}))].sort((Y,X)=>X.sum-Y.sum),q=D[0],P=D[1],V=(q.x+P.x)/2+8,Z=(q.y+P.y)/2+4;return g.jsxs("g",{children:[g.jsx("title",{children:pb(O)}),g.jsx("polygon",{points:A,fill:w||k?j.fill:"transparent",stroke:j.stroke,strokeWidth:w||k?3:2,opacity:w||k?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":w?"true":"false","data-selected":k?"true":"false",onClick:()=>a==null?void 0:a.get("browse:click").next({annotationId:O.id,motivation:O.motivation}),onMouseEnter:()=>m(O.id),onMouseLeave:p}),Q&&g.jsx("text",{x:V,y:Z,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:Y=>{Y.stopPropagation(),a==null||a.get("browse:click").next({annotationId:O.id,motivation:O.motivation})},onMouseEnter:()=>m(O.id),onMouseLeave:p,children:Q})]},O.id)}default:return null}})})}function m$(e){if(!e)return{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"};switch(e){case"highlighting":return{stroke:"rgb(250, 204, 21)",fill:"rgba(250, 204, 21, 0.2)"};case"linking":return{stroke:"rgb(59, 130, 246)",fill:"rgba(59, 130, 246, 0.2)"};case"assessing":return{stroke:"rgb(239, 68, 68)",fill:"rgba(239, 68, 68, 0.2)"};case"commenting":return{stroke:"rgb(255, 255, 255)",fill:"rgba(255, 255, 255, 0.2)"};default:return{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"}}}function p$({imageUrl:e,existingAnnotations:t=[],drawingMode:n,selectedMotivation:r,eventBus:i,hoveredAnnotationId:a,selectedAnnotationId:s}){const{hoverDelayMs:l}=XR(),c=_.useRef(null),d=_.useRef(null),[f,m]=_.useState(null),[p,O]=_.useState(null),[b,S]=_.useState(!1),[w,k]=_.useState(null),[j,T]=_.useState(null);_.useEffect(()=>{const q=new Image;q.onload=()=>{m({width:q.naturalWidth,height:q.naturalHeight})},q.src=e},[e]),_.useEffect(()=>{const q=()=>{d.current&&O({width:d.current.clientWidth,height:d.current.clientHeight})};q();let P=null;try{P=new ResizeObserver(q),d.current&&P.observe(d.current)}catch{console.warn("ResizeObserver not supported, falling back to window resize listener"),window.addEventListener("resize",q)}return()=>{P?P.disconnect():window.removeEventListener("resize",q)}},[]);const E=_.useCallback(q=>{if(!d.current)return null;const P=d.current.getBoundingClientRect();return{x:q.clientX-P.left,y:q.clientY-P.top}},[]),Q=_.useCallback(q=>{if(!n)return;const P=E(q);P&&(S(!0),k(P),T(P))},[n,E]),A=_.useCallback(q=>{if(!b||!w)return;const P=E(q);P&&T(P)},[b,w,E]),N=_.useCallback(q=>{if(!b||!w||!n)return;const P=E(q);if(!P||!p||!f)return;if(Math.sqrt(Math.pow(P.x-w.x,2)+Math.pow(P.y-w.y,2))<10){if(t.length>0){const H=t.find(I=>{if(typeof I.target=="string")return!1;const L=I.target.selector;if(!L)return!1;const ne=(Array.isArray(L)?L:[L]).find(R=>R.type==="SvgSelector");if(!ne||ne.type!=="SvgSelector")return!1;const z=F0(ne.value);if(!z)return!1;const G=p.width/f.width,re=p.height/f.height;if(z.type==="rect"){const{x:R,y:me,width:Se,height:ve}=z.data,Xe=R*G,qe=me*re,Pe=Se*G,Oe=ve*re;return P.x>=Xe&&P.x<=Xe+Pe&&P.y>=qe&&P.y<=qe+Oe}return!1});if(H){i==null||i.get("browse:click").next({annotationId:H.id,motivation:H.motivation}),S(!1),k(null),T(null);return}}S(!1),k(null),T(null);return}let Y;switch(n){case"circle":{const H=Math.sqrt(Math.pow(P.x-w.x,2)+Math.pow(P.y-w.y,2));Y=cA(w,H);break}case"polygon":{const H=(w.x+P.x)/2,I=(w.y+P.y)/2,L=Math.abs(P.x-w.x)/2,$=Math.abs(P.y-w.y)/2,ne=[{x:H,y:I-$},{x:H+L,y:I},{x:H,y:I+$},{x:H-L,y:I}];Y=lA(ne);break}case"rectangle":default:Y=oA(w,P);break}const X=MI(Y,p.width,p.height,f.width,f.height);i&&r&&i.get("mark:requested").next({selector:{type:"SvgSelector",value:X},motivation:r}),S(!1),k(null),T(null)},[b,w,n,p,f,E,r,t]),D=_.useCallback(()=>{b&&(S(!1),k(null),T(null))},[b]);return g.jsxs("div",{ref:c,className:"semiont-svg-drawing-canvas",onMouseDown:Q,onMouseMove:A,onMouseUp:N,onMouseLeave:D,"data-drawing-mode":n||"none",children:[g.jsx("img",{ref:d,src:e,alt:"Annotatable content",className:"semiont-svg-drawing-canvas__image",draggable:!1}),p&&f&&g.jsx("div",{className:"semiont-svg-drawing-canvas__overlay-container",children:g.jsxs("div",{className:"semiont-svg-drawing-canvas__overlay",style:{width:p.width,height:p.height},children:[g.jsx(h$,{annotations:t,imageWidth:f.width,imageHeight:f.height,displayWidth:p.width,displayHeight:p.height,hoverDelayMs:l,...i&&{eventBus:i},...a!==void 0&&{hoveredAnnotationId:a},...s!==void 0&&{selectedAnnotationId:s}}),b&&w&&j&&(()=>{const q=m$(r||null);return g.jsxs("svg",{className:"semiont-svg-drawing-canvas__preview",style:{width:p.width,height:p.height},children:[n==="circle"&&(()=>{const P=Math.sqrt(Math.pow(j.x-w.x,2)+Math.pow(j.y-w.y,2));return g.jsx("circle",{cx:w.x,cy:w.y,r:P,fill:q.fill,stroke:q.stroke,strokeWidth:"2",strokeDasharray:"5,5"})})(),n==="polygon"&&(()=>{const P=(w.x+j.x)/2,V=(w.y+j.y)/2,Z=Math.abs(j.x-w.x)/2,Y=Math.abs(j.y-w.y)/2,H=[{x:P,y:V-Y},{x:P+Z,y:V},{x:P,y:V+Y},{x:P-Z,y:V}].map(I=>`${I.x},${I.y}`).join(" ");return g.jsx("polygon",{points:H,fill:q.fill,stroke:q.stroke,strokeWidth:"2",strokeDasharray:"5,5"})})(),n==="rectangle"&&g.jsx("rect",{x:Math.min(w.x,j.x),y:Math.min(w.y,j.y),width:Math.abs(j.x-w.x),height:Math.abs(j.y-w.y),fill:q.fill,stroke:q.stroke,strokeWidth:"2",strokeDasharray:"5,5"})]})})()]})})]})}var g$=[{titleKey:"navigationTitle",shortcuts:[{keys:["⌘K","Ctrl K"],descriptionKey:"navOpenSearch"},{keys:["/"],descriptionKey:"navOpenSearchAlt"},{keys:["⌘N","Ctrl N"],descriptionKey:"navCreateResource"},{keys:["Esc Esc"],descriptionKey:"navCloseOverlays"},{keys:["?"],descriptionKey:"navShowHelp"}]},{titleKey:"sidebarTitle",shortcuts:[{keys:["Click <"],descriptionKey:"sidebarCollapse"},{keys:["Click ☰"],descriptionKey:"sidebarExpand"},{keys:["Space"],descriptionKey:"sidebarPickup"},{keys:["↑","↓"],descriptionKey:"sidebarMove"},{keys:["Space"],descriptionKey:"sidebarDrop"},{keys:["Esc"],descriptionKey:"sidebarCancel"}]},{titleKey:"annotationsTitle",shortcuts:[{keys:["H"],descriptionKey:"annotHighlight"},{keys:["R"],descriptionKey:"annotReference"},{keys:["Delete"],descriptionKey:"annotDelete"},{keys:["Tab"],descriptionKey:"annotNavigate"},{keys:["Shift Tab"],descriptionKey:"annotNavigateBack"}]},{titleKey:"listsTitle",shortcuts:[{keys:["←","→"],descriptionKey:"listsFilterNav"},{keys:["↑","↓","←","→"],descriptionKey:"listsGridNav"},{keys:["Home"],descriptionKey:"listsJumpFirst"},{keys:["End"],descriptionKey:"listsJumpLast"}]},{titleKey:"searchModalTitle",shortcuts:[{keys:["↑","↓"],descriptionKey:"searchNav"},{keys:["Enter"],descriptionKey:"searchSelect"},{keys:["Esc"],descriptionKey:"searchClose"}]},{titleKey:"modalTitle",shortcuts:[{keys:["Esc"],descriptionKey:"modalClose"},{keys:["Tab"],descriptionKey:"modalNavForward"},{keys:["Shift Tab"],descriptionKey:"modalNavBackward"},{keys:["Enter"],descriptionKey:"modalActivate"},{keys:["Space"],descriptionKey:"modalActivate"}]},{titleKey:"accessibilityTitle",shortcuts:[{keys:["Tab"],descriptionKey:"a11ySkipLinks"},{keys:["Enter"],descriptionKey:"a11yFollowLink"}]}];function Rre({isOpen:e,onClose:t}){const n=hn("KeyboardShortcuts"),r=typeof window<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;return g.jsx(nl,{appear:!0,show:e,children:g.jsxs(Lc,{as:"div",className:"semiont-modal",onClose:t,children:[g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(rl,{className:"semiont-modal__panel semiont-modal__panel--large",children:[g.jsx("div",{className:"semiont-modal__header",children:g.jsxs("div",{className:"semiont-modal__header-content",children:[g.jsx(bf,{className:"semiont-modal__title",children:n("title")}),g.jsx("button",{onClick:t,"aria-label":n("closeDialog"),className:"semiont-modal__close",children:g.jsx("svg",{className:"semiont-modal__close-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),g.jsxs("div",{className:"semiont-modal__body",children:[g.jsx("div",{className:"semiont-shortcuts",children:g$.map(i=>g.jsxs("div",{className:"semiont-shortcuts__group",children:[g.jsx("h3",{className:"semiont-shortcuts__group-title",children:n(i.titleKey)}),g.jsx("div",{className:"semiont-shortcuts__list",children:i.shortcuts.map((a,s)=>g.jsxs("div",{className:"semiont-shortcuts__item",children:[g.jsx("span",{className:"semiont-shortcuts__description",children:n(a.descriptionKey)}),g.jsx("div",{className:"semiont-shortcuts__keys",children:a.keys.map((l,c)=>l.includes("⌘")&&!r||l.includes("Ctrl")&&r?null:g.jsxs(ue.Fragment,{children:[c>0&&!l.includes("⌘")&&!l.includes("Ctrl")&&g.jsx("span",{className:"semiont-shortcuts__separator",children:n("or")}),g.jsx("kbd",{className:"semiont-shortcuts__key",children:l})]},c))})]},s))})]},i.titleKey))}),g.jsx("div",{className:"semiont-shortcuts__note",children:g.jsx("p",{className:"semiont-shortcuts__note-text",children:n(r?"macNote":"windowsNote")})})]}),g.jsx("div",{className:"semiont-modal__footer",children:g.jsxs("div",{className:"semiont-modal__footer-content",children:[g.jsx("div",{className:"semiont-modal__hint",children:n("footerHint",{key:"?"}).split("?").map((i,a,s)=>g.jsxs(ue.Fragment,{children:[i,a<s.length-1&&g.jsx("kbd",{className:"semiont-modal__hint-key",children:"?"})]},a))}),g.jsx("button",{onClick:t,className:"semiont-button semiont-button--secondary",children:n("close")})]})})]})})})})]})})}function v$(){const{permissionDeniedAt:e,permissionDeniedMessage:t,acknowledgePermissionDenied:n}=G0(),r=e!==null,i=t??"You do not have permission to perform this action.",a=()=>{n(),window.history.back()},s=()=>{n(),window.location.href="/"},l=()=>{n(),window.location.href=`/auth/connect?callbackUrl=${encodeURIComponent(window.location.pathname)}`};return g.jsx(nl,{appear:!0,show:r,children:g.jsxs(Lc,{as:"div",className:"semiont-modal",onClose:a,children:[g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(rl,{className:"semiont-modal__panel semiont-modal__panel--medium",children:[g.jsx("div",{className:"semiont-modal__icon-wrapper",children:g.jsx("div",{className:"semiont-modal__icon",children:g.jsx("svg",{style:{width:"1.5rem",height:"1.5rem",color:"var(--semiont-color-amber-600, #d97706)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})})}),g.jsxs("div",{className:"semiont-modal__content",children:[g.jsx(bf,{className:"semiont-modal__title semiont-modal__title--centered",children:"Access Denied"}),g.jsx("p",{className:"semiont-modal__description",children:i})]}),g.jsxs("div",{style:{padding:"0.75rem",backgroundColor:"var(--semiont-bg-secondary)",borderRadius:"var(--semiont-radius-md, 0.375rem)",border:"1px solid var(--semiont-border-primary)",fontSize:"var(--semiont-text-sm, 0.875rem)",marginBottom:"1rem"},children:[g.jsx("p",{style:{color:"var(--semiont-text-secondary)",marginBottom:"0.5rem"},children:"This could be because:"}),g.jsxs("ul",{style:{listStyle:"disc",listStylePosition:"inside",color:"var(--semiont-text-tertiary)",display:"flex",flexDirection:"column",gap:"0.25rem"},children:[g.jsx("li",{children:"You don't have the required permissions"}),g.jsx("li",{children:"The resource is restricted to specific users or teams"}),g.jsx("li",{children:"Your account type doesn't include this feature"})]})]}),g.jsxs("div",{className:"semiont-modal__actions",children:[g.jsx("button",{type:"button",onClick:a,className:"semiont-button--primary semiont-button--flex",children:"Go Back"}),g.jsx("button",{type:"button",onClick:s,className:"semiont-button--secondary semiont-button--flex",children:"Go to Home"})]}),g.jsx("div",{className:"semiont-modal__actions",style:{marginTop:"0.5rem",paddingTop:"0.5rem",borderTop:"1px solid var(--semiont-border-primary)"},children:g.jsx("button",{type:"button",onClick:l,className:"semiont-button--secondary semiont-button--flex",style:{fontSize:"var(--semiont-text-sm, 0.875rem)"},children:"Switch Account"})})]})})})})]})})}function O$(){const{sessionExpiredAt:e,sessionExpiredMessage:t,acknowledgeSessionExpired:n}=G0(),r=e!==null,i=()=>{n(),window.location.href=`/auth/connect?callbackUrl=${encodeURIComponent(window.location.pathname)}`},a=()=>{n(),window.location.href="/"};return g.jsx(nl,{appear:!0,show:r,children:g.jsxs(Lc,{as:"div",className:"semiont-modal",onClose:a,children:[g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(rl,{className:"semiont-modal__panel semiont-modal__panel--medium",children:[g.jsx("div",{className:"semiont-modal__icon-wrapper",children:g.jsx("div",{className:"semiont-modal__icon",style:{background:"linear-gradient(to bottom right, var(--semiont-color-red-100, #fee2e2), var(--semiont-color-red-300, #fca5a5))"},children:g.jsx("svg",{style:{width:"1.5rem",height:"1.5rem",color:"var(--semiont-color-red-600, #dc2626)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),g.jsxs("div",{className:"semiont-modal__content",children:[g.jsx(bf,{className:"semiont-modal__title semiont-modal__title--centered",children:"Session Expired"}),g.jsx("p",{className:"semiont-modal__description",children:t??"Your session has expired for security reasons. Please sign in again to continue working."})]}),g.jsxs("div",{className:"semiont-modal__actions",children:[g.jsx("button",{type:"button",onClick:a,className:"semiont-button--secondary semiont-button--flex",children:"Go to Home"}),g.jsx("button",{type:"button",onClick:i,className:"semiont-button--primary semiont-button--flex",children:"Sign In Again"})]})]})})})})]})})}function b$(e,t){if(!e)return[{exact:"",start:0,end:0}];const n=EI(e),r=t.map(s=>{const l=qn(s.target),c=gi(l),d=l?TI(l):null;let f;d&&(f=QI(e,d.exact,d.prefix,d.suffix,c==null?void 0:c.start,n));const m=(f==null?void 0:f.start)??(c==null?void 0:c.start)??0,p=(f==null?void 0:f.end)??(c==null?void 0:c.end)??0;return{annotation:s,start:m,end:p}}).filter(s=>s.start>=0&&s.end<=e.length&&s.start<s.end).sort((s,l)=>s.start-l.start);if(r.length===0)return[{exact:e,start:0,end:e.length}];const i=[];let a=0;for(const{annotation:s,start:l,end:c}of r)l<a||(l>a&&i.push({exact:e.slice(a,l),start:a,end:l}),i.push({exact:e.slice(l,c),annotation:s,start:l,end:c}),a=c);return a<e.length&&i.push({exact:e.slice(a),start:a,end:e.length}),i}function y$(e,t,n,r){if(!t||n<0||r<=n||r>e.length)return null;const i=LI(e,n,r);return[{type:"TextPositionSelector",start:n,end:r},{type:"TextQuoteSelector",exact:t,...i.prefix&&{prefix:i.prefix},...i.suffix&&{suffix:i.suffix}}]}function S$(e,t){const n=e.indexOf(t);return n===-1?null:{start:n,end:n+t.length}}var x$=_.lazy(()=>Ae(()=>import("./PdfAnnotationCanvas.client-CHDCGQBR-mCGxablw.js"),__vite__mapDeps([2,1,3,4])).then(e=>({default:e.PdfAnnotationCanvas})));function _$({content:e,mimeType:t="text/plain",resourceUri:n,annotations:r,uiState:i,onUIStateChange:a,enableWidgets:s=!1,getTargetResourceName:l,generatingReferenceId:c,showLineNumbers:d=!1,hoverDelayMs:f=150,annotateMode:m}){const{newAnnotationIds:p}=ex(),O=_.useRef(null),b=gt(),S=$0(t),{highlights:w,references:k,assessments:j,comments:T,tags:E}=r,Q=[...w,...k,...j,...T,...E],A=b$(e,Q),{selectedMotivation:N,selectedClick:D,selectedShape:q,hoveredAnnotationId:P,scrollToAnnotationId:V}=i,Z=_.useRef(a);Z.current=a;const Y=_.useCallback(({motivation:L})=>{var $;($=Z.current)==null||$.call(Z,{selectedMotivation:L})},[]),X=_.useCallback(({action:L})=>{var $;($=Z.current)==null||$.call(Z,{selectedClick:L})},[]),H=_.useCallback(({shape:L})=>{var $;($=Z.current)==null||$.call(Z,{selectedShape:L})},[]),I=_.useCallback(({annotationId:L})=>{var $;($=Z.current)==null||$.call(Z,{hoveredAnnotationId:L})},[]);switch(gr({"mark:selection-changed":Y,"mark:click-changed":X,"mark:shape-changed":H,"beckon:hover":I}),_.useEffect(()=>{const L=O.current;if(!L)return;let $=!1;const ne=G=>{const re=G.target;$=!!re.closest("[data-annotation-id]"),re.closest("[data-annotation-ui]")},z=G=>{const re=G.target;if(re.closest(".semiont-pdf-annotation-canvas")||re.closest(".semiont-svg-drawing-canvas"))return;const R=window.getSelection();if(!R||R.isCollapsed||!R.toString()){$=!1;return}if($){$=!1;return}$=!1;const me=R.getRangeAt(0),Se=R.toString(),ve=L.querySelector(".codemirror-renderer"),Xe=ve==null?void 0:ve.__cmView;let qe,Pe;if(!Xe||!Xe.posAtDOM){const Oe=S$(e,Se);if(!Oe)return;qe=Oe.start,Pe=Oe.end}else qe=Xe.posAtDOM(me.startContainer,me.startOffset),Pe=qe+Se.length;if(qe>=0&&N){const Oe=y$(e,Se,qe,Pe);if(!Oe)return;b.get("mark:requested").next({selector:Oe,motivation:N}),R.removeAllRanges()}};return L.addEventListener("mouseup",z),L.addEventListener("mousedown",ne),()=>{L.removeEventListener("mouseup",z),L.removeEventListener("mousedown",ne)}},[N,e]),S){case"text":return g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"text",ref:O,children:[g.jsx(cc,{selectedMotivation:N,selectedClick:D,mediaType:t,annotateMode:m,annotators:tr}),g.jsx("div",{className:"semiont-annotate-view__content",children:g.jsx(m5,{content:e,segments:A,editable:!1,newAnnotationIds:p,...P!==void 0&&{hoveredAnnotationId:P},...V!==void 0&&{scrollToAnnotationId:V},sourceView:!0,showLineNumbers:d,hoverDelayMs:f,enableWidgets:s,eventBus:b,...l&&{getTargetResourceName:l},...c!==void 0&&{generatingReferenceId:c}})})]});case"image":return Ec(t)?g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"pdf",ref:O,children:[g.jsx(cc,{selectedMotivation:N,selectedClick:D,showShapeGroup:!0,selectedShape:q,mediaType:t,annotateMode:m,annotators:tr}),g.jsx("div",{className:"semiont-annotate-view__content",children:e&&g.jsx(_.Suspense,{fallback:g.jsx("div",{className:"semiont-annotate-view__loading",children:"Loading PDF viewer..."}),children:g.jsx(x$,{pdfUrl:e,existingAnnotations:Q,drawingMode:N?q:null,selectedMotivation:N,eventBus:b,hoveredAnnotationId:P||null,hoverDelayMs:f})})})]}):g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"image",ref:O,children:[g.jsx(cc,{selectedMotivation:N,selectedClick:D,showShapeGroup:!0,selectedShape:q,mediaType:t,annotateMode:m,annotators:tr}),g.jsx("div",{className:"semiont-annotate-view__content",children:e&&g.jsx(p$,{imageUrl:e,existingAnnotations:Q,drawingMode:N?q:null,selectedMotivation:N,eventBus:b,hoveredAnnotationId:P||null,hoverDelayMs:f})})]});case"unsupported":default:return g.jsx("div",{ref:O,className:"semiont-annotate-view semiont-annotate-view--unsupported","data-mime-type":"unsupported",children:g.jsxs("div",{className:"semiont-annotate-view__empty",children:[g.jsxs("p",{className:"semiont-annotate-view__empty-message",children:["Annotation not supported for ",t]}),n&&g.jsx("a",{href:`/api/resources/${n}`,download:!0,className:"semiont-button semiont-button--primary",children:"Download File"})]})})}}function hC(e){if(!e.startsWith("did:"))return e;const t=e.match(/^did:web:system:(.+)$/);if(t){const r=t[1];return r.charAt(0).toUpperCase()+r.slice(1)}const n=e.match(/^did:web:[^:]+:users:(.+)$/);return n?decodeURIComponent(n[1]):e}function mC(e,t,n){var r;switch(e){case"yield:created":return t("resourceCreated");case"yield:cloned":return t("resourceCloned");case"mark:archived":return t("resourceArchived");case"mark:unarchived":return t("resourceUnarchived");case"mark:added":{const i=(r=n==null?void 0:n.annotation)==null?void 0:r.motivation;return t(i==="highlighting"?"highlightAdded":i==="linking"?"referenceCreated":i==="assessing"?"assessmentAdded":"annotationAdded")}case"mark:removed":return t("annotationRemoved");case"mark:body-updated":return t("annotationBodyUpdated");case"mark:entity-tag-added":return t("entitytagAdded");case"mark:entity-tag-removed":return t("entitytagRemoved");case"job:completed":case"job:started":case"job:progress":case"job:failed":return t("jobEvent");case"yield:representation-added":case"yield:representation-removed":return t("representationEvent");default:return e}}function w$(e,t){var n;switch(e){case"yield:created":case"yield:cloned":case"mark:archived":case"mark:unarchived":return"📄";case"mark:added":{const r=(n=t==null?void 0:t.annotation)==null?void 0:n.motivation;return r==="highlighting"?tr.highlight.iconEmoji||"📝":r==="linking"?tr.reference.iconEmoji||"📝":r==="assessing"&&tr.assessment.iconEmoji||"📝"}case"mark:removed":return"🗑️";case"mark:body-updated":return"✏️";case"mark:entity-tag-added":case"mark:entity-tag-removed":return"🏷️";case"job:completed":return"🔗";case"job:started":case"job:progress":return"⚙️";case"job:failed":return"❌";case"yield:representation-added":case"yield:representation-removed":return"📄";default:return"📝"}}function k$(e,t){const n=new Date(e),i=new Date().getTime()-n.getTime(),a=Math.floor(i/6e4),s=Math.floor(i/36e5),l=Math.floor(i/864e5);return a<1?t("justNow"):a<60?t("minutesAgo",{count:a}):s<24?t("hoursAgo",{count:s}):l<7?t("daysAgo",{count:l}):n.toLocaleDateString()}function mm(e,t=50){const n=e.trim();return n.length>t?n.substring(0,t)+"...":n}function j$(e,t,n){const r=e,i=r.payload;switch(r.type){case"yield:created":case"yield:cloned":return{exact:i.name,isQuoted:!1,isTag:!1};case"mark:body-updated":{const a=t.find(s=>s.id.endsWith(`/annotations/${i.annotationId}`));if(a!=null&&a.target)try{const s=qn(a.target),l=Is(s);if(l)return{exact:mm(l),isQuoted:!0,isTag:!1}}catch{}return null}case"mark:removed":{const a=n.find(s=>s.type==="mark:added"&&s.payload.annotation.id.endsWith(`/annotations/${i.annotationId}`));if(a&&a.type==="mark:added")try{const s=a.payload.annotation.target;if(typeof s!="string"&&s.selector){const l=Is(s.selector);if(l)return{exact:mm(l),isQuoted:!0,isTag:!1}}}catch{}return null}case"mark:added":{try{const a=i.annotation.target;if(typeof a!="string"&&a.selector){const s=Is(a.selector);if(s)return{exact:mm(s),isQuoted:!0,isTag:!1}}}catch{}return null}case"mark:entity-tag-added":case"mark:entity-tag-removed":return{exact:i.entityType,isQuoted:!1,isTag:!0};case"job:completed":{if(i.annotationUri){const a=t.find(s=>s.id===i.annotationUri);if(a!=null&&a.target)try{const s=qn(a.target),l=Is(s);if(l)return{exact:mm(l),isQuoted:!0,isTag:!1}}catch{}}return null}case"job:started":case"job:progress":case"job:failed":case"yield:representation-added":case"yield:representation-removed":return null;default:return null}}function T$(e){const t=e,n=t.payload;if(t.type==="mark:added"){const r=n.annotation.motivation,i=n.annotation.body;if(r==="linking"&&i&&"entityTypes"in i)return i.entityTypes??[]}return[]}function C$(e){const t=e,n=t.payload;return t.type==="yield:created"?{type:"created",method:n.creationMethod||"unknown",userId:t.userId,metadata:void 0}:t.type==="yield:cloned"?{type:"cloned",method:n.creationMethod||"clone",userId:t.userId,sourceDocId:n.parentResourceId,parentResourceId:n.parentResourceId,metadata:void 0}:null}function E$({event:e,annotations:t,allEvents:n,isRelated:r,t:i,Link:a,routes:s,onEventRef:l,onEventClick:c,onEventHover:d}){const f=j$(e,t,n),m=YE(e),p=C$(e),O=T$(e),b=_.useRef(null),S=_.useRef(d);_.useEffect(()=>{S.current=d});const w=_.useCallback(()=>{!m||!S.current||(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{var E;(E=S.current)==null||E.call(S,m)},300))},[m]),k=_.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),S.current&&S.current(null)},[]),j=m?"button":"div",T=m?{type:"button",onClick:()=>c==null?void 0:c(m),"aria-label":i("viewAnnotation",{content:(f==null?void 0:f.exact)||mC(e.type,i)}),className:"semiont-history-event","data-related":r?"true":"false","data-interactive":"true"}:{className:"semiont-history-event","data-related":r?"true":"false"};return g.jsxs(j,{ref:E=>{l&&l(m,E)},...T,children:[g.jsxs("div",{className:"semiont-history-event__content",children:[g.jsx("span",{className:"semiont-history-event__emoji",onMouseEnter:w,onMouseLeave:k,children:w$(e.type,e.payload)}),f?f.isTag?g.jsx("span",{className:"semiont-history-event__tag",children:f.exact}):f.isQuoted?g.jsxs("span",{className:"semiont-history-event__text semiont-history-event__text--quoted",children:["“",f.exact,"”"]}):g.jsx("span",{className:"semiont-history-event__text",children:f.exact}):g.jsx("span",{className:"semiont-history-event__text",children:mC(e.type,i,e.payload)}),e.userId&&g.jsx("span",{className:"semiont-history-event__user",children:hC(e.userId)}),g.jsx("span",{className:"semiont-history-event__timestamp",children:k$(e.timestamp,i)})]}),O.length>0&&g.jsx("div",{className:"semiont-history-event__entity-types",children:O.map(E=>g.jsx("span",{className:"semiont-tag semiont-tag--small","data-variant":"blue",children:E},E))}),p&&g.jsxs("div",{className:"semiont-history-event__details",children:[g.jsxs("span",{className:"semiont-history-event__detail",children:[i("user"),": ",g.jsx("span",{className:"semiont-history-event__detail-value",children:p.userId?hC(p.userId):""})]}),g.jsxs("span",{className:"semiont-history-event__detail",children:[i("method"),": ",g.jsx("span",{className:"semiont-history-event__detail-value semiont-history-event__detail-value--uppercase",children:p.method})]}),p.type==="cloned"&&p.sourceDocId&&g.jsx(a,{href:s.resourceDetail(p.sourceDocId),className:"semiont-history-event__link",onClick:E=>E.stopPropagation(),children:i("viewOriginal")})]})]})}function A$({rUri:e,hoveredAnnotationId:t,onEventHover:n,onEventClick:r,Link:i,routes:a}){const s=hn("AnnotationHistory"),l=Lp(),{data:c,isLoading:d,isError:f}=l.events.useQuery(e),{data:m}=l.annotations.useQuery(e),p=(m==null?void 0:m.annotations)||[],O=_.useRef(new Map),b=_.useRef(null),S=c!=null&&c.events?c.events.filter(w=>w.type!=="job:started"&&w.type!=="job:progress"&&w.type!=="job:completed").sort((w,k)=>w.metadata.sequenceNumber-k.metadata.sequenceNumber):[];return _.useEffect(()=>{b.current&&S.length>0&&requestAnimationFrame(()=>{b.current&&(b.current.scrollTop=b.current.scrollHeight)})},[S.length]),_.useEffect(()=>{if(!t)return;const w=O.current.get(t);w&&b.current&&(w.scrollIntoView({behavior:"smooth",block:"nearest"}),w.classList.add("bg-blue-100","dark:bg-blue-900/30"),setTimeout(()=>{w.classList.remove("bg-blue-100","dark:bg-blue-900/30")},1500))},[t]),d?g.jsxs("div",{className:"semiont-history-panel",children:[g.jsx("h3",{className:"semiont-history-panel__title",children:s("history")}),g.jsx("div",{className:"semiont-history-panel__loading",children:s("loading")})]}):f||S.length===0?null:g.jsxs("div",{className:"semiont-history-panel",children:[g.jsx("h3",{className:"semiont-history-panel__title",children:s("history")}),g.jsx("div",{ref:b,className:"semiont-history-panel__list",children:S.map(w=>{const k=t?(()=>{const j=YE(w);return j?j===t:!1})():!1;return g.jsx(E$,{event:w,annotations:p,allEvents:S,isRelated:k,t:s,Link:i,routes:a,onEventRef:(j,T)=>{T&&j?O.current.set(j,T):!T&&j&&O.current.delete(j)},...r&&{onEventClick:r},...n&&{onEventHover:n}},w.id)})})]})}function Q$(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var P$=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N$=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R$={};function pC(e,t){return(R$.jsx?N$:P$).test(e)}var M$=/[ \t\n\f\r]/g;function L$(e){return typeof e=="object"?e.type==="text"?gC(e.value):!1:gC(e)}function gC(e){return e.replace(M$,"")===""}var yf=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};yf.prototype.normal={};yf.prototype.property={};yf.prototype.space=void 0;function F5(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new yf(n,r,t)}function S0(e){return e.toLowerCase()}var Ar=class{constructor(e,t){this.attribute=t,this.property=e}};Ar.prototype.attribute="";Ar.prototype.booleanish=!1;Ar.prototype.boolean=!1;Ar.prototype.commaOrSpaceSeparated=!1;Ar.prototype.commaSeparated=!1;Ar.prototype.defined=!1;Ar.prototype.mustUseProperty=!1;Ar.prototype.number=!1;Ar.prototype.overloadedBoolean=!1;Ar.prototype.property="";Ar.prototype.spaceSeparated=!1;Ar.prototype.space=void 0;var hp={};PA(hp,{boolean:()=>We,booleanish:()=>jn,commaOrSpaceSeparated:()=>Zr,commaSeparated:()=>uc,number:()=>he,overloadedBoolean:()=>x0,spaceSeparated:()=>Bt});var D$=0,We=il(),jn=il(),x0=il(),he=il(),Bt=il(),uc=il(),Zr=il();function il(){return 2**++D$}var gb=Object.keys(hp),Ox=class extends Ar{constructor(e,t,n,r){let i=-1;if(super(e,t),vC(this,"space",r),typeof n=="number")for(;++i<gb.length;){const a=gb[i];vC(this,gb[i],(n&hp[a])===hp[a])}}};Ox.prototype.defined=!0;function vC(e,t,n){n&&(e[t]=n)}function Dc(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Ox(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[S0(r)]=r,n[S0(a.attribute)]=r}return new yf(t,n,e.space)}var $5=Dc({properties:{ariaActiveDescendant:null,ariaAtomic:jn,ariaAutoComplete:null,ariaBusy:jn,ariaChecked:jn,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:Bt,ariaCurrent:null,ariaDescribedBy:Bt,ariaDetails:null,ariaDisabled:jn,ariaDropEffect:Bt,ariaErrorMessage:null,ariaExpanded:jn,ariaFlowTo:Bt,ariaGrabbed:jn,ariaHasPopup:null,ariaHidden:jn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Bt,ariaLevel:he,ariaLive:null,ariaModal:jn,ariaMultiLine:jn,ariaMultiSelectable:jn,ariaOrientation:null,ariaOwns:Bt,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:jn,ariaReadOnly:jn,ariaRelevant:null,ariaRequired:jn,ariaRoleDescription:Bt,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:jn,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function W5(e,t){return t in e?e[t]:t}function H5(e,t){return W5(e,t.toLowerCase())}var z$=Dc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:uc,acceptCharset:Bt,accessKey:Bt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:Bt,autoFocus:We,autoPlay:We,blocking:Bt,capture:null,charSet:null,checked:We,cite:null,className:Bt,cols:he,colSpan:null,content:null,contentEditable:jn,controls:We,controlsList:Bt,coords:he|uc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:x0,draggable:jn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:Bt,height:he,hidden:x0,high:he,href:null,hrefLang:null,htmlFor:Bt,httpEquiv:Bt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:Bt,itemRef:Bt,itemScope:We,itemType:Bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:he,pattern:null,ping:Bt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:Bt,required:We,reversed:We,rows:he,rowSpan:he,sandbox:Bt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:jn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:jn,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Bt,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:jn,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:H5}),q$=Dc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Zr,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:Bt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:uc,g2:uc,glyphName:uc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Zr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zr,rev:Zr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zr,requiredFeatures:Zr,requiredFonts:Zr,requiredFormats:Zr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Zr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zr,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:W5}),G5=Dc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),K5=Dc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:H5}),J5=Dc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),I$={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},X$=/[A-Z]/g,OC=/-[a-z]/g,Z$=/^data[-\w.:]+$/i;function B$(e,t){const n=S0(t);let r=t,i=Ar;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Z$.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(OC,U$);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!OC.test(a)){let s=a.replace(X$,V$);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ox}return new i(r,t)}function V$(e){return"-"+e.toLowerCase()}function U$(e){return e.charAt(1).toUpperCase()}var Y$=F5([$5,z$,G5,K5,J5],"html"),bx=F5([$5,q$,G5,K5,J5],"svg");function F$(e){return e.join(" ").trim()}var $$=Ac(uZ(),1),eL=tL("end"),yx=tL("start");function tL(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function W$(e){const t=yx(e),n=eL(e);if(t&&n)return{start:t,end:n}}function Od(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bC(e.position):"start"in e||"end"in e?bC(e):"line"in e||"column"in e?_0(e):""}function _0(e){return yC(e&&e.line)+":"+yC(e&&e.column)}function bC(e){return _0(e&&e.start)+"-"+_0(e&&e.end)}function yC(e){return e&&typeof e=="number"?e:1}var sr=class extends Error{constructor(e,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof e=="string"?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?i.ruleId=n:(i.source=n.slice(0,l),i.ruleId=n.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=s?s.line:void 0,this.name=Od(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};sr.prototype.file="";sr.prototype.name="";sr.prototype.reason="";sr.prototype.message="";sr.prototype.stack="";sr.prototype.column=void 0;sr.prototype.line=void 0;sr.prototype.ancestors=void 0;sr.prototype.cause=void 0;sr.prototype.fatal=void 0;sr.prototype.place=void 0;sr.prototype.ruleId=void 0;sr.prototype.source=void 0;var Sx={}.hasOwnProperty,H$=new Map,G$=/[A-Z]/g,K$=new Set(["table","tbody","thead","tfoot","tr"]),J$=new Set(["td","th"]),nL="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function e8(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=l8(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=o8(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?bx:Y$,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=rL(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function rL(e,t,n){if(t.type==="element")return t8(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return n8(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return i8(e,t,n);if(t.type==="mdxjsEsm")return r8(e,t);if(t.type==="root")return a8(e,t,n);if(t.type==="text")return s8(e,t)}function t8(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=bx,e.schema=i),e.ancestors.push(t);const a=aL(e,t.tagName,!1),s=c8(e,t);let l=_x(e,t);return K$.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!L$(c):!0})),iL(e,s,a,t),xx(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function n8(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Vd(e,t.position)}function r8(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Vd(e,t.position)}function i8(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=bx,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:aL(e,t.name,!0),s=u8(e,t),l=_x(e,t);return iL(e,s,a,t),xx(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function a8(e,t,n){const r={};return xx(r,_x(e,t)),e.create(t,e.Fragment,r,n)}function s8(e,t){return t.value}function iL(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function xx(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function o8(e,t,n){return r;function r(i,a,s,l){const d=Array.isArray(s.children)?n:t;return l?d(a,s,l):d(a,s)}}function l8(e,t){return n;function n(r,i,a,s){const l=Array.isArray(a.children),c=yx(r);return t(i,a,s,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function c8(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Sx.call(t.properties,i)){const a=d8(e,i,t.properties[i]);if(a){const[s,l]=a;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&J$.has(t.tagName)?r=l:n[s]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function u8(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Vd(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Vd(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function _x(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:H$;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const d=i.get(c)||0;s=c+"-"+d,i.set(c,d+1)}}const l=rL(e,a,s);l!==void 0&&n.push(l)}return n}function d8(e,t,n){const r=B$(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Q$(n):F$(n)),r.property==="style"){let i=typeof n=="object"?n:f8(e,String(n));return e.stylePropertyNameCase==="css"&&(i=h8(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?I$[r.property]||r.property:r.attribute,n]}}function f8(e,t){try{return(0,$$.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new sr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=nL+"#cannot-parse-style-attribute",i}}function aL(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const l=pC(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=s}else r=pC(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Sx.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Vd(e)}function Vd(e,t){const n=new sr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=nL+"#cannot-handle-mdx-estrees-without-createevaluater",n}function h8(e){const t={};let n;for(n in e)Sx.call(e,n)&&(t[m8(n)]=e[n]);return t}function m8(e){let t=e.replace(G$,p8);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function p8(e){return"-"+e.toLowerCase()}var vb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},g8={};function wx(e,t){const n=g8,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return sL(e,r,i)}function sL(e,t,n){if(v8(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return SC(e.children,t,n)}return Array.isArray(e)?SC(e,t,n):""}function SC(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=sL(e[i],t,n);return r.join("")}function v8(e){return!!(e&&typeof e=="object")}var xC={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
128
|
+
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},O8={}.hasOwnProperty;function kx(e){return O8.call(xC,e)?xC[e]:!1}function Vr(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function ui(e,t){return e.length>0?(Vr(e,e.length,0,t),e):t}var _C={}.hasOwnProperty;function oL(e){const t={};let n=-1;for(;++n<e.length;)b8(t,e[n]);return t}function b8(e,t){let n;for(n in t){const i=(_C.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){_C.call(i,s)||(i[s]=[]);const l=a[s];y8(i[s],Array.isArray(l)?l:l?[l]:[])}}}function y8(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Vr(e,0,0,r)}function lL(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function qi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var hr=ro(/[A-Za-z]/),er=ro(/[\dA-Za-z]/),S8=ro(/[#-'*+\--9=?A-Z^-~]/);function mp(e){return e!==null&&(e<32||e===127)}var w0=ro(/\d/),x8=ro(/[\dA-Fa-f]/),_8=ro(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function Xt(e){return e!==null&&(e<0||e===32)}function nt(e){return e===-2||e===-1||e===32}var eg=ro(new RegExp("\\p{P}|\\p{S}","u")),Uo=ro(/\s/);function ro(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function zc(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&er(e.charCodeAt(n+1))&&er(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(s=String.fromCharCode(a,l),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function dt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(c){return nt(c)?(e.enter(n),l(c)):t(c)}function l(c){return nt(c)&&a++<i?(e.consume(c),l):(e.exit(n),t(c))}}var w8={tokenize:k8};function k8(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),dt(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Le(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),s)}}var j8={tokenize:T8},wC={tokenize:C8};function T8(e){const t=this,n=[];let r=0,i,a,s;return l;function l(T){if(r<n.length){const E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,c,d)(T)}return d(T)}function c(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&j();const E=t.events.length;let Q=E,A;for(;Q--;)if(t.events[Q][0]==="exit"&&t.events[Q][1].type==="chunkFlow"){A=t.events[Q][1].end;break}k(r);let N=E;for(;N<t.events.length;)t.events[N][1].end={...A},N++;return Vr(t.events,Q+1,0,t.events.slice(E)),t.events.length=N,d(T)}return l(T)}function d(T){if(r===n.length){if(!i)return p(T);if(i.currentConstruct&&i.currentConstruct.concrete)return b(T);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(wC,f,m)(T)}function f(T){return i&&j(),k(r),p(T)}function m(T){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(T)}function p(T){return t.containerState={},e.attempt(wC,O,b)(T)}function O(T){return r++,n.push([t.currentConstruct,t.containerState]),p(T)}function b(T){if(T===null){i&&j(),k(0),e.consume(T);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),S(T)}function S(T){if(T===null){w(e.exit("chunkFlow"),!0),k(0),e.consume(T);return}return Le(T)?(e.consume(T),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(T),S)}function w(T,E){const Q=t.sliceStream(T);if(E&&Q.push(null),T.previous=a,a&&(a.next=T),a=T,i.defineSkip(T.start),i.write(Q),t.parser.lazy[T.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<s&&(!i.events[A][1].end||i.events[A][1].end.offset>s))return;const N=t.events.length;let D=N,q,P;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(q){P=t.events[D][1].end;break}q=!0}for(k(r),A=N;A<t.events.length;)t.events[A][1].end={...P},A++;Vr(t.events,D+1,0,t.events.slice(N)),t.events.length=A}}function k(T){let E=n.length;for(;E-- >T;){const Q=n[E];t.containerState=Q[1],Q[0].exit.call(t,e)}n.length=T}function j(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function C8(e,t,n){return dt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wc(e){if(e===null||Xt(e)||Uo(e))return 1;if(eg(e))return 2}function tg(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var k0={name:"attention",resolveAll:E8,tokenize:A8};function E8(e,t){let n=-1,r,i,a,s,l,c,d,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},p={...e[n][1].start};kC(m,-c),kC(p,c),s={type:c>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=ui(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=ui(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),d=ui(d,tg(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=ui(d,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,d=ui(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Vr(e,r-1,n-r+3,d),n=r+d.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function A8(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=wc(r);let a;return s;function s(c){return a=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===a)return e.consume(c),l;const d=e.exit("attentionSequence"),f=wc(c),m=!f||f===2&&i||n.includes(c),p=!i||i===2&&f||n.includes(r);return d._open=!!(a===42?m:m&&(i||!p)),d._close=!!(a===42?p:p&&(f||!m)),t(c)}}function kC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Q8={name:"autolink",tokenize:P8};function P8(e,t,n){let r=0;return i;function i(O){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(O),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(O){return hr(O)?(e.consume(O),s):O===64?n(O):d(O)}function s(O){return O===43||O===45||O===46||er(O)?(r=1,l(O)):d(O)}function l(O){return O===58?(e.consume(O),r=0,c):(O===43||O===45||O===46||er(O))&&r++<32?(e.consume(O),l):(r=0,d(O))}function c(O){return O===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(O),e.exit("autolinkMarker"),e.exit("autolink"),t):O===null||O===32||O===60||mp(O)?n(O):(e.consume(O),c)}function d(O){return O===64?(e.consume(O),f):S8(O)?(e.consume(O),d):n(O)}function f(O){return er(O)?m(O):n(O)}function m(O){return O===46?(e.consume(O),r=0,f):O===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(O),e.exit("autolinkMarker"),e.exit("autolink"),t):p(O)}function p(O){if((O===45||er(O))&&r++<63){const b=O===45?p:m;return e.consume(O),b}return n(O)}}var Sf={partial:!0,tokenize:N8};function N8(e,t,n){return r;function r(a){return nt(a)?dt(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Le(a)?t(a):n(a)}}var cL={continuation:{tokenize:M8},exit:L8,name:"blockQuote",tokenize:R8};function R8(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return nt(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function M8(e,t,n){const r=this;return i;function i(s){return nt(s)?dt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(cL,t,n)(s)}}function L8(e){e.exit("blockQuote")}var uL={name:"characterEscape",tokenize:D8};function D8(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return _8(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}var dL={name:"characterReference",tokenize:z8};function z8(e,t,n){const r=this;let i=0,a,s;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),c}function c(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,s=er,f(m))}function d(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=x8,f):(e.enter("characterReferenceValue"),a=7,s=w0,f(m))}function f(m){if(m===59&&i){const p=e.exit("characterReferenceValue");return s===er&&!kx(r.sliceSerialize(p))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(m)&&i++<a?(e.consume(m),f):n(m)}}var jC={partial:!0,tokenize:I8},TC={concrete:!0,name:"codeFenced",tokenize:q8};function q8(e,t,n){const r=this,i={partial:!0,tokenize:Q};let a=0,s=0,l;return c;function c(A){return d(A)}function d(A){const N=r.events[r.events.length-1];return a=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,l=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(A)}function f(A){return A===l?(s++,e.consume(A),f):s<3?n(A):(e.exit("codeFencedFenceSequence"),nt(A)?dt(e,m,"whitespace")(A):m(A))}function m(A){return A===null||Le(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(jC,S,E)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||Le(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):nt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),dt(e,O,"whitespace")(A)):A===96&&A===l?n(A):(e.consume(A),p)}function O(A){return A===null||Le(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||Le(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===l?n(A):(e.consume(A),b)}function S(A){return e.attempt(i,E,w)(A)}function w(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),k}function k(A){return a>0&&nt(A)?dt(e,j,"linePrefix",a+1)(A):j(A)}function j(A){return A===null||Le(A)?e.check(jC,S,E)(A):(e.enter("codeFlowValue"),T(A))}function T(A){return A===null||Le(A)?(e.exit("codeFlowValue"),j(A)):(e.consume(A),T)}function E(A){return e.exit("codeFenced"),t(A)}function Q(A,N,D){let q=0;return P;function P(H){return A.enter("lineEnding"),A.consume(H),A.exit("lineEnding"),V}function V(H){return A.enter("codeFencedFence"),nt(H)?dt(A,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):Z(H)}function Z(H){return H===l?(A.enter("codeFencedFenceSequence"),Y(H)):D(H)}function Y(H){return H===l?(q++,A.consume(H),Y):q>=s?(A.exit("codeFencedFenceSequence"),nt(H)?dt(A,X,"whitespace")(H):X(H)):D(H)}function X(H){return H===null||Le(H)?(A.exit("codeFencedFence"),N(H)):D(H)}}}function I8(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}var Ob={name:"codeIndented",tokenize:Z8},X8={partial:!0,tokenize:B8};function Z8(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),dt(e,a,"linePrefix",5)(d)}function a(d){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?c(d):Le(d)?e.attempt(X8,s,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||Le(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),t(d)}}function B8(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Le(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):dt(e,a,"linePrefix",5)(s)}function a(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):Le(s)?i(s):n(s)}}var V8={name:"codeText",previous:Y8,resolve:U8,tokenize:F8};function U8(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Y8(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function F8(e,t,n){let r=0,i,a;return s;function s(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),c(m))}function c(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),c):m===96?(a=e.enter("codeTextSequence"),i=0,f(m)):Le(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||Le(m)?(e.exit("codeTextData"),c(m)):(e.consume(m),d)}function f(m){return m===96?(e.consume(m),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",d(m))}}var $8=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Yu(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Yu(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Yu(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Yu(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Yu(this.left,t.reverse())}}};function Yu(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function fL(e){const t={};let n=-1,r,i,a,s,l,c,d;const f=new $8(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,W8(f,n)),n=t[n],d=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=f.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},l=f.slice(i,n),l.unshift(r),f.splice(i,n-i+1,l))}}return Vr(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!d}function W8(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,c=[],d={};let f,m,p=-1,O=n,b=0,S=0;const w=[S];for(;O;){for(;e.get(++i)[1]!==O;);a.push(i),O._tokenizer||(f=r.sliceStream(O),O.next||f.push(null),m&&s.defineSkip(O.start),O._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),O._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),m=O,O=O.next}for(O=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(S=p+1,w.push(S),O._tokenizer=void 0,O.previous=void 0,O=O.next);for(s.events=[],O?(O._tokenizer=void 0,O.previous=void 0):w.pop(),p=w.length;p--;){const k=l.slice(w[p],w[p+1]),j=a.pop();c.push([j,j+k.length-1]),e.splice(j,2,k)}for(c.reverse(),p=-1;++p<c.length;)d[b+c[p][0]]=b+c[p][1],b+=c[p][1]-c[p][0]-1;return d}var H8={resolve:K8,tokenize:J8},G8={partial:!0,tokenize:eW};function K8(e){return fL(e),e}function J8(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):Le(l)?e.check(G8,s,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function eW(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),dt(e,a,"linePrefix")}function a(s){if(s===null||Le(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function hL(e,t,n,r,i,a,s,l,c){const d=c||Number.POSITIVE_INFINITY;let f=0;return m;function m(k){return k===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(k),e.exit(a),p):k===null||k===32||k===41||mp(k)?n(k):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),S(k))}function p(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),O(k))}function O(k){return k===62?(e.exit("chunkString"),e.exit(l),p(k)):k===null||k===60||Le(k)?n(k):(e.consume(k),k===92?b:O)}function b(k){return k===60||k===62||k===92?(e.consume(k),O):O(k)}function S(k){return!f&&(k===null||k===41||Xt(k))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(k)):f<d&&k===40?(e.consume(k),f++,S):k===41?(e.consume(k),f--,S):k===null||k===32||k===40||mp(k)?n(k):(e.consume(k),k===92?w:S)}function w(k){return k===40||k===41||k===92?(e.consume(k),S):S(k)}}function mL(e,t,n,r,i,a){const s=this;let l=0,c;return d;function d(O){return e.enter(r),e.enter(i),e.consume(O),e.exit(i),e.enter(a),f}function f(O){return l>999||O===null||O===91||O===93&&!c||O===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(O):O===93?(e.exit(a),e.enter(i),e.consume(O),e.exit(i),e.exit(r),t):Le(O)?(e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),m(O))}function m(O){return O===null||O===91||O===93||Le(O)||l++>999?(e.exit("chunkString"),f(O)):(e.consume(O),c||(c=!nt(O)),O===92?p:m)}function p(O){return O===91||O===92||O===93?(e.consume(O),l++,m):m(O)}}function pL(e,t,n,r,i,a){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,c):n(p)}function c(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),d(p))}function d(p){return p===s?(e.exit(a),c(s)):p===null?n(p):Le(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),dt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===s||p===null||Le(p)?(e.exit("chunkString"),d(p)):(e.consume(p),p===92?m:f)}function m(p){return p===s||p===92?(e.consume(p),f):f(p)}}function bd(e,t){let n;return r;function r(i){return Le(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):nt(i)?dt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var tW={name:"definition",tokenize:rW},nW={partial:!0,tokenize:iW};function rW(e,t,n){const r=this;let i;return a;function a(O){return e.enter("definition"),s(O)}function s(O){return mL.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(O)}function l(O){return i=qi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),O===58?(e.enter("definitionMarker"),e.consume(O),e.exit("definitionMarker"),c):n(O)}function c(O){return Xt(O)?bd(e,d)(O):d(O)}function d(O){return hL(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(O)}function f(O){return e.attempt(nW,m,m)(O)}function m(O){return nt(O)?dt(e,p,"whitespace")(O):p(O)}function p(O){return O===null||Le(O)?(e.exit("definition"),r.parser.defined.push(i),t(O)):n(O)}}function iW(e,t,n){return r;function r(l){return Xt(l)?bd(e,i)(l):n(l)}function i(l){return pL(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return nt(l)?dt(e,s,"whitespace")(l):s(l)}function s(l){return l===null||Le(l)?t(l):n(l)}}var aW={name:"hardBreakEscape",tokenize:sW};function sW(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}var oW={name:"headingAtx",resolve:lW,tokenize:cW};function lW(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Vr(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function cW(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||Xt(f)?(e.exit("atxHeadingSequence"),l(f)):n(f)}function l(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||Le(f)?(e.exit("atxHeading"),t(f)):nt(f)?dt(e,l,"whitespace")(f):(e.enter("atxHeadingText"),d(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),l(f))}function d(f){return f===null||f===35||Xt(f)?(e.exit("atxHeadingText"),l(f)):(e.consume(f),d)}}var uW=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],CC=["pre","script","style","textarea"],dW={concrete:!0,name:"htmlFlow",resolveTo:mW,tokenize:pW},fW={partial:!0,tokenize:vW},hW={partial:!0,tokenize:gW};function mW(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function pW(e,t,n){const r=this;let i,a,s,l,c;return d;function d(R){return f(R)}function f(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),m}function m(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),a=!0,S):R===63?(e.consume(R),i=3,r.interrupt?t:z):hr(R)?(e.consume(R),s=String.fromCharCode(R),w):n(R)}function p(R){return R===45?(e.consume(R),i=2,O):R===91?(e.consume(R),i=5,l=0,b):hr(R)?(e.consume(R),i=4,r.interrupt?t:z):n(R)}function O(R){return R===45?(e.consume(R),r.interrupt?t:z):n(R)}function b(R){const me="CDATA[";return R===me.charCodeAt(l++)?(e.consume(R),l===me.length?r.interrupt?t:Z:b):n(R)}function S(R){return hr(R)?(e.consume(R),s=String.fromCharCode(R),w):n(R)}function w(R){if(R===null||R===47||R===62||Xt(R)){const me=R===47,Se=s.toLowerCase();return!me&&!a&&CC.includes(Se)?(i=1,r.interrupt?t(R):Z(R)):uW.includes(s.toLowerCase())?(i=6,me?(e.consume(R),k):r.interrupt?t(R):Z(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):a?j(R):T(R))}return R===45||er(R)?(e.consume(R),s+=String.fromCharCode(R),w):n(R)}function k(R){return R===62?(e.consume(R),r.interrupt?t:Z):n(R)}function j(R){return nt(R)?(e.consume(R),j):P(R)}function T(R){return R===47?(e.consume(R),P):R===58||R===95||hr(R)?(e.consume(R),E):nt(R)?(e.consume(R),T):P(R)}function E(R){return R===45||R===46||R===58||R===95||er(R)?(e.consume(R),E):Q(R)}function Q(R){return R===61?(e.consume(R),A):nt(R)?(e.consume(R),Q):T(R)}function A(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),c=R,N):nt(R)?(e.consume(R),A):D(R)}function N(R){return R===c?(e.consume(R),c=null,q):R===null||Le(R)?n(R):(e.consume(R),N)}function D(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Xt(R)?Q(R):(e.consume(R),D)}function q(R){return R===47||R===62||nt(R)?T(R):n(R)}function P(R){return R===62?(e.consume(R),V):n(R)}function V(R){return R===null||Le(R)?Z(R):nt(R)?(e.consume(R),V):n(R)}function Z(R){return R===45&&i===2?(e.consume(R),I):R===60&&i===1?(e.consume(R),L):R===62&&i===4?(e.consume(R),G):R===63&&i===3?(e.consume(R),z):R===93&&i===5?(e.consume(R),ne):Le(R)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(fW,re,Y)(R)):R===null||Le(R)?(e.exit("htmlFlowData"),Y(R)):(e.consume(R),Z)}function Y(R){return e.check(hW,X,re)(R)}function X(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),H}function H(R){return R===null||Le(R)?Y(R):(e.enter("htmlFlowData"),Z(R))}function I(R){return R===45?(e.consume(R),z):Z(R)}function L(R){return R===47?(e.consume(R),s="",$):Z(R)}function $(R){if(R===62){const me=s.toLowerCase();return CC.includes(me)?(e.consume(R),G):Z(R)}return hr(R)&&s.length<8?(e.consume(R),s+=String.fromCharCode(R),$):Z(R)}function ne(R){return R===93?(e.consume(R),z):Z(R)}function z(R){return R===62?(e.consume(R),G):R===45&&i===2?(e.consume(R),z):Z(R)}function G(R){return R===null||Le(R)?(e.exit("htmlFlowData"),re(R)):(e.consume(R),G)}function re(R){return e.exit("htmlFlow"),t(R)}}function gW(e,t,n){const r=this;return i;function i(s){return Le(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function vW(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Sf,t,n)}}var OW={name:"htmlText",tokenize:bW};function bW(e,t,n){const r=this;let i,a,s;return l;function l(z){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(z),c}function c(z){return z===33?(e.consume(z),d):z===47?(e.consume(z),Q):z===63?(e.consume(z),T):hr(z)?(e.consume(z),D):n(z)}function d(z){return z===45?(e.consume(z),f):z===91?(e.consume(z),a=0,b):hr(z)?(e.consume(z),j):n(z)}function f(z){return z===45?(e.consume(z),O):n(z)}function m(z){return z===null?n(z):z===45?(e.consume(z),p):Le(z)?(s=m,L(z)):(e.consume(z),m)}function p(z){return z===45?(e.consume(z),O):m(z)}function O(z){return z===62?I(z):z===45?p(z):m(z)}function b(z){const G="CDATA[";return z===G.charCodeAt(a++)?(e.consume(z),a===G.length?S:b):n(z)}function S(z){return z===null?n(z):z===93?(e.consume(z),w):Le(z)?(s=S,L(z)):(e.consume(z),S)}function w(z){return z===93?(e.consume(z),k):S(z)}function k(z){return z===62?I(z):z===93?(e.consume(z),k):S(z)}function j(z){return z===null||z===62?I(z):Le(z)?(s=j,L(z)):(e.consume(z),j)}function T(z){return z===null?n(z):z===63?(e.consume(z),E):Le(z)?(s=T,L(z)):(e.consume(z),T)}function E(z){return z===62?I(z):T(z)}function Q(z){return hr(z)?(e.consume(z),A):n(z)}function A(z){return z===45||er(z)?(e.consume(z),A):N(z)}function N(z){return Le(z)?(s=N,L(z)):nt(z)?(e.consume(z),N):I(z)}function D(z){return z===45||er(z)?(e.consume(z),D):z===47||z===62||Xt(z)?q(z):n(z)}function q(z){return z===47?(e.consume(z),I):z===58||z===95||hr(z)?(e.consume(z),P):Le(z)?(s=q,L(z)):nt(z)?(e.consume(z),q):I(z)}function P(z){return z===45||z===46||z===58||z===95||er(z)?(e.consume(z),P):V(z)}function V(z){return z===61?(e.consume(z),Z):Le(z)?(s=V,L(z)):nt(z)?(e.consume(z),V):q(z)}function Z(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),i=z,Y):Le(z)?(s=Z,L(z)):nt(z)?(e.consume(z),Z):(e.consume(z),X)}function Y(z){return z===i?(e.consume(z),i=void 0,H):z===null?n(z):Le(z)?(s=Y,L(z)):(e.consume(z),Y)}function X(z){return z===null||z===34||z===39||z===60||z===61||z===96?n(z):z===47||z===62||Xt(z)?q(z):(e.consume(z),X)}function H(z){return z===47||z===62||Xt(z)?q(z):n(z)}function I(z){return z===62?(e.consume(z),e.exit("htmlTextData"),e.exit("htmlText"),t):n(z)}function L(z){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),$}function $(z){return nt(z)?dt(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):ne(z)}function ne(z){return e.enter("htmlTextData"),s(z)}}var jx={name:"labelEnd",resolveAll:_W,resolveTo:wW,tokenize:kW},yW={tokenize:jW},SW={tokenize:TW},xW={tokenize:CW};function _W(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Vr(e,0,e.length,n),e}function wW(e,t){let n=e.length,r=0,i,a,s,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",c,t],["enter",d,t]],l=ui(l,e.slice(a+1,a+r+3)),l=ui(l,[["enter",f,t]]),l=ui(l,tg(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),l=ui(l,[["exit",f,t],e[s-2],e[s-1],["exit",d,t]]),l=ui(l,e.slice(s+1)),l=ui(l,[["exit",c,t]]),Vr(e,a,e.length,l),e}function kW(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(p){return a?a._inactive?m(p):(s=r.parser.defined.includes(qi(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(yW,f,s?f:m)(p):p===91?e.attempt(SW,f,s?d:m)(p):s?f(p):m(p)}function d(p){return e.attempt(xW,f,m)(p)}function f(p){return t(p)}function m(p){return a._balanced=!0,n(p)}}function jW(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),i}function i(m){return Xt(m)?bd(e,a)(m):a(m)}function a(m){return m===41?f(m):hL(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function s(m){return Xt(m)?bd(e,c)(m):f(m)}function l(m){return n(m)}function c(m){return m===34||m===39||m===40?pL(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):f(m)}function d(m){return Xt(m)?bd(e,f)(m):f(m)}function f(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function TW(e,t,n){const r=this;return i;function i(l){return mL.call(r,e,a,s,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(qi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function CW(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}var EW={name:"labelStartImage",resolveAll:jx.resolveAll,tokenize:AW};function AW(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}var QW={name:"labelStartLink",resolveAll:jx.resolveAll,tokenize:PW};function PW(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}var bb={name:"lineEnding",tokenize:NW};function NW(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),dt(e,t,"linePrefix")}}var Im={name:"thematicBreak",tokenize:RW};function RW(e,t,n){let r=0,i;return a;function a(d){return e.enter("thematicBreak"),s(d)}function s(d){return i=d,l(d)}function l(d){return d===i?(e.enter("thematicBreakSequence"),c(d)):r>=3&&(d===null||Le(d))?(e.exit("thematicBreak"),t(d)):n(d)}function c(d){return d===i?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),nt(d)?dt(e,l,"whitespace")(d):l(d))}}var wr={continuation:{tokenize:zW},exit:IW,name:"list",tokenize:DW},MW={partial:!0,tokenize:XW},LW={partial:!0,tokenize:qW};function DW(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(O){const b=r.containerState.type||(O===42||O===43||O===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||O===r.containerState.marker:w0(O)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),O===42||O===45?e.check(Im,n,d)(O):d(O);if(!r.interrupt||O===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(O)}return n(O)}function c(O){return w0(O)&&++s<10?(e.consume(O),c):(!r.interrupt||s<2)&&(r.containerState.marker?O===r.containerState.marker:O===41||O===46)?(e.exit("listItemValue"),d(O)):n(O)}function d(O){return e.enter("listItemMarker"),e.consume(O),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||O,e.check(Sf,r.interrupt?n:f,e.attempt(MW,p,m))}function f(O){return r.containerState.initialBlankLine=!0,a++,p(O)}function m(O){return nt(O)?(e.enter("listItemPrefixWhitespace"),e.consume(O),e.exit("listItemPrefixWhitespace"),p):n(O)}function p(O){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(O)}}function zW(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Sf,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,dt(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!nt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(LW,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,dt(e,e.attempt(wr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function qW(e,t,n){const r=this;return dt(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function IW(e){e.exit(this.containerState.type)}function XW(e,t,n){const r=this;return dt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!nt(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}var EC={name:"setextUnderline",resolveTo:ZW,tokenize:BW};function ZW(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function BW(e,t,n){const r=this;let i;return a;function a(d){let f=r.events.length,m;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){m=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),i=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===i?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),nt(d)?dt(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||Le(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}var VW={tokenize:UW};function UW(e){const t=this,n=e.attempt(Sf,r,e.attempt(this.parser.constructs.flowInitial,i,dt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(H8,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var YW={resolveAll:vL()},FW=gL("string"),$W=gL("text");function gL(e){return{resolveAll:vL(e==="text"?WW:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,l);return s;function s(f){return d(f)?a(f):l(f)}function l(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),c}function c(f){return d(f)?(n.exit("data"),a(f)):(n.consume(f),c)}function d(f){if(f===null)return!0;const m=i[f];let p=-1;if(m)for(;++p<m.length;){const O=m[p];if(!O.previous||O.previous.call(r,r.previous))return!0}return!1}}}function vL(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function WW(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,l=0,c;for(;a--;){const d=i[a];if(typeof d=="string"){for(s=d.length;d.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(d===-2)c=!0,l++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const d={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}var OL={};PA(OL,{attentionMarkers:()=>rH,contentInitial:()=>GW,disable:()=>iH,document:()=>HW,flow:()=>JW,flowInitial:()=>KW,insideSpan:()=>nH,string:()=>eH,text:()=>tH});var HW={42:wr,43:wr,45:wr,48:wr,49:wr,50:wr,51:wr,52:wr,53:wr,54:wr,55:wr,56:wr,57:wr,62:cL},GW={91:tW},KW={[-2]:Ob,[-1]:Ob,32:Ob},JW={35:oW,42:Im,45:[EC,Im],60:dW,61:EC,95:Im,96:TC,126:TC},eH={38:dL,92:uL},tH={[-5]:bb,[-4]:bb,[-3]:bb,33:EW,38:dL,42:k0,60:[Q8,OW],91:QW,92:[aW,uL],93:jx,95:k0,96:V8},nH={null:[k0,YW]},rH={null:[42,95]},iH={null:[]};function aH(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],l=[];const c={attempt:N(Q),check:N(A),consume:j,enter:T,exit:E,interrupt:N(A,{interrupt:!0})},d={code:null,containerState:{},defineSkip:S,events:[],now:b,parser:e,previous:null,sliceSerialize:p,sliceStream:O,write:m};let f=t.tokenize.call(d,c);return t.resolveAll&&a.push(t),d;function m(V){return s=ui(s,V),w(),s[s.length-1]!==null?[]:(D(t,0),d.events=tg(a,d.events,d),d.events)}function p(V,Z){return oH(O(V),Z)}function O(V){return sH(s,V)}function b(){const{_bufferIndex:V,_index:Z,line:Y,column:X,offset:H}=r;return{_bufferIndex:V,_index:Z,line:Y,column:X,offset:H}}function S(V){i[V.line]=V.column,P()}function w(){let V;for(;r._index<s.length;){const Z=s[r._index];if(typeof Z=="string")for(V=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===V&&r._bufferIndex<Z.length;)k(Z.charCodeAt(r._bufferIndex));else k(Z)}}function k(V){f=f(V)}function j(V){Le(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,P()):V!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=V}function T(V,Z){const Y=Z||{};return Y.type=V,Y.start=b(),d.events.push(["enter",Y,d]),l.push(Y),Y}function E(V){const Z=l.pop();return Z.end=b(),d.events.push(["exit",Z,d]),Z}function Q(V,Z){D(V,Z.from)}function A(V,Z){Z.restore()}function N(V,Z){return Y;function Y(X,H,I){let L,$,ne,z;return Array.isArray(X)?re(X):"tokenize"in X?re([X]):G(X);function G(ve){return Xe;function Xe(qe){const Pe=qe!==null&&ve[qe],Oe=qe!==null&&ve.null,Ve=[...Array.isArray(Pe)?Pe:Pe?[Pe]:[],...Array.isArray(Oe)?Oe:Oe?[Oe]:[]];return re(Ve)(qe)}}function re(ve){return L=ve,$=0,ve.length===0?I:R(ve[$])}function R(ve){return Xe;function Xe(qe){return z=q(),ne=ve,ve.partial||(d.currentConstruct=ve),ve.name&&d.parser.constructs.disable.null.includes(ve.name)?Se():ve.tokenize.call(Z?Object.assign(Object.create(d),Z):d,c,me,Se)(qe)}}function me(ve){return V(ne,z),H}function Se(ve){return z.restore(),++$<L.length?R(L[$]):I}}}function D(V,Z){V.resolveAll&&!a.includes(V)&&a.push(V),V.resolve&&Vr(d.events,Z,d.events.length-Z,V.resolve(d.events.slice(Z),d)),V.resolveTo&&(d.events=V.resolveTo(d.events,d))}function q(){const V=b(),Z=d.previous,Y=d.currentConstruct,X=d.events.length,H=Array.from(l);return{from:X,restore:I};function I(){r=V,d.previous=Z,d.currentConstruct=Y,d.events.length=X,l=H,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function sH(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function oH(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
129
|
+
`;break}case-3:{s=`\r
|
|
130
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function lH(e){const r={constructs:oL([OL,...(e||{}).extensions||[]]),content:i(w8),defined:[],document:i(j8),flow:i(VW),lazy:{},string:i(FW),text:i($W)};return r;function i(a){return s;function s(l){return aH(r,a,l)}}}function cH(e){for(;!fL(e););return e}var AC=/[\0\t\n\r]/g;function uH(){let e=1,t="",n=!0,r;return i;function i(a,s,l){const c=[];let d,f,m,p,O;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(AC.lastIndex=m,d=AC.exec(a),p=d&&d.index!==void 0?d.index:a.length,O=a.charCodeAt(p),!d){t=a.slice(m);break}if(O===10&&m===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),m<p&&(c.push(a.slice(m,p)),e+=p-m),O){case 0:{c.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,c.push(-2);e++<f;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}m=p+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}var dH=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fH(e){return e.replace(dH,hH)}function hH(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return lL(n.slice(a?2:1),a?16:10)}return kx(n)||e}var bL={}.hasOwnProperty;function mH(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),pH(n)(cH(lH(n).document().write(uH()(e,t,!0))))}function pH(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(de),autolinkProtocol:q,autolinkEmail:q,atxHeading:a(ft),blockQuote:a(Oe),characterEscape:q,characterReference:q,codeFenced:a(Ve),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Ve,s),codeText:a(we,s),codeTextData:q,data:q,codeFlowValue:q,definition:a(Ze),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Fe),hardBreakEscape:a(Rt),hardBreakTrailing:a(Rt),htmlFlow:a(mn,s),htmlFlowData:q,htmlText:a(mn,s),htmlTextData:q,image:a(ke),label:s,link:a(de),listItem:a(ht),listItemValue:p,listOrdered:a(Ue,m),listUnordered:a(Ue),paragraph:a(Tt),reference:R,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(ft),strong:a(Ot),thematicBreak:a(Si)},exit:{atxHeading:c(),atxHeadingSequence:Q,autolink:c(),autolinkEmail:Pe,autolinkProtocol:qe,blockQuote:c(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:ve,characterReference:Xe,codeFenced:c(w),codeFencedFence:S,codeFencedFenceInfo:O,codeFencedFenceMeta:b,codeFlowValue:P,codeIndented:c(k),codeText:c(H),codeTextData:P,data:P,definition:c(),definitionDestinationString:E,definitionLabelString:j,definitionTitleString:T,emphasis:c(),hardBreakEscape:c(Z),hardBreakTrailing:c(Z),htmlFlow:c(Y),htmlFlowData:P,htmlText:c(X),htmlTextData:P,image:c(L),label:ne,labelText:$,lineEnding:V,link:c(I),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:me,resourceDestinationString:z,resourceTitleString:G,resource:re,setextHeading:c(D),setextHeadingLineSequence:N,setextHeadingText:A,strong:c(),thematicBreak:c()}};yL(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ae){let fe={type:"root",children:[]};const je={stack:[fe],tokenStack:[],config:t,enter:l,exit:d,buffer:s,resume:f,data:n},Be=[];let Je=-1;for(;++Je<ae.length;)if(ae[Je][1].type==="listOrdered"||ae[Je][1].type==="listUnordered")if(ae[Je][0]==="enter")Be.push(Je);else{const Ct=Be.pop();Je=i(ae,Ct,Je)}for(Je=-1;++Je<ae.length;){const Ct=t[ae[Je][0]];bL.call(Ct,ae[Je][1].type)&&Ct[ae[Je][1].type].call(Object.assign({sliceSerialize:ae[Je][2].sliceSerialize},je),ae[Je][1])}if(je.tokenStack.length>0){const Ct=je.tokenStack[je.tokenStack.length-1];(Ct[1]||QC).call(je,void 0,Ct[0])}for(fe.position={start:As(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:As(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<t.transforms.length;)fe=t.transforms[Je](fe)||fe;return fe}function i(ae,fe,je){let Be=fe-1,Je=-1,Ct=!1,un,Ht,Mt,Gt;for(;++Be<=je;){const rt=ae[Be];switch(rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{rt[0]==="enter"?Je++:Je--,Gt=void 0;break}case"lineEndingBlank":{rt[0]==="enter"&&(un&&!Gt&&!Je&&!Mt&&(Mt=Be),Gt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Gt=void 0}if(!Je&&rt[0]==="enter"&&rt[1].type==="listItemPrefix"||Je===-1&&rt[0]==="exit"&&(rt[1].type==="listUnordered"||rt[1].type==="listOrdered")){if(un){let Wn=Be;for(Ht=void 0;Wn--;){const pn=ae[Wn];if(pn[1].type==="lineEnding"||pn[1].type==="lineEndingBlank"){if(pn[0]==="exit")continue;Ht&&(ae[Ht][1].type="lineEndingBlank",Ct=!0),pn[1].type="lineEnding",Ht=Wn}else if(!(pn[1].type==="linePrefix"||pn[1].type==="blockQuotePrefix"||pn[1].type==="blockQuotePrefixWhitespace"||pn[1].type==="blockQuoteMarker"||pn[1].type==="listItemIndent"))break}Mt&&(!Ht||Mt<Ht)&&(un._spread=!0),un.end=Object.assign({},Ht?ae[Ht][1].start:rt[1].end),ae.splice(Ht||Be,0,["exit",un,rt[2]]),Be++,je++}if(rt[1].type==="listItemPrefix"){const Wn={type:"listItem",_spread:!1,start:Object.assign({},rt[1].start),end:void 0};un=Wn,ae.splice(Be,0,["enter",Wn,rt[2]]),Be++,je++,Mt=void 0,Gt=!0}}}return ae[fe][1]._spread=Ct,je}function a(ae,fe){return je;function je(Be){l.call(this,ae(Be),Be),fe&&fe.call(this,Be)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(ae,fe,je){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([fe,je||void 0]),ae.position={start:As(fe.start),end:void 0}}function c(ae){return fe;function fe(je){ae&&ae.call(this,je),d.call(this,je)}}function d(ae,fe){const je=this.stack.pop(),Be=this.tokenStack.pop();if(Be)Be[0].type!==ae.type&&(fe?fe.call(this,ae,Be[0]):(Be[1]||QC).call(this,ae,Be[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Od({start:ae.start,end:ae.end})+"): it’s not open");je.position.end=As(ae.end)}function f(){return wx(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function p(ae){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function O(){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=ae}function b(){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=ae}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ae.replace(/(\r?\n|\r)$/g,"")}function j(ae){const fe=this.resume(),je=this.stack[this.stack.length-1];je.label=fe,je.identifier=qi(this.sliceSerialize(ae)).toLowerCase()}function T(){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ae}function E(){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ae}function Q(ae){const fe=this.stack[this.stack.length-1];if(!fe.depth){const je=this.sliceSerialize(ae).length;fe.depth=je}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function N(ae){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function q(ae){const je=this.stack[this.stack.length-1].children;let Be=je[je.length-1];(!Be||Be.type!=="text")&&(Be=bt(),Be.position={start:As(ae.start),end:void 0},je.push(Be)),this.stack.push(Be)}function P(ae){const fe=this.stack.pop();fe.value+=this.sliceSerialize(ae),fe.position.end=As(ae.end)}function V(ae){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const je=fe.children[fe.children.length-1];je.position.end=As(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(q.call(this,ae),P.call(this,ae))}function Z(){this.data.atHardBreak=!0}function Y(){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ae}function X(){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ae}function H(){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ae}function I(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=fe,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function L(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=fe,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function $(ae){const fe=this.sliceSerialize(ae),je=this.stack[this.stack.length-2];je.label=fH(fe),je.identifier=qi(fe).toLowerCase()}function ne(){const ae=this.stack[this.stack.length-1],fe=this.resume(),je=this.stack[this.stack.length-1];if(this.data.inReference=!0,je.type==="link"){const Be=ae.children;je.children=Be}else je.alt=fe}function z(){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ae}function G(){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ae}function re(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function me(ae){const fe=this.resume(),je=this.stack[this.stack.length-1];je.label=fe,je.identifier=qi(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function Se(ae){this.data.characterReferenceType=ae.type}function ve(ae){const fe=this.sliceSerialize(ae),je=this.data.characterReferenceType;let Be;je?(Be=lL(fe,je==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=kx(fe);const Je=this.stack[this.stack.length-1];Je.value+=Be}function Xe(ae){const fe=this.stack.pop();fe.position.end=As(ae.end)}function qe(ae){P.call(this,ae);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ae)}function Pe(ae){P.call(this,ae);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(ae)}function Oe(){return{type:"blockquote",children:[]}}function Ve(){return{type:"code",lang:null,meta:null,value:""}}function we(){return{type:"inlineCode",value:""}}function Ze(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Fe(){return{type:"emphasis",children:[]}}function ft(){return{type:"heading",depth:0,children:[]}}function Rt(){return{type:"break"}}function mn(){return{type:"html",value:""}}function ke(){return{type:"image",title:null,url:"",alt:null}}function de(){return{type:"link",title:null,url:"",children:[]}}function Ue(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function ht(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function Tt(){return{type:"paragraph",children:[]}}function Ot(){return{type:"strong",children:[]}}function bt(){return{type:"text",value:""}}function Si(){return{type:"thematicBreak"}}}function As(e){return{line:e.line,column:e.column,offset:e.offset}}function yL(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?yL(e,r):gH(e,r)}}function gH(e,t){let n;for(n in t)if(bL.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function QC(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Od({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Od({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Od({start:t.start,end:t.end})+") is still open")}function vH(e){const t=this;t.parser=n;function n(r){return mH(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function OH(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function bH(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
131
|
+
`}]}function yH(e,t){const n=t.value?t.value+`
|
|
132
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function SH(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xH(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _H(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=zc(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,d),e.applyData(t,d)}function wH(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kH(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function SL(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function jH(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return SL(e,t);const i={src:zc(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function TH(e,t){const n={src:zc(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function CH(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function EH(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return SL(e,t);const i={href:zc(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function AH(e,t){const n={href:zc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function QH(e,t,n){const r=e.all(t),i=n?PH(n):xL(t),a={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let m;f&&f.type==="element"&&f.tagName==="p"?m=f:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const f=r[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
|
|
133
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
|
|
134
|
+
`});const d={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,d),e.applyData(t,d)}function PH(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=xL(n[r])}return t}function xL(e){const t=e.spread;return t??e.children.length>1}function NH(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function RH(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MH(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function LH(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DH(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=yx(t.children[1]),c=eL(t.children[t.children.length-1]);l&&c&&(s.position={start:l,end:c}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function zH(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let c=-1;const d=[];for(;++c<l;){const m=t.children[c],p={},O=s?s[c]:void 0;O&&(p.align=O);let b={type:"element",tagName:a,properties:p,children:[]};m&&(b.children=e.all(m),e.patch(m,b),b=e.applyData(m,b)),d.push(b)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,f),e.applyData(t,f)}function qH(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var PC=9,NC=32;function IH(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(RC(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(RC(t.slice(i),i>0,!1)),a.join("")}function RC(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===PC||a===NC;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===PC||a===NC;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function XH(e,t){const n={type:"text",value:IH(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ZH(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var BH={blockquote:OH,break:bH,code:yH,delete:SH,emphasis:xH,footnoteReference:_H,heading:wH,html:kH,imageReference:jH,image:TH,inlineCode:CH,linkReference:EH,link:AH,listItem:QH,list:NH,paragraph:RH,root:MH,strong:LH,table:DH,tableCell:qH,tableRow:zH,text:XH,thematicBreak:ZH,toml:pm,yaml:pm,definition:pm,footnoteDefinition:pm};function pm(){}var _L=-1,ng=0,yd=1,pp=2,Tx=3,Cx=4,Ex=5,Ax=6,wL=7,kL=8,MC=typeof self=="object"?self:globalThis,VH=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case ng:case _L:return n(s,i);case yd:{const l=n([],i);for(const c of s)l.push(r(c));return l}case pp:{const l=n({},i);for(const[c,d]of s)l[r(c)]=r(d);return l}case Tx:return n(new Date(s),i);case Cx:{const{source:l,flags:c}=s;return n(new RegExp(l,c),i)}case Ex:{const l=n(new Map,i);for(const[c,d]of s)l.set(r(c),r(d));return l}case Ax:{const l=n(new Set,i);for(const c of s)l.add(r(c));return l}case wL:{const{name:l,message:c}=s;return n(new MC[l](c),i)}case kL:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new MC[a](s),i)};return r},LC=e=>VH(new Map,e)(0),Fl="",{toString:UH}={},{keys:YH}=Object,Fu=e=>{const t=typeof e;if(t!=="object"||!e)return[ng,t];const n=UH.call(e).slice(8,-1);switch(n){case"Array":return[yd,Fl];case"Object":return[pp,Fl];case"Date":return[Tx,Fl];case"RegExp":return[Cx,Fl];case"Map":return[Ex,Fl];case"Set":return[Ax,Fl];case"DataView":return[yd,n]}return n.includes("Array")?[yd,n]:n.includes("Error")?[wL,n]:[pp,n]},gm=([e,t])=>e===ng&&(t==="function"||t==="symbol"),FH=(e,t,n,r)=>{const i=(s,l)=>{const c=r.push(s)-1;return n.set(l,c),c},a=s=>{if(n.has(s))return n.get(s);let[l,c]=Fu(s);switch(l){case ng:{let f=s;switch(c){case"bigint":l=kL,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([_L],s)}return i([l,f],s)}case yd:{if(c){let p=s;return c==="DataView"?p=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(s)),i([c,[...p]],s)}const f=[],m=i([l,f],s);for(const p of s)f.push(a(p));return m}case pp:{if(c)switch(c){case"BigInt":return i([c,s.toString()],s);case"Boolean":case"Number":case"String":return i([c,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const f=[],m=i([l,f],s);for(const p of YH(s))(e||!gm(Fu(s[p])))&&f.push([a(p),a(s[p])]);return m}case Tx:return i([l,s.toISOString()],s);case Cx:{const{source:f,flags:m}=s;return i([l,{source:f,flags:m}],s)}case Ex:{const f=[],m=i([l,f],s);for(const[p,O]of s)(e||!(gm(Fu(p))||gm(Fu(O))))&&f.push([a(p),a(O)]);return m}case Ax:{const f=[],m=i([l,f],s);for(const p of s)(e||!gm(Fu(p)))&&f.push(a(p));return m}}const{message:d}=s;return i([l,{name:c,message:d}],s)};return a},DC=(e,{json:t,lossy:n}={})=>{const r=[];return FH(!(t||n),!!t,new Map,r)(e),r},gp=typeof structuredClone=="function"?((e,t)=>t&&("json"in t||"lossy"in t)?LC(DC(e,t)):structuredClone(e)):(e,t)=>LC(DC(e,t));function $H(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function WH(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function HH(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||$H,r=e.options.footnoteBackLabel||WH,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[c]);if(!d)continue;const f=e.all(d),m=String(d.identifier).toUpperCase(),p=zc(m.toLowerCase());let O=0;const b=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++O<=S;){b.length>0&&b.push({type:"text",value:" "});let j=typeof n=="string"?n:n(c,O);typeof j=="string"&&(j={type:"text",value:j}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(O>1?"-"+O:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,O),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const j=w.children[w.children.length-1];j&&j.type==="text"?j.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...b)}else f.push(...b);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(d,k),l.push(k)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...gp(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
135
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
136
|
+
`}]}}var rg=(function(e){if(e==null)return e4;if(typeof e=="function")return ig(e);if(typeof e=="object")return Array.isArray(e)?GH(e):KH(e);if(typeof e=="string")return JH(e);throw new Error("Expected function, string, or object as test")});function GH(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rg(e[n]);return ig(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function KH(e){const t=e;return ig(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function JH(e){return ig(t);function t(n){return n&&n.type===e}}function ig(e){return t;function t(n,r,i){return!!(t4(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function e4(){return!0}function t4(e){return e!==null&&typeof e=="object"&&"type"in e}function n4(e){return"\x1B[33m"+e+"\x1B[39m"}var jL=[],r4=!0,j0=!1,i4="skip";function TL(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=rg(i),s=r?-1:1;l(e,void 0,[])();function l(c,d,f){const m=c&&typeof c=="object"?c:{};if(typeof m.type=="string"){const O=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(p,"name",{value:"node ("+n4(c.type+(O?"<"+O+">":""))+")"})}return p;function p(){let O=jL,b,S,w;if((!t||a(c,d,f[f.length-1]||void 0))&&(O=a4(n(c,f)),O[0]===j0))return O;if("children"in c&&c.children){const k=c;if(k.children&&O[0]!==i4)for(S=(r?k.children.length:-1)+s,w=f.concat(k);S>-1&&S<k.children.length;){const j=k.children[S];if(b=l(j,S,w)(),b[0]===j0)return b;S=typeof b[1]=="number"?b[1]:S+s}}return O}}}function a4(e){return Array.isArray(e)?e:typeof e=="number"?[r4,e]:e==null?jL:[e]}function Qx(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),TL(e,a,l,i);function l(c,d){const f=d[d.length-1],m=f?f.children.indexOf(c):void 0;return s(c,m,f)}}var T0={}.hasOwnProperty,s4={};function o4(e,t){const n=t||s4,r=new Map,i=new Map,a=new Map,s={...BH,...n.handlers},l={all:d,applyData:c4,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:c,options:n,patch:l4,wrap:d4};return Qx(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const m=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();m.has(p)||m.set(p,f)}}),l;function c(f,m){const p=f.type,O=l.handlers[p];if(T0.call(l.handlers,p)&&O)return O(l,f,m);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in f){const{children:S,...w}=f,k=gp(w);return k.children=l.all(f),k}return gp(f)}return(l.options.unknownHandler||u4)(l,f,m)}function d(f){const m=[];if("children"in f){const p=f.children;let O=-1;for(;++O<p.length;){const b=l.one(p[O],f);if(b){if(O&&p[O-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=zC(b.value)),!Array.isArray(b)&&b.type==="element")){const S=b.children[0];S&&S.type==="text"&&(S.value=zC(S.value))}Array.isArray(b)?m.push(...b):m.push(b)}}}return m}}function l4(e,t){e.position&&(t.position=W$(e))}function c4(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,gp(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function u4(e,t){const n=t.data||{},r="value"in t&&!(T0.call(n,"hProperties")||T0.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function d4(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
137
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
138
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
139
|
+
`}),n}function zC(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qC(e,t){const n=o4(e,t),r=n.one(e,void 0),i=HH(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
140
|
+
`},i),a}function f4(e,t){return e&&"run"in e?async function(n,r){const i=qC(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qC(n,{file:r,...e||t})}}function IC(e){if(e)throw e}var yb=Ac(dZ(),1);function C0(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function h4(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(c,...d){const f=e[++a];let m=-1;if(c){s(c);return}for(;++m<i.length;)(d[m]===null||d[m]===void 0)&&(d[m]=i[m]);i=d,f?m4(f,l)(...d):s(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function m4(e,t){let n;return r;function r(...s){const l=e.length>s.length;let c;l&&s.push(i);try{c=e.apply(this,s)}catch(d){const f=d;if(l&&n)throw f;return i(f)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(s,...l){n||(n=!0,t(s,...l))}function a(s){i(null,s)}}function XC(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var Sb=["history","path","basename","stem","extname","dirname"],CL=class{constructor(e){let t;e?XC(e)?t={path:e}:typeof e=="string"||p4(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":vX.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Sb.length;){const i=Sb[n];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let r;for(r in t)Sb.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path=="string"?ia.basename(this.path):void 0}set basename(e){_b(e,"basename"),xb(e,"basename"),this.path=ia.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ia.dirname(this.path):void 0}set dirname(e){ZC(this.basename,"dirname"),this.path=ia.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ia.extname(this.path):void 0}set extname(e){if(xb(e,"extname"),ZC(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ia.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){XC(e)&&(e=OX(e)),_b(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ia.basename(this.path,this.extname):void 0}set stem(e){_b(e,"stem"),xb(e,"stem"),this.path=ia.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new sr(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function xb(e,t){if(e&&e.includes(ia.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ia.sep+"`")}function _b(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ZC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function p4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var g4=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),v4={}.hasOwnProperty,O4=class EL extends g4{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=h4()}copy(){const t=new EL;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data((0,yb.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(jb("data",this.frozen),this.namespace[t]=n,this):v4.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jb("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=vm(t),r=this.parser||this.Parser;return wb("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),wb("process",this.parser||this.Parser),kb("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const l=vm(t),c=r.parse(l);r.run(c,l,function(f,m,p){if(f||!m||!p)return d(f);const O=m,b=r.stringify(O,p);S4(b)?p.value=b:p.result=b,d(f,p)});function d(f,m){f||!m?s(f):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),wb("processSync",this.parser||this.Parser),kb("processSync",this.compiler||this.Compiler),this.process(t,i),VC("processSync","process",n),r;function i(a,s){n=!0,IC(a),r=s}}run(t,n,r){BC(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,l){const c=vm(n);i.run(t,c,d);function d(f,m,p){const O=m||t;f?l(f):s?s(O):r(void 0,O,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),VC("runSync","run",r),i;function a(s,l){IC(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=vm(n),i=this.compiler||this.Compiler;return kb("stringify",i),BC(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(jb("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(d){if(typeof d=="function")c(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[f,...m]=d;c(f,m)}else s(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function s(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(d.plugins),d.settings&&(i.settings=(0,yb.default)(!0,i.settings,d.settings))}function l(d){let f=-1;if(d!=null)if(Array.isArray(d))for(;++f<d.length;){const m=d[f];a(m)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function c(d,f){let m=-1,p=-1;for(;++m<r.length;)if(r[m][0]===d){p=m;break}if(p===-1)r.push([d,...f]);else if(f.length>0){let[O,...b]=f;const S=r[p][1];C0(S)&&C0(O)&&(O=(0,yb.default)(!0,S,O)),r[p]=[d,O,...b]}}}},b4=new O4().freeze();function wb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function kb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jb(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function BC(e){if(!C0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function VC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vm(e){return y4(e)?e:new CL(e)}function y4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function S4(e){return typeof e=="string"||x4(e)}function x4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var _4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",UC=[],YC={allowDangerousHtml:!0},w4=/^(https?|ircs?|mailto|xmpp)$/i,k4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function j4(e){const t=T4(e),n=C4(e);return E4(t.runSync(t.parse(n),n),e)}function T4(e){const t=e.rehypePlugins||UC,n=e.remarkPlugins||UC,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...YC}:YC;return b4().use(vH).use(n).use(f4,r).use(t)}function C4(e){const t=e.children||"",n=new CL;return typeof t=="string"&&(n.value=t),n}function E4(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||A4;for(const f of k4)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+_4+f.id,void 0);return Qx(e,d),e8(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function d(f,m,p){if(f.type==="raw"&&p&&typeof m=="number")return s?p.children.splice(m,1):p.children[m]={type:"text",value:f.value},m;if(f.type==="element"){let O;for(O in vb)if(Object.hasOwn(vb,O)&&Object.hasOwn(f.properties,O)){const b=f.properties[O],S=vb[O];(S===null||S.includes(f.tagName))&&(f.properties[O]=c(String(b||""),O,f))}}if(f.type==="element"){let O=n?!n.includes(f.tagName):a?a.includes(f.tagName):!1;if(!O&&r&&typeof m=="number"&&(O=!r(f,m,p)),O&&p&&typeof m=="number")return l&&f.children?p.children.splice(m,1,...f.children):p.children.splice(m,1),m}}}function A4(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||w4.test(e.slice(0,t))?e:""}function FC(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Q4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function P4(e,t,n){const i=rg((n||{}).ignore||[]),a=N4(t);let s=-1;for(;++s<a.length;)TL(e,"text",l);function l(d,f){let m=-1,p;for(;++m<f.length;){const O=f[m],b=p?p.children:void 0;if(i(O,b?b.indexOf(O):void 0,p))return;p=O}if(p)return c(d,f)}function c(d,f){const m=f[f.length-1],p=a[s][0],O=a[s][1];let b=0;const w=m.children.indexOf(d);let k=!1,j=[];p.lastIndex=0;let T=p.exec(d.value);for(;T;){const E=T.index,Q={index:T.index,input:T.input,stack:[...f,d]};let A=O(...T,Q);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?p.lastIndex=E+1:(b!==E&&j.push({type:"text",value:d.value.slice(b,E)}),Array.isArray(A)?j.push(...A):A&&j.push(A),b=E+T[0].length,k=!0),!p.global)break;T=p.exec(d.value)}return k?(b<d.value.length&&j.push({type:"text",value:d.value.slice(b)}),m.children.splice(w,1,...j)):j=[d],w+j.length}}function N4(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([R4(i[0]),M4(i[1])])}return t}function R4(e){return typeof e=="string"?new RegExp(Q4(e),"g"):e}function M4(e){return typeof e=="function"?e:function(){return e}}var Tb="phrasing",Cb=["autolink","link","image","label"];function L4(){return{transforms:[B4],enter:{literalAutolink:z4,literalAutolinkEmail:Eb,literalAutolinkHttp:Eb,literalAutolinkWww:Eb},exit:{literalAutolink:Z4,literalAutolinkEmail:X4,literalAutolinkHttp:q4,literalAutolinkWww:I4}}}function D4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Tb,notInConstruct:Cb},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Tb,notInConstruct:Cb},{character:":",before:"[ps]",after:"\\/",inConstruct:Tb,notInConstruct:Cb}]}}function z4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Eb(e){this.config.enter.autolinkProtocol.call(this,e)}function q4(e){this.config.exit.autolinkProtocol.call(this,e)}function I4(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function X4(e){this.config.exit.autolinkEmail.call(this,e)}function Z4(e){this.exit(e)}function B4(e){P4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,V4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),U4]],{ignore:["link","linkReference"]})}function V4(e,t,n,r,i){let a="";if(!AL(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Y4(n)))return!1;const s=F4(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function U4(e,t,n,r){return!AL(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Y4(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function F4(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=FC(e,"(");let a=FC(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function AL(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Uo(n)||eg(n))&&(!t||n!==47)}QL.peek=nG;function $4(){this.buffer()}function W4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function H4(){this.buffer()}function G4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function K4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=qi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function J4(e){this.exit(e)}function eG(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=qi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tG(e){this.exit(e)}function nG(){return"["}function QL(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),s(),a+=i.move("]"),a}function rG(){return{enter:{gfmFootnoteCallString:$4,gfmFootnoteCall:W4,gfmFootnoteDefinitionLabelString:H4,gfmFootnoteDefinition:G4},exit:{gfmFootnoteCallString:K4,gfmFootnoteCall:J4,gfmFootnoteDefinitionLabelString:eG,gfmFootnoteDefinition:tG}}}function iG(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:QL},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const l=a.createTracker(s);let c=l.move("[^");const d=a.enter("footnoteDefinition"),f=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),f(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
|
|
141
|
+
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?PL:aG))),d(),c}}function aG(e,t,n){return t===0?e:PL(e,t,n)}function PL(e,t,n){return(n?"":" ")+e}var sG=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];NL.peek=dG;function oG(){return{canContainEols:["delete"],enter:{strikethrough:cG},exit:{strikethrough:uG}}}function lG(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:sG}],handlers:{delete:NL}}}function cG(e){this.enter({type:"delete",children:[]},e)}function uG(e){this.exit(e)}function NL(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function dG(){return"~"}function fG(e){return e.length}function hG(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||fG,a=[],s=[],l=[],c=[];let d=0,f=-1;for(;++f<e.length;){const S=[],w=[];let k=-1;for(e[f].length>d&&(d=e[f].length);++k<e[f].length;){const j=mG(e[f][k]);if(n.alignDelimiters!==!1){const T=i(j);w[k]=T,(c[k]===void 0||T>c[k])&&(c[k]=T)}S.push(j)}s[f]=S,l[f]=w}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<d;)a[m]=$C(r[m]);else{const S=$C(r);for(;++m<d;)a[m]=S}m=-1;const p=[],O=[];for(;++m<d;){const S=a[m];let w="",k="";S===99?(w=":",k=":"):S===108?w=":":S===114&&(k=":");let j=n.alignDelimiters===!1?1:Math.max(1,c[m]-w.length-k.length);const T=w+"-".repeat(j)+k;n.alignDelimiters!==!1&&(j=w.length+j+k.length,j>c[m]&&(c[m]=j),O[m]=j),p[m]=T}s.splice(1,0,p),l.splice(1,0,O),f=-1;const b=[];for(;++f<s.length;){const S=s[f],w=l[f];m=-1;const k=[];for(;++m<d;){const j=S[m]||"";let T="",E="";if(n.alignDelimiters!==!1){const Q=c[m]-(w[m]||0),A=a[m];A===114?T=" ".repeat(Q):A===99?Q%2?(T=" ".repeat(Q/2+.5),E=" ".repeat(Q/2-.5)):(T=" ".repeat(Q/2),E=T):E=" ".repeat(Q)}n.delimiterStart!==!1&&!m&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||m)&&k.push(" "),n.alignDelimiters!==!1&&k.push(T),k.push(j),n.alignDelimiters!==!1&&k.push(E),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||m!==d-1)&&k.push("|")}b.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return b.join(`
|
|
142
|
+
`)}function mG(e){return e==null?"":String(e)}function $C(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function pG(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),gG);return i(),s}function gG(e,t,n){return">"+(n?"":" ")+e}function vG(e,t){return WC(e,t.inConstruct,!0)&&!WC(e,t.notInConstruct,!1)}function WC(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function HC(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
143
|
+
`&&vG(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
144
|
+
`}function OG(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function bG(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function yG(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function SG(e,t,n,r){const i=yG(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(bG(e,n)){const m=n.enter("codeIndented"),p=n.indentLines(a,xG);return m(),p}const l=n.createTracker(r),c=i.repeat(Math.max(OG(a,i)+1,3)),d=n.enter("codeFenced");let f=l.move(c);if(e.lang){const m=n.enter(`codeFencedLang${s}`);f+=l.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...l.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${s}`);f+=l.move(" "),f+=l.move(n.safe(e.meta,{before:f,after:`
|
|
145
|
+
`,encode:["`"],...l.current()})),m()}return f+=l.move(`
|
|
146
|
+
`),a&&(f+=l.move(a+`
|
|
147
|
+
`)),f+=l.move(c),d(),f}function xG(e,t,n){return(n?"":" ")+e}function Px(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function _G(e,t,n,r){const i=Px(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");return d+=c.move(n.safe(n.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":`
|
|
148
|
+
`,...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),d+=c.move(" "+i),d+=c.move(n.safe(e.title,{before:d,after:i,...c.current()})),d+=c.move(i),l()),s(),d}function wG(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ud(e){return"&#x"+e.toString(16).toUpperCase()+";"}function vp(e,t,n){const r=wc(e),i=wc(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}RL.peek=kG;function RL(e,t,n,r){const i=wG(n),a=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let c=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const d=c.charCodeAt(0),f=vp(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(c=Ud(d)+c.slice(1));const m=c.charCodeAt(c.length-1),p=vp(r.after.charCodeAt(0),m,i);p.inside&&(c=c.slice(0,-1)+Ud(m));const O=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},l+c+O}function kG(e,t,n){return n.options.emphasis||"*"}function jG(e,t){let n=!1;return Qx(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,j0}),!!((!e.depth||e.depth<3)&&wx(e)&&(t.options.setext||n))}function TG(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(jG(e,n)){const f=n.enter("headingSetext"),m=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
|
|
149
|
+
`,after:`
|
|
150
|
+
`});return m(),f(),p+`
|
|
151
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
152
|
+
`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),c=n.enter("phrasing");a.move(s+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
|
|
153
|
+
`,...a.current()});return/^[\t ]/.test(d)&&(d=Ud(d.charCodeAt(0))+d.slice(1)),d=d?s+" "+d:s,n.options.closeAtx&&(d+=" "+s),c(),l(),d}ML.peek=CG;function ML(e){return e.value||""}function CG(){return"<"}LL.peek=EG;function LL(e,t,n,r){const i=Px(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");return d+=c.move(n.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),d+=c.move(" "+i),d+=c.move(n.safe(e.title,{before:d,after:i,...c.current()})),d+=c.move(i),l()),d+=c.move(")"),s(),d}function EG(){return"!"}DL.peek=AG;function DL(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const d=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=f,a(),i==="full"||!d||d!==m?c+=l.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function AG(){return"!"}zL.peek=QG;function zL(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],l=n.compilePattern(s);let c;if(s.atBreak)for(;c=l.exec(r);){let d=c.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(c.index+1)}}return i+r+i}function QG(){return"`"}function qL(e,t){const n=wx(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}IL.peek=PG;function IL(e,t,n,r){const i=Px(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,c;if(qL(e,n)){const f=n.stack;n.stack=[],l=n.enter("autolink");let m=s.move("<");return m+=s.move(n.containerPhrasing(e,{before:m,after:">",...s.current()})),m+=s.move(">"),l(),n.stack=f,m}l=n.enter("link"),c=n.enter("label");let d=s.move("[");return d+=s.move(n.containerPhrasing(e,{before:d,after:"](",...s.current()})),d+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=s.move("<"),d+=s.move(n.safe(e.url,{before:d,after:">",...s.current()})),d+=s.move(">")):(c=n.enter("destinationRaw"),d+=s.move(n.safe(e.url,{before:d,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=s.move(" "+i),d+=s.move(n.safe(e.title,{before:d,after:i,...s.current()})),d+=s.move(i),c()),d+=s.move(")"),l(),d}function PG(e,t,n){return qL(e,n)?"<":"["}XL.peek=NG;function XL(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const d=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=f,a(),i==="full"||!d||d!==m?c+=l.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function NG(){return"["}function Nx(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function RG(e){const t=Nx(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function MG(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ZL(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function LG(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?MG(n):Nx(n);const l=e.ordered?s==="."?")":".":RG(n);let c=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),ZL(n)===s&&f){let m=-1;for(;++m<e.children.length;){const p=e.children[m];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=l),n.bulletCurrent=s;const d=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),d}function DG(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function zG(e,t,n,r){const i=DG(n);let a=n.bulletCurrent||Nx(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(s-a.length)),l.shift(s);const c=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,l.current()),f);return c(),d;function f(m,p,O){return p?(O?"":" ".repeat(s))+m:(O?a:a+" ".repeat(s-a.length))+m}}function qG(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}var IG=rg(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function XG(e,t,n,r){return(e.children.some(function(s){return IG(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ZG(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}BL.peek=BG;function BL(e,t,n,r){const i=ZG(n),a=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let c=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const d=c.charCodeAt(0),f=vp(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(c=Ud(d)+c.slice(1));const m=c.charCodeAt(c.length-1),p=vp(r.after.charCodeAt(0),m,i);p.inside&&(c=c.slice(0,-1)+Ud(m));const O=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},l+c+O}function BG(e,t,n){return n.options.strong||"*"}function VG(e,t,n,r){return n.safe(e.value,r)}function UG(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function YG(e,t,n){const r=(ZL(n)+(n.options.ruleSpaces?" ":"")).repeat(UG(n));return n.options.ruleSpaces?r.slice(0,-1):r}var VL={blockquote:pG,break:HC,code:SG,definition:_G,emphasis:RL,hardBreak:HC,heading:TG,html:ML,image:LL,imageReference:DL,inlineCode:zL,link:IL,linkReference:XL,list:LG,listItem:zG,paragraph:qG,root:XG,strong:BL,text:VG,thematicBreak:YG};function FG(){return{enter:{table:$G,tableData:GC,tableHeader:GC,tableRow:HG},exit:{codeText:GG,table:WG,tableData:Ab,tableHeader:Ab,tableRow:Ab}}}function $G(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function WG(e){this.exit(e),this.data.inTable=void 0}function HG(e){this.enter({type:"tableRow",children:[]},e)}function Ab(e){this.exit(e)}function GC(e){this.enter({type:"tableCell",children:[]},e)}function GG(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,KG));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function KG(e,t){return t==="|"?t:e}function JG(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
154
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:c,tableRow:l}};function s(O,b,S,w){return d(f(O,S,w),O.align)}function l(O,b,S,w){const k=m(O,S,w),j=d([k]);return j.slice(0,j.indexOf(`
|
|
155
|
+
`))}function c(O,b,S,w){const k=S.enter("tableCell"),j=S.enter("phrasing"),T=S.containerPhrasing(O,{...w,before:a,after:a});return j(),k(),T}function d(O,b){return hG(O,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function f(O,b,S){const w=O.children;let k=-1;const j=[],T=b.enter("table");for(;++k<w.length;)j[k]=m(w[k],b,S);return T(),j}function m(O,b,S){const w=O.children;let k=-1;const j=[],T=b.enter("tableRow");for(;++k<w.length;)j[k]=c(w[k],O,b,S);return T(),j}function p(O,b,S){let w=VL.inlineCode(O,b,S);return S.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function eK(){return{exit:{taskListCheckValueChecked:KC,taskListCheckValueUnchecked:KC,paragraph:nK}}}function tK(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rK}}}function KC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function nK(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function rK(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(s);let c=VL.listItem(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),c;function d(f){return f+s}}function iK(){return[L4(),rG(),oG(),FG(),eK()]}function aK(e){return{extensions:[D4(),iG(e),lG(),JG(e),tK()]}}var sK={tokenize:fK,partial:!0},UL={tokenize:hK,partial:!0},YL={tokenize:mK,partial:!0},FL={tokenize:pK,partial:!0},oK={tokenize:gK,partial:!0},$L={name:"wwwAutolink",tokenize:uK,previous:HL},WL={name:"protocolAutolink",tokenize:dK,previous:GL},ts={name:"emailAutolink",tokenize:cK,previous:KL},va={};function lK(){return{text:va}}var jo=48;for(;jo<123;)va[jo]=ts,jo++,jo===58?jo=65:jo===91&&(jo=97);va[43]=ts;va[45]=ts;va[46]=ts;va[95]=ts;va[72]=[ts,WL];va[104]=[ts,WL];va[87]=[ts,$L];va[119]=[ts,$L];function cK(e,t,n){const r=this;let i,a;return s;function s(m){return!E0(m)||!KL.call(r,r.previous)||Rx(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return E0(m)?(e.consume(m),l):m===64?(e.consume(m),c):n(m)}function c(m){return m===46?e.check(oK,f,d)(m):m===45||m===95||er(m)?(a=!0,e.consume(m),c):f(m)}function d(m){return e.consume(m),i=!0,c}function f(m){return a&&i&&hr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function uK(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!HL.call(r,r.previous)||Rx(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(sK,e.attempt(UL,e.attempt(YL,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function dK(e,t,n){const r=this;let i="",a=!1;return s;function s(m){return(m===72||m===104)&&GL.call(r,r.previous)&&!Rx(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(hr(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(m),c}return n(m)}function c(m){return m===47?(e.consume(m),a?d:(a=!0,c)):n(m)}function d(m){return m===null||mp(m)||Xt(m)||Uo(m)||eg(m)?n(m):e.attempt(UL,e.attempt(YL,f),n)(m)}function f(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function fK(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function hK(e,t,n){let r,i,a;return s;function s(d){return d===46||d===95?e.check(FL,c,l)(d):d===null||Xt(d)||Uo(d)||d!==45&&eg(d)?c(d):(a=!0,e.consume(d),s)}function l(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),s}function c(d){return i||r||!a?n(d):t(d)}}function mK(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(FL,t,a)(s):s===null||Xt(s)||Uo(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function pK(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||Xt(l)||Uo(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||Xt(l)||Uo(l)?t(l):r(l)}function a(l){return hr(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):hr(l)?(e.consume(l),s):n(l)}}function gK(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return er(a)?n(a):t(a)}}function HL(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Xt(e)}function GL(e){return!hr(e)}function KL(e){return!(e===47||E0(e))}function E0(e){return e===43||e===45||e===46||e===95||er(e)}function Rx(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var vK={tokenize:kK,partial:!0};function OK(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:xK,continuation:{tokenize:_K},exit:wK}},text:{91:{name:"gfmFootnoteCall",tokenize:SK},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:bK,resolveTo:yK}}}}function bK(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!s||!s._balanced)return n(c);const d=qi(r.sliceSerialize({start:s.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function yK(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function SK(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),c}function c(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(a>999||m===93&&!s||m===null||m===91||Xt(m))return n(m);if(m===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(qi(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Xt(m)||(s=!0),a++,e.consume(m),m===92?f:d}function f(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}}function xK(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,l;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(b)}function f(b){if(s>999||b===93&&!l||b===null||b===91||Xt(b))return n(b);if(b===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=qi(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Xt(b)||(l=!0),s++,e.consume(b),b===92?m:f}function m(b){return b===91||b===92||b===93?(e.consume(b),s++,f):f(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),dt(e,O,"gfmFootnoteDefinitionWhitespace")):n(b)}function O(b){return t(b)}}function _K(e,t,n){return e.check(Sf,t,e.attempt(vK,t,n))}function wK(e){e.exit("gfmFootnoteDefinition")}function kK(e,t,n){const r=this;return dt(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function jK(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let d=c;for(;d--;)if(s[d][0]==="exit"&&s[d][1].type==="strikethroughSequenceTemporary"&&s[d][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[d][1].end.offset-s[d][1].start.offset){s[c][1].type="strikethroughSequence",s[d][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[d][1].start),end:Object.assign({},s[c][1].end)},m={type:"strikethroughText",start:Object.assign({},s[d][1].end),end:Object.assign({},s[c][1].start)},p=[["enter",f,l],["enter",s[d][1],l],["exit",s[d][1],l],["enter",m,l]],O=l.parser.constructs.insideSpan.null;O&&Vr(p,p.length,0,tg(O,s.slice(d+1,c),l)),Vr(p,p.length,0,[["exit",m,l],["enter",s[c][1],l],["exit",s[c][1],l],["exit",f,l]]),Vr(s,d-1,c-d+3,p),c=d+p.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function a(s,l,c){const d=this.previous,f=this.events;let m=0;return p;function p(b){return d===126&&f[f.length-1][1].type!=="characterEscape"?c(b):(s.enter("strikethroughSequenceTemporary"),O(b))}function O(b){const S=wc(d);if(b===126)return m>1?c(b):(s.consume(b),m++,O);if(m<2&&!n)return c(b);const w=s.exit("strikethroughSequenceTemporary"),k=wc(b);return w._open=!k||k===2&&!!S,w._close=!S||S===2&&!!k,l(b)}}}var TK=class{constructor(){this.map=[]}add(e,t,n){CK(this,e,t,n)}consume(e){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const i of r)e.push(i);r=n.pop()}this.map.length=0}};function CK(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function EK(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function AK(){return{flow:{null:{name:"table",tokenize:QK,resolveAll:PK}}}}function QK(e,t,n){const r=this;let i=0,a=0,s;return l;function l(P){let V=r.events.length-1;for(;V>-1;){const X=r.events[V][1].type;if(X==="lineEnding"||X==="linePrefix")V--;else break}const Z=V>-1?r.events[V][1].type:null,Y=Z==="tableHead"||Z==="tableRow"?A:c;return Y===A&&r.parser.lazy[r.now().line]?n(P):Y(P)}function c(P){return e.enter("tableHead"),e.enter("tableRow"),d(P)}function d(P){return P===124||(s=!0,a+=1),f(P)}function f(P){return P===null?n(P):Le(P)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),O):n(P):nt(P)?dt(e,f,"whitespace")(P):(a+=1,s&&(s=!1,i+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),m(P)))}function m(P){return P===null||P===124||Xt(P)?(e.exit("data"),f(P)):(e.consume(P),P===92?p:m)}function p(P){return P===92||P===124?(e.consume(P),m):m(P)}function O(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),s=!1,nt(P)?dt(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):b(P))}function b(P){return P===45||P===58?w(P):P===124?(s=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),S):Q(P)}function S(P){return nt(P)?dt(e,w,"whitespace")(P):w(P)}function w(P){return P===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),k):P===45?(a+=1,k(P)):P===null||Le(P)?E(P):Q(P)}function k(P){return P===45?(e.enter("tableDelimiterFiller"),j(P)):Q(P)}function j(P){return P===45?(e.consume(P),j):P===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(P))}function T(P){return nt(P)?dt(e,E,"whitespace")(P):E(P)}function E(P){return P===124?b(P):P===null||Le(P)?!s||i!==a?Q(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):Q(P)}function Q(P){return n(P)}function A(P){return e.enter("tableRow"),N(P)}function N(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),N):P===null||Le(P)?(e.exit("tableRow"),t(P)):nt(P)?dt(e,N,"whitespace")(P):(e.enter("data"),D(P))}function D(P){return P===null||P===124||Xt(P)?(e.exit("data"),N(P)):(e.consume(P),P===92?q:D)}function q(P){return P===92||P===124?(e.consume(P),D):D(P)}}function PK(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],l=!1,c=0,d,f,m;const p=new TK;for(;++n<e.length;){const O=e[n],b=O[1];O[0]==="enter"?b.type==="tableHead"?(l=!1,c!==0&&(JC(p,t,c,d,f),f=void 0,c=0),d={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",d,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,f={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",f,t]])),i=b.type==="tableDelimiterRow"?2:f?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],m=Om(p,t,a,i,void 0,m),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],m=Om(p,t,a,i,void 0,m)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(l=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,a[1]!==0?(s[0]=s[1],m=Om(p,t,a,i,n,m)):s[1]!==0&&(m=Om(p,t,s,i,n,m)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&JC(p,t,c,d,f),p.consume(t.events),n=-1;++n<t.events.length;){const O=t.events[n];O[0]==="enter"&&O[1].type==="table"&&(O[1]._align=EK(t.events,n))}return e}function Om(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},Hl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=Hl(t.events,n[1]);if(a={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const d=Hl(t.events,n[2]),f=Hl(t.events,n[3]),m={type:l,start:Object.assign({},d),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const p=t.events[n[2]],O=t.events[n[3]];if(p[1].end=Object.assign({},O[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,S=n[3]-n[2]-1;e.add(b,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(a.end=Object.assign({},Hl(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function JC(e,t,n,r,i){const a=[],s=Hl(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Hl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var NK={name:"tasklistCheck",tokenize:MK};function RK(){return{text:{91:NK}}}function MK(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Xt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return Le(c)?t(c):nt(c)?e.check({tokenize:LK},t,n)(c):n(c)}}function LK(e,t,n){return dt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function DK(e){return oL([lK(),OK(),jK(e),AK(),RK()])}var zK={};function qK(e){const t=this,n=e||zK,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(DK(n)),a.push(iK()),s.push(aK(n))}function IK({imageUrl:e,alt:t="Resource image"}){return g.jsx("div",{className:"semiont-image-viewer",children:g.jsx("img",{src:e,alt:t,className:"semiont-image-viewer__image",style:{imageRendering:"auto"}})})}var XK=_.lazy(()=>Ae(()=>import("./PdfAnnotationCanvas.client-CHDCGQBR-mCGxablw.js"),__vite__mapDeps([2,1,3,4])).then(e=>({default:e.PdfAnnotationCanvas}))),ZK=_.memo(function({content:t}){return g.jsx(j4,{remarkPlugins:[qK],children:t})}),BK=_.memo(function({content:t,mimeType:n,resourceUri:r,annotations:i,selectedClick:a="detail",annotateMode:s,hoverDelayMs:l=150}){const{newAnnotationIds:c}=ex(),d=gt(),f=_.useRef(null),m=$0(n),{highlights:p,references:O,assessments:b,comments:S,tags:w}=i,k=_.useMemo(()=>[...p,...O,...b,...S,...w],[p,O,b,S,w]),j=_.useMemo(()=>L6(k),[k]),T=_.useRef(null);_.useEffect(()=>{f.current&&(T.current=Q6(t,f.current))},[t]),_.useEffect(()=>{if(!f.current||!T.current||j.length===0)return;const N=f.current,D=P6(N),q=N6(j,T.current,D);return R6(q),()=>M6(N)},[j]),_.useEffect(()=>{if(!f.current)return;const N=f.current,D=X=>{const I=X.target.closest("[data-annotation-id]");if(!I)return;const L=I.getAttribute("data-annotation-id"),$=I.getAttribute("data-annotation-type");if(L&&$==="reference"){const ne=k.find(z=>z.id===L);ne&&d.get("browse:click").next({annotationId:L,motivation:ne.motivation})}},{handleMouseEnter:q,handleMouseLeave:P,cleanup:V}=W0(X=>d.get("beckon:hover").next({annotationId:X}),l),Z=X=>{const I=X.target.closest("[data-annotation-id]"),L=I==null?void 0:I.getAttribute("data-annotation-id");L&&q(L)},Y=X=>{X.target.closest("[data-annotation-id]")&&P()};return c&&N.querySelectorAll("[data-annotation-id]").forEach(H=>{const I=H.getAttribute("data-annotation-id");I&&c.has(I)&&H.classList.add("annotation-sparkle")}),N.addEventListener("click",D),N.addEventListener("mouseover",Z),N.addEventListener("mouseout",Y),()=>{N.removeEventListener("click",D),N.removeEventListener("mouseover",Z),N.removeEventListener("mouseout",Y),V()}},[t,k,c,l]);const E=_.useCallback((N,D=!1)=>{f.current&&d5(N,f.current,{pulse:D})},[]),Q=_.useCallback(({annotationId:N})=>{E(N)},[E]),A=_.useCallback(({annotationId:N})=>{E(N??null,!0)},[E]);switch(gr({"beckon:hover":Q,"beckon:focus":A}),m){case"text":return g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"text",children:[g.jsx(cc,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:tr}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx(ZK,{content:t})})]});case"image":return Ec(n)?g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"pdf",children:[g.jsx(cc,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:tr}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx(_.Suspense,{fallback:g.jsx("div",{className:"semiont-browse-view__loading",children:"Loading PDF viewer..."}),children:g.jsx(XK,{pdfUrl:t,existingAnnotations:k,drawingMode:null,selectedMotivation:null})})})]}):g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"image",children:[g.jsx(cc,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:tr}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx(IK,{imageUrl:t,mimeType:n,alt:"Resource content"})})]});case"unsupported":return g.jsx("div",{ref:f,className:"semiont-browse-view semiont-browse-view--unsupported","data-mime-type":"unsupported",children:g.jsxs("div",{className:"semiont-browse-view__empty",children:[g.jsxs("p",{className:"semiont-browse-view__empty-message",children:["Preview not available for ",n]}),g.jsx("a",{href:`/api/resources/${r}`,download:!0,className:"semiont-button semiont-button--primary",children:"Download File"})]})})}});function VK({resource:e,annotations:t,generatingReferenceId:n,showLineNumbers:r=!1,hoverDelayMs:i,hoveredAnnotationId:a}){const s=hn("ResourceViewer"),l=_.useRef(null),c=gt(),d=ZR(),{highlights:f,references:m,assessments:p,comments:O,tags:b}=t;if(!e["@id"])throw new Error("Resource has no @id");const S=pi(e["@id"]),k=(()=>{const de=e.representations;return Array.isArray(de)&&de.length>0&&de[0]?de[0].mediaType:"text/plain"})(),[j,T]=_.useState(()=>typeof window<"u"?localStorage.getItem("annotateMode")==="true":!1);_.useEffect(()=>{typeof window<"u"&&localStorage.setItem("annotateMode",j.toString())},[j]);const E=_.useCallback(()=>{T(de=>!de)},[]),Q=j?"annotate":"browse",A=$6(),N=_.useCallback(()=>{A&&A.invalidateAnnotations(S)},[A,S]),D=_.useCallback(()=>{A&&A.invalidateAnnotations(S)},[A,S]),q=_.useCallback(()=>{A&&A.invalidateAnnotations(S)},[A,S]),[P,V]=_.useState(()=>{if(typeof window<"u"){const de=localStorage.getItem("semiont-toolbar-selection");if(de==="null")return null;if(de&&["linking","highlighting","assessing","commenting","tagging"].includes(de))return de}return"linking"}),[Z,Y]=_.useState(()=>{if(typeof window<"u"){const de=localStorage.getItem("semiont-toolbar-click");if(de&&["detail","follow","jsonld","deleting"].includes(de))return de}return"detail"}),X=C6(k),[H,I]=_.useState(()=>eT(X)),L=_.useCallback(({motivation:de})=>{V(de)},[]),$=_.useCallback(({action:de})=>{Y(de)},[]),ne=_.useCallback(({shape:de})=>{I(de)},[]);_.useEffect(()=>{P===null?localStorage.setItem("semiont-toolbar-selection","null"):localStorage.setItem("semiont-toolbar-selection",P)},[P]),_.useEffect(()=>{localStorage.setItem("semiont-toolbar-click",Z)},[Z]),_.useEffect(()=>{E6(X,H)},[X,H]),_.useEffect(()=>{const de=eT(X);de!==H&&I(de)},[X]);const[z,G]=_.useState(!1),[re,R]=_.useState(null),[me,Se]=_.useState(null),ve=a??null,[Xe,qe]=_.useState(null),[Pe,Oe]=_.useState(null),Ve=_.useCallback(de=>{Oe(de),qe(de),setTimeout(()=>Oe(null),3e3)},[]),we=()=>typeof window>"u"?{x:0,y:0}:{x:Math.max(0,(window.innerWidth-800)/2),y:Math.max(0,(window.innerHeight-700)/2)},Ze=_.useCallback(de=>{c.get("mark:delete").next({annotationId:mr(de)})},[]),Fe=_.useCallback((de,Ue)=>{const ht=Object.values(tr).find(Ot=>Ot.matchesAnnotation(de));if(ht!=null&&ht.hasSidePanel){if(Z==="detail"){Ve(de.id);return}if(Z!=="deleting"&&Z!=="jsonld"&&Z!=="follow")return}const Tt=Tc(de)||Hd(de)||$o(de)||Ii(de)||Cc(de);if(Z==="follow"&&Ii(de)){const Ot=Wa(de.body);Ot&&d(`/know/resource/${Ot}`,{resourceId:Ot});return}if(Z==="jsonld"&&Tt){R(de),G(!0);return}if(j&&Z==="deleting"&&Tt){const Ot=Ue?{x:Ue.clientX,y:Ue.clientY+10}:{x:window.innerWidth/2-150,y:window.innerHeight/2-75};Se({annotation:de,position:Ot});return}},[j,Z,Ve]),ft=_.useCallback(({annotationId:de,motivation:Ue})=>{const ht=Object.values(tr).find(Tt=>Tt.matchesAnnotation({motivation:Ue}));if(!(ht!=null&&ht.hasSidePanel)){const Ot=[...f,...m,...p,...O,...b].find(bt=>bt.id===de);Ot&&Fe(Ot);return}if(Z!=="detail"){const Ot=[...f,...m,...p,...O,...b].find(bt=>bt.id===de);Ot&&Fe(Ot);return}c.get("browse:panel-open").next({panel:"annotations",scrollToAnnotationId:de,motivation:Ue})},[f,m,p,O,b,Fe,Z]);gr({"mark:mode-toggled":E,"mark:added":N,"mark:removed":D,"mark:body-updated":q,"mark:selection-changed":L,"mark:click-changed":$,"mark:shape-changed":ne,"browse:click":ft});const Rt=_.useMemo(()=>({highlights:f,references:m,assessments:p,comments:O,tags:b}),[f,m,p,O,b]),mn={selectedMotivation:P,selectedClick:Z,selectedShape:H,hoveredAnnotationId:ve,scrollToAnnotationId:Xe},ke=_.useCallback(de=>{const Ue=m.find(ht=>Wa(ht.body)===de);return Ue?Is(qn(Ue.target)):void 0},[m]);return g.jsxs("div",{ref:l,className:"semiont-resource-viewer",children:[Q==="annotate"?g.jsx(_$,{content:e.content,mimeType:k,resourceUri:e["@id"],annotations:Rt,uiState:mn,onUIStateChange:de=>{"selectedMotivation"in de&&V(de.selectedMotivation),"selectedClick"in de&&Y(de.selectedClick),"selectedShape"in de&&I(de.selectedShape)},enableWidgets:!0,getTargetResourceName:ke,...n!==void 0&&{generatingReferenceId:n},showLineNumbers:r,hoverDelayMs:i,annotateMode:j}):g.jsx(BK,{content:e.content,mimeType:k,resourceUri:e["@id"],annotations:Rt,selectedClick:Z,hoverDelayMs:i,annotateMode:j}),re&&g.jsx(fC,{isOpen:z,onClose:()=>G(!1),position:we(),wide:!0,children:g.jsx(dY,{annotation:re,onBack:()=>{G(!1),R(null)}})}),me&&(()=>{const de=me.annotation,Ue=Object.values(tr).find(bt=>bt.matchesAnnotation(de)),ht=qn(de.target),Tt=Is(ht),Ot=(Ue==null?void 0:Ue.iconEmoji)||"📝";return g.jsx(fC,{isOpen:!!me,onClose:()=>Se(null),position:me.position,children:g.jsxs("div",{className:"semiont-delete-confirmation",children:[g.jsxs("div",{className:"semiont-delete-confirmation__header",children:[g.jsx("span",{className:"semiont-delete-confirmation__icon",children:Ot}),g.jsx("h3",{className:"semiont-delete-confirmation__title",children:s("deleteConfirmationTitle")})]}),Tt&&g.jsx("div",{className:"semiont-delete-confirmation__quote",children:g.jsxs("p",{className:"semiont-delete-confirmation__text",children:['"',Tt.length>100?Tt.substring(0,100)+"...":Tt,'"']})}),g.jsx("p",{className:"semiont-delete-confirmation__message",children:s("deleteConfirmationMessage")}),g.jsxs("div",{className:"semiont-delete-confirmation__actions",children:[g.jsx("button",{onClick:()=>Se(null),className:"semiont-button semiont-button--secondary",children:s("deleteConfirmationCancel")}),g.jsx("button",{onClick:()=>{Ze(me.annotation.id),Se(null)},className:"semiont-button semiont-button--danger",children:s("deleteConfirmationDelete")})]})]})})})()]})}function UK(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),l=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:l<7?`${l} day${l>1?"s":""} ago`:t.toLocaleDateString()}function eE(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="TextualBody"&&"value"in e&&typeof e.value=="string"}function YK(e){if(!e.body)return null;if(eE(e.body))return e.body.value||null;if(Array.isArray(e.body)&&e.body.length>0){const t=e.body.find(eE);return(t==null?void 0:t.value)||null}return null}function FK({assessment:e,isFocused:t,isHovered:n=!1,ref:r}){var c;const i=gt(),a=Kd(e.id),s=Gd(e),l=YK(e);return g.jsxs("div",{ref:r,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"assessment","data-focused":t?"true":"false",onClick:()=>{i.get("browse:click").next({annotationId:e.id,motivation:e.motivation})},...a,children:[s&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"assessment",children:['"',s.substring(0,100),s.length>100?"...":"",'"']}),l&&g.jsx("div",{className:"semiont-annotation-entry__body","data-type":"assessment",children:l}),g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((c=e.creator)==null?void 0:c.name)||"Unknown"," • ",UK(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function Mx({annotationType:e,isAssisting:t,locale:n,progress:r}){const a=hn(e==="highlight"?"HighlightPanel":e==="assessment"?"AssessmentPanel":"CommentsPanel"),s=gt(),[l,c]=_.useState(""),[d,f]=_.useState(""),m=e==="comment"?5:e==="assessment"?4:5,[p,O]=_.useState(m),[b,S]=_.useState(!0),[w,k]=_.useState(()=>{if(typeof window>"u")return!0;const E=localStorage.getItem(`assist-section-expanded-${e}`);return E?E==="true":!0});_.useEffect(()=>{typeof window>"u"||localStorage.setItem(`assist-section-expanded-${e}`,String(w))},[w,e]);const j=_.useCallback(()=>{const E=e==="highlight"?"highlighting":e==="assessment"?"assessing":"commenting";s.get("mark:assist-request").next({motivation:E,options:{instructions:l.trim()||void 0,tone:(e==="comment"||e==="assessment")&&d?d:void 0,density:(e==="comment"||e==="assessment"||e==="highlight")&&b?p:void 0,language:e==="comment"||e==="assessment"?n:void 0}}),c(""),f("")},[e,l,d,b,p,n]),T=_.useCallback(()=>{s.get("mark:progress-dismiss").next(void 0)},[]);return g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>k(!w),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":w,type:"button",children:[g.jsx("span",{children:a(e==="highlight"?"annotateHighlights":e==="assessment"?"annotateAssessments":"annotateComments")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":w,children:"›"})]}),w&&g.jsxs("div",{className:"semiont-assist-widget","data-assisting":t&&r?"true":"false","data-type":e,children:[!r&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("label",{className:"semiont-form-field__label",children:[a("instructions")," ",a("optional")]}),g.jsx("textarea",{value:l,onChange:E=>c(E.target.value),className:"semiont-textarea",rows:3,placeholder:a("instructionsPlaceholder"),maxLength:500}),g.jsxs("div",{className:"semiont-form-field__char-count",children:[l.length,"/500"]})]}),(e==="comment"||e==="assessment")&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("label",{className:"semiont-form-field__label",children:[a("toneLabel")," ",a("toneOptional")]}),g.jsxs("select",{value:d,onChange:E=>f(E.target.value),className:"semiont-select",children:[g.jsx("option",{value:"",children:"Default"}),e==="comment"&&g.jsxs(g.Fragment,{children:[g.jsx("option",{value:"scholarly",children:a("toneScholarly")}),g.jsx("option",{value:"explanatory",children:a("toneExplanatory")}),g.jsx("option",{value:"conversational",children:a("toneConversational")}),g.jsx("option",{value:"technical",children:a("toneTechnical")})]}),e==="assessment"&&g.jsxs(g.Fragment,{children:[g.jsx("option",{value:"analytical",children:a("toneAnalytical")}),g.jsx("option",{value:"critical",children:a("toneCritical")}),g.jsx("option",{value:"balanced",children:a("toneBalanced")}),g.jsx("option",{value:"constructive",children:a("toneConstructive")})]})]})]}),(e==="comment"||e==="assessment"||e==="highlight")&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("div",{className:"semiont-form-field__header",children:[g.jsxs("label",{className:"semiont-form-field__label semiont-form-field__label--with-checkbox",children:[g.jsx("input",{type:"checkbox",checked:b,onChange:E=>S(E.target.checked),className:"semiont-checkbox","data-variant":e}),g.jsx("span",{children:a("densityLabel")})]}),b&&g.jsxs("span",{className:"semiont-form-field__info",children:[p," per 2000 words"]})]}),b&&g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"range",min:e==="comment"?"2":"1",max:e==="comment"?"12":e==="assessment"?"10":"15",value:p,onChange:E=>O(Number(E.target.value)),className:"semiont-slider"}),g.jsxs("div",{className:"semiont-slider__labels",children:[g.jsx("span",{children:a("densitySparse")}),g.jsx("span",{children:a("densityDense")})]})]})]}),g.jsxs("button",{onClick:j,className:"semiont-button","data-variant":"assist","data-type":e,children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:a("annotate")})]})]}),r&&g.jsxs("div",{className:"semiont-annotation-progress","data-type":e,children:[r.requestParams&&r.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params","data-type":e,children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),r.requestParams.map((E,Q)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[E.label,":"]})," ",E.value]},Q))]}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:r.message})]}),!t&&g.jsx("button",{onClick:T,className:"semiont-annotation-progress__close","aria-label":a("closeProgress"),title:a("closeProgress"),type:"button",children:"×"})]})]})]})]})}function xf({count:e,title:t}){return g.jsx("div",{className:"semiont-panel-header",children:g.jsxs("h2",{className:"semiont-panel-header__title",children:[g.jsx("span",{className:"semiont-panel-header__text",children:t}),g.jsxs("span",{className:"semiont-panel-header__count",children:["(",e,")"]})]})})}function $K(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function WK({annotations:e,pendingAnnotation:t,isAssisting:n=!1,progress:r,locale:i,annotateMode:a=!0,scrollToAnnotationId:s,onScrollCompleted:l,hoveredAnnotationId:c}){const d=hn("AssessmentPanel"),f=gt(),[m,p]=_.useState(""),[O,b]=_.useState(null),S=_.useRef(null),w=_.useRef(new Map),k=_.useMemo(()=>[...e].sort((Q,A)=>{const N=gi(qn(Q.target)),D=gi(qn(A.target));return!N||!D?0:N.start-D.start}),[e]),j=_.useCallback((Q,A)=>{A?w.current.set(Q,A):w.current.delete(Q)},[]);_.useEffect(()=>{if(!s)return;const Q=w.current.get(s);if(Q&&S.current){const A=Q.offsetTop,N=S.current.clientHeight,D=Q.offsetHeight,q=A-N/2+D/2;S.current.scrollTo({top:q,behavior:"smooth"}),Q.classList.remove("semiont-annotation-pulse"),Q.offsetWidth,Q.classList.add("semiont-annotation-pulse"),l&&l()}},[s]),_.useEffect(()=>{if(!c)return;const Q=w.current.get(c);if(!Q||!S.current)return;const A=S.current,N=Q.getBoundingClientRect(),D=A.getBoundingClientRect();if(!(N.top>=D.top&&N.bottom<=D.bottom)){const P=Q.offsetTop,V=A.clientHeight,Z=Q.offsetHeight,Y=P-V/2+Z/2;A.scrollTo({top:Y,behavior:"smooth"})}},[c]);const T=()=>{if(t){const Q=m.trim()?[{type:"TextualBody",value:m,purpose:"assessing"}]:[];f.get("mark:submit").next({motivation:"assessing",selector:t.selector,body:Q}),p("")}};_.useEffect(()=>{if(!t)return;const Q=A=>{A.key==="Escape"&&(f.get("mark:cancel-pending").next(void 0),p(""))};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[t]);const E=_.useCallback(({annotationId:Q})=>{b(Q),setTimeout(()=>b(null),3e3)},[]);return gr({"browse:click":E}),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(xf,{annotationType:"assessment",count:e.length,title:d("title")}),t&&t.motivation==="assessing"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"assessment",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const Q=$K(t.selector);return Q?`"${Q.substring(0,100)}${Q.length>100?"...":""}"`:d("fragmentSelected")})()}),g.jsx("textarea",{value:m,onChange:Q=>p(Q.target.value),className:"semiont-textarea",rows:3,placeholder:d("assessmentPlaceholder"),autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-prompt__footer",children:[g.jsxs("span",{className:"semiont-annotation-prompt__char-count",children:[m.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{f.get("mark:cancel-pending").next(void 0),p("")},className:"semiont-button semiont-button--secondary","data-type":"assessment",children:d("cancel")}),g.jsx("button",{onClick:T,className:"semiont-button semiont-button--primary","data-type":"assessment",children:d("save")})]})]})]}),g.jsxs("div",{ref:S,className:"semiont-panel__content",children:[a&&g.jsx(Mx,{annotationType:"assessment",isAssisting:n,locale:i,progress:r}),g.jsx("div",{className:"semiont-panel__list",children:k.length===0?g.jsx("p",{className:"semiont-panel__empty",children:d("noAssessments")}):k.map(Q=>g.jsx(FK,{assessment:Q,isFocused:Q.id===O,isHovered:Q.id===c,ref:A=>j(Q.id,A)},Q.id))})]})]})}function HK({isConnected:e,eventCount:t,lastEventTimestamp:n,knowledgeBaseName:r}){const i=hn("CollaborationPanel");let a;if(!n)a=i("noActivity");else{const s=new Date,l=new Date(n),c=s.getTime()-l.getTime(),d=Math.floor(c/1e3),f=Math.floor(d/60),m=Math.floor(f/60);d<10?a=i("justNow"):d<60?a=i("secondsAgo",{count:d}):f===1?a=i("minuteAgo"):f<60?a=i("minutesAgo",{count:f}):m===1?a=i("hourAgo"):m<24?a=i("hoursAgo",{count:m}):a=l.toLocaleDateString()}return g.jsxs("div",{className:"semiont-collaboration-panel",children:[g.jsx("h3",{className:"semiont-collaboration-panel__title",children:i("title")}),r&&g.jsx("div",{style:{padding:"0 0.75rem 0.5rem",fontSize:"0.8rem",color:"var(--semiont-color-neutral-400)"},children:r}),g.jsxs("div",{className:"semiont-collaboration-panel__section",children:[g.jsx("h3",{className:"semiont-collaboration-panel__heading",children:i("connectionStatus")}),g.jsxs("div",{className:"semiont-collaboration-panel__status",children:[g.jsxs("span",{className:"semiont-collaboration-panel__indicator",children:[g.jsx("span",{className:"semiont-collaboration-panel__dot","data-connected":e?"true":"false"}),g.jsx("span",{className:"semiont-collaboration-panel__status-text","data-connected":e?"true":"false",children:i(e?"live":"disconnected")})]}),e&&t>0&&g.jsxs("span",{className:"semiont-collaboration-panel__event-count",children:["(",i("events",{count:t}),")"]})]}),g.jsxs("div",{className:"semiont-collaboration-panel__details",children:[g.jsxs("div",{children:[g.jsx("span",{className:"semiont-collaboration-panel__label",children:i("lastSync")})," ",a]}),g.jsx("div",{children:i(e?"realtimeActive":"reconnecting")})]})]}),g.jsxs("div",{className:"semiont-collaboration-panel__section semiont-collaboration-panel__section--bordered",children:[g.jsx("h3",{className:"semiont-collaboration-panel__heading",children:i("sharing")}),g.jsx("p",{className:"semiont-collaboration-panel__description",children:i("collaborationComingSoon")})]})]})}function GK(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),l=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:l<7?`${l} day${l>1?"s":""} ago`:t.toLocaleDateString()}function KK({comment:e,isFocused:t,isHovered:n=!1,annotateMode:r=!0,ref:i}){var j;const a=hn("CommentsPanel"),s=gt(),l=Kd(e.id),[c,d]=_.useState(!1),[f,m]=_.useState(""),p=_.useRef(null);_.useImperativeHandle(i,()=>p.current);const O=jI(e)||"",b=Gd(e);_.useEffect(()=>{t&&p.current&&p.current.scrollIntoView({behavior:"smooth",block:"center"})},[t]);const S=()=>{m(O),d(!0)},w=()=>{d(!1)},k=()=>{d(!1),m("")};return g.jsxs("div",{ref:p,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"comment","data-focused":t?"true":"false",onClick:()=>{s.get("browse:click").next({annotationId:e.id,motivation:e.motivation})},...l,children:[b&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"comment",children:['"',b.substring(0,100),b.length>100?"...":"",'"']}),c?g.jsxs("div",{className:"semiont-annotation-entry__edit",onClick:T=>T.stopPropagation(),children:[g.jsx("textarea",{value:f,onChange:T=>m(T.target.value),className:"semiont-textarea",rows:3,autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-entry__edit-footer",children:[g.jsxs("span",{className:"semiont-annotation-entry__char-count",children:[f.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-entry__button-group",children:[g.jsx("button",{onClick:w,className:"semiont-button semiont-button--primary","data-type":"comment",children:a("save")}),g.jsx("button",{onClick:k,className:"semiont-button semiont-button--secondary",children:a("cancel")})]})]})]}):g.jsx("div",{className:"semiont-annotation-entry__body",children:O}),!c&&g.jsxs("div",{className:"semiont-annotation-entry__footer",children:[g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((j=e.creator)==null?void 0:j.name)||"Unknown"," • ",GK(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]}),r&&g.jsx("div",{className:"semiont-annotation-entry__actions",onClick:T=>T.stopPropagation(),children:g.jsx("button",{onClick:S,className:"semiont-text-button","data-variant":"comment",children:a("edit")})})]})]})}function JK(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function eJ({annotations:e,pendingAnnotation:t,annotateMode:n=!0,isAssisting:r=!1,progress:i,locale:a,scrollToAnnotationId:s,onScrollCompleted:l,hoveredAnnotationId:c}){const d=hn("CommentsPanel"),f=gt(),[m,p]=_.useState(""),[O,b]=_.useState(null),S=_.useRef(null),w=_.useRef(new Map),k=_.useMemo(()=>[...e].sort((Q,A)=>{const N=gi(qn(Q.target)),D=gi(qn(A.target));return!N||!D?0:N.start-D.start}),[e]),j=_.useCallback((Q,A)=>{A?w.current.set(Q,A):w.current.delete(Q)},[]);_.useEffect(()=>{if(!s)return;const Q=w.current.get(s);if(Q&&S.current){const A=Q.offsetTop,N=S.current.clientHeight,D=Q.offsetHeight,q=A-N/2+D/2;S.current.scrollTo({top:q,behavior:"smooth"}),Q.classList.remove("semiont-annotation-pulse"),Q.offsetWidth,Q.classList.add("semiont-annotation-pulse"),l&&l()}},[s]),_.useEffect(()=>{if(!c)return;const Q=w.current.get(c);if(!Q||!S.current)return;const A=S.current,N=Q.getBoundingClientRect(),D=A.getBoundingClientRect();if(!(N.top>=D.top&&N.bottom<=D.bottom)){const P=Q.offsetTop,V=A.clientHeight,Z=Q.offsetHeight,Y=P-V/2+Z/2;A.scrollTo({top:Y,behavior:"smooth"})}},[c]);const T=_.useCallback(({annotationId:Q})=>{b(Q),setTimeout(()=>b(null),3e3)},[]);gr({"browse:click":T});const E=()=>{m.trim()&&t&&(f.get("mark:submit").next({motivation:"commenting",selector:t.selector,body:[{type:"TextualBody",value:m,purpose:"commenting"}]}),p(""))};return _.useEffect(()=>{if(!t)return;const Q=A=>{A.key==="Escape"&&(f.get("mark:cancel-pending").next(void 0),p(""))};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[t]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(xf,{annotationType:"comment",count:e.length,title:d("title")}),t&&t.motivation==="commenting"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"comment",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const Q=JK(t.selector);return Q?`"${Q.substring(0,100)}${Q.length>100?"...":""}"`:d("fragmentSelected")})()}),g.jsx("textarea",{value:m,onChange:Q=>p(Q.target.value),className:"semiont-textarea",rows:3,placeholder:d("commentPlaceholder"),autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-prompt__footer",children:[g.jsxs("span",{className:"semiont-annotation-prompt__char-count",children:[m.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{f.get("mark:cancel-pending").next(void 0),p("")},className:"semiont-button semiont-button--secondary","data-type":"comment",children:d("cancel")}),g.jsx("button",{onClick:E,disabled:!m.trim(),className:"semiont-button semiont-button--primary","data-type":"comment",children:d("save")})]})]})]}),g.jsxs("div",{ref:S,className:"semiont-panel__content",children:[n&&g.jsx(Mx,{annotationType:"comment",isAssisting:r,locale:a,progress:i}),g.jsx("div",{className:"semiont-panel__list",children:k.length===0?g.jsx("p",{className:"semiont-panel__empty",children:d("noComments")}):k.map(Q=>g.jsx(KK,{comment:Q,isFocused:Q.id===O,isHovered:Q.id===c,annotateMode:n,ref:A=>j(Q.id,A)},Q.id))})]})]})}function tJ(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),l=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:l<7?`${l} day${l>1?"s":""} ago`:t.toLocaleDateString()}function nJ({highlight:e,isFocused:t,isHovered:n=!1,ref:r}){var l;const i=gt(),a=Kd(e.id),s=Gd(e);return g.jsxs("div",{ref:r,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"highlight","data-focused":t?"true":"false",onClick:()=>{i.get("browse:click").next({annotationId:e.id,motivation:e.motivation})},...a,children:[s&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"highlight",children:['"',s.substring(0,200),s.length>200?"...":"",'"']}),g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((l=e.creator)==null?void 0:l.name)||"Unknown"," • ",tJ(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function rJ({annotations:e,pendingAnnotation:t,isAssisting:n=!1,progress:r,annotateMode:i=!0,scrollToAnnotationId:a,onScrollCompleted:s,hoveredAnnotationId:l}){const c=hn("HighlightPanel"),d=gt(),[f,m]=_.useState(null),p=_.useRef(null),O=_.useRef(new Map),b=_.useMemo(()=>[...e].sort((k,j)=>{const T=gi(qn(k.target)),E=gi(qn(j.target));return!T||!E?0:T.start-E.start}),[e]),S=_.useCallback((k,j)=>{j?O.current.set(k,j):O.current.delete(k)},[]);_.useEffect(()=>{if(!a)return;const k=O.current.get(a);if(k&&p.current){const j=k.offsetTop,T=p.current.clientHeight,E=k.offsetHeight,Q=j-T/2+E/2;p.current.scrollTo({top:Q,behavior:"smooth"}),k.classList.remove("semiont-annotation-pulse"),k.offsetWidth,k.classList.add("semiont-annotation-pulse"),s&&s()}},[a]),_.useEffect(()=>{if(!l)return;const k=O.current.get(l);if(!k||!p.current)return;const j=p.current,T=k.getBoundingClientRect(),E=j.getBoundingClientRect();if(!(T.top>=E.top&&T.bottom<=E.bottom)){const A=k.offsetTop,N=j.clientHeight,D=k.offsetHeight,q=A-N/2+D/2;j.scrollTo({top:q,behavior:"smooth"})}},[l]);const w=_.useCallback(({annotationId:k})=>{m(k),setTimeout(()=>m(null),3e3)},[]);return gr({"browse:click":w}),_.useEffect(()=>{t&&t.motivation==="highlighting"&&d.get("mark:submit").next({motivation:"highlighting",selector:t.selector,body:[]})},[t]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(xf,{annotationType:"highlight",count:e.length,title:c("title")}),g.jsxs("div",{ref:p,className:"semiont-panel__content",children:[i&&g.jsx(Mx,{annotationType:"highlight",isAssisting:n,progress:r}),g.jsx("div",{className:"semiont-panel__list",children:b.length===0?g.jsx("p",{className:"semiont-panel__empty",children:c("noHighlights")}):b.map(k=>g.jsx(nJ,{highlight:k,isFocused:k.id===f,isHovered:k.id===l,ref:j=>S(k.id,j)},k.id))})]})]})}function iJ({resource:e}){const t=_.useRef(null),n=_.useRef(null),{showLineNumbers:r}=JS();_.useEffect(()=>{var f;if(!t.current)return;const a=((f=document.documentElement)==null?void 0:f.classList.contains("dark"))??!1,s=JSON.stringify(e,null,2),l=[g5(),De.editable.of(!1),nn.readOnly.of(!0)];r&&l.push(rp()),a?l.push(v5):(l.push(MR),l.push(KS(LR)));const c=nn.create({doc:s,extensions:l}),d=new De({state:c,parent:t.current});return n.current=d,()=>{d.destroy(),n.current=null}},[e,r]);const i=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(a){console.error("Failed to copy JSON-LD:",a)}};return g.jsxs("div",{className:"semiont-jsonld-panel",children:[g.jsxs("div",{className:"semiont-jsonld-panel__header",children:[g.jsx("h3",{className:"semiont-jsonld-panel__title",children:"JSON-LD"}),g.jsx("button",{onClick:i,className:"semiont-button semiont-button--icon",title:"Copy to clipboard",children:"📋 Copy"})]}),g.jsx("div",{ref:t,className:"semiont-jsonld-panel__editor"})]})}function aJ({reference:e,isFocused:t,isHovered:n=!1,routes:r,annotateMode:i=!0,isGenerating:a=!1,ref:s}){const l=hn("ReferencesPanel"),c=gt(),d=In(),f=ZR(),m=Kd(e.id),p=Gd(e)||"",O=jd(e.body),b=O?Wa(e.body):null,S=qR(e),w=qn(e.target),k=Vq(w),j=$E(w),T=k?"Fragment annotation":j?"Image annotation":"Annotation",E=e,Q=E._resolvedDocumentName,A=E._resolvedDocumentMediaType,N=DR(A),D=()=>{b&&f(r.resourceDetail(b),{resourceId:b})},q=typeof e.target=="object"&&"source"in e.target?e.target.source:"",P=()=>{q&&b&&d.bind.body(pi(q),mr(e.id),[{op:"remove",item:{type:"SpecificResource",source:b,purpose:"linking"}}]).catch(()=>{})},V=()=>{c.get("bind:initiate").next({annotationId:mr(e.id),resourceId:pi(q),defaultTitle:p,entityTypes:S})},Z=X=>{X.stopPropagation(),O?D():i&&V()},Y=O||i;return g.jsxs("div",{ref:s,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"reference","data-focused":t?"true":"false",onClick:()=>{c.get("browse:click").next({annotationId:e.id,motivation:e.motivation})},...m,children:[g.jsxs("div",{className:"semiont-annotation-entry__header",children:[g.jsxs("div",{className:"semiont-reference-icon-group",children:[g.jsx("button",{className:`semiont-reference-icon${Y?" semiont-reference-icon--clickable":""}`,title:l(O?"open":i?"resolve":"stub"),onClick:Y?Z:void 0,"data-generating":!O&&a?"true":"false",tabIndex:Y?0:-1,children:O?"🔗":"❓"}),i&&O&&g.jsx("button",{className:"semiont-reference-unlink",title:l("unlink"),onClick:X=>{X.stopPropagation(),P()},children:"⛓️💥"})]}),g.jsxs("div",{className:"semiont-annotation-entry__content",children:[p&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"reference",children:['"',p.substring(0,100),p.length>100?"...":"",'"']}),!p&&g.jsx("div",{className:"semiont-annotation-entry__meta",children:T}),Q&&g.jsx("div",{className:"semiont-reference-link",children:g.jsxs("span",{children:["→ ",N," ",Q]})})]})]}),S.length>0&&g.jsx("div",{className:"semiont-annotation-entry__tags",children:S.map((X,H)=>g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:X},H))}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function sJ(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function oJ({annotations:e=[],isAssisting:t,progress:n,annotateMode:r=!0,Link:i,routes:a,allEntityTypes:s,generatingReferenceId:l,referencedBy:c=[],referencedByLoading:d=!1,pendingAnnotation:f,scrollToAnnotationId:m,onScrollCompleted:p,hoveredAnnotationId:O}){const b=hn("ReferencesPanel"),S=gt(),[w,k]=_.useState([]),[j,T]=_.useState(null),[E,Q]=_.useState([]),[A,N]=_.useState(!1),[D,q]=_.useState(null),P=_.useRef(null),[V,Z]=_.useState(()=>{if(typeof window>"u")return!0;const G=localStorage.getItem("assist-section-expanded-reference");return G?G==="true":!0});_.useEffect(()=>{typeof window>"u"||localStorage.setItem("assist-section-expanded-reference",String(V))},[V]);const Y=_.useRef(new Map),X=_.useMemo(()=>[...e].sort((G,re)=>{const R=gi(qn(G.target)),me=gi(qn(re.target));return!R||!me?0:R.start-me.start}),[e]),H=_.useCallback((G,re)=>{re?Y.current.set(G,re):Y.current.delete(G)},[]);_.useEffect(()=>{if(!m)return;const G=Y.current.get(m);if(G&&P.current){const re=G.offsetTop,R=P.current.clientHeight,me=G.offsetHeight,Se=re-R/2+me/2;P.current.scrollTo({top:Se,behavior:"smooth"}),G.classList.remove("semiont-annotation-pulse"),G.offsetWidth,G.classList.add("semiont-annotation-pulse"),p&&p()}else console.warn("[ReferencesPanel] Element not found for scrollToAnnotationId:",m)},[m]),_.useEffect(()=>{if(!O)return;const G=Y.current.get(O);if(!G||!P.current)return;const re=P.current,R=G.getBoundingClientRect(),me=re.getBoundingClientRect();if(!(R.top>=me.top&&R.bottom<=me.bottom)){const ve=G.offsetTop,Xe=re.clientHeight,qe=G.offsetHeight,Pe=ve-Xe/2+qe/2;re.scrollTo({top:Pe,behavior:"smooth"})}},[O]);const I=_.useCallback(({annotationId:G})=>{q(G),setTimeout(()=>q(null),3e3)},[]);gr({"browse:click":I});const L=()=>{T(null),S.get("mark:assist-request").next({motivation:"linking",options:{entityTypes:w,includeDescriptiveReferences:A}})},$=_.useRef(!1);_.useEffect(()=>{if(t){$.current=!1;return}!t&&!$.current&&(n!=null&&n.completedEntityTypes)&&($.current=!0,T(n.completedEntityTypes),k([]))},[t,n==null?void 0:n.completedEntityTypes]);const ne=G=>{Q(re=>re.includes(G)?re.filter(R=>R!==G):[...re,G])},z=()=>{if(f){const G=E.join(",")||void 0;S.get("mark:submit").next({motivation:"linking",selector:f.selector,body:G?[{type:"TextualBody",value:G,purpose:"tagging"}]:[]}),Q([])}};return _.useEffect(()=>{if(!f)return;const G=re=>{re.key==="Escape"&&(S.get("mark:cancel-pending").next(void 0),Q([]))};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[f]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(xf,{annotationType:"reference",count:e.length,title:b("title")}),f&&f.motivation==="linking"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"reference",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const G=sJ(f.selector);return G?`"${G.substring(0,100)}${G.length>100?"...":""}"`:b("fragmentSelected")})()}),s.length>0&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("p",{className:"semiont-form-field__label",children:b("entityTypesOptional")}),g.jsx("div",{className:"semiont-tag-selector",children:s.map(G=>g.jsx("button",{onClick:()=>ne(G),className:"semiont-tag-selector__item","data-selected":E.includes(G)?"true":"false",children:G},G))})]}),g.jsx("div",{className:"semiont-annotation-prompt__footer",children:g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{S.get("mark:cancel-pending").next(void 0),Q([])},className:"semiont-button semiont-button--secondary","data-type":"reference",children:b("cancel")}),g.jsxs("button",{onClick:z,className:"semiont-button semiont-button--primary","data-type":"reference",children:["🔗 ",b("createReference")]})]})})]}),g.jsxs("div",{ref:P,className:"semiont-panel__content",children:[r&&g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>Z(!V),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":V,type:"button",children:[g.jsx("span",{children:b("annotateReferences")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":V,children:"›"})]}),V&&g.jsxs(g.Fragment,{children:[!t&&g.jsx("div",{className:"semiont-assist-widget","data-type":"reference",children:g.jsxs(g.Fragment,{children:[j&&j.length>0&&g.jsx("div",{className:"semiont-assist-widget__log",children:g.jsx("div",{className:"semiont-assist-widget__log-items",children:j.map((G,re)=>g.jsxs("div",{className:"semiont-assist-widget__log-item",children:[g.jsx("span",{className:"semiont-assist-widget__log-check",children:"✓"}),g.jsxs("span",{className:"semiont-assist-widget__log-type",children:[G.entityType,":"]}),g.jsx("span",{children:b("found",{count:G.foundCount})})]},re))})}),g.jsxs("div",{className:"semiont-assist-widget__entity-types",children:[g.jsx("p",{className:"semiont-assist-widget__label",children:b("selectEntityTypes")}),g.jsx("div",{className:"semiont-assist-widget__chips",children:s.length>0?s.map(G=>g.jsx("button",{onClick:()=>{k(re=>re.includes(G)?re.filter(R=>R!==G):[...re,G])},"aria-pressed":w.includes(G),"aria-label":`${w.includes(G)?b("deselect"):b("select")} ${G}`,className:"semiont-chip semiont-chip--selectable","data-selected":w.includes(G),children:G},G)):g.jsx("p",{className:"semiont-assist-widget__no-types",children:b("noEntityTypes")})})]}),w.length>0&&g.jsx("p",{className:"semiont-assist-widget__count",children:b("typesSelected",{count:w.length})}),g.jsxs("div",{className:"semiont-assist-widget__checkbox-group",children:[g.jsxs("label",{className:"semiont-assist-widget__checkbox-label",children:[g.jsx("input",{type:"checkbox",checked:A,onChange:G=>N(G.target.checked),className:"semiont-assist-widget__checkbox"}),g.jsx("span",{children:b("includeDescriptiveReferences")})]}),g.jsx("p",{className:"semiont-assist-widget__checkbox-hint",children:b("descriptiveReferencesTooltip")})]}),g.jsxs("button",{onClick:L,disabled:w.length===0,title:b("annotate"),className:"semiont-button","data-variant":"assist","data-type":"reference",children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:b("annotate")})]})]})}),t&&n&&g.jsx(YU,{progress:n,annotationType:"reference"})]})]}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-panel__divider",children:g.jsxs("h3",{className:"semiont-panel__subtitle",children:[b("outgoingReferences")," (",X.length,")"]})}),g.jsx("div",{className:"semiont-panel__list",children:X.length===0?g.jsx("p",{className:"semiont-panel__empty-message",children:b("noReferences")}):X.map(G=>g.jsx(aJ,{reference:G,isFocused:G.id===D,isHovered:G.id===O,routes:a,annotateMode:r,isGenerating:G.id===l,ref:re=>H(G.id,re)},G.id))})]}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-panel__divider",children:g.jsxs("h3",{className:"semiont-panel__subtitle",children:[b("incomingReferences")," (",c.length,")",d&&g.jsxs("span",{className:"semiont-panel__loading-indicator",children:["(",b("loading"),")"]})]})}),c.length>0?g.jsx("div",{className:"semiont-panel__list",children:c.map(G=>{var R;const re=G.target.source;return g.jsxs("div",{className:"semiont-reference-item semiont-reference-item--incoming",children:[g.jsxs("div",{className:"semiont-reference-item__header",children:[g.jsx("span",{className:"semiont-reference-item__title",children:G.resourceName||b("untitledResource")}),g.jsx(i,{href:a.resourceDetail(re),className:"semiont-reference-item__link",title:b("open"),children:"🔗"})]}),g.jsxs("span",{className:"semiont-reference-item__excerpt",children:['"',((R=G.target.selector)==null?void 0:R.exact)||b("noText"),'"']})]},G.id)})}):g.jsx("p",{className:"semiont-panel__empty-message semiont-panel__empty-message--small",children:b(d?"loadingEllipsis":"noIncomingReferences")})]})]})]})}function lJ({resourceId:e,documentEntityTypes:t,documentLocale:n,primaryMediaType:r,primaryByteSize:i,storageUri:a,isArchived:s=!1,dateCreated:l,dateModified:c,creationMethod:d,wasAttributedTo:f,wasDerivedFrom:m,generator:p}){const O=hn("ResourceInfoPanel"),b=gt();return g.jsxs("div",{className:"semiont-resource-info-panel",children:[g.jsx("h3",{className:"semiont-resource-info-panel__title",children:O("title")}),g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("locale")}),n?g.jsx("div",{className:"semiont-resource-info-panel__value",children:RI(n)}):g.jsx("div",{className:"semiont-resource-info-panel__value semiont-resource-info-panel__value--empty",children:O("notSpecified")})]}),(r||i!==void 0)&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("representation")}),g.jsxs("div",{className:"semiont-resource-info-panel__field-group",children:[r&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("mediaType")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:r})]}),i!==void 0&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("byteSize")}),g.jsxs("span",{className:"semiont-resource-info-panel__value",children:[i.toLocaleString()," bytes"]})]}),a&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("storageUri")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:a})]})]})]}),(l||c||d||f||m||p)&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("provenance")}),g.jsxs("div",{className:"semiont-resource-info-panel__field-group",children:[l&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("createdAt")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:new Date(l).toLocaleString()})]}),c&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("modifiedAt")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:new Date(c).toLocaleString()})]}),d&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("creationMethod")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:d})]}),f&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("attributedTo")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(f)?f:[f]).map(S=>S.name).join(", ")})]}),m&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("derivedFrom")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(m)?m:[m]).map((S,w)=>g.jsxs("button",{className:"semiont-resource-info-panel__link",onClick:()=>b.get("browse:reference-navigate").next({resourceId:S}),children:[w>0&&", ",S]},S))})]}),p&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("generatedBy")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(p)?p:[p]).map(S=>S.name).join(", ")})]})]})]}),t.length>0&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("entityTypeTags")}),g.jsx("div",{className:"semiont-resource-info-panel__tag-list",children:t.map(S=>g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:S},S))})]}),g.jsxs("div",{className:"semiont-resource-info-panel__action-section",children:[g.jsxs("button",{onClick:()=>b.get("yield:clone").next(void 0),className:"semiont-resource-button semiont-resource-button--secondary",children:["🔗 ",O("clone")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:O("cloneDescription")})]}),g.jsx("div",{className:"semiont-resource-info-panel__action-section",children:s?g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>b.get("mark:unarchive").next({resourceId:pi(e)}),className:"semiont-resource-button semiont-resource-button--secondary",children:["📤 ",O("unarchive")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:O("unarchiveDescription")})]}):g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>b.get("mark:archive").next({resourceId:pi(e)}),className:"semiont-resource-button semiont-resource-button--archive",children:["📦 ",O("archive")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:O("archiveDescription")})]})})]})}function cJ({highlights:e,comments:t,assessments:n,references:r,tags:i}){const a=hn("StatisticsPanel"),s=r.filter(f=>!jd(f.body)).length,l=r.filter(f=>jd(f.body)).length,c=new Map;r.forEach(f=>{qR(f).forEach(p=>{c.set(p,(c.get(p)||0)+1)})});const d=Array.from(c.entries()).sort((f,m)=>m[1]-f[1]);return g.jsx("div",{className:"semiont-statistics-panel",children:g.jsxs("div",{className:"semiont-statistics-panel__content",children:[g.jsx("h2",{className:"semiont-statistics-panel__title",children:a("title")}),g.jsxs("div",{className:"semiont-statistics-panel__list",children:[g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("highlights")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:e.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("comments")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:t.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("assessments")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:n.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("tags")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:i.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("references")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:r.length}),g.jsxs("div",{className:"semiont-statistics-panel__subitems",children:[g.jsxs("div",{className:"semiont-statistics-panel__subitem",children:[g.jsx("span",{className:"semiont-statistics-panel__sublabel",children:a("stub")}),g.jsx("span",{className:"semiont-statistics-panel__subvalue",children:s})]}),g.jsxs("div",{className:"semiont-statistics-panel__subitem",children:[g.jsx("span",{className:"semiont-statistics-panel__sublabel",children:a("resolved")}),g.jsx("span",{className:"semiont-statistics-panel__subvalue",children:l})]})]})]}),d.length>0&&g.jsxs("div",{className:"semiont-statistics-panel__entity-types",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("entityTypes")}),g.jsx("div",{className:"semiont-statistics-panel__entity-list",children:d.map(([f,m])=>g.jsxs("div",{className:"semiont-statistics-panel__entity-item",children:[g.jsx("span",{className:"semiont-statistics-panel__entity-name",children:f}),g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:m})]},f))})]})]})]})})}function uJ({tag:e,isFocused:t,isHovered:n=!1,ref:r}){const i=gt(),a=Kd(e.id),s=Gd(e),l=q6(e),c=I6(e),d=c?D6(c):null;return g.jsxs("div",{ref:r,onClick:()=>{i.get("browse:click").next({annotationId:e.id,motivation:e.motivation})},...a,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"tag","data-focused":t?"true":"false",children:[g.jsxs("div",{className:"semiont-annotation-entry__header",children:[g.jsx("span",{className:"semiont-tag-badge","data-variant":"tag",children:l}),d&&g.jsx("span",{className:"semiont-annotation-entry__meta",children:d.name})]}),g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"tag",children:['"',s.substring(0,150),s.length>150?"...":"",'"']}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function dJ(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function fJ({annotations:e,annotateMode:t=!0,isAssisting:n=!1,progress:r,pendingAnnotation:i,scrollToAnnotationId:a,onScrollCompleted:s,hoveredAnnotationId:l}){const c=hn("TaggingPanel"),d=gt(),[f,m]=_.useState("legal-irac"),[p,O]=_.useState(new Set),[b,S]=_.useState(null),w=_.useRef(null),[k,j]=_.useState(()=>{if(typeof window>"u")return!0;const X=localStorage.getItem("assist-section-expanded-tag");return X?X==="true":!0});_.useEffect(()=>{typeof window>"u"||localStorage.setItem("assist-section-expanded-tag",String(k))},[k]);const T=_.useCallback(({annotationId:X})=>{S(X),setTimeout(()=>S(null),3e3)},[]);gr({"browse:click":T});const E=_.useRef(new Map),Q=_.useMemo(()=>[...e].sort((X,H)=>{const I=gi(qn(X.target)),L=gi(qn(H.target));return!I||!L?0:I.start-L.start}),[e]),A=_.useCallback((X,H)=>{H?E.current.set(X,H):E.current.delete(X)},[]);_.useEffect(()=>{if(!a)return;const X=E.current.get(a);if(X&&w.current){const H=X.offsetTop,I=w.current.clientHeight,L=X.offsetHeight,$=H-I/2+L/2;w.current.scrollTo({top:$,behavior:"smooth"}),X.classList.remove("semiont-annotation-pulse"),X.offsetWidth,X.classList.add("semiont-annotation-pulse"),s&&s()}},[a]),_.useEffect(()=>{if(!l)return;const X=E.current.get(l);if(!X||!w.current)return;const H=w.current,I=X.getBoundingClientRect(),L=H.getBoundingClientRect();if(!(I.top>=L.top&&I.bottom<=L.bottom)){const ne=X.offsetTop,z=H.clientHeight,G=X.offsetHeight,re=ne-z/2+G/2;H.scrollTo({top:re,behavior:"smooth"})}},[l]);const N=z6(),D=N.find(X=>X.id===f),q=X=>{m(X),O(new Set)},P=X=>{const H=new Set(p);H.has(X)?H.delete(X):H.add(X),O(H)},V=()=>{D&&O(new Set(D.tags.map(X=>X.name)))},Z=()=>{O(new Set)},Y=()=>{p.size>0&&(d.get("mark:assist-request").next({motivation:"tagging",options:{schemaId:f,categories:Array.from(p)}}),O(new Set))};return _.useEffect(()=>{if(!i)return;const X=H=>{H.key==="Escape"&&d.get("mark:cancel-pending").next(void 0)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[i]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(xf,{annotationType:"tag",count:e.length,title:c("title")}),g.jsxs("div",{ref:w,className:"semiont-panel__content",children:[i&&i.motivation==="tagging"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"tag",children:[g.jsx("h3",{className:"semiont-annotation-prompt__title",children:c("createTagForSelection")}),g.jsx("div",{className:"semiont-annotation-prompt__quote",children:g.jsx("p",{className:"semiont-annotation-prompt__text",children:(()=>{const X=dJ(i.selector);return X?`"${X.substring(0,100)}${X.length>100?"...":""}"`:c("fragmentSelected")})()})}),g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectSchema")}),g.jsx("select",{value:f,onChange:X=>q(X.target.value),className:"semiont-select",children:N.map(X=>g.jsx("option",{value:X.id,children:c(`schema${X.id==="legal-irac"?"Legal":X.id==="scientific-imrad"?"Scientific":"Argument"}`)},X.id))})]}),D&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectCategory")}),g.jsxs("select",{className:"semiont-select",onChange:X=>{X.target.value&&i&&d.get("mark:submit").next({motivation:"tagging",selector:i.selector,body:[{type:"TextualBody",value:X.target.value,purpose:"tagging"},{type:"TextualBody",value:f,purpose:"classifying"}]})},defaultValue:"",children:[g.jsx("option",{value:"",children:c("chooseCategory")}),D.tags.map(X=>g.jsx("option",{value:X.name,children:X.name},X.name))]})]}),g.jsx("div",{className:"semiont-annotation-prompt__footer",children:g.jsx("button",{onClick:()=>d.get("mark:cancel-pending").next(void 0),className:"semiont-button semiont-button--secondary","data-type":"tag",children:c("cancel")})})]}),t&&g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>j(!k),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":k,type:"button",children:[g.jsx("span",{children:c("annotateTags")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":k,children:"›"})]}),k&&g.jsxs("div",{className:"semiont-assist-widget","data-assisting":n&&r?"true":"false","data-type":"tag",children:[!n&&!r&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectSchema")}),g.jsx("select",{value:f,onChange:X=>q(X.target.value),className:"semiont-select",children:N.map(X=>g.jsx("option",{value:X.id,children:c(`schema${X.id==="legal-irac"?"Legal":X.id==="scientific-imrad"?"Scientific":"Argument"}`)},X.id))}),D&&g.jsx("p",{className:"semiont-form__help",children:D.description})]}),D&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectCategories")}),g.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginBottom:"0.75rem"},children:[g.jsx("button",{onClick:V,type:"button",className:"semiont-button--secondary",style:{fontSize:"var(--semiont-text-xs)",padding:"0.25rem 0.5rem"},children:c("selectAll")}),g.jsx("button",{onClick:Z,type:"button",className:"semiont-button--secondary",style:{fontSize:"var(--semiont-text-xs)",padding:"0.25rem 0.5rem"},children:c("deselectAll")})]}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:D.tags.map(X=>g.jsxs("div",{className:"semiont-form__checkbox-field",children:[g.jsx("input",{type:"checkbox",id:`category-${X.name.replace(/\s+/g,"-")}`,checked:p.has(X.name),onChange:()=>P(X.name),className:"semiont-checkbox"}),g.jsxs("label",{htmlFor:`category-${X.name.replace(/\s+/g,"-")}`,className:"semiont-form__checkbox-label",style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:[g.jsx("span",{style:{fontWeight:500},children:c(`category${X.name.replace(/\s+/g,"")}`)}),g.jsx("span",{style:{fontSize:"var(--semiont-text-xs)",color:"var(--semiont-text-secondary)"},children:X.description})]})]},X.name))}),g.jsx("p",{className:"semiont-form__help",children:c("categoriesSelected",{count:p.size})})]})]}),g.jsxs("button",{onClick:Y,disabled:p.size===0||n,className:"semiont-button","data-variant":"assist","data-type":"tag",children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:c("annotate")})]}),n&&r&&g.jsxs("div",{className:"semiont-annotation-progress","data-type":"tag",children:[r.requestParams&&r.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params","data-type":"tag",children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),r.requestParams.map((X,H)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[X.label,":"]})," ",X.value]},H))]}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:r.message})]}),r.currentCategory&&g.jsxs("div",{className:"semiont-annotation-progress__details",children:["Processing: ",r.currentCategory,r.processedCategories!==void 0&&r.totalCategories!==void 0&&g.jsxs(g.Fragment,{children:[" (",r.processedCategories,"/",r.totalCategories,")"]})]})]}),r.percentage!==void 0&&g.jsx("div",{className:"semiont-progress-bar",children:g.jsx("div",{className:"semiont-progress-bar__fill","data-type":"tag",style:{width:`${r.percentage}%`}})})]})]})]}),g.jsx("div",{className:"semiont-panel__list",children:Q.length===0?g.jsx("p",{className:"semiont-panel__empty",children:c("noTags")}):Q.map(X=>g.jsx(uJ,{tag:X,isFocused:X.id===b,isHovered:X.id===l,ref:H=>A(X.id,H)},X.id))})]})]})}var tE=["statistics","reference","highlight","assessment","comment","tag"];function hJ(e){const t=hn("UnifiedAnnotationsPanel"),n={highlight:[],comment:[],assessment:[],reference:[],tag:[]};for(const c of e.annotations){const d=Object.values(e.annotators).find(f=>f.matchesAnnotation(c));d&&(n[d.internalType]||(n[d.internalType]=[]),n[d.internalType].push(c))}const r=n,[i,a]=_.useState(()=>{if(typeof window>"u")return e.initialTab||"statistics";const c=e.resourceId?`annotations-tab-${e.resourceId}`:"annotations-tab-global",d=localStorage.getItem(c);return d&&tE.includes(d)?d:e.initialTab||"statistics"});_.useEffect(()=>{if(typeof window>"u")return;const c=e.resourceId?`annotations-tab-${e.resourceId}`:"annotations-tab-global";localStorage.setItem(c,i)},[i,e.resourceId]),_.useEffect(()=>{e.initialTab&&e.initialTabGeneration!==void 0&&a(e.initialTab)},[e.initialTabGeneration]),_.useEffect(()=>{if(e.pendingAnnotation){const d={linking:"reference",commenting:"comment",tagging:"tag",assessing:"assessment",highlighting:"highlight"}[e.pendingAnnotation.motivation];d&&a(d)}},[e.pendingAnnotation]);const s=c=>{a(c)},l=c=>`semiont-unified-panel__tab-button${i===c?" semiont-unified-panel__tab-button--active":""}`;return g.jsxs("div",{className:"semiont-unified-panel",children:[g.jsx("h3",{className:"semiont-unified-panel__title",children:t("title")}),g.jsx("div",{className:"semiont-unified-panel__tabs",children:tE.map(c=>{if(c==="statistics")return g.jsx("button",{onClick:()=>s(c),className:l(c),title:t(c),"aria-pressed":i===c,children:g.jsx("span",{className:"semiont-unified-panel__tab-icon",children:"📊"})},c);const d=e.annotators[c];return d?g.jsx("button",{onClick:()=>s(c),className:l(c),title:t(c),"aria-pressed":i===c,children:g.jsx("span",{className:"semiont-unified-panel__tab-icon",children:d.iconEmoji})},c):null})}),g.jsx("div",{className:"semiont-unified-panel__content",children:(()=>{if(i==="statistics")return g.jsx(cJ,{highlights:r.highlight||[],comments:r.comment||[],assessments:r.assessment||[],references:r.reference||[],tags:r.tag||[]});const c=e.annotators[i];if(!c)return null;const d=r[i]||[],f=e.assistingMotivation===c.motivation,m=f?e.progress??null:null,p={annotations:d,pendingAnnotation:e.pendingAnnotation,isAssisting:f,progress:m,annotateMode:e.annotateMode,locale:e.locale,scrollToAnnotationId:e.scrollToAnnotationId,onScrollCompleted:e.onScrollCompleted,hoveredAnnotationId:e.hoveredAnnotationId};return i==="highlight"?g.jsx(rJ,{...p}):i==="reference"?g.jsx(oJ,{annotations:p.annotations,pendingAnnotation:p.pendingAnnotation,isAssisting:p.isAssisting,progress:p.progress,annotateMode:p.annotateMode,scrollToAnnotationId:p.scrollToAnnotationId,onScrollCompleted:p.onScrollCompleted,hoveredAnnotationId:p.hoveredAnnotationId,allEntityTypes:e.allEntityTypes||[],generatingReferenceId:e.generatingReferenceId,referencedBy:e.referencedBy,referencedByLoading:e.referencedByLoading,Link:e.Link,routes:e.routes}):i==="assessment"?g.jsx(WK,{...p}):i==="comment"?g.jsx(eJ,{...p}):i==="tag"?g.jsx(fJ,{...p}):null})()})]})}function mJ({Link:e,routes:t,t:n,CookiePreferences:r,onOpenKeyboardHelp:i,sourceCodeUrl:a="https://github.com/The-AI-Alliance/semiont",showPolicyLinks:s=!0}){var d,f,m;const[l,c]=_.useState(!1);return g.jsxs(g.Fragment,{children:[g.jsx("footer",{role:"contentinfo",className:"semiont-footer",children:g.jsx("div",{className:"semiont-footer__container",children:g.jsxs("div",{className:"semiont-footer__content",children:[g.jsx("div",{className:"semiont-footer__copyright",children:n("copyright",{year:new Date().getFullYear()})}),g.jsxs("div",{className:"semiont-footer__links",children:[s&&g.jsxs(g.Fragment,{children:[g.jsx(e,{href:((d=t.about)==null?void 0:d.call(t))||"/about",className:"semiont-footer__link",children:n("about")}),g.jsx(e,{href:((f=t.privacy)==null?void 0:f.call(t))||"/privacy",className:"semiont-footer__link",children:n("privacyPolicy")}),r&&g.jsx("button",{onClick:()=>c(!0),className:"semiont-footer__link",children:n("cookiePreferences")}),g.jsx(e,{href:((m=t.terms)==null?void 0:m.call(t))||"/terms",className:"semiont-footer__link",children:n("termsOfService")})]}),i&&g.jsxs("button",{onClick:i,className:"semiont-footer__link semiont-footer__link--keyboard",children:[n("keyboardShortcuts"),g.jsx("kbd",{className:"semiont-footer__kbd",children:"?"})]}),g.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"semiont-footer__link",children:n("sourceCode")})]})]})})}),s&&r&&g.jsx(r,{isOpen:l,onClose:()=>c(!1)})]})}function A0({Link:e,routes:t,t:n,isAdmin:r=!1,isModerator:i=!1,onItemClick:a,className:s="",currentPath:l}){var f,m,p,O,b,S;const c=s?`semiont-navigation-menu ${s}`:"semiont-navigation-menu",d=w=>l?l===w||l.startsWith(w+"/"):!1;return g.jsxs("nav",{className:c,"aria-label":"Main navigation",children:[g.jsx(e,{href:((f=t.knowledge)==null?void 0:f.call(t))||"/know",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((m=t.knowledge)==null?void 0:m.call(t))||"/know")?"page":void 0,children:n("know")}),(i||r)&&g.jsxs(g.Fragment,{children:[g.jsx("hr",{className:"semiont-navigation-menu__divider"}),g.jsx(e,{href:((p=t.moderate)==null?void 0:p.call(t))||"/moderate",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((O=t.moderate)==null?void 0:O.call(t))||"/moderate")?"page":void 0,children:n("moderate")})]}),r&&g.jsxs(g.Fragment,{children:[g.jsx("hr",{className:"semiont-navigation-menu__divider"}),g.jsx(e,{href:((b=t.admin)==null?void 0:b.call(t))||"/admin",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((S=t.admin)==null?void 0:S.call(t))||"/admin")?"page":void 0,children:n("administer")})]})]})}function Mre({title:e,items:t,currentPath:n,LinkComponent:r,dropdownContent:i,isCollapsed:a,icons:s,collapseSidebarLabel:l,expandSidebarLabel:c}){const d=s.chevronLeft,f=s.bars,[m,p]=_.useState(!1),O=_.useRef(null),b=gt(),S=()=>p(!m),w=()=>p(!1);return _.useEffect(()=>{const k=j=>{O.current&&!O.current.contains(j.target)&&w()};if(m)return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[m]),g.jsxs("div",{className:"semiont-simple-nav",children:[g.jsxs("div",{style:{position:"relative"},ref:i?O:void 0,children:[g.jsxs("div",{className:"semiont-nav-section__header",children:[i?g.jsx("button",{onClick:S,className:"semiont-nav-section__header-button","aria-expanded":m,"aria-haspopup":"true",type:"button",children:!a&&g.jsx("span",{className:"semiont-nav-section__header-text",children:e})}):!a&&g.jsx("span",{className:"semiont-nav-section__header-text",children:e}),g.jsx("button",{onClick:()=>b.get("browse:sidebar-toggle").next(void 0),className:"semiont-nav-section__header-icon",title:a?c:l,"aria-label":a?c:l,type:"button",children:a?g.jsx(f,{}):g.jsx(d,{})})]}),m&&i&&!a&&g.jsx("div",{className:"semiont-nav-section__dropdown",children:i(w)})]}),!a&&g.jsx("nav",{className:"semiont-nav-tabs",children:t.map(k=>{const j=n===k.href;return g.jsxs(r,{href:k.href,className:`semiont-nav-tab ${j?"semiont-nav-tab--active":""}`,title:k.description||k.name,"aria-current":j?"page":void 0,children:[g.jsx(k.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"}),g.jsx("span",{className:"semiont-nav-tab__text",children:k.name})]},k.href)})}),a&&g.jsx("nav",{className:"semiont-nav-tabs",children:t.map(k=>{const j=n===k.href;return g.jsx(r,{href:k.href,className:`semiont-nav-tab ${j?"semiont-nav-tab--active":""}`,title:k.description||k.name,"aria-current":j?"page":void 0,"aria-label":k.name,children:g.jsx(k.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"})},k.href)})})]})}function pJ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}var ag=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function qc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Lx(e){return"nodeType"in e}function Qr(e){var t,n;return e?qc(e)?e:Lx(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Dx(e){const{Document:t}=Qr(e);return e instanceof t}function _f(e){return qc(e)?!1:e instanceof Qr(e).HTMLElement}function JL(e){return e instanceof Qr(e).SVGElement}function Ic(e){return e?qc(e)?e.document:Lx(e)?Dx(e)?e:_f(e)||JL(e)?e.ownerDocument:document:document:document}var pa=ag?_.useLayoutEffect:_.useEffect;function zx(e){const t=_.useRef(e);return pa(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function gJ(){const e=_.useRef(null),t=_.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=_.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Yd(e,t){t===void 0&&(t=[e]);const n=_.useRef(e);return pa(()=>{n.current!==e&&(n.current=e)},t),n}function wf(e,t){const n=_.useRef();return _.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Op(e){const t=zx(e),n=_.useRef(null),r=_.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function Q0(e){const t=_.useRef();return _.useEffect(()=>{t.current=e},[e]),t.current}var Qb={};function kf(e,t){return _.useMemo(()=>{if(t)return t;const n=Qb[e]==null?0:Qb[e]+1;return Qb[e]=n,e+"-"+n},[e,t])}function eD(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((a,s)=>{const l=Object.entries(s);for(const[c,d]of l){const f=a[c];f!=null&&(a[c]=f+e*d)}return a},{...t})}}var dc=eD(1),Fd=eD(-1);function vJ(e){return"clientX"in e&&"clientY"in e}function qx(e){if(!e)return!1;const{KeyboardEvent:t}=Qr(e.target);return t&&e instanceof t}function OJ(e){if(!e)return!1;const{TouchEvent:t}=Qr(e.target);return t&&e instanceof t}function P0(e){if(OJ(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return vJ(e)?{x:e.clientX,y:e.clientY}:null}var $d=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[$d.Translate.toString(e),$d.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),nE="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function bJ(e){return e.matches(nE)?e:e.querySelector(nE)}var yJ={display:"none"};function SJ(e){let{id:t,value:n}=e;return ue.createElement("div",{id:t,style:yJ},n)}function xJ(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ue.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function _J(){const[e,t]=_.useState("");return{announce:_.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}var tD=_.createContext(null);function wJ(e){const t=_.useContext(tD);_.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function kJ(){const[e]=_.useState(()=>new Set),t=_.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[_.useCallback(r=>{let{type:i,event:a}=r;e.forEach(s=>{var l;return(l=s[i])==null?void 0:l.call(s,a)})},[e]),t]}var jJ={draggable:`
|
|
156
|
+
To pick up a draggable item, press the space bar.
|
|
157
|
+
While dragging, use the arrow keys to move the item.
|
|
158
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
159
|
+
`},TJ={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function CJ(e){let{announcements:t=TJ,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=jJ}=e;const{announce:a,announcement:s}=_J(),l=kf("DndLiveRegion"),[c,d]=_.useState(!1);if(_.useEffect(()=>{d(!0)},[]),wJ(_.useMemo(()=>({onDragStart(m){let{active:p}=m;a(t.onDragStart({active:p}))},onDragMove(m){let{active:p,over:O}=m;t.onDragMove&&a(t.onDragMove({active:p,over:O}))},onDragOver(m){let{active:p,over:O}=m;a(t.onDragOver({active:p,over:O}))},onDragEnd(m){let{active:p,over:O}=m;a(t.onDragEnd({active:p,over:O}))},onDragCancel(m){let{active:p,over:O}=m;a(t.onDragCancel({active:p,over:O}))}}),[a,t])),!c)return null;const f=ue.createElement(ue.Fragment,null,ue.createElement(SJ,{id:r,value:i.draggable}),ue.createElement(xJ,{id:l,announcement:s}));return n?No.createPortal(f,n):f}var An;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(An||(An={}));function bp(){}function rE(e,t){return _.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function EJ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>[...t].filter(r=>r!=null),[...t])}var Zi=Object.freeze({x:0,y:0});function nD(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function rD(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function AJ(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function iE(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function iD(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function aE(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var QJ=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=aE(t,t.left,t.top),a=[];for(const s of r){const{id:l}=s,c=n.get(l);if(c){const d=nD(aE(c),i);a.push({id:l,data:{droppableContainer:s,value:d}})}}return a.sort(rD)},PJ=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=iE(t),a=[];for(const s of r){const{id:l}=s,c=n.get(l);if(c){const d=iE(c),f=i.reduce((p,O,b)=>p+nD(d[b],O),0),m=Number((f/4).toFixed(4));a.push({id:l,data:{droppableContainer:s,value:m}})}}return a.sort(rD)};function NJ(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=i-r,l=a-n;if(r<i&&n<a){const c=t.width*t.height,d=e.width*e.height,f=s*l,m=f/(c+d-f);return Number(m.toFixed(4))}return 0}var RJ=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const a of r){const{id:s}=a,l=n.get(s);if(l){const c=NJ(l,t);c>0&&i.push({id:s,data:{droppableContainer:a,value:c}})}}return i.sort(AJ)};function MJ(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function aD(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Zi}function LJ(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return i.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...n})}}var DJ=LJ(1);function zJ(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function qJ(e,t,n){const r=zJ(t);if(!r)return e;const{scaleX:i,scaleY:a,x:s,y:l}=r,c=e.left-s-(1-i)*parseFloat(n),d=e.top-l-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),f=i?e.width/i:e.width,m=a?e.height/a:e.height;return{width:f,height:m,top:d,right:c+f,bottom:d+m,left:c}}var IJ={ignoreTransform:!1};function Xc(e,t){t===void 0&&(t=IJ);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:f}=Qr(e).getComputedStyle(e);d&&(n=qJ(n,d,f))}const{top:r,left:i,width:a,height:s,bottom:l,right:c}=n;return{top:r,left:i,width:a,height:s,bottom:l,right:c}}function sE(e){return Xc(e,{ignoreTransform:!0})}function XJ(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function ZJ(e,t){return t===void 0&&(t=Qr(e).getComputedStyle(e)),t.position==="fixed"}function BJ(e,t){t===void 0&&(t=Qr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function sg(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Dx(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!_f(i)||JL(i)||n.includes(i))return n;const a=Qr(e).getComputedStyle(i);return i!==e&&BJ(i,a)&&n.push(i),ZJ(i,a)?n:r(i.parentNode)}return e?r(e):n}function sD(e){const[t]=sg(e,1);return t??null}function Pb(e){return!ag||!e?null:qc(e)?e:Lx(e)?Dx(e)||e===Ic(e).scrollingElement?window:_f(e)?e:null:null}function oD(e){return qc(e)?e.scrollX:e.scrollLeft}function lD(e){return qc(e)?e.scrollY:e.scrollTop}function N0(e){return{x:oD(e),y:lD(e)}}var zn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(zn||(zn={}));function cD(e){return!ag||!e?!1:e===document.scrollingElement}function uD(e){const t={x:0,y:0},n=cD(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,l=e.scrollLeft>=r.x;return{isTop:i,isLeft:a,isBottom:s,isRight:l,maxScroll:r,minScroll:t}}var VJ={x:.2,y:.2};function UJ(e,t,n,r,i){let{top:a,left:s,right:l,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=VJ);const{isTop:d,isBottom:f,isLeft:m,isRight:p}=uD(e),O={x:0,y:0},b={x:0,y:0},S={height:t.height*i.y,width:t.width*i.x};return!d&&a<=t.top+S.height?(O.y=zn.Backward,b.y=r*Math.abs((t.top+S.height-a)/S.height)):!f&&c>=t.bottom-S.height&&(O.y=zn.Forward,b.y=r*Math.abs((t.bottom-S.height-c)/S.height)),!p&&l>=t.right-S.width?(O.x=zn.Forward,b.x=r*Math.abs((t.right-S.width-l)/S.width)):!m&&s<=t.left+S.width&&(O.x=zn.Backward,b.x=r*Math.abs((t.left+S.width-s)/S.width)),{direction:O,speed:b}}function YJ(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:s}=window;return{top:0,left:0,right:a,bottom:s,width:a,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function dD(e){return e.reduce((t,n)=>dc(t,N0(n)),Zi)}function FJ(e){return e.reduce((t,n)=>t+oD(n),0)}function $J(e){return e.reduce((t,n)=>t+lD(n),0)}function WJ(e,t){if(t===void 0&&(t=Xc),!e)return;const{top:n,left:r,bottom:i,right:a}=t(e);sD(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}var HJ=[["x",["left","right"],FJ],["y",["top","bottom"],$J]],Ix=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=sg(t),r=dD(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,a,s]of HJ)for(const l of a)Object.defineProperty(this,l,{get:()=>{const c=s(n),d=r[i]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},Sd=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...t)})},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function GJ(e){const{EventTarget:t}=Qr(e);return e instanceof t?e:Ic(e)}function Nb(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var ci;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ci||(ci={}));function oE(e){e.preventDefault()}function KJ(e){e.stopPropagation()}var lt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(lt||(lt={}));var fD={start:[lt.Space,lt.Enter],cancel:[lt.Esc],end:[lt.Space,lt.Enter,lt.Tab]},JJ=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case lt.Right:return{...n,x:n.x+25};case lt.Left:return{...n,x:n.x-25};case lt.Down:return{...n,y:n.y+25};case lt.Up:return{...n,y:n.y-25}}},Xx=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Sd(Ic(t)),this.windowListeners=new Sd(Qr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ci.Resize,this.handleCancel),this.windowListeners.add(ci.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ci.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&WJ(n),t(Zi)}handleKeyDown(e){if(qx(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=fD,coordinateGetter:a=JJ,scrollBehavior:s="smooth"}=r,{code:l}=e;if(i.end.includes(l)){this.handleEnd(e);return}if(i.cancel.includes(l)){this.handleCancel(e);return}const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:Zi;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(e,{active:t,context:n.current,currentCoordinates:d});if(f){const m=Fd(f,d),p={x:0,y:0},{scrollableAncestors:O}=n.current;for(const b of O){const S=e.code,{isTop:w,isRight:k,isLeft:j,isBottom:T,maxScroll:E,minScroll:Q}=uD(b),A=YJ(b),N={x:Math.min(S===lt.Right?A.right-A.width/2:A.right,Math.max(S===lt.Right?A.left:A.left+A.width/2,f.x)),y:Math.min(S===lt.Down?A.bottom-A.height/2:A.bottom,Math.max(S===lt.Down?A.top:A.top+A.height/2,f.y))},D=S===lt.Right&&!k||S===lt.Left&&!j,q=S===lt.Down&&!T||S===lt.Up&&!w;if(D&&N.x!==f.x){const P=b.scrollLeft+m.x,V=S===lt.Right&&P<=E.x||S===lt.Left&&P>=Q.x;if(V&&!m.y){b.scrollTo({left:P,behavior:s});return}V?p.x=b.scrollLeft-P:p.x=S===lt.Right?b.scrollLeft-E.x:b.scrollLeft-Q.x,p.x&&b.scrollBy({left:-p.x,behavior:s});break}else if(q&&N.y!==f.y){const P=b.scrollTop+m.y,V=S===lt.Down&&P<=E.y||S===lt.Up&&P>=Q.y;if(V&&!m.x){b.scrollTo({top:P,behavior:s});return}V?p.y=b.scrollTop-P:p.y=S===lt.Down?b.scrollTop-E.y:b.scrollTop-Q.y,p.y&&b.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(e,dc(Fd(f,this.referenceCoordinates),p))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Xx.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=fD,onActivation:i}=t,{active:a}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function lE(e){return!!(e&&"distance"in e)}function cE(e){return!!(e&&"delay"in e)}var Zx=class{constructor(e,t,n){var r;n===void 0&&(n=GJ(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:a}=i;this.props=e,this.events=t,this.document=Ic(a),this.documentListeners=new Sd(this.document),this.listeners=new Sd(n),this.windowListeners=new Sd(Qr(a)),this.initialCoordinates=(r=P0(i))!=null?r:Zi,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ci.Resize,this.handleCancel),this.windowListeners.add(ci.DragStart,oE),this.windowListeners.add(ci.VisibilityChange,this.handleCancel),this.windowListeners.add(ci.ContextMenu,oE),this.documentListeners.add(ci.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(cE(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(lE(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ci.Click,KJ,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ci.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!r)return;const l=(t=P0(e))!=null?t:Zi,c=Fd(r,l);if(!n&&s){if(lE(s)){if(s.tolerance!=null&&Nb(c,s.tolerance))return this.handleCancel();if(Nb(c,s.distance))return this.handleStart()}if(cE(s)&&Nb(c,s.tolerance))return this.handleCancel();this.handlePending(s,c);return}e.cancelable&&e.preventDefault(),a(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===lt.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},eee={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},Bx=class extends Zx{constructor(e){const{event:t}=e,n=Ic(t.target);super(e,eee,n)}};Bx.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];var tee={move:{name:"mousemove"},end:{name:"mouseup"}},R0;(function(e){e[e.RightClick=2]="RightClick"})(R0||(R0={}));var nee=class extends Zx{constructor(e){super(e,tee,Ic(e.event.target))}};nee.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===R0.RightClick?!1:(r==null||r({event:n}),!0)}}];var Rb={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},ree=class extends Zx{constructor(e){super(e,Rb)}static setup(){return window.addEventListener(Rb.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Rb.move.name,e)};function e(){}}};ree.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var xd;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(xd||(xd={}));var yp;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(yp||(yp={}));function iee(e){let{acceleration:t,activator:n=xd.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:s=5,order:l=yp.TreeOrder,pointerCoordinates:c,scrollableAncestors:d,scrollableAncestorRects:f,delta:m,threshold:p}=e;const O=see({delta:m,disabled:!a}),[b,S]=gJ(),w=_.useRef({x:0,y:0}),k=_.useRef({x:0,y:0}),j=_.useMemo(()=>{switch(n){case xd.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case xd.DraggableRect:return i}},[n,i,c]),T=_.useRef(null),E=_.useCallback(()=>{const A=T.current;if(!A)return;const N=w.current.x*k.current.x,D=w.current.y*k.current.y;A.scrollBy(N,D)},[]),Q=_.useMemo(()=>l===yp.TreeOrder?[...d].reverse():d,[l,d]);_.useEffect(()=>{if(!a||!d.length||!j){S();return}for(const A of Q){if((r==null?void 0:r(A))===!1)continue;const N=d.indexOf(A),D=f[N];if(!D)continue;const{direction:q,speed:P}=UJ(A,D,j,t,p);for(const V of["x","y"])O[V][q[V]]||(P[V]=0,q[V]=0);if(P.x>0||P.y>0){S(),T.current=A,b(E,s),w.current=P,k.current=q;return}}w.current={x:0,y:0},k.current={x:0,y:0},S()},[t,E,r,S,a,s,JSON.stringify(j),JSON.stringify(O),b,d,Q,f,JSON.stringify(p)])}var aee={x:{[zn.Backward]:!1,[zn.Forward]:!1},y:{[zn.Backward]:!1,[zn.Forward]:!1}};function see(e){let{delta:t,disabled:n}=e;const r=Q0(t);return wf(i=>{if(n||!r||!i)return aee;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[zn.Backward]:i.x[zn.Backward]||a.x===-1,[zn.Forward]:i.x[zn.Forward]||a.x===1},y:{[zn.Backward]:i.y[zn.Backward]||a.y===-1,[zn.Forward]:i.y[zn.Forward]||a.y===1}}},[n,t,r])}function oee(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return wf(i=>{var a;return t==null?null:(a=r??i)!=null?a:null},[r,t])}function lee(e,t){return _.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,a=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...a]},[]),[e,t])}var Wd;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Wd||(Wd={}));var M0;(function(e){e.Optimized="optimized"})(M0||(M0={}));var uE=new Map;function cee(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,s]=_.useState(null),{frequency:l,measure:c,strategy:d}=i,f=_.useRef(e),m=w(),p=Yd(m),O=_.useCallback(function(k){k===void 0&&(k=[]),!p.current&&s(j=>j===null?k:j.concat(k.filter(T=>!j.includes(T))))},[p]),b=_.useRef(null),S=wf(k=>{if(m&&!n)return uE;if(!k||k===uE||f.current!==e||a!=null){const j=new Map;for(let T of e){if(!T)continue;if(a&&a.length>0&&!a.includes(T.id)&&T.rect.current){j.set(T.id,T.rect.current);continue}const E=T.node.current,Q=E?new Ix(c(E),E):null;T.rect.current=Q,Q&&j.set(T.id,Q)}return j}return k},[e,a,n,m,c]);return _.useEffect(()=>{f.current=e},[e]),_.useEffect(()=>{m||O()},[n,m]),_.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),_.useEffect(()=>{m||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{O(),b.current=null},l))},[l,m,O,...r]),{droppableRects:S,measureDroppableContainers:O,measuringScheduled:a!=null};function w(){switch(d){case Wd.Always:return!1;case Wd.BeforeDragging:return n;default:return!n}}}function hD(e,t){return wf(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function uee(e,t){return hD(e,t)}function dee(e){let{callback:t,disabled:n}=e;const r=zx(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return _.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function og(e){let{callback:t,disabled:n}=e;const r=zx(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return _.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function fee(e){return new Ix(Xc(e),e)}function dE(e,t,n){t===void 0&&(t=fee);const[r,i]=_.useState(null);function a(){i(c=>{if(!e)return null;if(e.isConnected===!1){var d;return(d=c??n)!=null?d:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const s=dee({callback(c){if(e)for(const d of c){const{type:f,target:m}=d;if(f==="childList"&&m instanceof HTMLElement&&m.contains(e)){a();break}}}}),l=og({callback:a});return pa(()=>{a(),e?(l==null||l.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),s==null||s.disconnect())},[e]),r}function hee(e){const t=hD(e);return aD(e,t)}var fE=[];function mee(e){const t=_.useRef(e),n=wf(r=>e?r&&r!==fE&&e&&t.current&&e.parentNode===t.current.parentNode?r:sg(e):fE,[e]);return _.useEffect(()=>{t.current=e},[e]),n}function pee(e){const[t,n]=_.useState(null),r=_.useRef(e),i=_.useCallback(a=>{const s=Pb(a.target);s&&n(l=>l?(l.set(s,N0(s)),new Map(l)):null)},[]);return _.useEffect(()=>{const a=r.current;if(e!==a){s(a);const l=e.map(c=>{const d=Pb(c);return d?(d.addEventListener("scroll",i,{passive:!0}),[d,N0(d)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),r.current=e}return()=>{s(e),s(a)};function s(l){l.forEach(c=>{const d=Pb(c);d==null||d.removeEventListener("scroll",i)})}},[i,e]),_.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,s)=>dc(a,s),Zi):dD(e):Zi,[e,t])}function hE(e,t){t===void 0&&(t=[]);const n=_.useRef(null);return _.useEffect(()=>{n.current=null},t),_.useEffect(()=>{const r=e!==Zi;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Fd(e,n.current):Zi}function gee(e){_.useEffect(()=>{if(!ag)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function vee(e,t){return _.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:a}=r;return n[i]=s=>{a(s,t)},n},{}),[e,t])}function mD(e){return _.useMemo(()=>e?XJ(e):null,[e])}var mE=[];function Oee(e,t){t===void 0&&(t=Xc);const[n]=e,r=mD(n?Qr(n):null),[i,a]=_.useState(mE);function s(){a(()=>e.length?e.map(c=>cD(c)?r:new Ix(t(c),c)):mE)}const l=og({callback:s});return pa(()=>{l==null||l.disconnect(),s(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),i}function bee(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return _f(t)?t:e}function yee(e){let{measure:t}=e;const[n,r]=_.useState(null),i=_.useCallback(d=>{for(const{target:f}of d)if(_f(f)){r(m=>{const p=t(f);return m?{...m,width:p.width,height:p.height}:p});break}},[t]),a=og({callback:i}),s=_.useCallback(d=>{const f=bee(d);a==null||a.disconnect(),f&&(a==null||a.observe(f)),r(f?t(f):null)},[t,a]),[l,c]=Op(s);return _.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}var See=[{sensor:Bx,options:{}},{sensor:Xx,options:{}}],xee={current:{}},Xm={draggable:{measure:sE},droppable:{measure:sE,strategy:Wd.WhileDragging,frequency:M0.Optimized},dragOverlay:{measure:Xc}},_d=class extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return(t=(n=this.get(e))==null?void 0:n.node.current)!=null?t:void 0}},_ee={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new _d,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:bp},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Xm,measureDroppableContainers:bp,windowRect:null,measuringScheduled:!1},wee={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:bp,draggableNodes:new Map,over:null,measureDroppableContainers:bp},lg=_.createContext(wee),pD=_.createContext(_ee);function kee(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new _d}}}function jee(e,t){switch(t.type){case An.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case An.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case An.DragEnd:case An.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case An.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new _d(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case An.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const s=new _d(e.droppable.containers);return s.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case An.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new _d(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Tee(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=_.useContext(lg),a=Q0(r),s=Q0(n==null?void 0:n.id);return _.useEffect(()=>{if(!t&&!r&&a&&s!=null){if(!qx(a)||document.activeElement===a.target)return;const l=i.get(s);if(!l)return;const{activatorNode:c,node:d}=l;if(!c.current&&!d.current)return;requestAnimationFrame(()=>{for(const f of[c.current,d.current]){if(!f)continue;const m=bJ(f);if(m){m.focus();break}}})}},[r,t,i,s,a]),null}function Cee(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...r}),n):n}function Eee(e){return _.useMemo(()=>({draggable:{...Xm.draggable,...e==null?void 0:e.draggable},droppable:{...Xm.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Xm.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Aee(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const a=_.useRef(!1),{x:s,y:l}=typeof i=="boolean"?{x:i,y:i}:i;pa(()=>{if(!s&&!l||!t){a.current=!1;return}if(a.current||!r)return;const d=t==null?void 0:t.node.current;if(!d||d.isConnected===!1)return;const f=n(d),m=aD(f,r);if(s||(m.x=0),l||(m.y=0),a.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const p=sD(d);p&&p.scrollBy({top:m.y,left:m.x})}},[t,s,l,r,n])}var gD=_.createContext({...Zi,scaleX:1,scaleY:1}),Ms;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ms||(Ms={}));var Qee=_.memo(function(t){var n,r,i,a;let{id:s,accessibility:l,autoScroll:c=!0,children:d,sensors:f=See,collisionDetection:m=RJ,measuring:p,modifiers:O,...b}=t;const S=_.useReducer(jee,void 0,kee),[w,k]=S,[j,T]=kJ(),[E,Q]=_.useState(Ms.Uninitialized),A=E===Ms.Initialized,{draggable:{active:N,nodes:D,translate:q},droppable:{containers:P}}=w,V=N!=null?D.get(N):null,Z=_.useRef({initial:null,translated:null}),Y=_.useMemo(()=>{var Lt;return N!=null?{id:N,data:(Lt=V==null?void 0:V.data)!=null?Lt:xee,rect:Z}:null},[N,V]),X=_.useRef(null),[H,I]=_.useState(null),[L,$]=_.useState(null),ne=Yd(b,Object.values(b)),z=kf("DndDescribedBy",s),G=_.useMemo(()=>P.getEnabled(),[P]),re=Eee(p),{droppableRects:R,measureDroppableContainers:me,measuringScheduled:Se}=cee(G,{dragging:A,dependencies:[q.x,q.y],config:re.droppable}),ve=oee(D,N),Xe=_.useMemo(()=>L?P0(L):null,[L]),qe=Wr(),Pe=uee(ve,re.draggable.measure);Aee({activeNode:N!=null?D.get(N):null,config:qe.layoutShiftCompensation,initialRect:Pe,measure:re.draggable.measure});const Oe=dE(ve,re.draggable.measure,Pe),Ve=dE(ve?ve.parentElement:null),we=_.useRef({activatorEvent:null,active:null,activeNode:ve,collisionRect:null,collisions:null,droppableRects:R,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ze=P.getNodeFor((n=we.current.over)==null?void 0:n.id),Fe=yee({measure:re.dragOverlay.measure}),ft=(r=Fe.nodeRef.current)!=null?r:ve,Rt=A?(i=Fe.rect)!=null?i:Oe:null,mn=!!(Fe.nodeRef.current&&Fe.rect),ke=hee(mn?null:Oe),de=mD(ft?Qr(ft):null),Ue=mee(A?Ze??ve:null),ht=Oee(Ue),Tt=Cee(O,{transform:{x:q.x-ke.x,y:q.y-ke.y,scaleX:1,scaleY:1},activatorEvent:L,active:Y,activeNodeRect:Oe,containerNodeRect:Ve,draggingNodeRect:Rt,over:we.current.over,overlayNodeRect:Fe.rect,scrollableAncestors:Ue,scrollableAncestorRects:ht,windowRect:de}),Ot=Xe?dc(Xe,q):null,bt=pee(Ue),Si=hE(bt),ae=hE(bt,[Oe]),fe=dc(Tt,Si),je=Rt?DJ(Rt,Tt):null,Be=Y&&je?m({active:Y,collisionRect:je,droppableRects:R,droppableContainers:G,pointerCoordinates:Ot}):null,Je=iD(Be,"id"),[Ct,un]=_.useState(null),Ht=mn?Tt:dc(Tt,ae),Mt=MJ(Ht,(a=Ct==null?void 0:Ct.rect)!=null?a:null,Oe),Gt=_.useRef(null),rt=_.useCallback((Lt,Dt)=>{let{sensor:Kt,options:gn}=Dt;if(X.current==null)return;const vn=D.get(X.current);if(!vn)return;const rn=Lt.nativeEvent,On=new Kt({active:X.current,activeNode:vn,event:rn,options:gn,context:we,onAbort(Yt){if(!D.get(Yt))return;const{onDragAbort:bn}=ne.current,Rn={id:Yt};bn==null||bn(Rn),j({type:"onDragAbort",event:Rn})},onPending(Yt,Nn,bn,Rn){if(!D.get(Yt))return;const{onDragPending:or}=ne.current,Xn={id:Yt,constraint:Nn,initialCoordinates:bn,offset:Rn};or==null||or(Xn),j({type:"onDragPending",event:Xn})},onStart(Yt){const Nn=X.current;if(Nn==null)return;const bn=D.get(Nn);if(!bn)return;const{onDragStart:Rn}=ne.current,yn={activatorEvent:rn,active:{id:Nn,data:bn.data,rect:Z}};No.unstable_batchedUpdates(()=>{Rn==null||Rn(yn),Q(Ms.Initializing),k({type:An.DragStart,initialCoordinates:Yt,active:Nn}),j({type:"onDragStart",event:yn}),I(Gt.current),$(rn)})},onMove(Yt){k({type:An.DragMove,coordinates:Yt})},onEnd:Pn(An.DragEnd),onCancel:Pn(An.DragCancel)});Gt.current=On;function Pn(Yt){return async function(){const{active:bn,collisions:Rn,over:yn,scrollAdjustedTranslate:or}=we.current;let Xn=null;if(bn&&or){const{cancelDrop:lr}=ne.current;Xn={activatorEvent:rn,active:bn,collisions:Rn,delta:or,over:yn},Yt===An.DragEnd&&typeof lr=="function"&&await Promise.resolve(lr(Xn))&&(Yt=An.DragCancel)}X.current=null,No.unstable_batchedUpdates(()=>{k({type:Yt}),Q(Ms.Uninitialized),un(null),I(null),$(null),Gt.current=null;const lr=Yt===An.DragEnd?"onDragEnd":"onDragCancel";if(Xn){const Mn=ne.current[lr];Mn==null||Mn(Xn),j({type:lr,event:Xn})}})}}},[D]),Wn=_.useCallback((Lt,Dt)=>(Kt,gn)=>{const vn=Kt.nativeEvent,rn=D.get(gn);if(X.current!==null||!rn||vn.dndKit||vn.defaultPrevented)return;const On={active:rn};Lt(Kt,Dt.options,On)===!0&&(vn.dndKit={capturedBy:Dt.sensor},X.current=gn,rt(Kt,Dt))},[D,rt]),pn=lee(f,Wn);gee(f),pa(()=>{Oe&&E===Ms.Initializing&&Q(Ms.Initialized)},[Oe,E]),_.useEffect(()=>{const{onDragMove:Lt}=ne.current,{active:Dt,activatorEvent:Kt,collisions:gn,over:vn}=we.current;if(!Dt||!Kt)return;const rn={active:Dt,activatorEvent:Kt,collisions:gn,delta:{x:fe.x,y:fe.y},over:vn};No.unstable_batchedUpdates(()=>{Lt==null||Lt(rn),j({type:"onDragMove",event:rn})})},[fe.x,fe.y]),_.useEffect(()=>{const{active:Lt,activatorEvent:Dt,collisions:Kt,droppableContainers:gn,scrollAdjustedTranslate:vn}=we.current;if(!Lt||X.current==null||!Dt||!vn)return;const{onDragOver:rn}=ne.current,On=gn.get(Je),Pn=On&&On.rect.current?{id:On.id,rect:On.rect.current,data:On.data,disabled:On.disabled}:null,Yt={active:Lt,activatorEvent:Dt,collisions:Kt,delta:{x:vn.x,y:vn.y},over:Pn};No.unstable_batchedUpdates(()=>{un(Pn),rn==null||rn(Yt),j({type:"onDragOver",event:Yt})})},[Je]),pa(()=>{we.current={activatorEvent:L,active:Y,activeNode:ve,collisionRect:je,collisions:Be,droppableRects:R,draggableNodes:D,draggingNode:ft,draggingNodeRect:Rt,droppableContainers:P,over:Ct,scrollableAncestors:Ue,scrollAdjustedTranslate:fe},Z.current={initial:Rt,translated:je}},[Y,ve,Be,je,D,ft,Rt,R,P,Ct,Ue,fe]),iee({...qe,delta:q,draggingRect:je,pointerCoordinates:Ot,scrollableAncestors:Ue,scrollableAncestorRects:ht});const ba=_.useMemo(()=>({active:Y,activeNode:ve,activeNodeRect:Oe,activatorEvent:L,collisions:Be,containerNodeRect:Ve,dragOverlay:Fe,draggableNodes:D,droppableContainers:P,droppableRects:R,over:Ct,measureDroppableContainers:me,scrollableAncestors:Ue,scrollableAncestorRects:ht,measuringConfiguration:re,measuringScheduled:Se,windowRect:de}),[Y,ve,Oe,L,Be,Ve,Fe,D,P,R,Ct,me,Ue,ht,re,Se,de]),$r=_.useMemo(()=>({activatorEvent:L,activators:pn,active:Y,activeNodeRect:Oe,ariaDescribedById:{draggable:z},dispatch:k,draggableNodes:D,over:Ct,measureDroppableContainers:me}),[L,pn,Y,Oe,k,z,D,Ct,me]);return ue.createElement(tD.Provider,{value:T},ue.createElement(lg.Provider,{value:$r},ue.createElement(pD.Provider,{value:ba},ue.createElement(gD.Provider,{value:Mt},d)),ue.createElement(Tee,{disabled:(l==null?void 0:l.restoreFocus)===!1})),ue.createElement(CJ,{...l,hiddenTextDescribedById:z}));function Wr(){const Lt=(H==null?void 0:H.autoScrollEnabled)===!1,Dt=typeof c=="object"?c.enabled===!1:c===!1,Kt=A&&!Lt&&!Dt;return typeof c=="object"?{...c,enabled:Kt}:{enabled:Kt}}}),Pee=_.createContext(null),pE="button",Nee="Draggable";function Ree(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=kf(Nee),{activators:s,activatorEvent:l,active:c,activeNodeRect:d,ariaDescribedById:f,draggableNodes:m,over:p}=_.useContext(lg),{role:O=pE,roleDescription:b="draggable",tabIndex:S=0}=i??{},w=(c==null?void 0:c.id)===t,k=_.useContext(w?gD:Pee),[j,T]=Op(),[E,Q]=Op(),A=vee(s,t),N=Yd(n);pa(()=>(m.set(t,{id:t,key:a,node:j,activatorNode:E,data:N}),()=>{const q=m.get(t);q&&q.key===a&&m.delete(t)}),[m,t]);const D=_.useMemo(()=>({role:O,tabIndex:S,"aria-disabled":r,"aria-pressed":w&&O===pE?!0:void 0,"aria-roledescription":b,"aria-describedby":f.draggable}),[r,O,S,w,b,f.draggable]);return{active:c,activatorEvent:l,activeNodeRect:d,attributes:D,isDragging:w,listeners:r?void 0:A,node:j,over:p,setNodeRef:T,setActivatorNodeRef:Q,transform:k}}function Mee(){return _.useContext(pD)}var Lee="Droppable",Dee={timeout:25};function zee(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=kf(Lee),{active:s,dispatch:l,over:c,measureDroppableContainers:d}=_.useContext(lg),f=_.useRef({disabled:n}),m=_.useRef(!1),p=_.useRef(null),O=_.useRef(null),{disabled:b,updateMeasurementsFor:S,timeout:w}={...Dee,...i},k=Yd(S??r),j=_.useCallback(()=>{if(!m.current){m.current=!0;return}O.current!=null&&clearTimeout(O.current),O.current=setTimeout(()=>{d(Array.isArray(k.current)?k.current:[k.current]),O.current=null},w)},[w]),T=og({callback:j,disabled:b||!s}),E=_.useCallback((D,q)=>{T&&(q&&(T.unobserve(q),m.current=!1),D&&T.observe(D))},[T]),[Q,A]=Op(E),N=Yd(t);return _.useEffect(()=>{!T||!Q.current||(T.disconnect(),m.current=!1,T.observe(Q.current))},[Q,T]),_.useEffect(()=>(l({type:An.RegisterDroppable,element:{id:r,key:a,disabled:n,node:Q,rect:p,data:N}}),()=>l({type:An.UnregisterDroppable,key:a,id:r})),[r]),_.useEffect(()=>{n!==f.current.disabled&&(l({type:An.SetDroppableDisabled,id:r,key:a,disabled:n}),f.current.disabled=n)},[r,a,n,l]),{active:s,rect:p,isOver:(c==null?void 0:c.id)===r,node:Q,over:c,setNodeRef:A}}function vD(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function qee(e,t){return e.reduce((n,r,i)=>{const a=t.get(r);return a&&(n[i]=a),n},Array(e.length))}function bm(e){return e!==null&&e>=0}function Iee(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Xee(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}var OD=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const a=vD(t,r,n),s=t[i],l=a[i];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},ym={scaleX:1,scaleY:1},Zee=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:a,overIndex:s}=e;const l=(t=a[n])!=null?t:r;if(!l)return null;if(i===n){const d=a[s];return d?{x:0,y:n<s?d.top+d.height-(l.top+l.height):d.top-l.top,...ym}:null}const c=Bee(a,i,n);return i>n&&i<=s?{x:0,y:-l.height-c,...ym}:i<n&&i>=s?{x:0,y:l.height+c,...ym}:{x:0,y:0,...ym}};function Bee(e,t,n){const r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var bD="Sortable",yD=ue.createContext({activeIndex:-1,containerId:bD,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:OD,disabled:{draggable:!1,droppable:!1}});function Vee(e){let{children:t,id:n,items:r,strategy:i=OD,disabled:a=!1}=e;const{active:s,dragOverlay:l,droppableRects:c,over:d,measureDroppableContainers:f}=Mee(),m=kf(bD,n),p=l.rect!==null,O=_.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),b=s!=null,S=s?O.indexOf(s.id):-1,w=d?O.indexOf(d.id):-1,k=_.useRef(O),j=!Iee(O,k.current),T=w!==-1&&S===-1||j,E=Xee(a);pa(()=>{j&&b&&f(O)},[j,O,b,f]),_.useEffect(()=>{k.current=O},[O]);const Q=_.useMemo(()=>({activeIndex:S,containerId:m,disabled:E,disableTransforms:T,items:O,overIndex:w,useDragOverlay:p,sortedRects:qee(O,c),strategy:i}),[S,m,E.draggable,E.droppable,T,O,w,c,p,i]);return ue.createElement(yD.Provider,{value:Q},t)}var Uee=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return vD(n,r,i).indexOf(t)},Yee=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:s,previousItems:l,previousContainerId:c,transition:d}=e;return!d||!r||l!==a&&i===s?!1:n?!0:s!==i&&t===c},Fee={duration:200,easing:"ease"},SD="transform",$ee=$d.Transition.toString({property:SD,duration:0,easing:"linear"}),Wee={roleDescription:"sortable"};function Hee(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,s]=_.useState(null),l=_.useRef(n);return pa(()=>{if(!t&&n!==l.current&&r.current){const c=i.current;if(c){const d=Xc(r.current,{ignoreTransform:!0}),f={x:c.left-d.left,y:c.top-d.top,scaleX:c.width/d.width,scaleY:c.height/d.height};(f.x||f.y)&&s(f)}}n!==l.current&&(l.current=n)},[t,n,r,i]),_.useEffect(()=>{a&&s(null)},[a]),a}function Gee(e){let{animateLayoutChanges:t=Yee,attributes:n,disabled:r,data:i,getNewIndex:a=Uee,id:s,strategy:l,resizeObserverConfig:c,transition:d=Fee}=e;const{items:f,containerId:m,activeIndex:p,disabled:O,disableTransforms:b,sortedRects:S,overIndex:w,useDragOverlay:k,strategy:j}=_.useContext(yD),T=Kee(r,O),E=f.indexOf(s),Q=_.useMemo(()=>({sortable:{containerId:m,index:E,items:f},...i}),[m,i,E,f]),A=_.useMemo(()=>f.slice(f.indexOf(s)),[f,s]),{rect:N,node:D,isOver:q,setNodeRef:P}=zee({id:s,data:Q,disabled:T.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...c}}),{active:V,activatorEvent:Z,activeNodeRect:Y,attributes:X,setNodeRef:H,listeners:I,isDragging:L,over:$,setActivatorNodeRef:ne,transform:z}=Ree({id:s,data:Q,attributes:{...Wee,...n},disabled:T.draggable}),G=pJ(P,H),re=!!V,R=re&&!b&&bm(p)&&bm(w),me=!k&&L,Se=me&&R?z:null,Xe=R?Se??(l??j)({rects:S,activeNodeRect:Y,activeIndex:p,overIndex:w,index:E}):null,qe=bm(p)&&bm(w)?a({id:s,items:f,activeIndex:p,overIndex:w}):E,Pe=V==null?void 0:V.id,Oe=_.useRef({activeId:Pe,items:f,newIndex:qe,containerId:m}),Ve=f!==Oe.current.items,we=t({active:V,containerId:m,isDragging:L,isSorting:re,id:s,index:E,items:f,newIndex:Oe.current.newIndex,previousItems:Oe.current.items,previousContainerId:Oe.current.containerId,transition:d,wasDragging:Oe.current.activeId!=null}),Ze=Hee({disabled:!we,index:E,node:D,rect:N});return _.useEffect(()=>{re&&Oe.current.newIndex!==qe&&(Oe.current.newIndex=qe),m!==Oe.current.containerId&&(Oe.current.containerId=m),f!==Oe.current.items&&(Oe.current.items=f)},[re,qe,m,f]),_.useEffect(()=>{if(Pe===Oe.current.activeId)return;if(Pe!=null&&Oe.current.activeId==null){Oe.current.activeId=Pe;return}const ft=setTimeout(()=>{Oe.current.activeId=Pe},50);return()=>clearTimeout(ft)},[Pe]),{active:V,activeIndex:p,attributes:X,data:Q,rect:N,index:E,newIndex:qe,items:f,isOver:q,isSorting:re,isDragging:L,listeners:I,node:D,overIndex:w,over:$,setNodeRef:G,setActivatorNodeRef:ne,setDroppableNodeRef:P,setDraggableNodeRef:H,transform:Ze??Xe,transition:Fe()};function Fe(){if(Ze||Ve&&Oe.current.newIndex===E)return $ee;if(!(me&&!qx(Z)||!d)&&(re||we))return $d.Transition.toString({...d,property:SD})}}function Kee(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function Sp(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}var Jee=[lt.Down,lt.Right,lt.Up,lt.Left],ete=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:s,scrollableAncestors:l}}=t;if(Jee.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];a.getEnabled().forEach(m=>{if(!m||m!=null&&m.disabled)return;const p=i.get(m.id);if(p)switch(e.code){case lt.Down:r.top<p.top&&c.push(m);break;case lt.Up:r.top>p.top&&c.push(m);break;case lt.Left:r.left>p.left&&c.push(m);break;case lt.Right:r.left<p.left&&c.push(m);break}});const d=PJ({collisionRect:r,droppableRects:i,droppableContainers:c});let f=iD(d,"id");if(f===(s==null?void 0:s.id)&&d.length>1&&(f=d[1].id),f!=null){const m=a.get(n.id),p=a.get(f),O=p?i.get(p.id):null,b=p==null?void 0:p.node.current;if(b&&O&&m&&p){const w=sg(b).some((A,N)=>l[N]!==A),k=xD(m,p),j=tte(m,p),T=w||!k?{x:0,y:0}:{x:j?r.width-O.width:0,y:j?r.height-O.height:0},E={x:O.left,y:O.top};return T.x&&T.y?E:Fd(E,T)}}}};function xD(e,t){return!Sp(e)||!Sp(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function tte(e,t){return!Sp(e)||!Sp(t)||!xD(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function gE({resource:e,isCollapsed:t,isActive:n,href:r,onClose:i,onReorder:a,index:s,totalCount:l,LinkComponent:c,translations:d={},isDragging:f=!1}){const{attributes:m,listeners:p,setNodeRef:O,transform:b,transition:S,isDragging:w}=Gee({id:e.id}),k=_.useRef(a);_.useEffect(()=>{k.current=a});const j={transform:$d.Transform.toString(b),transition:S,opacity:w||f?.5:1},T=DR(e.mediaType),E=w||f,Q=e.storageUri?e.storageUri.replace(/^file:\/\//,""):e.name,A=_.useCallback(N=>{k.current&&N.altKey&&(N.key==="ArrowUp"?(N.preventDefault(),k.current(e.id,"up")):N.key==="ArrowDown"&&(N.preventDefault(),k.current(e.id,"down")))},[e.id]);return g.jsxs("div",{ref:O,style:j,...m,...p,"aria-selected":n,onKeyDown:A,"aria-label":`${e.name}, position ${s!==void 0?s+1:""} of ${l||""}`,className:`semiont-resource-tab ${n?"semiont-resource-tab--active":""} ${E?"semiont-resource-tab--dragging":""}`,role:"tab",children:[g.jsxs(c,{href:r,className:"semiont-resource-tab__link",title:Q,children:[g.jsx("span",{className:"semiont-resource-tab__icon","aria-hidden":"true",children:T}),!t&&g.jsx("span",{className:"semiont-resource-tab__text",children:e.name})]}),!t&&g.jsx("button",{onClick:N=>i(e.id,N),className:"semiont-resource-tab__close",title:d.closeResource||"Close resource","aria-label":`Close ${e.name}`,type:"button",children:g.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",width:"16",height:"16",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}function nte(){const{announce:e}=Mc(),t=_.useCallback(l=>{e(l,"assertive")},[e]),n=_.useCallback((l,c,d)=>{e(`Picked up ${l}. Position ${c} of ${d}. Use arrow keys to move, space to drop.`,"assertive")},[e]),r=_.useCallback((l,c,d)=>{e(`Dropped ${l} at position ${c} of ${d}.`,"assertive")},[e]),i=_.useCallback((l,c,d,f)=>{e(`Moved ${l} ${c} to position ${d} of ${f}.`,"polite")},[e]),a=_.useCallback((l,c,d,f)=>{e(`${l} moved ${c} to position ${d} of ${f}.`,"assertive")},[e]),s=_.useCallback(l=>{e(`Cannot move ${l}. Already at the ${l==="up"?"top":"bottom"} of the list.`,"polite")},[e]);return{announceReorder:t,announcePickup:n,announceDrop:r,announceMove:i,announceKeyboardReorder:a,announceCannotMove:s}}function Lre({fixedItems:e,resources:t,isCollapsed:n,currentPath:r,LinkComponent:i,onNavigate:a,getResourceHref:s,className:l="",translations:c={},icons:d,navigationMenu:f}){const m=d.chevronLeft,p=d.bars,[O,b]=_.useState(!1),S=_.useRef(null),{announcePickup:w,announceDrop:k,announceKeyboardReorder:j,announceCannotMove:T}=nte(),E=hn("CollapsibleResourceNavigation"),Q=gt(),A={title:(c==null?void 0:c.title)||E("title"),collapseSidebar:(c==null?void 0:c.collapseSidebar)||E("collapseSidebar"),expandSidebar:(c==null?void 0:c.expandSidebar)||E("expandSidebar"),dragToReorder:(c==null?void 0:c.dragToReorder)||E("dragToReorder"),dragToReorderDoc:(c==null?void 0:c.dragToReorderDoc)||E("dragToReorderDoc"),closeResource:(c==null?void 0:c.closeResource)||E("closeResource"),dragInstructions:(c==null?void 0:c.dragInstructions)||E("dragInstructions")},N=()=>b(!O),D=()=>b(!1);_.useEffect(()=>{const X=H=>{S.current&&!S.current.contains(H.target)&&D()};if(O)return document.addEventListener("mousedown",X),()=>document.removeEventListener("mousedown",X)},[O]);const q=EJ(rE(Bx,{activationConstraint:{distance:8}}),rE(Xx,{coordinateGetter:ete})),P=_.useCallback((X,H)=>{const I=t.findIndex(ne=>ne.id===X);if(I===-1)return;const L=H==="up"?I-1:I+1;if(L<0||L>=t.length){T(H);return}Q.get("browse:resource-reorder").next({oldIndex:I,newIndex:L});const $=t[I];j($.name,H,L+1,t.length)},[t]),V=(X,H)=>{H.preventDefault(),H.stopPropagation(),Q.get("browse:resource-close").next({resourceId:X});const I=s(X);r===I&&a&&e.length>0&&a(e[0].href)},Z=X=>{const{active:H}=X,I=t.find(L=>L.id===H.id);if(I){const L=t.indexOf(I);w(I.name,L+1,t.length)}},Y=X=>{const{active:H,over:I}=X;if(I&&H.id!==I.id){const L=t.findIndex(ne=>ne.id===H.id),$=t.findIndex(ne=>ne.id===I.id);if(L!==-1&&$!==-1){Q.get("browse:resource-reorder").next({oldIndex:L,newIndex:$});const ne=t[L];k(ne.name,$+1,t.length)}}};return g.jsxs("div",{className:`semiont-collapsible-nav ${l}`,children:[g.jsx("div",{id:"drag-instructions",className:"sr-only","aria-live":"polite",children:A.dragInstructions}),g.jsx("div",{className:"sr-only",role:"status","aria-atomic":"true",children:"Resources can be reordered using Alt+Up or Alt+Down arrow keys."}),g.jsxs("div",{className:"semiont-collapsible-nav__container",children:[g.jsxs("div",{style:{position:"relative"},ref:f?S:void 0,children:[g.jsxs("div",{className:"semiont-nav-section__header",children:[!n&&f&&g.jsx("button",{onClick:N,className:"semiont-nav-section__header-text","aria-expanded":O,"aria-haspopup":"true",type:"button",children:A.title}),!n&&!f&&g.jsx("span",{className:"semiont-nav-section__header-text",children:A.title}),g.jsx("button",{onClick:()=>Q.get("browse:sidebar-toggle").next(void 0),className:"semiont-nav-section__header-icon",title:n?A.expandSidebar:A.collapseSidebar,"aria-label":n?A.expandSidebar:A.collapseSidebar,type:"button",children:n?g.jsx(p,{}):g.jsx(m,{})})]}),O&&f&&!n&&g.jsx("div",{className:"semiont-nav-section__dropdown",children:f(D)})]}),!n&&g.jsx("nav",{className:"semiont-nav-tabs",children:e.map(X=>{const H=r===X.href;return g.jsxs(i,{href:X.href,className:`semiont-nav-tab ${H?"semiont-nav-tab--active":""}`,title:X.description||X.name,"aria-current":H?"page":void 0,children:[g.jsx(X.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"}),g.jsx("span",{className:"semiont-nav-tab__text",children:X.name})]},X.href)})}),n&&g.jsx("nav",{className:"semiont-nav-tabs",children:e.map(X=>{const H=r===X.href;return g.jsx(i,{href:X.href,className:`semiont-nav-tab ${H?"semiont-nav-tab--active":""}`,title:X.description||X.name,"aria-current":H?"page":void 0,"aria-label":X.name,children:g.jsx(X.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"})},X.href)})}),g.jsx("div",{className:"semiont-resource-tabs",role:"tablist","aria-label":"Open resources",children:n?t.map(X=>{const H=s(X.id),I=r===H;return g.jsx(gE,{resource:X,isCollapsed:n,isActive:I,href:H,onClose:V,LinkComponent:i,translations:{dragToReorder:A.dragToReorder,dragToReorderDoc:A.dragToReorderDoc,closeResource:A.closeResource}},X.id)}):g.jsx(Qee,{sensors:q,collisionDetection:QJ,onDragStart:Z,onDragEnd:Y,children:g.jsx(Vee,{items:t.map(X=>X.id),strategy:Zee,children:t.map((X,H)=>{const I=s(X.id),L=r===I;return g.jsx(gE,{resource:X,isCollapsed:n,isActive:L,href:I,onClose:V,onReorder:P,index:H,totalCount:t.length,LinkComponent:i,translations:{dragToReorder:A.dragToReorder,dragToReorderDoc:A.dragToReorderDoc,closeResource:A.closeResource}},X.id)})})})})]})]})}function _D({context:e,translations:t}){const n=e.graphContext,r=(n==null?void 0:n.connections)??[],i=(n==null?void 0:n.citedBy)??[],a=(n==null?void 0:n.citedByCount)??0;return g.jsx(g.Fragment,{children:n&&(r.length>0||a>0)&&g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[r.length>0&&g.jsxs("div",{children:[g.jsx("div",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--semiont-text-tertiary)",marginBottom:"0.375rem"},children:t.connectionsLabel}),g.jsx("ul",{style:{display:"flex",flexDirection:"column",gap:"0.375rem",listStyle:"none",padding:0,margin:0},children:r.map(s=>g.jsxs("li",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.375rem",fontSize:"var(--semiont-text-sm)"},children:[g.jsx("span",{style:{color:"var(--semiont-text-primary)",fontWeight:500},children:s.resourceName}),s.bidirectional&&g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem"},children:"mutual"}),s.entityTypes&&s.entityTypes.map(l=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem"},children:l},l))]},s.resourceId))})]}),a>0&&g.jsxs("div",{children:[g.jsxs("div",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--semiont-text-tertiary)",marginBottom:"0.375rem"},children:[t.citedByLabel," (",a,")"]}),i.length>0&&g.jsx("ul",{style:{display:"flex",flexDirection:"column",gap:"0.25rem",listStyle:"none",padding:0,margin:0},children:i.map(s=>g.jsx("li",{style:{fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-primary)",fontWeight:500},children:s.resourceName},s.resourceId))})]})]})})}function rte({context:e,contextLoading:t,contextError:n,userHint:r,onUserHintChange:i,onBind:a,onGenerate:s,onCompose:l,translations:c}){var b,S,w;const[d,f]=_.useState(!1),m=!t&&!n&&!!e,p=e==null?void 0:e.sourceContext,O=_.useRef(null);return _.useEffect(()=>{O.current&&O.current.scrollIntoView({block:"center",behavior:"instant"})},[e]),g.jsxs("div",{className:"semiont-gather__outer",children:[t&&g.jsxs("div",{className:"semiont-gather__loading",children:[g.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[g.jsx("span",{className:"semiont-gather__loading-dot"}),g.jsx("span",{className:"semiont-gather__loading-dot"}),g.jsx("span",{className:"semiont-gather__loading-dot"})]}),g.jsx("span",{className:"semiont-gather__loading-text",children:c.loadingContext})]}),!!n&&g.jsx("div",{style:{textAlign:"center",padding:"1rem 0",color:"var(--semiont-color-red-600)"},children:c.failedContext}),e&&g.jsxs(g.Fragment,{children:[p&&g.jsxs("div",{className:"semiont-gather__source-strip",children:[g.jsxs("label",{className:"semiont-form__label",style:{marginBottom:"0.375rem"},children:[c.sourceContextLabel,(b=e.sourceResource)!=null&&b.name?` "${e.sourceResource.name}"`:""]}),g.jsxs("div",{className:`semiont-gather__source-box${d?" semiont-gather__source-box--expanded":""}`,children:[g.jsx("div",{className:"semiont-gather__source-context",children:g.jsxs("div",{style:{fontSize:"var(--semiont-text-sm)",fontFamily:"monospace",whiteSpace:"pre-wrap",color:"var(--semiont-text-secondary)"},children:[p.before&&g.jsx("span",{children:p.before}),g.jsx("span",{ref:O,style:{backgroundColor:"var(--semiont-color-primary-100)",padding:"0 0.25rem",fontWeight:600,color:"var(--semiont-color-primary-900)"},children:p.selected}),(((S=e.metadata)==null?void 0:S.entityTypes)??[]).map(k=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem",fontWeight:400,verticalAlign:"middle",marginLeft:"0.25rem"},children:k},k)),((w=e.annotation)==null?void 0:w.motivation)&&g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem",fontWeight:400,verticalAlign:"middle",marginLeft:"0.25rem"},children:e.annotation.motivation}),p.after&&g.jsx("span",{children:p.after})]})}),g.jsx("button",{type:"button",className:"semiont-gather__expand-btn",onClick:()=>f(k=>!k),children:d?"▲ less":"▼ more"})]})]}),g.jsxs("div",{className:"semiont-gather__body",children:[g.jsx("div",{className:"semiont-gather__left",children:g.jsx(_D,{context:e,translations:c})}),g.jsx("div",{className:"semiont-gather__right",children:g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{className:"semiont-form__label",children:c.userHintLabel}),g.jsx("textarea",{value:r,onChange:k=>i(k.target.value),placeholder:c.userHintPlaceholder,className:"semiont-search-modal__search-input semiont-gather__hint-textarea",style:{resize:"vertical",fontFamily:"inherit"}})]})})]}),g.jsxs("div",{className:"semiont-gather__footer",children:[g.jsx("div",{className:"semiont-gather__footer-label",children:c.resolutionStrategyLabel}),g.jsxs("div",{className:"semiont-gather__actions",children:[g.jsxs("button",{type:"button",onClick:a,disabled:!m,className:"semiont-button--primary semiont-button--flex",children:["🔍 ",c.search,"…"]}),g.jsxs("button",{type:"button",onClick:s,disabled:!m,className:"semiont-button--primary semiont-button--flex",children:["✨ ",c.generate,"…"]}),g.jsxs("button",{type:"button",onClick:l,disabled:!m,className:"semiont-button--secondary semiont-button--flex",children:["✍️ ",c.compose]})]})]})]})]})}function ite({defaultTitle:e,locale:t,context:n,onBack:r,onCancel:i,onGenerate:a,translations:s}){const[l,c]=_.useState(e),[d,f]=_.useState(""),[m,p]=_.useState(""),[O,b]=_.useState(t),[S,w]=_.useState(.7),[k,j]=_.useState(500),T=E=>{E.preventDefault();const Q=m.trim();a({title:l,storagePath:`file://${d}`,...Q?{prompt:Q}:{},language:O,temperature:S,maxTokens:k,context:n})};return g.jsxs("form",{onSubmit:T,className:"semiont-form semiont-form--scrollable",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-title",className:"semiont-form__label",children:s.resourceTitle}),g.jsx("input",{id:"wizard-title",type:"text",value:l,onChange:E=>c(E.target.value),required:!0,className:"semiont-input",placeholder:s.resourceTitlePlaceholder})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-storagePath",className:"semiont-form__label",children:"Save location"}),g.jsxs("div",{className:"semiont-input-addon",children:[g.jsx("span",{className:"semiont-input-addon__prefix",children:"file://"}),g.jsx("input",{id:"wizard-storagePath",type:"text",value:d,onChange:E=>f(E.target.value),required:!0,className:"semiont-input semiont-input--addon",placeholder:"generated/my-resource.md"})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-prompt",className:"semiont-form__label",children:s.additionalInstructions}),g.jsx("textarea",{id:"wizard-prompt",value:m,onChange:E=>p(E.target.value),rows:2,className:"semiont-textarea",placeholder:s.additionalInstructionsPlaceholder})]}),g.jsxs("div",{className:"semiont-form__inline-row",children:[g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline",children:[g.jsx("label",{htmlFor:"wizard-language",className:"semiont-form__label",children:s.language}),g.jsx("select",{id:"wizard-language",value:O,onChange:E=>b(E.target.value),className:"semiont-select",children:ec.map(E=>g.jsx("option",{value:E.code,children:E.nativeName},E.code))})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline semiont-form__field--grow",children:[g.jsxs("label",{htmlFor:"wizard-temperature",className:"semiont-form__label",children:[s.creativity," (",S.toFixed(1),")"]}),g.jsx("input",{id:"wizard-temperature",type:"range",min:"0",max:"1",step:"0.1",value:S,onChange:E=>w(parseFloat(E.target.value)),className:"semiont-slider"}),g.jsxs("div",{className:"semiont-slider__labels semiont-slider__labels--small",children:[g.jsx("span",{children:s.creativityFocused}),g.jsx("span",{children:s.creativityCreative})]})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline semiont-form__field--narrow",children:[g.jsx("label",{htmlFor:"wizard-maxTokens",className:"semiont-form__label",children:s.maxLength}),g.jsx("input",{id:"wizard-maxTokens",type:"number",min:"100",max:"4000",step:"100",value:k,onChange:E=>j(parseInt(E.target.value)),className:"semiont-input"})]})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:i,className:"semiont-button--secondary semiont-button--flex",children:["✕ ",s.cancel]}),g.jsxs("button",{type:"button",onClick:r,className:"semiont-button--secondary semiont-button--flex",children:["◀ ",s.back]}),g.jsxs("button",{type:"submit",className:"semiont-button--primary semiont-button--flex",children:["✨ ",s.generate]})]})]})}function ate({isSearching:e=!1,onBack:t,onCancel:n,onSearch:r,translations:i}){const[a,s]=_.useState(10),[l,c]=_.useState(!0),d=f=>{f.preventDefault(),r({limit:a,useSemanticScoring:l})};return g.jsxs("form",{onSubmit:d,className:"semiont-form",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-limit",className:"semiont-form__label",children:i.maxResults}),g.jsxs("select",{id:"wizard-limit",value:a,onChange:f=>s(parseInt(f.target.value)),className:"semiont-select",children:[g.jsx("option",{value:1,children:"1"}),g.jsx("option",{value:5,children:"5"}),g.jsx("option",{value:10,children:"10"}),g.jsx("option",{value:20,children:"20"})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsxs("label",{className:"semiont-form__label",style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[g.jsx("input",{type:"checkbox",checked:l,onChange:f=>c(f.target.checked)}),i.semanticScoring]}),g.jsx("p",{className:"semiont-form__help",children:i.semanticScoringHelp})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:n,className:"semiont-button--secondary semiont-button--flex",disabled:e,children:["✕ ",i.cancel]}),g.jsxs("button",{type:"button",onClick:t,className:"semiont-button--secondary semiont-button--flex",disabled:e,children:["◀ ",i.back]}),g.jsx("button",{type:"submit",className:"semiont-button--primary semiont-button--flex",disabled:e,"data-generating":e?"true":"false",children:e?`✨ ${i.searching}`:`🔍 ${i.search}`})]})]})}function ste({results:e,context:t,onLink:n,onBack:r,onCancel:i,translations:a}){return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"semiont-search-results__two-pane",children:[g.jsx("div",{className:"semiont-search-results__context-pane",children:g.jsx(_D,{context:t,translations:a})}),g.jsx("div",{className:"semiont-search-results__results-pane",children:e.length===0?g.jsx("div",{className:"semiont-modal__empty-state",style:{textAlign:"center",padding:"2rem 0"},children:a.noResults}):e.map(s=>{const l=s["@id"];return g.jsxs("div",{style:{padding:"0.75rem",borderBottom:"1px solid var(--semiont-border-primary)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"0.75rem"},children:[g.jsxs("div",{style:{flex:1,minWidth:0},children:[g.jsx("div",{style:{fontWeight:500,color:"var(--semiont-text-primary)"},children:s.name}),s.description&&g.jsx("div",{style:{fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-secondary)",marginTop:"0.25rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.description}),g.jsxs("div",{style:{fontSize:"var(--semiont-text-xs)",color:"var(--semiont-text-tertiary)",marginTop:"0.25rem",display:"flex",gap:"0.5rem"},children:[s.score!==void 0&&g.jsxs("span",{children:[a.score,": ",s.score]}),s.matchReason&&g.jsx("span",{children:s.matchReason})]})]}),g.jsxs("button",{type:"button",onClick:()=>n(l),className:"semiont-button--primary",style:{flexShrink:0},children:["🔗 ",a.link]})]},l)})})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:i,className:"semiont-button--secondary semiont-button--flex",children:["✕ ",a.cancel]}),g.jsxs("button",{type:"button",onClick:r,className:"semiont-button--secondary semiont-button--flex",children:["◀ ",a.back]})]})]})}function ote({isOpen:e,onClose:t,annotationId:n,resourceId:r,defaultTitle:i,entityTypes:a,locale:s,context:l,contextLoading:c,contextError:d,eventBus:f,onGenerateSubmit:m,onLinkResource:p,onComposeNavigate:O,translations:b}){const[S,w]=_.useState({step:"gather"}),[k,j]=_.useState(!1),[T,E]=_.useState("");_.useEffect(()=>{e&&(w({step:"gather"}),j(!1),E(""))},[e]),_.useEffect(()=>{if(!e)return;const Y=f.get("match:search-results").subscribe(X=>{n&&X.referenceId===n&&(j(!1),w({step:"search-results",results:X.response}))});return()=>Y.unsubscribe()},[e,f,n]);const Q=_.useCallback(()=>{w({step:"configure-search"})},[]),A=_.useCallback(()=>{w({step:"configure-generation"})},[]),N=_.useCallback(()=>{if(!l||!n||!r)return;const Y=T?{...l,userHint:T}:l;O(Y,n,r,i,a),t()},[l,n,r,i,a,O,t,T]),D=_.useCallback(()=>{w({step:"gather"})},[]),q=_.useCallback(Y=>{if(!n||!l||!r)return;j(!0);const X=T?{...l,userHint:T}:l;f.get("match:search-requested").next({correlationId:crypto.randomUUID(),resourceId:r,referenceId:n,context:X,limit:Y.limit,useSemanticScoring:Y.useSemanticScoring})},[n,r,l,f,T]),P=_.useCallback(Y=>{n&&(m(n,Y),t())},[n,m,t]),V=_.useCallback(Y=>{n&&(p(n,Y),t())},[n,p,t]),Z=S.step==="gather"?b.gatherTitle:S.step==="configure-generation"?b.configureGenerationTitle:S.step==="configure-search"?b.configureSearchTitle:b.searchResultsTitle;return g.jsx(nl,{appear:!0,show:e,children:g.jsxs(Lc,{as:"div",className:"semiont-search-modal",onClose:t,children:[g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-search-modal__backdrop"})}),g.jsx("div",{className:"semiont-search-modal__wrapper",children:g.jsx("div",{className:"semiont-search-modal__centering semiont-search-modal__centering--center",children:g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(rl,{className:`semiont-search-modal__panel semiont-search-modal__panel--with-border${S.step==="search-results"?" semiont-search-modal__panel--wide":""}${S.step==="gather"?" semiont-search-modal__panel--gather":""}`,children:[g.jsxs("div",{className:"semiont-search-modal__header",children:[g.jsx(bf,{className:"semiont-search-modal__title",children:Z}),g.jsx("button",{onClick:t,className:"semiont-search-modal__close-button","aria-label":"Close",children:"✕"})]}),S.step==="gather"&&g.jsx(rte,{context:l,contextLoading:c,contextError:d,userHint:T,onUserHintChange:E,onBind:Q,onGenerate:A,onCompose:N,translations:{title:b.gatherTitle,sourceContextLabel:b.sourceContextLabel,connectionsLabel:b.connectionsLabel,citedByLabel:b.citedByLabel,userHintLabel:b.userHintLabel,userHintPlaceholder:b.userHintPlaceholder,loadingContext:b.loadingContext,failedContext:b.failedContext,search:b.search,generate:b.generate,compose:b.compose,resolutionStrategyLabel:b.resolutionStrategyLabel}}),S.step==="configure-generation"&&l&&g.jsx(ite,{defaultTitle:i,locale:s,context:l,onBack:D,onCancel:t,onGenerate:P,translations:{resourceTitle:b.resourceTitle,resourceTitlePlaceholder:b.resourceTitlePlaceholder,additionalInstructions:b.additionalInstructions,additionalInstructionsPlaceholder:b.additionalInstructionsPlaceholder,language:b.language,languageHelp:b.languageHelp,creativity:b.creativity,creativityFocused:b.creativityFocused,creativityCreative:b.creativityCreative,maxLength:b.maxLength,maxLengthHelp:b.maxLengthHelp,cancel:b.cancel,back:b.back,generate:b.generate}}),S.step==="configure-search"&&g.jsx(ate,{isSearching:k,onBack:D,onCancel:t,onSearch:q,translations:{maxResults:b.maxResults,semanticScoring:b.semanticScoring,semanticScoringHelp:b.semanticScoringHelp,cancel:b.cancel,back:b.back,search:b.search,searching:b.searching}}),S.step==="search-results"&&l&&g.jsx(ste,{results:S.results,context:l,onLink:V,onBack:D,onCancel:t,translations:{noResults:b.noResults,link:b.link,back:b.back,cancel:b.cancel,score:b.score,sourceContextLabel:b.sourceContextLabel,connectionsLabel:b.connectionsLabel,citedByLabel:b.citedByLabel,userHintLabel:b.userHintLabel,userHintPlaceholder:b.userHintPlaceholder}})]})})})})]})})}var lte=Ac(CS());function cte(){const{announce:e}=Mc(),t=_.useCallback(()=>{e("Searching...","polite")},[e]),n=_.useCallback((a,s)=>{e(a===0?`No results found for ${s}`:a===1?`1 result found for ${s}`:`${a} results found for ${s}`,"polite")},[e]),r=_.useCallback((a,s)=>{e(`Selected ${s}: ${a}. Press Enter to navigate.`,"polite")},[e]),i=_.useCallback((a,s)=>{e(`Navigating to ${s}: ${a}`,"assertive")},[e]);return{announceSearching:t,announceSearchResults:n,announceSelection:r,announceNavigation:i}}function L0(e){const[t,n]=_.useState(void 0);return _.useEffect(()=>{const r=e.subscribe(n);return()=>r.unsubscribe()},[e]),t}var ute=300,dte=5;function Dre({isOpen:e,onClose:t,onNavigate:n,translations:r={}}){const{announceSearchResults:i,announceSearching:a}=cte(),s=In(),[l,c]=_.useState(0),d={placeholder:r.placeholder||"Search resources, entities...",searching:r.searching||"Searching...",noResults:r.noResults||"No results found for",startTyping:r.startTyping||"Start typing to search...",navigate:r.navigate||"Navigate",select:r.select||"Select",close:r.close||"Close",enter:r.enter||"Enter",esc:r.esc||"ESC"},[f]=_.useState(()=>A6(k=>s.browse.resources({search:k,limit:dte}).pipe((0,lte.map)(j=>{if(j!==void 0)return j.map(T=>{var Q;const E=Hb(T);return E?{type:"resource",id:E,name:T.name,content:(Q=T.content)==null?void 0:Q.substring(0,150)}:null}).filter(T=>T!==null)})),{debounceMs:ute}));_.useEffect(()=>()=>f.dispose(),[f]);const m=L0(f.query$)??"",p=L0(f.state$),O=(p==null?void 0:p.results)??[],b=(p==null?void 0:p.isSearching)??!1;_.useEffect(()=>{e&&(f.setQuery(""),c(0))},[e,f]),_.useEffect(()=>{c(0)},[O.length]),_.useEffect(()=>{m.trim()&&(b?a():i(O.length,m))},[b,O.length]);const S=k=>{k.key==="ArrowDown"?(k.preventDefault(),c(j=>(j+1)%Math.max(1,O.length))):k.key==="ArrowUp"?(k.preventDefault(),c(j=>(j-1+Math.max(1,O.length))%Math.max(1,O.length))):k.key==="Enter"&&O[l]&&(k.preventDefault(),w(O[l]))},w=k=>{t(),n(k.type,k.id)};return g.jsx(nl,{appear:!0,show:e,children:g.jsxs(Lc,{as:"div",className:"semiont-search-modal",onClose:t,children:[g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-search-modal__backdrop"})}),g.jsx("div",{className:"semiont-search-modal__wrapper",children:g.jsx("div",{className:"semiont-search-modal__centering",children:g.jsx(pr,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(rl,{className:"semiont-search-modal__panel",children:[g.jsxs("div",{className:"semiont-search-modal__input-container",children:[g.jsx("div",{className:"semiont-search-modal__search-icon-wrapper",children:g.jsx("svg",{className:"semiont-search-modal__search-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),g.jsx("input",{type:"text",value:m,onChange:k=>f.setQuery(k.target.value),onKeyDown:S,placeholder:d.placeholder,className:"semiont-search-modal__input",autoFocus:!0}),g.jsx("div",{className:"semiont-search-modal__esc-wrapper",children:g.jsx("kbd",{className:"semiont-search-modal__kbd",children:d.esc})})]}),g.jsxs("div",{className:"semiont-search-modal__results",children:[b&&g.jsx("div",{className:"semiont-search-modal__empty",children:d.searching}),!b&&m&&O.length===0&&g.jsxs("div",{className:"semiont-search-modal__empty",children:[d.noResults,' "',m,'"']}),!b&&O.length>0&&g.jsx("div",{className:"semiont-search-modal__results-list",children:O.map((k,j)=>g.jsxs("button",{onClick:()=>w(k),onMouseEnter:()=>c(j),className:`semiont-search-modal__result ${j===l?"semiont-search-modal__result--selected":""}`,children:[g.jsx("div",{className:"semiont-search-modal__result-icon-wrapper",children:k.type==="resource"?g.jsx("svg",{className:"semiont-search-modal__result-icon semiont-search-modal__result-icon--resource",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}):g.jsx("svg",{className:"semiont-search-modal__result-icon semiont-search-modal__result-icon--entity",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}),g.jsxs("div",{className:"semiont-search-modal__result-content",children:[g.jsxs("div",{className:"semiont-search-modal__result-header",children:[g.jsx("span",{className:"semiont-search-modal__result-name",children:k.name}),k.type==="entity"&&k.entityType&&g.jsx("span",{className:"semiont-search-modal__result-badge",children:k.entityType})]}),k.content&&g.jsx("p",{className:"semiont-search-modal__result-description",children:k.content})]}),j===l&&g.jsx("div",{className:"semiont-search-modal__result-action",children:g.jsx("kbd",{className:"semiont-search-modal__kbd",children:d.enter})})]},`${k.type}-${k.id}`))}),!b&&!m&&g.jsxs("div",{className:"semiont-search-modal__help",children:[g.jsx("div",{className:"semiont-search-modal__help-text",children:d.startTyping}),g.jsxs("div",{className:"semiont-search-modal__shortcuts",children:[g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:"↑↓"}),d.navigate]}),g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:d.enter}),d.select]}),g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:"Esc"}),d.close]})]})]})]})]})})})})]})})}Ac(CS());function fte(){return g.jsx("div",{className:"semiont-skip-links",children:g.jsxs("div",{className:"semiont-skip-links-container",children:[g.jsx("a",{href:"#main-content",className:"semiont-skip-link semiont-skip-link-first",children:"Skip to main content"}),g.jsx("a",{href:"#main-navigation",className:"semiont-skip-link",children:"Skip to navigation"}),g.jsx("a",{href:"#search",className:"semiont-skip-link semiont-skip-link-last",children:"Skip to search"})]})})}function zre({isFullyAuthenticated:e=!1,isAuthenticated:t=!1,hasValidBackendToken:n=!1}){const i=mZ().status.useQuery(3e4),a=()=>{if(t&&!n)return"🚀 Frontend Status: Ready • Backend: Please sign out and sign in again to reconnect";if(!e)return"🚀 Frontend Status: Ready • Backend: Authentication required";if(i.data)return`🚀 Frontend Status: Ready • Backend: ${i.data.status} (v${i.data.version})`;if(i.isLoading)return"🚀 Frontend Status: Ready • Backend: Connecting...";if(i.error){const l=i.error instanceof Error?i.error.message:String(i.error);return l.includes("401")||l.includes("Unauthorized")?"🚀 Frontend Status: Ready • Backend: Please sign out and sign in again":"🚀 Frontend Status: Ready • Backend: Connection failed"}return"🚀 Frontend Status: Ready • Backend: Unknown"},s=()=>t&&!n?"warning":e?i.data?"success":i.isLoading?"loading":"error":"info";return g.jsxs("section",{className:"semiont-status-display","data-status":s(),role:"status","aria-live":"polite","aria-label":"System status information",children:[g.jsxs("p",{className:"semiont-status-message",children:[g.jsx("span",{className:"sr-only",children:"System status: "}),a()]}),e?i.error?g.jsxs("p",{className:"semiont-status-hint semiont-status-error-hint",role:"alert",children:[g.jsx("span",{className:"sr-only",children:"Error: "}),"Check that the backend server is running and accessible"]}):null:g.jsx("p",{className:"semiont-status-hint",children:"Sign in to view backend status"})]})}function xp({t:e,className:t="",size:n="lg",showTagline:r=!0,animated:i=!0,compactTagline:a=!1}){return g.jsxs("div",{className:`semiont-branding ${t}`,"data-size":n,"data-animated":i,"data-compact-tagline":a,children:[g.jsx("h1",{className:"semiont-branding-title",children:g.jsx("span",{className:"semiont-branding-text",children:"Semiont"})}),r&&g.jsx("h2",{className:"semiont-branding-tagline",children:e("tagline")})]})}function hte({Link:e,routes:t,t:n,tHome:r,showBranding:i=!0,brandingLink:a="/",variant:s="standalone",isAuthenticated:l=!1,isAdmin:c=!1,isModerator:d=!1,currentPath:f}){const{isOpen:m,toggle:p,close:O,dropdownRef:b}=Y6();if(s==="floating"&&i)return g.jsxs("div",{className:"semiont-unified-header semiont-unified-header--floating","data-variant":"floating",ref:b,children:[g.jsx("button",{onClick:p,className:"semiont-unified-header__branding-button","aria-label":"Navigation menu","aria-expanded":m,"aria-controls":"nav-menu-dropdown-1","aria-haspopup":"true",id:"nav-menu-button-1",children:g.jsx(xp,{t:r,size:"sm",showTagline:!0,animated:!1,compactTagline:!0,className:"semiont-unified-header__branding"})}),m&&l&&g.jsx("div",{id:"nav-menu-dropdown-1",className:"semiont-unified-header__dropdown",role:"menu","aria-orientation":"vertical","aria-labelledby":"nav-menu-button-1",children:g.jsx(A0,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:O,currentPath:f})})]});const S=g.jsxs("div",{className:"semiont-unified-header__content","data-variant":s,children:[i?g.jsxs("div",{className:"semiont-unified-header__branding-wrapper",ref:b,children:[g.jsx("button",{onClick:p,className:"semiont-unified-header__branding-button","aria-label":"Navigation menu","aria-expanded":m,"aria-controls":"nav-menu-dropdown-2","aria-haspopup":"true",id:"nav-menu-button-2",children:g.jsx(xp,{t:r,size:"sm",showTagline:!0,animated:!1,compactTagline:!0,className:"semiont-unified-header__branding"})}),m&&l&&g.jsx("div",{id:"nav-menu-dropdown-2",className:"semiont-unified-header__dropdown",role:"menu","aria-orientation":"vertical","aria-labelledby":"nav-menu-button-2",children:g.jsx(A0,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:O,currentPath:f})})]}):g.jsx("div",{}),g.jsx("div",{className:"semiont-unified-header__actions","data-variant":s})]});return s==="standalone"?g.jsx("header",{className:"semiont-unified-header semiont-unified-header--standalone","data-variant":"standalone",children:g.jsx("div",{className:"semiont-unified-header__container",children:S})}):S}function qre({Link:e,routes:t,t:n,tHome:r,children:i,brandingLink:a="/",collapsible:s=!1,storageKey:l="leftSidebarCollapsed",isAdmin:c=!1,isModerator:d=!1,currentPath:f}){const[m,p]=_.useState(!1),{width:O,setWidth:b,minWidth:S,maxWidth:w}=B6({defaultWidth:256,minWidth:192,maxWidth:400,storageKey:"semiont-left-sidebar-width"});_.useEffect(()=>{s&&localStorage.getItem(l)==="true"&&p(!0)},[s,l]);const k=()=>{if(!s)return;const T=!m;p(T),localStorage.setItem(l,T.toString())},j=T=>g.jsx(A0,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:T,currentPath:f});return g.jsxs("aside",{className:"semiont-left-sidebar","data-collapsed":m,style:m?void 0:{width:`${O}px`,position:"relative"},children:[!m&&g.jsx(GU,{onResize:b,minWidth:S,maxWidth:w,position:"right",ariaLabel:"Resize left sidebar"}),g.jsx("div",{className:"semiont-left-sidebar__header","data-collapsed":m,children:g.jsx(e,{href:a,className:"semiont-left-sidebar__branding-button","aria-label":"Go to home page",children:m?g.jsx("div",{className:"semiont-left-sidebar__logo-collapsed",children:g.jsx("span",{className:"semiont-left-sidebar__logo-text",children:"S"})}):g.jsx(xp,{t:r,size:"sm",showTagline:!1,animated:!1,className:""})})}),g.jsx("nav",{role:"navigation","aria-label":"Main navigation",id:"main-navigation",className:"semiont-left-sidebar__content",children:typeof i=="function"?i(m,k,j):i})]})}function Ire({Link:e,routes:t,t:n,tNav:r,tHome:i,children:a,className:s="",showAuthLinks:l=!0,CookiePreferences:c,onOpenKeyboardHelp:d}){return g.jsxs("div",{className:"semiont-page-layout",children:[g.jsx(fte,{}),g.jsx("header",{role:"banner",className:"semiont-page-layout__header",children:g.jsx("div",{className:"semiont-page-layout__header-container",children:g.jsx(hte,{Link:e,routes:t,t:r,tHome:i,showAuthLinks:l,brandingLink:"/",variant:"embedded"})})}),g.jsx("main",{role:"main",id:"main-content",tabIndex:-1,className:`semiont-page-layout__main ${s}`,children:a}),g.jsx(mJ,{Link:e,routes:t,t:n,...c&&{CookiePreferences:c},...d&&{onOpenKeyboardHelp:d}})]})}var oi={colors:{primary:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#0080ff",600:"#0066cc",700:"#0052a3",800:"#1e40af",900:"#1e3a8a"},secondary:{50:"#f0fffe",100:"#e0fffd",200:"#b3fffa",300:"#66fff6",400:"#1afff1",500:"#00ffff",600:"#00cccc",700:"#00a3a3",800:"#007a7a",900:"#005252"},semantic:{error:"#ef4444",errorLight:"#fca5a5",errorDark:"#b91c1c",warning:"#f59e0b",warningLight:"#fcd34d",warningDark:"#d97706",success:"#10b981",successLight:"#6ee7b7",successDark:"#047857",info:"#3b82f6",infoLight:"#93c5fd",infoDark:"#1d4ed8"},neutral:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",1e3:"#000000"}},spacing:{0:"0",xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"2.5rem","3xl":"3rem","4xl":"4rem","5xl":"5rem"},typography:{fontFamily:{sans:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',mono:'JetBrains Mono, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem"},fontWeight:{thin:100,light:300,normal:400,medium:500,semibold:600,bold:700,black:900}},borderRadius:{none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},shadows:{none:"none",xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",base:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",md:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",lg:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",xl:"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},transitions:{duration:{fast:"150ms",base:"250ms",slow:"350ms",slower:"500ms"}}};function mte(){const e=[":root {"];return Object.entries(oi.colors.primary).forEach(([t,n])=>{e.push(` --semiont-color-primary-${t}: ${n};`)}),Object.entries(oi.colors.secondary).forEach(([t,n])=>{e.push(` --semiont-color-secondary-${t}: ${n};`)}),Object.entries(oi.colors.semantic).forEach(([t,n])=>{e.push(` --semiont-color-${t.toLowerCase().replace(/([A-Z])/g,"-$1").toLowerCase()}: ${n};`)}),Object.entries(oi.colors.neutral).forEach(([t,n])=>{e.push(` --semiont-color-neutral-${t}: ${n};`)}),Object.entries(oi.spacing).forEach(([t,n])=>{e.push(` --semiont-spacing-${t}: ${n};`)}),Object.entries(oi.typography.fontSize).forEach(([t,n])=>{e.push(` --semiont-text-${t}: ${n};`)}),Object.entries(oi.typography.fontWeight).forEach(([t,n])=>{e.push(` --semiont-font-${t}: ${n};`)}),e.push(` --semiont-font-sans: ${oi.typography.fontFamily.sans};`),e.push(` --semiont-font-mono: ${oi.typography.fontFamily.mono};`),Object.entries(oi.borderRadius).forEach(([t,n])=>{e.push(` --semiont-radius-${t}: ${n};`)}),Object.entries(oi.shadows).forEach(([t,n])=>{e.push(` --semiont-shadow-${t}: ${n};`)}),Object.entries(oi.transitions.duration).forEach(([t,n])=>{e.push(` --semiont-duration-${t}: ${n};`)}),e.push("}"),e.join(`
|
|
160
|
+
`)}mte();function Xre({message:e}){return g.jsx("div",{className:"semiont-loading-state-wrapper",children:g.jsx("div",{className:"semiont-loading-state semiont-loading-state-compose",children:g.jsx("p",{className:"semiont-loading-message",children:e})})})}function Zre(){return g.jsx("div",{className:"semiont-loading-state semiont-loading-state-resource",children:g.jsx("p",{className:"semiont-loading-message",children:"Loading resource..."})})}function Bre({error:e,onRetry:t}){return g.jsxs("div",{className:"semiont-error-state semiont-error-state-resource",children:[g.jsx("p",{className:"semiont-error-message",children:e instanceof Error?e.message:"Failed to load resource"}),g.jsx("button",{onClick:t,className:"semiont-button","data-variant":"secondary",children:"Try Again"})]})}function pte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5"}))}var gte=_.forwardRef(pte),vte=gte;function Ote({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}var bte=_.forwardRef(Ote),yte=bte;function Ste({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}var xte=_.forwardRef(Ste),_te=xte;function wte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z"}))}var kte=_.forwardRef(wte),jte=kte;function Tte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}var Cte=_.forwardRef(Tte),Ete=Cte;function Ate({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}var Qte=_.forwardRef(Ate),Pte=Qte;function Nte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}var Rte=_.forwardRef(Nte),Mte=Rte;function Lte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}var Dte=_.forwardRef(Lte),zte=Dte;function qte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"}))}var Ite=_.forwardRef(qte),wD=Ite;function Xte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}var Zte=_.forwardRef(Xte),Bte=Zte;function Vte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}var Ute=_.forwardRef(Vte),Yte=Ute;function Fte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}var $te=_.forwardRef(Fte),kD=$te;function Wte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v17.25m0 0c-1.472 0-2.882.265-4.185.75M12 20.25c1.472 0 2.882.265 4.185.75M18.75 4.97A48.416 48.416 0 0 0 12 4.5c-2.291 0-4.545.16-6.75.47m13.5 0c1.01.143 2.01.317 3 .52m-3-.52 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.988 5.988 0 0 1-2.031.352 5.988 5.988 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L18.75 4.971Zm-16.5.52c.99-.203 1.99-.377 3-.52m0 0 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.989 5.989 0 0 1-2.031.352 5.989 5.989 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L5.25 4.971Z"}))}var Hte=_.forwardRef(Wte),Gte=Hte;function Kte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))}var Jte=_.forwardRef(Kte),Vx=Jte;function ene({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"}),_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6Z"}))}var tne=_.forwardRef(ene),nne=tne;function rne({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}var ine=_.forwardRef(rne),ane=ine;function sne({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}var one=_.forwardRef(sne),D0=one,Oa=["knowledge-base","user","settings"],lne=0;function cne(){const[e,t]=_.useState(()=>{if(typeof window<"u"){const f=localStorage.getItem("activeToolbarPanel");return f||"knowledge-base"}return null}),[n,r]=_.useState(null),[i,a]=_.useState(null);_.useEffect(()=>{typeof window>"u"||(e?localStorage.setItem("activeToolbarPanel",e):localStorage.removeItem("activeToolbarPanel"))},[e]);const s=_.useCallback(()=>{r(null)},[]),l=_.useCallback(({panel:f})=>{t(m=>m===f?null:f)},[]),c=_.useCallback(({panel:f,scrollToAnnotationId:m,motivation:p})=>{if(m&&r(m),p){const b={linking:"reference",commenting:"comment",tagging:"tag",highlighting:"highlight",assessing:"assessment"}[p]||"highlight";a({tab:b,generation:++lne})}t(f)},[]),d=_.useCallback(()=>{t(null)},[]);return gr({"browse:panel-toggle":l,"browse:panel-open":c,"browse:panel-close":d}),{activePanel:e,scrollToAnnotationId:n,panelInitialTab:i,onScrollCompleted:s}}function Vre({suggestedFeatures:e,theme:t,showLineNumbers:n,activePanel:r,translations:i,StatusDisplay:a,ToolbarPanels:s,Toolbar:l}){return g.jsxs("div",{className:`semiont-page${r&&Oa.includes(r)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:i.title}),g.jsx("p",{className:"semiont-page__subtitle",children:i.subtitle})]}),g.jsxs("div",{className:"semiont-admin__section",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:i.systemStatus}),g.jsx(a,{})]}),g.jsxs("div",{className:"semiont-admin__section",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:i.cliOperations}),g.jsx("p",{className:"semiont-admin__section-description",children:i.cliOperationsDescription}),g.jsx("div",{className:"semiont-admin__features-grid",children:e.map(c=>g.jsx("div",{className:"semiont-devops-feature",children:g.jsxs("div",{className:"semiont-devops-feature__header",children:[g.jsx("div",{className:"semiont-devops-feature__icon-box",children:g.jsx(c.icon,{className:"semiont-devops-feature__icon"})}),g.jsxs("div",{className:"semiont-devops-feature__content",children:[g.jsx("h3",{className:"semiont-devops-feature__title",children:c.title}),g.jsx("p",{className:"semiont-devops-feature__description",children:c.description}),g.jsx("p",{className:"semiont-devops-feature__available",children:c.available})]})]})},c.title))})]}),g.jsx("div",{className:"semiont-admin__info-box",children:g.jsxs("div",{className:"semiont-admin__info-box-content",children:[g.jsx("div",{className:"semiont-admin__info-box-icon",children:g.jsx(jte,{className:"semiont-icon semiont-icon--info"})}),g.jsxs("div",{className:"semiont-admin__info-box-text",children:[g.jsx("h3",{className:"semiont-admin__info-box-title",children:i.cliTitle}),g.jsxs("div",{className:"semiont-admin__info-box-description",children:[g.jsx("p",{children:i.cliDescription}),g.jsx("code",{className:"semiont-admin__info-box-code",children:"semiont --help"})]})]})]})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(s,{activePanel:r,theme:t,showLineNumbers:n}),g.jsx(l,{context:"simple",activePanel:r})]})]})}function jD({onExport:e,isExporting:t,translations:n}){return g.jsxs("div",{className:"semiont-admin__card",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:n.title}),g.jsx("p",{className:"semiont-admin__section-description",children:n.description}),g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:e,disabled:t,children:t?n.exporting:n.exportButton})]})}function TD({onFileSelected:e,onImport:t,onCancel:n,selectedFile:r,preview:i,isImporting:a,translations:s}){const l=_.useRef(null),[c,d]=_.useState(!1),[f,m]=_.useState(!1),p=_.useCallback(T=>{T.preventDefault(),d(!0)},[]),O=_.useCallback(()=>{d(!1)},[]),b=_.useCallback(T=>{T.preventDefault(),d(!1),m(!1);const E=T.dataTransfer.files[0];E&&e(E)},[e]),S=_.useCallback(T=>{var Q;m(!1);const E=(Q=T.target.files)==null?void 0:Q[0];E&&e(E)},[e]),w=()=>{m(!0)},k=()=>{m(!1),t()},j=()=>{m(!1)};return g.jsxs("div",{className:"semiont-admin__card",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:s.title}),g.jsx("p",{className:"semiont-admin__section-description",children:s.description}),g.jsxs("div",{className:`semiont-exchange__dropzone${c?" semiont-exchange__dropzone--active":""}`,onDragOver:p,onDragLeave:O,onDrop:b,onClick:()=>{var T;return(T=l.current)==null?void 0:T.click()},children:[g.jsx("p",{className:"semiont-exchange__dropzone-text",children:c?s.dropzoneActive:s.dropzoneLabel}),r&&g.jsxs("p",{className:"semiont-exchange__file-info",children:[r.name," (",(r.size/1024).toFixed(1)," KB)"]})]}),g.jsx("input",{ref:l,type:"file",accept:".tar.gz,.jsonl,.gz",onChange:S,style:{display:"none"}}),i&&g.jsxs("div",{className:"semiont-exchange__preview",children:[g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:s.detectedFormat}),g.jsxs("span",{className:"semiont-exchange__preview-value",children:[i.format," v",i.version]})]}),i.sourceUrl&&g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:"Source"}),g.jsx("span",{className:"semiont-exchange__preview-value",children:i.sourceUrl})]}),Object.keys(i.stats).length>0&&g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:s.statsPreview}),g.jsx("span",{className:"semiont-exchange__preview-value",children:Object.entries(i.stats).map(([T,E])=>`${E} ${T}`).join(", ")})]})]}),f&&g.jsxs("div",{className:"semiont-exchange__confirm",children:[g.jsx("p",{className:"semiont-exchange__confirm-title",children:s.importConfirmTitle}),g.jsx("p",{className:"semiont-exchange__confirm-message",children:s.importConfirmMessage}),g.jsxs("div",{className:"semiont-exchange__confirm-actions",children:[g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:k,children:s.confirmImport}),g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--secondary",onClick:j,children:s.cancelImport})]})]}),!f&&g.jsxs("div",{className:"semiont-exchange__actions",children:[g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:w,disabled:!i||a,children:a?s.importing:s.importButton}),r&&g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--secondary",onClick:n,disabled:a,children:s.cancelImport})]})]})}var une={started:"phaseStarted","entity-types":"phaseEntityTypes",resources:"phaseResources",annotations:"phaseAnnotations",complete:"phaseComplete",error:"phaseError"};function CD({phase:e,message:t,result:n,translations:r}){const i=une[e],a=i?r[i]:e,s=e==="complete",l=e==="error";return g.jsxs("div",{className:"semiont-exchange__progress",children:[g.jsx("div",{className:`semiont-exchange__phase-label${l?" semiont-exchange__phase-label--error":s?" semiont-exchange__phase-label--complete":""}`,children:a}),t&&!s&&!l&&g.jsx("p",{className:"semiont-exchange__progress-message",children:t}),s&&n&&g.jsxs("div",{className:"semiont-exchange__result",children:[n.stats!=null&&typeof n.stats=="object"&&g.jsx(g.Fragment,{children:Object.entries(n.stats).map(([c,d])=>{const f=c==="streams"?r.streams:c==="events"?r.events:c==="blobs"?r.blobs:c;return g.jsxs("div",{className:"semiont-exchange__result-stat",children:[g.jsx("span",{className:"semiont-exchange__result-value",children:d}),g.jsx("span",{className:"semiont-exchange__result-label",children:f})]},c)})}),n.hashChainValid!==void 0&&g.jsx("div",{className:`semiont-exchange__hash-badge${n.hashChainValid?" semiont-exchange__hash-badge--valid":" semiont-exchange__hash-badge--invalid"}`,children:n.hashChainValid?r.hashChainValid:r.hashChainInvalid})]}),l&&t&&g.jsx("p",{className:"semiont-exchange__error-message",children:t})]})}function Ure({onExport:e,isExporting:t,onFileSelected:n,onImport:r,onCancelImport:i,selectedFile:a,preview:s,isImporting:l,importPhase:c,importMessage:d,importResult:f,theme:m,showLineNumbers:p,activePanel:O,translations:b,ToolbarPanels:S,Toolbar:w}){return g.jsxs("div",{className:`semiont-page${O&&Oa.includes(O)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:b.title}),g.jsx("p",{className:"semiont-page__subtitle",children:b.subtitle})]}),g.jsxs("div",{className:"semiont-exchange__cards",children:[g.jsx(jD,{onExport:e,isExporting:t,translations:b.export}),g.jsx(TD,{onFileSelected:n,onImport:r,onCancel:i,selectedFile:a,preview:s,isImporting:l,translations:b.import})]}),c&&g.jsx(CD,{phase:c,message:d,result:f,translations:b.progress})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(S,{activePanel:O,theme:m,showLineNumbers:p}),g.jsx(w,{context:"simple",activePanel:O})]})]})}function Yre({providers:e,allowedDomains:t,isLoading:n,theme:r,showLineNumbers:i,activePanel:a,translations:s,ToolbarPanels:l,Toolbar:c}){return g.jsxs("div",{className:`semiont-page${a&&Oa.includes(a)?" semiont-page--panel-open":""}`,children:[g.jsx("div",{className:"semiont-page__content",children:g.jsxs("div",{className:"semiont-page__sections",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:s.title}),g.jsx("p",{className:"semiont-page__subtitle",children:s.subtitle})]}),g.jsxs("div",{className:"semiont-admin__card",children:[g.jsxs("div",{className:"semiont-admin__card-header",children:[g.jsx(Vx,{className:"semiont-admin__card-icon semiont-admin__card-icon--primary"}),g.jsxs("div",{children:[g.jsx("h3",{className:"semiont-admin__card-title",children:s.oauthProviders}),g.jsx("p",{className:"semiont-admin__card-description",children:s.oauthProvidersDescription})]})]}),n?g.jsx("div",{className:"semiont-skeleton-group",children:g.jsx("div",{className:"semiont-skeleton semiont-skeleton--bar"})}):e.length>0?g.jsx("div",{className:"semiont-provider-list",children:e.map(d=>g.jsxs("div",{className:"semiont-provider-item",children:[g.jsxs("div",{className:"semiont-provider-item__info",children:[g.jsx(yte,{className:"semiont-provider-item__icon semiont-provider-item__icon--success"}),g.jsx("span",{className:"semiont-provider-item__name",children:d.name}),d.clientId&&g.jsxs("span",{className:"semiont-provider-item__client-id",children:[s.clientId,": ",d.clientId]})]}),g.jsx("span",{className:"semiont-badge semiont-badge--success",children:s.configured})]},d.name))}):g.jsx("div",{className:"semiont-empty-message",children:s.noProvidersConfigured})]}),g.jsxs("div",{className:"semiont-admin__card",children:[g.jsxs("div",{className:"semiont-admin__card-header",children:[g.jsx(Mte,{className:"semiont-admin__card-icon semiont-admin__card-icon--primary"}),g.jsxs("div",{children:[g.jsx("h3",{className:"semiont-admin__card-title",children:s.allowedDomains}),g.jsx("p",{className:"semiont-admin__card-description",children:s.allowedDomainsDescription})]})]}),n?g.jsxs("div",{className:"semiont-skeleton-group",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--chip"}),g.jsx("div",{className:"semiont-skeleton semiont-skeleton--chip semiont-skeleton--chip-lg"})]}):t.length>0?g.jsx("div",{className:"semiont-domain-list",children:t.map(d=>g.jsxs("div",{className:"semiont-chip semiont-chip--primary",children:["@",d]},d))}):g.jsx("div",{className:"semiont-empty-message",children:s.noDomainsConfigured})]}),g.jsx("div",{className:"semiont-admin__info-box",children:g.jsxs("div",{className:"semiont-info-box__content",children:[g.jsx(zte,{className:"semiont-info-box__icon"}),g.jsxs("div",{className:"semiont-info-box__text",children:[g.jsx("p",{className:"semiont-info-box__title",children:s.configManagementTitle}),g.jsx("p",{className:"semiont-info-box__description",children:s.configManagementDescription}),g.jsxs("ul",{className:"semiont-info-box__list",children:[g.jsx("li",{children:s.configLocalDev}),g.jsxs("li",{children:[s.configCloudDeploy," ",g.jsx("code",{className:"semiont-code-inline",children:s.configCloudDeployCommand})," ",s.configCloudDeployEnd]}),g.jsx("li",{children:s.configAWS})]})]})]})})]})}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(l,{activePanel:a,theme:r,showLineNumbers:i}),g.jsx(c,{context:"simple",activePanel:a})]})]})}function Fre({onExport:e,isExporting:t,onFileSelected:n,onImport:r,onCancelImport:i,selectedFile:a,preview:s,isImporting:l,importPhase:c,importMessage:d,importResult:f,theme:m,showLineNumbers:p,activePanel:O,translations:b,ToolbarPanels:S,Toolbar:w}){return g.jsxs("div",{className:`semiont-page${O&&Oa.includes(O)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:b.title}),g.jsx("p",{className:"semiont-page__subtitle",children:b.subtitle})]}),g.jsxs("div",{className:"semiont-exchange__cards",children:[g.jsx(jD,{onExport:e,isExporting:t,translations:b.export}),g.jsx(TD,{onFileSelected:n,onImport:r,onCancel:i,selectedFile:a,preview:s,isImporting:l,translations:b.import})]}),c&&g.jsx(CD,{phase:c,message:d,result:f,translations:b.progress})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(S,{activePanel:O,theme:m,showLineNumbers:p}),g.jsx(w,{context:"simple",activePanel:O})]})]})}function dne({user:e,onUpdate:t,onDelete:n,translations:r}){const i={admin:"semiont-badge semiont-badge--danger",user:"semiont-badge semiont-badge--default"},a={active:"semiont-badge semiont-badge--success",inactive:"semiont-badge semiont-badge--default"},s=e.isAdmin?"admin":"user",l=e.isActive?"active":"inactive";return g.jsxs("tr",{className:"semiont-table__row",children:[g.jsx("td",{className:"semiont-table__cell",children:g.jsxs("div",{className:"semiont-user-info",children:[g.jsx(D0,{className:"semiont-user-info__avatar"}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-user-info__name",children:e.name||r.noName}),g.jsx("div",{className:"semiont-user-info__email",children:e.email})]})]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsxs("span",{className:"semiont-table__text--secondary",children:["@",e.domain]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsx("span",{className:i[s],children:r[s]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsx("span",{className:a[l],children:r[l]})}),g.jsx("td",{className:"semiont-table__cell semiont-table__text--secondary",children:e.lastLogin?new Date(e.lastLogin).toLocaleDateString():r.never}),g.jsx("td",{className:"semiont-table__cell semiont-table__text--secondary",children:new Date(e.created).toLocaleDateString()}),g.jsx("td",{className:"semiont-table__cell semiont-table__cell--actions",children:g.jsxs("div",{className:"semiont-table__actions",children:[g.jsx("button",{onClick:()=>t(e.id,{isAdmin:!e.isAdmin}),className:"semiont-action-button semiont-action-button--info",title:e.isAdmin?r.removeAdmin:r.makeAdmin,children:g.jsx(Vx,{className:"semiont-action-button__icon"})}),g.jsx("button",{onClick:()=>t(e.id,{isActive:!e.isActive}),className:"semiont-action-button semiont-action-button--warning",title:e.isActive?r.deactivateUser:r.activateUser,children:g.jsx(Yte,{className:"semiont-action-button__icon"})}),g.jsx("button",{onClick:()=>n(e.id),className:"semiont-action-button semiont-action-button--danger",title:r.deleteUser,children:g.jsx(ane,{className:"semiont-action-button__icon"})})]})})]})}function $re({users:e,userStats:t,isLoadingUsers:n,isLoadingStats:r,onUpdateUser:i,onDeleteUser:a,onAddUser:s,onExportUsers:l,theme:c,showLineNumbers:d,activePanel:f,translations:m,ToolbarPanels:p,Toolbar:O,buttonStyles:b}){var A;const[S,w]=_.useState(""),[k,j]=_.useState("all"),[T,E]=_.useState("all"),Q=e.filter(N=>{const D=(N.name||"").toLowerCase().includes(S.toLowerCase())||N.email.toLowerCase().includes(S.toLowerCase()),q=N.isAdmin?"admin":"user",P=N.isActive?"active":"inactive";return D&&(k==="all"||q===k)&&(T==="all"||P===T)});return g.jsxs("div",{className:`semiont-page${f&&Oa.includes(f)?" semiont-page--panel-open":""}`,children:[g.jsx("div",{className:"semiont-page__content",children:g.jsxs("div",{className:"semiont-page__sections",children:[g.jsxs("div",{className:"semiont-page__header-with-action",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"semiont-page__title",children:m.title}),g.jsx("p",{className:"semiont-page__subtitle",children:m.subtitle})]}),g.jsxs("button",{onClick:s,className:b.primary.base,children:[g.jsx(kD,{className:"semiont-button__icon"}),m.addUser]})]}),g.jsx("div",{className:"semiont-admin__stats-grid",children:r?Array(4).fill(0).map((N,D)=>g.jsx("div",{className:"semiont-stat-card semiont-stat-card--loading",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--icon"}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--text"}),g.jsx("div",{className:"semiont-skeleton semiont-skeleton--number"})]})]})},D)):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(D0,{className:"semiont-stat-card__icon semiont-stat-card__icon--primary"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.totalUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.totalUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx("div",{className:"semiont-stat-card__status-indicator semiont-stat-card__status-indicator--active",children:g.jsx("div",{className:"semiont-stat-card__status-dot"})})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.activeUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.activeUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(Vx,{className:"semiont-stat-card__icon semiont-stat-card__icon--danger"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.administrators}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.adminUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(Pte,{className:"semiont-stat-card__icon semiont-stat-card__icon--warning"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.recentUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:((A=t==null?void 0:t.recentSignups)==null?void 0:A.length)??0})]})]})})]})}),g.jsx("div",{className:"semiont-admin__filters-card",children:g.jsxs("div",{className:"semiont-admin__filters-grid",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"search",className:"semiont-form__label",children:m.searchUsers}),g.jsxs("div",{className:"semiont-search-input",children:[g.jsx("div",{className:"semiont-search-input__icon",children:g.jsx(Bte,{className:"semiont-icon semiont-icon--small"})}),g.jsx("input",{type:"text",id:"search",className:"semiont-search-input__field",placeholder:m.searchPlaceholder,value:S,onChange:N=>w(N.target.value)})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"role",className:"semiont-form__label",children:m.role}),g.jsxs("select",{id:"role",className:"semiont-select",value:k,onChange:N=>j(N.target.value),children:[g.jsx("option",{value:"all",children:m.allRoles}),g.jsx("option",{value:"admin",children:m.admin}),g.jsx("option",{value:"user",children:m.user})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"status",className:"semiont-form__label",children:m.status}),g.jsxs("select",{id:"status",className:"semiont-select",value:T,onChange:N=>E(N.target.value),children:[g.jsx("option",{value:"all",children:m.allStatus}),g.jsx("option",{value:"active",children:m.active}),g.jsx("option",{value:"inactive",children:m.inactive})]})]}),g.jsx("div",{className:"semiont-form__field semiont-form__field--align-end",children:g.jsx("button",{onClick:l,className:`${b.secondary.base} semiont-button--full-width`,children:m.exportUsers})})]})}),g.jsxs("div",{className:"semiont-admin__table-card",children:[g.jsx("div",{className:"semiont-table-container",children:n?g.jsxs("div",{className:"semiont-loading-state",children:[g.jsx("div",{className:"semiont-spinner"}),g.jsx("p",{className:"semiont-loading-state__text",children:m.loadingUsers})]}):g.jsxs("table",{className:"semiont-table",children:[g.jsx("thead",{className:"semiont-table__head",children:g.jsxs("tr",{children:[g.jsx("th",{className:"semiont-table__header",children:m.userColumn}),g.jsx("th",{className:"semiont-table__header",children:m.domainColumn}),g.jsx("th",{className:"semiont-table__header",children:m.roleColumn}),g.jsx("th",{className:"semiont-table__header",children:m.statusColumn}),g.jsx("th",{className:"semiont-table__header",children:m.lastLoginColumn}),g.jsx("th",{className:"semiont-table__header",children:m.joinedColumn}),g.jsx("th",{className:"semiont-table__header semiont-table__header--actions",children:m.actionsColumn})]})}),g.jsx("tbody",{className:"semiont-table__body",children:Q.map(N=>g.jsx(dne,{user:N,onUpdate:i,onDelete:a,translations:m},N.id))})]})}),!n&&Q.length===0&&g.jsxs("div",{className:"semiont-empty-state",children:[g.jsx(D0,{className:"semiont-empty-state__icon"}),g.jsx("h3",{className:"semiont-empty-state__title",children:m.noUsersFound}),g.jsx("p",{className:"semiont-empty-state__description",children:m.noUsersFoundDescription})]})]})]})}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(p,{activePanel:f,theme:c,showLineNumbers:d}),g.jsx(O,{context:"simple",activePanel:f})]})]})}function fne(){return g.jsxs("svg",{className:"semiont-icon semiont-icon--small semiont-icon--inline",viewBox:"0 0 24 24",children:[g.jsx("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),g.jsx("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),g.jsx("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),g.jsx("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}function Wre({onSignUp:e,Link:t,translations:n}){const[r,i]=_.useState(!1),a=async()=>{i(!0);try{await e()}catch(s){console.error("Failed to initiate Google sign-up:",s),i(!1)}};return g.jsx("main",{className:"semiont-auth__main",role:"main",children:g.jsx("div",{className:"semiont-auth__container",children:g.jsxs("div",{className:"semiont-auth__content",children:[g.jsxs("section",{"aria-labelledby":"signup-heading",className:"semiont-auth__branding",children:[g.jsx("h1",{id:"signup-heading",className:"sr-only",children:n.pageTitle}),g.jsx(xp,{t:s=>n[s]||s,size:"xl",animated:!0,className:"semiont-auth__logo"}),g.jsx("p",{className:"semiont-auth__welcome",children:n.pageTitle}),g.jsx("p",{className:"semiont-auth__subtitle",children:n.signUpPrompt})]}),g.jsxs("div",{className:"semiont-auth__forms",children:[g.jsxs("button",{onClick:a,disabled:r,className:`${sd.primary.base} semiont-button--full-width`,children:[r?g.jsx("div",{className:"semiont-auth__spinner"}):g.jsx(fne,{}),r?n.creatingAccount:n.signUpWithGoogle]}),g.jsxs("div",{className:"semiont-auth__info",children:[n.approvedDomainsInfo,g.jsx("br",{}),n.termsAgreement]})]}),g.jsxs("div",{className:"semiont-auth__links",children:[g.jsx(t,{href:"/",className:sd.secondary.base,children:n.backToHome}),g.jsx(t,{href:"/auth/signin",className:sd.primary.base,children:n.alreadyHaveAccount})]})]})})})}function hne(e,t){switch(e){case"Configuration":return t.errorConfiguration;case"AccessDenied":return t.errorAccessDenied;case"Verification":return t.errorVerification;default:return t.errorGeneric}}function Hre({errorType:e,Link:t,translations:n}){const r=hne(e,n);return g.jsx("div",{className:"semiont-auth-error-display",children:g.jsxs("div",{className:"semiont-auth-error-display__container",children:[g.jsx("div",{children:g.jsx("h2",{className:"semiont-auth-error-display__title",children:n.pageTitle})}),g.jsx("div",{className:"semiont-auth-error-display__error-box",children:g.jsx("div",{className:"semiont-auth-error-display__error-message",children:r})}),g.jsx("div",{className:"semiont-auth-error-display__actions",children:g.jsx(t,{href:"/auth/signin",className:"semiont-auth-error-display__link",children:n.tryAgain})})]})})}function Gre({userName:e,status:t,isProcessing:n,onAccept:r,onDecline:i,translations:a,PageLayout:s,Link:l}){return t==="loading"?g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__loading",children:g.jsxs("div",{className:"semiont-welcome-page__loading-content",children:[g.jsx("div",{className:"semiont-welcome-page__spinner"}),g.jsx("p",{className:"semiont-welcome-page__loading-text",children:a.loading})]})})}):t==="accepted"?g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__accepted",children:g.jsxs("div",{className:"semiont-welcome-page__accepted-content",children:[g.jsx("div",{className:"semiont-welcome-page__accepted-icon",children:g.jsx("svg",{className:"semiont-welcome-page__accepted-checkmark",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),g.jsxs("div",{children:[g.jsx("h2",{className:"semiont-welcome-page__accepted-title",children:a.welcomeTitle}),g.jsx("p",{className:"semiont-welcome-page__accepted-subtitle",children:a.thanksForAccepting})]})]})})}):g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__form-wrapper",children:g.jsxs("div",{className:"semiont-welcome-page__form",children:[g.jsxs("div",{className:"semiont-welcome-page__form-header",children:[g.jsx("div",{className:"semiont-welcome-page__form-icon",children:g.jsx("svg",{className:"semiont-welcome-page__form-icon-svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),g.jsx("h1",{className:"semiont-welcome-page__form-title",children:a.welcomeUser.replace("{firstName}",e||"")}),g.jsx("p",{className:"semiont-welcome-page__form-subtitle",children:a.reviewTermsPrompt})]}),g.jsx("div",{className:"semiont-welcome-page__terms-content",children:g.jsxs("div",{className:"semiont-welcome-page__prose",children:[g.jsx("h3",{children:a.termsSummaryTitle}),g.jsx("p",{children:a.termsSummaryIntro}),g.jsx("h4",{children:a.acceptableUseTitle}),g.jsxs("ul",{children:[g.jsx("li",{children:a.acceptableUseResponsible}),g.jsx("li",{children:a.acceptableUseRespect}),g.jsx("li",{children:a.acceptableUseConduct})]}),g.jsx("h4",{children:a.prohibitedContentTitle}),g.jsx("p",{children:a.prohibitedContentIntro}),g.jsxs("ul",{children:[g.jsx("li",{children:a.prohibitedIllegal}),g.jsx("li",{children:a.prohibitedAdult}),g.jsx("li",{children:a.prohibitedHate}),g.jsx("li",{children:a.prohibitedViolence}),g.jsx("li",{children:a.prohibitedMisinformation}),g.jsx("li",{children:a.prohibitedPrivacy}),g.jsx("li",{children:a.prohibitedCopyright}),g.jsx("li",{children:a.prohibitedMalware}),g.jsx("li",{children:a.prohibitedSpam})]}),g.jsx("h4",{children:a.conductTitle}),g.jsxs("p",{children:[a.conductDescription," ",g.jsx("a",{href:"https://ai-alliance.cdn.prismic.io/ai-alliance/Zl-MG5m069VX1dgH_AIAllianceCodeofConduct.pdf",target:"_blank",rel:"noopener noreferrer",className:"semiont-link",children:a.conductLink}),a.conductPromotion]}),g.jsx("h4",{children:a.responsibilitiesTitle}),g.jsxs("ul",{children:[g.jsx("li",{children:a.responsibilitiesSecure}),g.jsx("li",{children:a.responsibilitiesReport}),g.jsx("li",{children:a.responsibilitiesAccurate}),g.jsx("li",{children:a.responsibilitiesComply})]}),g.jsx("p",{className:"semiont-welcome-page__warning",children:a.violationsWarning})]})}),g.jsxs("div",{className:"semiont-welcome-page__actions",children:[g.jsxs("p",{className:"semiont-welcome-page__legal-links",children:[a.readFullTerms," ",g.jsx(l,{href:"/terms",target:"_blank",className:"semiont-welcome-page__link",children:a.termsOfService})," ",a.and," ",g.jsx(l,{href:"/privacy",target:"_blank",className:"semiont-welcome-page__link",children:a.privacyPolicy})]}),g.jsxs("div",{className:"semiont-welcome-page__buttons",children:[g.jsx("button",{onClick:i,disabled:n,className:"semiont-welcome-page__button semiont-welcome-page__button--secondary",children:a.declineAndSignOut}),g.jsx("button",{onClick:r,disabled:n,className:"semiont-welcome-page__button semiont-welcome-page__button--primary",children:n?a.processing:a.acceptAndContinue})]}),g.jsx("p",{className:"semiont-welcome-page__legal-notice",children:a.legallyBound})]})]})})})}function Kre({entityTypes:e,error:t,newTag:n,onNewTagChange:r,onAddTag:i,isAddingTag:a,theme:s,showLineNumbers:l,activePanel:c,translations:d,ToolbarPanels:f,Toolbar:m}){const p=O=>{O.key==="Enter"&&i()};return g.jsxs("div",{className:`semiont-page${c&&Oa.includes(c)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:d.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:d.pageDescription})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-entity-tags__header",children:[g.jsx("div",{className:"semiont-entity-tags__icon-box",children:g.jsx(nne,{className:"semiont-entity-tags__icon"})}),g.jsxs("div",{className:"semiont-entity-tags__content",children:[g.jsx("h3",{className:"semiont-entity-tags__title",children:d.sectionTitle}),g.jsx("p",{className:"semiont-entity-tags__description",children:d.sectionDescription})]})]}),g.jsx("div",{className:"semiont-entity-tags__tags-section",children:g.jsx("div",{className:"semiont-tags",children:e.map(O=>g.jsx("span",{className:"semiont-tag semiont-tag--info semiont-tag--rounded-md",children:O},O))})}),g.jsxs("div",{className:"semiont-entity-tags__input-group",children:[g.jsx("input",{type:"text",value:n,onChange:O=>r(O.target.value),onKeyDown:p,placeholder:d.inputPlaceholder,className:"semiont-entity-tags__input",disabled:a}),g.jsx("button",{onClick:i,disabled:a||!n.trim(),className:"semiont-button semiont-button--primary",children:a?d.adding:g.jsxs(g.Fragment,{children:[g.jsx(kD,{className:"semiont-icon semiont-icon--small semiont-icon--inline"}),d.addTag]})})]}),t&&g.jsxs("div",{className:"semiont-entity-tags__error",children:[g.jsx(Ete,{className:"semiont-entity-tags__error-icon"}),t]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(f,{activePanel:c,theme:s,showLineNumbers:l}),g.jsx(m,{context:"simple",activePanel:c})]})]})}function Jre({isLoading:e,theme:t,showLineNumbers:n,activePanel:r,translations:i,ToolbarPanels:a,Toolbar:s}){return e?g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:i.loading})}):g.jsxs("div",{className:`semiont-page${r&&Oa.includes(r)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:i.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:i.pageDescription})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-recent-docs__header",children:[g.jsx("div",{className:"semiont-recent-docs__icon-box",children:g.jsx(_te,{className:"semiont-recent-docs__icon"})}),g.jsxs("div",{className:"semiont-recent-docs__content",children:[g.jsx("h3",{className:"semiont-recent-docs__title",children:i.sectionTitle}),g.jsx("p",{className:"semiont-recent-docs__description",children:i.sectionDescription})]})]}),g.jsxs("div",{className:"semiont-recent-docs__empty-state",children:[g.jsx("svg",{className:"semiont-recent-docs__empty-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),g.jsx("p",{className:"semiont-recent-docs__empty-message",children:i.noDocuments}),g.jsx("p",{className:"semiont-recent-docs__empty-hint",children:i.activityWillAppear})]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(a,{activePanel:r,theme:t,showLineNumbers:n}),g.jsx(s,{context:"simple",activePanel:r})]})]})}var mne={legal:Gte,scientific:vte,general:wD},vE={legal:"semiont-schema-domain--legal",scientific:"semiont-schema-domain--scientific",general:"semiont-schema-domain--general"};function eie({schemas:e,isLoading:t,theme:n,showLineNumbers:r,activePanel:i,translations:a,ToolbarPanels:s,Toolbar:l}){return t?g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:a.loading})}):g.jsxs("div",{className:`semiont-page${i&&Oa.includes(i)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:a.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:a.pageDescription})]}),g.jsx("div",{className:"semiont-card-grid semiont-card-grid--two-columns",children:e.map(c=>{const d=mne[c.domain]||wD,f=vE[c.domain]||vE.general;return g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-schema__header",children:[g.jsx("div",{className:`semiont-schema__icon-wrapper ${f}`,children:d&&g.jsx(d,{className:"semiont-schema__icon"})}),g.jsxs("div",{className:"semiont-schema__content",children:[g.jsx("h3",{className:"semiont-schema__title",children:c.name}),g.jsx("p",{className:"semiont-schema__description",children:c.description}),g.jsx("span",{className:`semiont-schema__badge ${f}`,children:c.domain})]})]}),g.jsxs("div",{className:"semiont-schema__categories",children:[g.jsx("h4",{className:"semiont-schema__categories-title",children:a.categories}),c.tags.map(m=>g.jsxs("div",{className:"semiont-schema__category",children:[g.jsx("div",{className:"semiont-schema__category-name",children:m.name}),g.jsx("div",{className:"semiont-schema__category-description",children:m.description}),g.jsxs("div",{className:"semiont-schema__examples",children:[m.examples.slice(0,2).map((p,O)=>g.jsx("span",{className:"semiont-schema__example",children:p},O)),m.examples.length>2&&g.jsxs("span",{className:"semiont-schema__example-more",children:["+",m.examples.length-2," more"]})]})]},m.name))]})]},c.id)})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(s,{activePanel:i,theme:n,showLineNumbers:r}),g.jsx(l,{context:"simple",activePanel:i})]})]})}function tie({mode:e,cloneData:t,referenceData:n,gatheredContext:r,availableEntityTypes:i,initialLocale:a,theme:s,showLineNumbers:l,hoverDelayMs:c,activePanel:d,onSaveResource:f,onCancel:m,translations:p,ToolbarPanels:O,Toolbar:b}){const{announceFormSubmitting:S,announceFormSuccess:w,announceFormError:k}=H6(),[j,T]=_.useState(""),[E,Q]=_.useState(""),[A,N]=_.useState([]),[D,q]=_.useState(!1),[P,V]=_.useState("write"),[Z,Y]=_.useState(null),[X,H]=_.useState("text/markdown"),[I,L]=_.useState(null),[$,ne]=_.useState("text/markdown"),[z,G]=_.useState(a),[re,R]=_.useState(""),[me,Se]=_.useState(""),[ve,Xe]=_.useState(!0);_.useEffect(()=>{e==="clone"&&t?(T(t.sourceResource.name),Q(t.sourceContent)):e==="reference"&&n&&(T(n.name),n.entityTypes.length>0&&N(n.entityTypes))},[e,t,n]);const qe=we=>{var Fe;const Ze=(Fe=we.target.files)==null?void 0:Fe[0];if(Ze){if(Y(Ze),H(Ze.type),V("upload"),!j){const ft=Ze.name.replace(/\.[^/.]+$/,"");T(ft)}if(Kb(Ze.type)||Ec(Ze.type)){const ft=URL.createObjectURL(Ze);L(ft)}else{const ft=new FileReader;ft.onload=Rt=>{var ke;const mn=(ke=Rt.target)==null?void 0:ke.result;Q(mn)},ft.readAsText(Ze)}}};_.useEffect(()=>()=>{I&&URL.revokeObjectURL(I)},[I]);const Pe=async we=>{if(we.preventDefault(),!!j.trim()){q(!0),S();try{const Ze={mode:e,name:j,storageUri:`file://${me}`,content:E,format:Z?X:$,entityTypes:A,language:z};Z&&(Ze.file=Z),re&&(Ze.charset=re),e==="clone"&&(Ze.archiveOriginal=ve),n!=null&&n.annotationUri&&(Ze.annotationUri=n.annotationUri),n!=null&&n.sourceDocumentId&&(Ze.sourceDocumentId=n.sourceDocumentId),await f(Ze),w(e==="clone"?"Resource cloned successfully":e==="reference"?"Reference completed successfully":"Resource created successfully")}catch(Ze){throw k("Failed to save resource. Please try again."),Ze}finally{q(!1)}}},Oe=e==="clone",Ve=e==="reference";return g.jsxs("div",{className:`semiont-page${d&&Oa.includes(d)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content semiont-page__compose",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:Oe?p.titleEditClone:Ve?p.titleCompleteReference:p.title}),(Oe||Ve)&&g.jsx("p",{className:"semiont-page__subtitle",children:Oe?p.subtitleClone:p.subtitleReference}),Ve&&g.jsx("div",{className:"semiont-page__reference-notice",children:g.jsx("p",{className:"semiont-page__reference-notice-text",children:p.linkedNoticePrefix})})]}),r&&g.jsxs("div",{className:"semiont-form__field",style:{marginBottom:"1.5rem",padding:"1rem",backgroundColor:"var(--semiont-bg-secondary)",borderRadius:"var(--semiont-radius-md)",border:"1px solid var(--semiont-border-primary)"},children:[g.jsx("h3",{className:"semiont-form__label",style:{marginBottom:"0.75rem"},children:"Gathered Context"}),r.sourceContext&&g.jsx("div",{style:{padding:"0.75rem",backgroundColor:"var(--semiont-bg-primary)",borderRadius:"var(--semiont-radius-md)",border:"1px solid var(--semiont-border-primary)",maxHeight:"150px",overflowY:"auto",marginBottom:"0.5rem"},children:g.jsxs("div",{style:{fontSize:"var(--semiont-text-sm)",fontFamily:"monospace",whiteSpace:"pre-wrap",color:"var(--semiont-text-secondary)"},children:[r.sourceContext.before&&g.jsx("span",{children:r.sourceContext.before}),g.jsx("span",{style:{backgroundColor:"var(--semiont-color-primary-100)",padding:"0 0.25rem",fontWeight:600,color:"var(--semiont-color-primary-900)"},children:r.sourceContext.selected}),r.sourceContext.after&&g.jsx("span",{children:r.sourceContext.after})]})}),r.graphContext&&r.graphContext.connections&&r.graphContext.connections.length>0&&g.jsxs("div",{style:{padding:"0.5rem 0",fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-secondary)"},children:[g.jsx("span",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:500,marginRight:"0.5rem"},children:"Connections:"}),r.graphContext.connections.map(we=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.5rem",marginRight:"0.25rem"},children:we.resourceName},we.resourceId))]})]}),g.jsx("div",{className:"semiont-form",children:g.jsxs("form",{onSubmit:Pe,className:"semiont-form__fields semiont-compose-grid",children:[g.jsxs("div",{className:"semiont-compose-grid__meta",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"docName",className:"semiont-form__label",children:p.resourceName}),g.jsx("input",{id:"docName",type:"text",value:j,onChange:we=>T(we.target.value),placeholder:p.resourceNamePlaceholder,className:"semiont-input",required:!0,disabled:D})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"storagePath",className:"semiont-form__label",children:"Save location"}),g.jsxs("div",{className:"semiont-input-addon",children:[g.jsx("span",{className:"semiont-input-addon__prefix",children:"file://"}),g.jsx("input",{id:"storagePath",type:"text",value:me,onChange:we=>Se(we.target.value),placeholder:"docs/my-resource.md",required:!0,className:"semiont-input semiont-input--addon",disabled:D})]})]}),(!Ve||A.length===0)&&g.jsxs("div",{className:"semiont-form__field semiont-form__entity-types",children:[g.jsx("div",{className:"semiont-form__label",children:p.entityTypes}),g.jsx("div",{className:"semiont-form__entity-type-buttons",role:"group","aria-describedby":"entity-types-description",children:i.map(we=>{const Ze=A.includes(we);return g.jsx("button",{type:"button",onClick:()=>{N(Fe=>Fe.includes(we)?Fe.filter(ft=>ft!==we):[...Fe,we])},className:"semiont-form__entity-type-button","data-selected":Ze,disabled:D,"aria-pressed":Ze,"aria-label":`${we} entity type, ${Ze?"selected":"not selected"}`,children:we},we)})}),A.length>0&&g.jsxs("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",children:[A.length," entity type",A.length!==1?"s":""," selected: ",A.join(", ")]})]}),Ve&&A.length>0&&g.jsxs("div",{className:"semiont-form__field semiont-form__entity-types-display",role:"region","aria-labelledby":"selected-entity-types-label",children:[g.jsx("h3",{id:"selected-entity-types-label",className:"semiont-form__label",children:p.entityTypes}),g.jsx("div",{className:"semiont-form__entity-type-tags",role:"list",children:A.map(we=>g.jsx("span",{role:"listitem",className:"semiont-form__entity-type-tag","aria-label":`Entity type: ${we}`,children:we},we))}),g.jsx("p",{className:"semiont-form__helper-text",id:"reference-entity-types-description",children:"These entity types were selected when creating the reference"})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"language-select",className:"semiont-form__label",children:p.language}),g.jsx("select",{id:"language-select",value:z,onChange:we=>G(we.target.value),disabled:D,className:"semiont-select",children:ec.map(we=>g.jsx("option",{value:we.code,children:we.nativeName},we.code))})]})]}),g.jsxs("div",{className:"semiont-compose-grid__content",children:[!Oe&&!Ve&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{className:"semiont-form__label",children:p.contentSource}),g.jsxs("div",{className:"semiont-form__content-source-toggle",children:[g.jsxs("button",{type:"button",onClick:()=>V("upload"),disabled:D,className:"semiont-form__content-source-button","data-active":P==="upload",children:[g.jsxs("div",{className:"semiont-form__content-source-icon-wrapper",children:[g.jsx("span",{className:"semiont-form__content-source-icon",children:"📎"}),g.jsx("span",{className:"semiont-form__content-source-label",children:p.uploadFile})]}),g.jsx("div",{className:"semiont-form__content-source-description",children:p.uploadFileDescription})]}),g.jsxs("button",{type:"button",onClick:()=>V("write"),disabled:D,className:"semiont-form__content-source-button","data-active":P==="write",children:[g.jsxs("div",{className:"semiont-form__content-source-icon-wrapper",children:[g.jsx("span",{className:"semiont-form__content-source-icon",children:"✍️"}),g.jsx("span",{className:"semiont-form__content-source-label",children:p.writeContent})]}),g.jsx("div",{className:"semiont-form__content-source-description",children:p.writeContentDescription})]})]})]}),!Oe&&!Ve&&P==="upload"&&g.jsxs("div",{className:"semiont-form__upload-section",children:[g.jsx("div",{children:g.jsxs("div",{className:"semiont-form__upload-container",children:[g.jsx("label",{className:"semiont-form__upload-dropzone",children:g.jsxs("div",{className:"semiont-form__upload-area",children:[g.jsx("input",{type:"file",accept:"text/plain,text/markdown,image/png,image/jpeg,application/pdf",onChange:qe,className:"semiont-form__upload-input",disabled:D}),g.jsx("p",{className:"semiont-form__upload-text",children:Z?Z.name:p.dropFileOrClick}),g.jsx("p",{className:"semiont-form__upload-hint",children:p.supportedFormats})]})}),Z&&g.jsx("button",{type:"button",onClick:()=>{Y(null),L(null),H("text/markdown")},className:"semiont-button semiont-button--danger semiont-button--small",disabled:D,children:"Clear"})]})}),Z&&g.jsxs("div",{className:"semiont-form__media-type",children:[g.jsxs("span",{className:"semiont-form__media-type-label",children:[p.mediaType,":"]}),g.jsx("code",{className:"semiont-form__media-type-value",children:X}),g.jsx("span",{className:"semiont-form__media-type-lock",title:p.autoDetected,children:"🔒"})]}),Z&&I&&Kb(X)&&g.jsxs("div",{className:"semiont-form__image-preview",children:[g.jsx("p",{className:"semiont-form__image-preview-label",children:"Preview:"}),g.jsx("div",{className:"semiont-form__image-preview-container",children:g.jsx("img",{src:I,alt:"Upload preview",className:"semiont-form__image-preview-img"})})]})]}),(Oe||Ve||P==="write")&&g.jsxs("div",{className:"semiont-form__write-section",children:[!Oe&&!Ve&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"format-select",className:"semiont-form__label",children:p.format}),g.jsxs("select",{id:"format-select",value:$,onChange:we=>ne(we.target.value),disabled:D,className:"semiont-select",children:[g.jsx("option",{value:"text/markdown",children:"Markdown (text/markdown)"}),g.jsx("option",{value:"text/plain",children:"Plain Text (text/plain)"}),g.jsx("option",{value:"text/html",children:"HTML (text/html)"})]})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__editor",children:[g.jsx("label",{className:"semiont-form__label",children:Oe?p.resourceContent:p.content}),g.jsx("div",{className:"semiont-form__editor-wrapper",lang:z,children:g.jsx(m5,{content:E,editable:!D,sourceView:!0,showLineNumbers:l,hoverDelayMs:c,onChange:we=>Q(we)})})]}),!Oe&&!Ve&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"charset-select",className:"semiont-form__label",children:p.encoding}),g.jsxs("select",{id:"charset-select",value:re,onChange:we=>R(we.target.value),disabled:D,className:"semiont-select",children:[g.jsx("option",{value:"",children:"UTF-8 (default)"}),g.jsx("option",{value:"iso-8859-1",children:"ISO-8859-1 (Latin-1)"}),g.jsx("option",{value:"windows-1252",children:"Windows-1252"}),g.jsx("option",{value:"ascii",children:"ASCII"}),g.jsx("option",{value:"utf-16le",children:"UTF-16LE"})]})]})]}),Oe&&g.jsxs("div",{className:"semiont-form__checkbox-field",children:[g.jsx("input",{id:"archiveOriginal",type:"checkbox",checked:ve,onChange:we=>Xe(we.target.checked),className:"semiont-checkbox",disabled:D}),g.jsx("label",{htmlFor:"archiveOriginal",className:"semiont-form__checkbox-label",children:p.archiveOriginal})]})]}),g.jsxs("div",{className:"semiont-form__actions",children:[g.jsx("button",{type:"button",onClick:m,disabled:D,className:sd.tertiary.base,children:p.cancel}),g.jsx("button",{type:"submit",disabled:D||!j.trim(),className:sd.primary.base,children:D?Oe?p.saving:Ve?p.creatingAndLinking:p.creating:Oe?p.saveClonedResource:Ve?p.createAndLinkResource:p.createResource})]})]})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(O,{activePanel:d,theme:s,showLineNumbers:l}),g.jsx(b,{context:"simple",activePanel:d})]})]})}var ED=ue.memo(({resource:e,onOpen:t,tabIndex:n=0,archivedLabel:r,createdLabel:i})=>g.jsxs("div",{onClick:()=>t(e),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),t(e))},role:"button",tabIndex:n,"aria-label":`Open resource: ${e.name}`,className:"semiont-resource-card",children:[g.jsxs("div",{className:"semiont-resource-card__header",children:[g.jsx("h4",{className:"semiont-resource-card__title",children:e.name}),e.archived&&g.jsx("span",{className:"semiont-resource-card__badge","data-type":"archived",children:r})]}),g.jsxs("div",{className:"semiont-resource-card__metadata",children:[g.jsxs("span",{className:"semiont-resource-card__date",children:[i," ",e.dateCreated?new Date(e.dateCreated).toLocaleDateString():"N/A"]}),e.entityTypes&&e.entityTypes.length>0&&g.jsxs("div",{className:"semiont-tags",children:[e.entityTypes.slice(0,2).map(a=>g.jsx("span",{className:"semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm",children:a},a)),e.entityTypes.length>2&&g.jsxs("span",{className:"semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm",children:["+",e.entityTypes.length-2]})]})]})]}));ED.displayName="ResourceCard";function nie({recentDocuments:e,searchDocuments:t,entityTypes:n,isLoadingRecent:r,isSearching:i,searchQuery:a,onSearchQueryChange:s,theme:l,showLineNumbers:c,activePanel:d,onNavigateToResource:f,onNavigateToCompose:m,translations:p,ToolbarPanels:O}){const[b,S]=_.useState(""),w=a.trim()!=="",k=w?t:e,j=b?k.filter(q=>q.entityTypes&&q.entityTypes.includes(b)):k,T=iT(n.length+1,{orientation:"horizontal"}),E=iT(j.length,{orientation:"grid",cols:2}),Q=_.useRef(f);Q.current=f;const A=_.useCallback(q=>{S(q)},[]),N=_.useCallback(q=>{const P=Hb(q);P&&Q.current(P)},[]);if(r)return g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:p.loadingKnowledgeBase})});const D=w&&t.length===0&&!i;return g.jsxs("div",{className:`semiont-page${d&&Oa.includes(d)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:p.title}),g.jsx("p",{className:"semiont-page__subtitle",children:p.subtitle})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsx("div",{className:"semiont-card__search-form",children:g.jsxs("div",{className:"semiont-card__search-wrapper",children:[g.jsx("input",{type:"text",value:a,onChange:q=>s(q.target.value),placeholder:p.searchPlaceholder,className:"semiont-card__search-input","aria-label":p.searchPlaceholder}),i&&g.jsx("span",{className:"semiont-card__search-status","aria-live":"polite",children:p.searching})]})}),n.length>0&&g.jsxs("div",{className:"semiont-card__filters",children:[g.jsx("h3",{className:"semiont-card__filters-label",children:p.filterByEntityType}),g.jsxs("div",{ref:T.containerRef,onKeyDown:T.handleKeyDown,className:"semiont-card__filter-buttons",role:"group","aria-label":"Entity type filters",children:[g.jsx("button",{onClick:()=>A(""),tabIndex:0,"aria-pressed":b==="",className:"semiont-card__filter-button","data-active":b==="",children:p.all}),n.map(q=>g.jsx("button",{onClick:()=>A(q),tabIndex:-1,"aria-pressed":b===q,className:"semiont-card__filter-button","data-active":b===q,children:q},q))]})]}),g.jsxs("div",{className:"semiont-card__documents",children:[g.jsx("h3",{className:"semiont-card__documents-label",children:w&&t.length>0?p.searchResults(t.length):b?p.documentsTaggedWith(b):p.recentResources}),D&&g.jsx("div",{className:"semiont-card__warning",children:g.jsx("p",{className:"semiont-card__warning-text",children:p.noResultsFound(a)})}),j.length>0?g.jsx("div",{ref:E.containerRef,onKeyDown:E.handleKeyDown,className:"semiont-card-grid",role:"group","aria-label":"Document grid",children:j.map((q,P)=>g.jsx(ED,{resource:q,onOpen:N,tabIndex:P===0?0:-1,archivedLabel:p.archived,createdLabel:p.created},Hb(q)))}):g.jsxs("div",{className:"semiont-card__empty",children:[g.jsx("p",{className:"semiont-card__empty-text",children:p.noResourcesAvailable}),!w&&g.jsx("button",{onClick:m,className:"semiont-card__empty-button",children:p.composeFirstResource})]})]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(O,{activePanel:d,theme:l,showLineNumbers:c}),g.jsx(p5,{context:"simple",activePanel:d})]})]})}function pne(e){const t=Lp(),{data:n,isLoading:r}=t.mediaToken.useQuery(e);return{token:n==null?void 0:n.token,loading:r}}function gne(e){const t=In(),n=gt(),{showError:r}=Jd();gr({"bind:update-body":async i=>{try{await t.bind.body(e,mr(i.annotationId),i.operations)}catch(a){r(`Failed to update reference: ${a instanceof Error?a.message:String(a)}`)}},"bind:body-update-failed":({message:i})=>r(`Failed to update reference: ${i}`),"match:search-requested":i=>{t.match.search(pi(i.resourceId),i.referenceId,i.context,{limit:i.limit,useSemanticScoring:i.useSemanticScoring}).subscribe({next:a=>n.get("match:search-results").next(a),error:a=>n.get("match:search-failed").next({correlationId:i.correlationId,referenceId:i.referenceId,error:a instanceof Error?a.message:String(a)})})}})}function vne(e){const t=gt(),n=In(),{showSuccess:r,showError:i,showInfo:a}=Jd(),[s,l]=_.useState(null),c=_.useCallback(j=>{if(j.svgSelector)return{type:"SvgSelector",value:j.svgSelector};if(j.fragmentSelector){const T=[{type:"FragmentSelector",value:j.fragmentSelector,...j.conformsTo&&{conformsTo:j.conformsTo}}];return j.exact&&T.push({type:"TextQuoteSelector",exact:j.exact,...j.prefix&&{prefix:j.prefix},...j.suffix&&{suffix:j.suffix}}),T}return{type:"TextQuoteSelector",exact:j.exact,...j.prefix&&{prefix:j.prefix},...j.suffix&&{suffix:j.suffix}}},[]),d=_.useCallback(j=>{const T={highlighting:"annotations",commenting:"annotations",assessing:"annotations",tagging:"annotations",linking:"annotations"};t.get("browse:panel-open").next({panel:T[j.motivation]||"annotations"}),l(j)},[]),[f,m]=_.useState(null),[p,O]=_.useState(null),b=_.useRef(null),S=_.useRef(null),w=_.useCallback(j=>{m(T=>!j.motivation||j.motivation!==T?T:null),r("Annotation complete"),S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{O(null),S.current=null},5e3)},[r]),k=_.useCallback(j=>{S.current&&(clearTimeout(S.current),S.current=null),m(null),O(null),i(j.message||"Annotation failed")},[i]);return gr({"mark:requested":d,"mark:select-comment":j=>d({selector:c(j),motivation:"commenting"}),"mark:select-tag":j=>d({selector:c(j),motivation:"tagging"}),"mark:select-assessment":j=>d({selector:c(j),motivation:"assessing"}),"mark:select-reference":j=>d({selector:c(j),motivation:"linking"}),"mark:cancel-pending":()=>l(null),"mark:create-ok":()=>l(null),"mark:submit":async j=>{try{const T=await n.mark.annotation(e,{motivation:j.motivation,target:{source:e,selector:j.selector},body:j.body});t.get("mark:create-ok").next({annotationId:T.annotationId})}catch(T){t.get("mark:create-failed").next({message:T instanceof Error?T.message:String(T)})}},"mark:delete":async j=>{try{await n.mark.delete(e,j.annotationId),t.get("mark:delete-ok").next({annotationId:j.annotationId})}catch(T){t.get("mark:delete-failed").next({message:T instanceof Error?T.message:String(T)})}},"mark:assist-request":j=>{S.current&&(clearTimeout(S.current),S.current=null),m(j.motivation),O(null),n.mark.assist(e,j.motivation,j.options).subscribe({next:T=>O(T),error:T=>k({resourceId:e,message:T.message}),complete:()=>{}})},"mark:progress":j=>O(j),"mark:assist-finished":w,"mark:assist-failed":k,"mark:progress-dismiss":()=>{S.current&&(clearTimeout(S.current),S.current=null),O(null)},"mark:assist-cancelled":()=>a("Annotation cancelled"),"mark:create-failed":({message:j})=>i(`Failed to create annotation: ${j}`),"mark:delete-failed":({message:j})=>i(`Failed to delete annotation: ${j}`)}),_.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]),{pendingAnnotation:s,assistingMotivation:f,progress:p,assistStreamRef:b}}function One(e,t,n){const r=In(),{showSuccess:i,showError:a}=Jd(),[s,l]=_.useState(!1),[c,d]=_.useState(null),f=_.useCallback((p,O)=>(n(mr(p)),r.yield.fromAnnotation(pi(t),mr(p),{...O,language:O.language||e}).subscribe({next:S=>{d(S),l(!0)},complete:()=>{},error:S=>{d(null),l(!1);const w=S instanceof Error?S.message:"Generation failed";a(`Resource generation failed: ${w}`)}})),[t,n,e,r,a]),m=_.useCallback(()=>{d(null)},[]);return gr({"yield:progress":p=>{d(p),l(!0)},"yield:finished":p=>{d(p),l(!1),i(p.resourceName?`Resource "${p.resourceName}" created successfully!`:"Resource created successfully!"),setTimeout(()=>m(),2e3)},"yield:failed":({error:p,message:O})=>{d(null),l(!1),a(`Resource generation failed: ${O||p||"Generation failed"}`)}}),{isGenerating:s,generationProgress:c,onGenerateDocument:f}}function bne(e){const t=In(),[n,r]=_.useState(null),[i,a]=_.useState(!1),[s,l]=_.useState(null),[c,d]=_.useState(null);return gr({"gather:requested":f=>{var m;a(!0),l(null),r(null),d(mr(f.annotationId)),t.gather.annotation(mr(f.annotationId),e.resourceId,{contextWindow:((m=f.options)==null?void 0:m.contextWindow)??2e3}).subscribe({next:p=>{"response"in p&&p.response&&(r(p.response.context??null),a(!1))},error:p=>{l(p instanceof Error?p:new Error(String(p))),a(!1)},complete:()=>{a(!1)}})}}),{gatherContext:n,gatherLoading:i,gatherError:s,gatherAnnotationId:c}}function rie({resource:e,rUri:t,locale:n,Link:r,routes:i,ToolbarPanels:a,refetchDocument:s,streamStatus:l,knowledgeBaseName:c}){const d=hn("ReferenceWizard"),f=gt(),m=In(),p=kc(),{showError:O,showSuccess:b}=Jd(),{theme:S,setTheme:w}=U6(),{showLineNumbers:k,toggleLineNumbers:j}=JS(),{hoverDelayMs:T}=XR(),{addResource:E}=aX(),{triggerSparkleAnimation:Q,clearNewAnnotationId:A}=ex(),N=Lp(),D=hZ(),q=Gb(e)||"text/plain",P=$0(q)==="image",{content:V,loading:Z}=F6(t,e,!P),{token:Y,loading:X}=pne(t),H=P&&Y&&m?`${m.baseUrl}/api/resources/${t}?token=${Y}`:"",I=P?H:V,L=P?X:Z,$=L0(m.browse.annotations(t)),ne=_.useMemo(()=>$||[],[$]),{data:z,isLoading:G}=N.referencedBy.useQuery(t),re=(z==null?void 0:z.referencedBy)||[],{data:R}=D.list.useQuery(),me=(R==null?void 0:R.entityTypes)||[],{hoveredAnnotationId:Se}=II(),{assistingMotivation:ve,progress:Xe,pendingAnnotation:qe}=vne(t),{activePanel:Pe,scrollToAnnotationId:Oe,panelInitialTab:Ve,onScrollCompleted:we}=cne();gne(t);const{generationProgress:Ze,onGenerateDocument:Fe}=One(n,t,A),{gatherContext:ft,gatherLoading:Rt,gatherError:mn}=bne({resourceId:t}),[ke,de]=_.useState(!1),[Ue,ht]=_.useState(null),[Tt,Ot]=_.useState(null),[bt,Si]=_.useState(""),[ae,fe]=_.useState([]);_.useEffect(()=>{const Re=f.get("bind:initiate").subscribe(it=>{ht(it.annotationId),Ot(it.resourceId),Si(it.defaultTitle),fe(it.entityTypes),de(!0),f.get("gather:requested").next({correlationId:crypto.randomUUID(),annotationId:it.annotationId,resourceId:it.resourceId,options:{contextWindow:2e3}})});return()=>Re.unsubscribe()},[f]);const je=_.useCallback(()=>{de(!1)},[]),Be=_.useCallback((Re,it)=>{Fe(Re,{title:it.title,storageUri:it.storagePath,prompt:it.prompt,language:it.language,temperature:it.temperature,maxTokens:it.maxTokens,context:it.context})},[Fe]),Je=_.useCallback(async(Re,it)=>{try{await m.bind.body(t,mr(Re),[{op:"add",item:{type:"SpecificResource",source:it,purpose:"linking"}}]),b("Reference linked successfully")}catch(cr){O(`Failed to link reference: ${cr instanceof Error?cr.message:String(cr)}`)}},[t,m,b,O]),Ct=_.useCallback((Re,it,cr,Hn,Sa)=>{sessionStorage.setItem(`gather-context:${it}`,JSON.stringify(Re));const Gr=new URLSearchParams({annotationUri:it,sourceDocumentId:cr,name:Hn,entityTypes:Sa.join(",")});f.get("browse:router-push").next({path:`/know/compose?${Gr.toString()}`,reason:"compose-from-wizard"})},[]);_.useEffect(()=>{if(e&&t){const Re=Gb(e);E(t,e.name,Re||void 0,e.storageUri),typeof localStorage<"u"&&localStorage.setItem("lastViewedDocumentId",t)}},[e,t,E]),V6({rUri:t,autoConnect:!0,onAnnotationAdded:_.useCallback(Re=>{p.invalidateQueries({queryKey:xt.resources.events(t)})},[p,t]),onAnnotationRemoved:_.useCallback(Re=>{p.invalidateQueries({queryKey:xt.resources.events(t)})},[p,t]),onAnnotationBodyUpdated:_.useCallback(Re=>{p.invalidateQueries({queryKey:xt.resources.events(t)})},[p,t]),onDocumentArchived:_.useCallback(Re=>{s(),b("This document has been archived")},[s,b]),onDocumentUnarchived:_.useCallback(Re=>{s(),b("This document has been unarchived")},[s,b]),onEntityTagAdded:_.useCallback(Re=>{s()},[s]),onEntityTagRemoved:_.useCallback(Re=>{s()},[s]),onError:_.useCallback(Re=>{console.error("[RealTime] Event stream error:",Re)},[])});const un=N.update.useMutation(),Ht=N.generateCloneToken.useMutation(),Mt=_.useCallback(async()=>{try{await un.mutateAsync({id:t,data:{archived:!0}}),await s()}catch(Re){console.error("Failed to archive document:",Re),O("Failed to archive document")}},[un,t,s,O]),Gt=_.useCallback(async()=>{try{await un.mutateAsync({id:t,data:{archived:!1}}),await s()}catch(Re){console.error("Failed to unarchive document:",Re),O("Failed to unarchive document")}},[un,t,s,O]),rt=_.useCallback(async()=>{try{const it=(await Ht.mutateAsync(t)).token;f.get("browse:router-push").next({path:`/know/compose?mode=clone&token=${it}`,reason:"clone"})}catch(Re){console.error("Failed to generate clone token:",Re),O("Failed to generate clone link")}},[Ht,t,O]),Wn=_.useCallback(({annotationId:Re})=>{Q(Re)},[Q]),pn=_.useCallback(Re=>{Q(Re.payload.annotation.id)},[Q]),ba=_.useCallback(()=>O("Failed to create annotation"),[O]),$r=_.useCallback(()=>O("Failed to delete annotation"),[O]),Wr=_.useCallback(()=>{},[]),Lt=_.useCallback(()=>O("Failed to update annotation"),[O]),Dt=_.useCallback(({theme:Re})=>w(Re),[w]),Kt=_.useCallback(()=>{p.invalidateQueries({queryKey:xt.resources.events(t)})},[p,t]),gn=_.useCallback(()=>{p.invalidateQueries({queryKey:xt.resources.events(t)})},[p,t]),vn=_.useCallback(()=>{},[]),rn=_.useCallback(()=>{},[]),On=_.useCallback(({resourceId:Re})=>{if(i.resourceDetail){const it=i.resourceDetail(Re);f.get("browse:router-push").next({path:it,reason:"reference-link"})}},[i.resourceDetail]),Pn=_.useCallback(({entityType:Re})=>{if(i.know){const it=`${i.know}?entityType=${encodeURIComponent(Re)}`;f.get("browse:router-push").next({path:it,reason:"entity-type-filter"})}},[i.know]),Yt=_.useCallback(()=>{Mn(Re=>!Re)},[]);gr({"mark:mode-toggled":Yt,"mark:archive":Mt,"mark:unarchive":Gt,"yield:clone":rt,"beckon:sparkle":Wn,"mark:added":pn,"mark:create-failed":ba,"mark:delete-failed":$r,"mark:body-updated":Wr,"bind:body-update-failed":Lt,"settings:theme-changed":Dt,"settings:line-numbers-toggled":j,"mark:assist-finished":Kt,"mark:assist-failed":gn,"yield:finished":vn,"yield:failed":rn,"browse:reference-navigate":On,"browse:entity-type-clicked":Pn});const{announceResourceLoading:Nn,announceResourceLoaded:bn}=W6();_.useEffect(()=>{L?Nn(e.name):I&&bn(e.name)},[L,I,e.name,Nn,bn]);const Rn=e.entityTypes||[],yn=Y0(e),or=yn==null?void 0:yn.mediaType,Xn=yn==null?void 0:yn.byteSize,[lr,Mn]=_.useState(()=>typeof window<"u"?localStorage.getItem("annotateMode")==="true":!1),tn=_.useMemo(()=>{const Re={highlights:[],references:[],assessments:[],comments:[],tags:[]};for(const it of ne){const cr=Object.values(tr).find(Hn=>Hn.matchesAnnotation(it));if(cr){const Hn=cr.internalType+"s";Re[Hn]&&Re[Hn].push(it)}}return Re},[ne]),Sn={...e,content:I},Hr=_.useCallback(Re=>{Re&&f.get("beckon:sparkle").next({annotationId:Re})},[]),ya=_.useCallback(Re=>{},[]);return g.jsxs("div",{className:`semiont-document-viewer${Pe?" semiont-document-viewer--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-document-viewer__main",children:[g.jsxs("div",{className:"semiont-document-viewer__content",children:[g.jsx("div",{className:"semiont-document-viewer__header",children:g.jsx("div",{className:"semiont-document-viewer__header-inner",children:g.jsx("h2",{className:"semiont-document-viewer__title",children:e.name})})}),g.jsx("div",{className:"semiont-document-viewer__scrollable-body",lang:L1(e)||void 0,children:g.jsx(FU,{fallback:(Re,it)=>g.jsxs("div",{className:"semiont-document-viewer__error",children:[g.jsx("h3",{className:"semiont-document-viewer__error-title",children:"Error loading document viewer"}),g.jsx("p",{className:"semiont-document-viewer__error-message",children:Re.message}),g.jsx("button",{onClick:it,className:"semiont-document-viewer__error-button",children:"Try again"})]}),children:L?g.jsx("div",{className:"semiont-document-viewer__loading",children:"Loading document content..."}):g.jsx(VK,{resource:Sn,annotations:tn,generatingReferenceId:(Ze==null?void 0:Ze.referenceId)??null,showLineNumbers:k,hoverDelayMs:T,hoveredAnnotationId:Se})})})]}),g.jsxs("div",{className:"semiont-document-viewer__sidebar",children:[g.jsxs(a,{activePanel:Pe,theme:S,showLineNumbers:k,hoverDelayMs:T,width:Pe==="jsonld"?"w-[600px]":Pe==="annotations"?"w-[400px]":"w-64",children:[lr&&e.archived&&g.jsx("div",{className:"semiont-document-viewer__archived-status",children:g.jsx("div",{className:"semiont-document-viewer__archived-text",children:"📦 Archived"})}),Pe==="annotations"&&!e.archived&&g.jsx(hJ,{annotations:ne,annotators:tr,annotateMode:lr,assistingMotivation:ve,progress:Xe,pendingAnnotation:qe,allEntityTypes:me,generatingReferenceId:(Ze==null?void 0:Ze.referenceId)??null,referencedBy:re,referencedByLoading:G,resourceId:t,locale:n,scrollToAnnotationId:Oe,hoveredAnnotationId:Se,onScrollCompleted:we,initialTab:Ve==null?void 0:Ve.tab,initialTabGeneration:Ve==null?void 0:Ve.generation,Link:r,routes:i}),Pe==="history"&&g.jsx(A$,{rUri:t,hoveredAnnotationId:Se,onEventHover:Hr,onEventClick:ya,Link:r,routes:i}),Pe==="info"&&g.jsx(lJ,{resourceId:t,documentEntityTypes:Rn,documentLocale:L1(e),primaryMediaType:or,primaryByteSize:Xn,storageUri:e.storageUri,isArchived:e.archived??!1,dateCreated:e.dateCreated,dateModified:e.dateModified,creationMethod:e.creationMethod,wasAttributedTo:e.wasAttributedTo,wasDerivedFrom:e.wasDerivedFrom,generator:e.generator}),Pe==="collaboration"&&g.jsx(HK,{isConnected:l==="connected",eventCount:0,knowledgeBaseName:c}),Pe==="jsonld"&&g.jsx(iJ,{resource:e})]}),g.jsx(p5,{context:"document",activePanel:Pe,isArchived:e.archived??!1})]})]}),g.jsx(ote,{isOpen:ke,onClose:je,annotationId:Ue,resourceId:Tt,defaultTitle:bt,entityTypes:ae,locale:n,context:ft,contextLoading:Rt,contextError:mn,eventBus:f,onGenerateSubmit:Be,onLinkResource:Je,onComposeNavigate:Ct,translations:{gatherTitle:d("gatherTitle"),configureGenerationTitle:d("configureGenerationTitle"),configureSearchTitle:d("configureSearchTitle"),searchResultsTitle:d("searchResultsTitle"),sourceContextLabel:d("sourceContextLabel"),connectionsLabel:d("connectionsLabel"),citedByLabel:d("citedByLabel"),userHintLabel:d("userHintLabel"),userHintPlaceholder:d("userHintPlaceholder"),loadingContext:d("loadingContext"),failedContext:d("failedContext"),cancel:d("cancel"),search:d("search"),searching:d("searching"),generate:d("generate"),compose:d("compose"),resolutionStrategyLabel:d("resolutionStrategyLabel"),back:d("back"),link:d("link"),score:d("score"),noResults:d("noResults"),resourceTitle:d("resourceTitle"),resourceTitlePlaceholder:d("resourceTitlePlaceholder"),additionalInstructions:d("additionalInstructions"),additionalInstructionsPlaceholder:d("additionalInstructionsPlaceholder"),language:d("language"),languageHelp:d("languageHelp"),creativity:d("creativity"),creativityFocused:d("creativityFocused"),creativityCreative:d("creativityCreative"),maxLength:d("maxLength"),maxLengthHelp:d("maxLengthHelp"),maxResults:d("maxResults"),semanticScoring:d("semanticScoring"),semanticScoringHelp:d("semanticScoringHelp")}})]})}function iie(){const e=In(),t=Wt(),n=_.useRef(t);_.useEffect(()=>{n.current=t}),_.useEffect(()=>{const r=()=>n.current?n.current:void 0;e.setTokenGetter(r)},[e])}function yne({children:e}){const t=Pz();return g.jsx(tX,{children:g.jsxs(WU,{resetKeys:[t.pathname],children:[g.jsx(O$,{}),g.jsx(v$,{}),e]})})}const Sne=ue.lazy(()=>Ae(()=>import("./layout-DXY8hCsB.js"),__vite__mapDeps([5,3,1,6,7,4]))),xne=ue.lazy(()=>Ae(()=>import("./page-DzoXV-AN.js"),__vite__mapDeps([8,3,1,7,4]))),_ne=ue.lazy(()=>Ae(()=>import("./page-aKPxuWo3.js"),__vite__mapDeps([9,3,1,10,6,7,4,11,12]))),wne=ue.lazy(()=>Ae(()=>import("./page-BRTi-f95.js"),__vite__mapDeps([13,3,1,10,6,7,4,11,12]))),kne=ue.lazy(()=>Ae(()=>import("./page-D3THDsqd.js"),__vite__mapDeps([14,3,1,7,4,10,6,11,12]))),jne=ue.lazy(()=>Ae(()=>import("./page-BNJp__R7.js"),__vite__mapDeps([15,1,7,3,4]))),Tne=ue.lazy(()=>Ae(()=>import("./page-IgGNB4a9.js"),__vite__mapDeps([16,3,1,7,4,10,6,11,12]))),Cne=ue.lazy(()=>Ae(()=>import("./page-DbwQv5n_.js"),__vite__mapDeps([17,3,1,10,6,7,4,11,12]))),Ene=ue.lazy(()=>Ae(()=>import("./page-CyFJt2nP.js"),__vite__mapDeps([18,3,1,7,4]))),Ane=ue.lazy(()=>Ae(()=>import("./layout-VBQ97DvJ.js"),__vite__mapDeps([19,3,1,7,4,20,11,21,12,10,6,22]))),Qne=ue.lazy(()=>Ae(()=>import("./page-D1q6VB02.js"),__vite__mapDeps([23,3,1,7,4]))),Pne=ue.lazy(()=>Ae(()=>import("./page-8OrS1-4-.js"),__vite__mapDeps([24,3,1,7,4,20,11]))),Nne=ue.lazy(()=>Ae(()=>import("./page-B4Qu9WPd.js"),__vite__mapDeps([25,3,1,7,4,20,11]))),Rne=ue.lazy(()=>Ae(()=>import("./page-DddZ9Yxm.js"),__vite__mapDeps([26,3,1,7,4,12,22,20,11]))),Mne=ue.lazy(()=>Ae(()=>import("./layout-DJI7aibW.js"),__vite__mapDeps([27,3,1,7,4,10,6,11,28,29,21,12]))),Lne=ue.lazy(()=>Ae(()=>import("./page-CDSGl6uY.js"),__vite__mapDeps([30,3,1,7,4]))),Dne=ue.lazy(()=>Ae(()=>import("./client-CWwdB0xQ.js"),__vite__mapDeps([31,3,1,20,7,4,11]))),zne=ue.lazy(()=>Ae(()=>import("./client-DeL0szs5.js"),__vite__mapDeps([32,3,1,20,7,4,11]))),qne=ue.lazy(()=>Ae(()=>import("./client-D3W9xTBT.js"),__vite__mapDeps([33,3,1,20,7,4,11]))),Ine=ue.lazy(()=>Ae(()=>import("./page-Bx8QAzic.js"),__vite__mapDeps([34,3,1,20,7,4,11,29]))),Xne=ue.lazy(()=>Ae(()=>import("./layout-B_JLc3yI.js"),__vite__mapDeps([35,3,1,7,4,28,21,10,6,11,12]))),Zne=ue.lazy(()=>Ae(()=>import("./page-CJLuuiG8.js"),__vite__mapDeps([36,3,1,7,4]))),Bne=ue.lazy(()=>Ae(()=>import("./page-jxC42AIR.js"),__vite__mapDeps([37,3,1,20,7,4,11]))),Vne=ue.lazy(()=>Ae(()=>import("./page-DCxg1lHk.js"),__vite__mapDeps([38,3,1,20,7,4,11]))),Une=ue.lazy(()=>Ae(()=>import("./page-BSB8GP79.js"),__vite__mapDeps([39,3,1,20,7,4,11]))),Yne=ue.lazy(()=>Ae(()=>import("./client-Cgz-uiSd.js"),__vite__mapDeps([40,3,1,20,7,4,11]))),Fne=ue.lazy(()=>Ae(()=>import("./not-found-BKG2_Fv3.js"),__vite__mapDeps([41,3,1,7,4])));function $ne({children:e}){const{locale:t}=Mz(),{i18n:n}=qz();return _.useEffect(()=>{if(!t)return;const r=Db(t)?t:hc;n.language!==r&&n.changeLanguage(r)},[t,n]),!t||!Db(t)?g.jsx(yE,{to:`/${hc}`,replace:!0}):g.jsx(g.Fragment,{children:e})}function Wne(){const e=Rz();return _.useEffect(()=>{const t=navigator.language.split("-")[0]??hc,n=Db(t)?t:hc;e(`/${n}`,{replace:!0})},[e]),null}function Hne(){return g.jsx(ue.Suspense,{fallback:null,children:g.jsxs(Nz,{children:[g.jsx(jt,{path:"/",element:g.jsx(Wne,{})}),g.jsxs(jt,{path:"/:locale",element:g.jsx($ne,{children:g.jsx(Sne,{})}),children:[g.jsx(jt,{index:!0,element:g.jsx(xne,{})}),g.jsx(jt,{path:"about",element:g.jsx(_ne,{})}),g.jsx(jt,{path:"privacy",element:g.jsx(wne,{})}),g.jsx(jt,{path:"terms",element:g.jsx(kne,{})}),g.jsx(jt,{path:"auth/connect",element:g.jsx(jne,{})}),g.jsx(jt,{path:"auth/signup",element:g.jsx(Tne,{})}),g.jsx(jt,{path:"auth/error",element:g.jsx(Cne,{})}),g.jsx(jt,{path:"auth/welcome",element:g.jsx(yne,{children:g.jsx(Ene,{})})}),g.jsxs(jt,{path:"know",element:g.jsx(Ane,{}),children:[g.jsx(jt,{index:!0,element:g.jsx(Qne,{})}),g.jsx(jt,{path:"discover",element:g.jsx(Pne,{})}),g.jsx(jt,{path:"compose",element:g.jsx(Nne,{})}),g.jsx(jt,{path:"resource/:id",element:g.jsx(Rne,{})})]}),g.jsxs(jt,{path:"admin",element:g.jsx(Mne,{}),children:[g.jsx(jt,{index:!0,element:g.jsx(Lne,{})}),g.jsx(jt,{path:"users",element:g.jsx(Dne,{})}),g.jsx(jt,{path:"security",element:g.jsx(zne,{})}),g.jsx(jt,{path:"exchange",element:g.jsx(qne,{})}),g.jsx(jt,{path:"devops",element:g.jsx(Ine,{})})]}),g.jsxs(jt,{path:"moderate",element:g.jsx(Xne,{}),children:[g.jsx(jt,{index:!0,element:g.jsx(Zne,{})}),g.jsx(jt,{path:"recent",element:g.jsx(Bne,{})}),g.jsx(jt,{path:"entity-tags",element:g.jsx(Vne,{})}),g.jsx(jt,{path:"tag-schemas",element:g.jsx(Une,{})}),g.jsx(jt,{path:"linked-data",element:g.jsx(Yne,{})})]}),g.jsx(jt,{path:"*",element:g.jsx(Fne,{})})]}),g.jsx(jt,{path:"*",element:g.jsx(yE,{to:`/${hc}`,replace:!0})})]})})}const AD=document.getElementById("root");if(!AD)throw new Error("Root element not found");Uz.createRoot(AD).render(g.jsx(ue.StrictMode,{children:g.jsx(Lz,{children:g.jsx(Hne,{})})}));const Gne=Object.freeze(Object.defineProperty({__proto__:null,AnnotateToolbar:kA,AnnotateView:EA,AnnotationHistory:gA,AssessmentPanel:bA,CollaborationPanel:pA,CollapsibleResourceNavigation:jA,CommentsPanel:vA,HighlightPanel:OA,KeyboardShortcuts:wA,ReferenceWizard:AA,ReferencesPanel:_A,ResourceInfoPanel:mA,ResourceViewer:TA,Settings:CA,StatisticsPanel:xA,TaggingPanel:yA,Toolbar:hA,UnifiedAnnotationsPanel:SA,default:zo},Symbol.toStringTag,{value:"Module"}));export{zre as $,Hre as A,$re as B,Xre as C,Yre as D,Ure as E,Jre as F,Kre as G,Ore as H,hc as I,Db as J,qn as K,Fre as L,W0 as M,eie as N,Mre as O,Ire as P,yne as Q,nie as R,xp as S,p5 as T,ore as U,sre as V,Gre as W,qre as X,mJ as Y,RA as Z,Vre as _,Wre as a,aX as a0,Lre as a1,Ul as a2,Ere as a3,mre as a4,Qre as a5,iie as a6,jre as a7,lre as a8,ure as a9,fte as aA,Dre as aa,wre as ab,kre as ac,Rre as ad,Tre as ae,xre as af,_re as ag,cre as ah,KI as ai,V0 as aj,Z0 as ak,ire as al,nre as am,rre as an,B6 as ao,Oa as ap,GU as aq,Nre as ar,pre as as,hre as at,Are as au,Cre as av,are as aw,sA as ax,dre as ay,fre as az,sd as b,Jd as c,bre as d,In as e,cne as f,U6 as g,JS as h,gr as i,Lp as j,hZ as k,A6 as l,L0 as m,XR as n,fZ as o,Wt as p,tie as q,pi as r,Gb as s,zI as t,G0 as u,mr as v,Zre as w,Bre as x,rie as y,vre as z};
|
|
161
|
+
//# sourceMappingURL=index-C5oI0kaf.js.map
|