Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

+3 -2
View File
@@ -1,6 +1,7 @@
<?php
use IPS\Application;
use IPS\Data\Store;
use IPS\File;
use IPS\Helpers\Form\Editor;
use IPS\Output;
@@ -17,11 +18,11 @@ if( !\IPS\IN_DEV )
/* Call the hasPlugins method first so that we can be sure the JS is generated */
if( Editor::hasPlugins() )
{
if( Settings::i()->editor_plugin_js )
if( Store::i()->editorPluginJs )
{
try
{
$pluginJs = File::get( 'core_Theme', Settings::i()->editor_plugin_js )->contents();
$pluginJs = File::get( 'core_Theme', Store::i()->editorPluginJs )->contents();
} catch ( Exception ) {}
}
@@ -120,7 +120,8 @@ try
Output::i()->sendHeader( "Content-type: " . File::getMimeType( $file->originalFilename ) . ";charset=UTF-8" );
Output::i()->sendHeader( "Content-Security-Policy: default-src 'none'; sandbox" );
Output::i()->sendHeader( "X-Content-Security-Policy: default-src 'none'; sandbox" );
Output::i()->sendHeader( "X-Content-Security-Policy: default-src 'none'; sandbox" );
Output::i()->sendHeader( "Cross-Origin-Opener-Policy: same-origin" );
foreach( $headers as $key => $header )
{
@@ -56,6 +56,7 @@ try
Output::i()->sendHeader( "Content-Length: " . $file->filesize() );
Output::i()->sendHeader( "Content-Security-Policy: default-src 'none'; sandbox" );
Output::i()->sendHeader( "X-Content-Security-Policy: default-src 'none'; sandbox" );
Output::i()->sendHeader( "Cross-Origin-Opener-Policy: same-origin" );
$file->printFile();
exit;
}
@@ -86,7 +86,7 @@ self.addEventListener("push", (e) => {
throw new Error("Server error");
}
const { body, url, grouped, groupedTitle, groupedUrl, icon, image } = data;
const { body, url, grouped, groupedTitle, groupedUrl, icon, image, unreadCount } = data;
let { title } = data;
let tag;
@@ -94,6 +94,11 @@ self.addEventListener("push", (e) => {
tag = data.tag.substr(0, 30);
}
if ( unreadCount && 'setAppBadge' in navigator )
{
navigator.setAppBadge(unreadCount);
}
let options = {
body,
icon: icon ? icon : NOTIFICATION_ICON,
@@ -0,0 +1,38 @@
<?php
use IPS\Output;
use IPS\Output\Javascript;
use IPS\Request;
define('REPORT_EXCEPTIONS', TRUE);
require_once '../../../../init.php';
$content = <<<JS
;(() => {
"use strict";
Debug.log( "No component supplied in the request." );
})();
JS;
if ( isset( Request::i()->component ) )
{
try
{
$content = Javascript::generateWebComponent( Request::i()->component );
}
catch ( Exception $e )
{
$encodedComponent = json_encode( Request::i()->component );
$content = <<<JS
;(() => {
"use strict";
Debug.log( "The source file for the component " + {$encodedComponent} + " could not be found." );
})();
JS;
}
}
$cacheHeaders = ( \IPS\IN_DEV ) ? Output::getNoCacheHeaders() : Output::getCacheHeaders( time(), 360 );
Output::i()->sendOutput( $content, 200, 'text/javascript', $cacheHeaders );
@@ -1 +1 @@
(()=>{var e,s,t={4333:(e,s,t)=>{var a={"./1c":[4570,6319,4570],"./1c.js":[4570,6319,4570],"./abnf":[4414,4414],"./abnf.js":[4414,4414],"./accesslog":[7490,7490],"./accesslog.js":[7490,7490],"./actionscript":[227,227],"./actionscript.js":[227,227],"./ada":[4968,4968],"./ada.js":[4968,4968],"./angelscript":[2725,2725],"./angelscript.js":[2725,2725],"./apache":[8430,8430],"./apache.js":[8430,8430],"./applescript":[7485,7485],"./applescript.js":[7485,7485],"./arcade":[1573,1573],"./arcade.js":[1573,1573],"./arduino":[319,319],"./arduino.js":[319,319],"./armasm":[358,358],"./armasm.js":[358,358],"./asciidoc":[2548,2548],"./asciidoc.js":[2548,2548],"./aspectj":[1016,1016],"./aspectj.js":[1016,1016],"./autohotkey":[3182,3182],"./autohotkey.js":[3182,3182],"./autoit":[661,661],"./autoit.js":[661,661],"./avrasm":[6286,6286],"./avrasm.js":[6286,6286],"./awk":[2715,2715],"./awk.js":[2715,2715],"./axapta":[3408,3408],"./axapta.js":[3408,3408],"./bash":[1755,1755],"./bash.js":[1755,1755],"./basic":[7535,7535],"./basic.js":[7535,7535],"./bnf":[9841,9841],"./bnf.js":[9841,9841],"./brainfuck":[3857,3857],"./brainfuck.js":[3857,3857],"./c":[3179,3179],"./c.js":[3179,3179],"./cal":[8123,8123],"./cal.js":[8123,8123],"./capnproto":[775,775],"./capnproto.js":[775,775],"./ceylon":[6740,6740],"./ceylon.js":[6740,6740],"./clean":[1675,1675],"./clean.js":[1675,1675],"./clojure":[894,894],"./clojure-repl":[4796,4796],"./clojure-repl.js":[4796,4796],"./clojure.js":[894,894],"./cmake":[7297,7297],"./cmake.js":[7297,7297],"./coffeescript":[2478,2478],"./coffeescript.js":[2478,2478],"./coq":[1434,1434],"./coq.js":[1434,1434],"./cos":[5875,5875],"./cos.js":[5875,5875],"./cpp":[863,863],"./cpp.js":[863,863],"./crmsh":[3582,3582],"./crmsh.js":[3582,3582],"./crystal":[8826,8826],"./crystal.js":[8826,8826],"./csharp":[5528,5528],"./csharp.js":[5528,5528],"./csp":[5248,5248],"./csp.js":[5248,5248],"./css":[1931,1931],"./css.js":[1931,1931],"./d":[552,552],"./d.js":[552,552],"./dart":[309,309],"./dart.js":[309,309],"./delphi":[713,713],"./delphi.js":[713,713],"./diff":[1730,1730],"./diff.js":[1730,1730],"./django":[2669,2669],"./django.js":[2669,2669],"./dns":[3485,3485],"./dns.js":[3485,3485],"./dockerfile":[1955,1955],"./dockerfile.js":[1955,1955],"./dos":[5763,5763],"./dos.js":[5763,5763],"./dsconfig":[5434,5434],"./dsconfig.js":[5434,5434],"./dts":[2908,2908],"./dts.js":[2908,2908],"./dust":[7565,7565],"./dust.js":[7565,7565],"./ebnf":[3152,3152],"./ebnf.js":[3152,3152],"./elixir":[1066,1066],"./elixir.js":[1066,1066],"./elm":[3435,3435],"./elm.js":[3435,3435],"./erb":[7005,7005],"./erb.js":[7005,7005],"./erlang":[8771,8771],"./erlang-repl":[8163,8163],"./erlang-repl.js":[8163,8163],"./erlang.js":[8771,8771],"./excel":[1007,1007],"./excel.js":[1007,1007],"./fix":[3596,3596],"./fix.js":[3596,3596],"./flix":[6634,6634],"./flix.js":[6634,6634],"./fortran":[8315,8315],"./fortran.js":[8315,8315],"./fsharp":[3078,3078],"./fsharp.js":[3078,3078],"./gams":[6929,6929],"./gams.js":[6929,6929],"./gauss":[1715,1715],"./gauss.js":[1715,1715],"./gcode":[7952,7952],"./gcode.js":[7952,7952],"./gherkin":[4935,4935],"./gherkin.js":[4935,4935],"./glsl":[1040,1040],"./glsl.js":[1040,1040],"./gml":[5726,7413,5726],"./gml.js":[5726,7413,5726],"./go":[3191,3191],"./go.js":[3191,3191],"./golo":[6643,6643],"./golo.js":[6643,6643],"./gradle":[7578,7578],"./gradle.js":[7578,7578],"./graphql":[6429,6429],"./graphql.js":[6429,6429],"./groovy":[371,371],"./groovy.js":[371,371],"./haml":[1690,1690],"./haml.js":[1690,1690],"./handlebars":[9079,9079],"./handlebars.js":[9079,9079],"./haskell":[7300,7469],"./haskell.js":[7300,7469],"./haxe":[3376,3376],"./haxe.js":[3376,3376],"./hsp":[8678,8678],"./hsp.js":[8678,8678],"./http":[3323,3323],"./http.js":[3323,3323],"./hy":[4010,4010],"./hy.js":[4010,4010],"./inform7":[3916,3916],"./inform7.js":[3916,3916],"./ini":[5544,5544],"./ini.js":[5544,5544],"./irpf90":[1642,1642],"./irpf90.js":[1642,1642],"./isbl":[3018,7930,3018],"./isbl.js":[3018,7930,3018],"./java":[1489,1489],"./java.js":[1489,1489],"./javascript":[6191,6191],"./javascript.js":[6191,6191],"./jboss-cli":[6812,6812],"./jboss-cli.js":[6812,6812],"./json":[8772,8772],"./json.js":[8772,8772],"./julia":[1122,1122],"./julia-repl":[1799,1799],"./julia-repl.js":[1799,1799],"./julia.js":[1122,1122],"./kotlin":[5872,5872],"./kotlin.js":[5872,5872],"./lasso":[7074,7074],"./lasso.js":[7074,7074],"./latex":[7649,7649],"./latex.js":[7649,7649],"./ldif":[8881,8881],"./ldif.js":[8881,8881],"./leaf":[150,150],"./leaf.js":[150,150],"./less":[7015,7015],"./less.js":[7015,7015],"./lisp":[8093,8093],"./lisp.js":[8093,8093],"./livecodeserver":[9924,9924],"./livecodeserver.js":[9924,9924],"./livescript":[6252,6252],"./livescript.js":[6252,6252],"./llvm":[3660,3660],"./llvm.js":[3660,3660],"./lsl":[6561,6561],"./lsl.js":[6561,6561],"./lua":[3324,3324],"./lua.js":[3324,3324],"./makefile":[6503,6503],"./makefile.js":[6503,6503],"./markdown":[7274,7274],"./markdown.js":[7274,7274],"./mathematLine truncated
(()=>{var e,s,t={4333:(e,s,t)=>{var a={"./1c":[4570,6319,4570],"./1c.js":[4570,6319,4570],"./abnf":[4414,4414],"./abnf.js":[4414,4414],"./accesslog":[7490,7490],"./accesslog.js":[7490,7490],"./actionscript":[227,227],"./actionscript.js":[227,227],"./ada":[4968,4968],"./ada.js":[4968,4968],"./angelscript":[2725,2725],"./angelscript.js":[2725,2725],"./apache":[8430,8430],"./apache.js":[8430,8430],"./applescript":[7485,7485],"./applescript.js":[7485,7485],"./arcade":[1573,1573],"./arcade.js":[1573,1573],"./arduino":[319,319],"./arduino.js":[319,319],"./armasm":[358,358],"./armasm.js":[358,358],"./asciidoc":[2548,2548],"./asciidoc.js":[2548,2548],"./aspectj":[1016,1016],"./aspectj.js":[1016,1016],"./autohotkey":[3182,3182],"./autohotkey.js":[3182,3182],"./autoit":[661,661],"./autoit.js":[661,661],"./avrasm":[6286,6286],"./avrasm.js":[6286,6286],"./awk":[2715,2715],"./awk.js":[2715,2715],"./axapta":[3408,3408],"./axapta.js":[3408,3408],"./bash":[1755,1755],"./bash.js":[1755,1755],"./basic":[7535,7535],"./basic.js":[7535,7535],"./bnf":[9841,9841],"./bnf.js":[9841,9841],"./brainfuck":[3857,3857],"./brainfuck.js":[3857,3857],"./c":[3179,3179],"./c.js":[3179,3179],"./cal":[8123,8123],"./cal.js":[8123,8123],"./capnproto":[775,775],"./capnproto.js":[775,775],"./ceylon":[6740,6740],"./ceylon.js":[6740,6740],"./clean":[1675,1675],"./clean.js":[1675,1675],"./clojure":[894,894],"./clojure-repl":[4796,4796],"./clojure-repl.js":[4796,4796],"./clojure.js":[894,894],"./cmake":[7297,7297],"./cmake.js":[7297,7297],"./coffeescript":[2478,2478],"./coffeescript.js":[2478,2478],"./coq":[1434,1434],"./coq.js":[1434,1434],"./cos":[5875,5875],"./cos.js":[5875,5875],"./cpp":[863,863],"./cpp.js":[863,863],"./crmsh":[3582,3582],"./crmsh.js":[3582,3582],"./crystal":[8826,8826],"./crystal.js":[8826,8826],"./csharp":[5528,5528],"./csharp.js":[5528,5528],"./csp":[5248,5248],"./csp.js":[5248,5248],"./css":[1931,1931],"./css.js":[1931,1931],"./d":[552,552],"./d.js":[552,552],"./dart":[309,309],"./dart.js":[309,309],"./delphi":[713,713],"./delphi.js":[713,713],"./diff":[1730,1730],"./diff.js":[1730,1730],"./django":[2669,2669],"./django.js":[2669,2669],"./dns":[3485,3485],"./dns.js":[3485,3485],"./dockerfile":[1955,1955],"./dockerfile.js":[1955,1955],"./dos":[5763,5763],"./dos.js":[5763,5763],"./dsconfig":[5434,5434],"./dsconfig.js":[5434,5434],"./dts":[2908,2908],"./dts.js":[2908,2908],"./dust":[7565,7565],"./dust.js":[7565,7565],"./ebnf":[3152,3152],"./ebnf.js":[3152,3152],"./elixir":[1066,1066],"./elixir.js":[1066,1066],"./elm":[3435,3435],"./elm.js":[3435,3435],"./erb":[7005,7005],"./erb.js":[7005,7005],"./erlang":[8771,8771],"./erlang-repl":[8163,8163],"./erlang-repl.js":[8163,8163],"./erlang.js":[8771,8771],"./excel":[1007,1007],"./excel.js":[1007,1007],"./fix":[3596,3596],"./fix.js":[3596,3596],"./flix":[6634,6634],"./flix.js":[6634,6634],"./fortran":[8315,8315],"./fortran.js":[8315,8315],"./fsharp":[3078,3078],"./fsharp.js":[3078,3078],"./gams":[6929,6929],"./gams.js":[6929,6929],"./gauss":[1715,1715],"./gauss.js":[1715,1715],"./gcode":[7952,7952],"./gcode.js":[7952,7952],"./gherkin":[4935,4935],"./gherkin.js":[4935,4935],"./glsl":[1040,1040],"./glsl.js":[1040,1040],"./gml":[5726,7413,5726],"./gml.js":[5726,7413,5726],"./go":[3191,3191],"./go.js":[3191,3191],"./golo":[6643,6643],"./golo.js":[6643,6643],"./gradle":[7578,7578],"./gradle.js":[7578,7578],"./graphql":[6429,6429],"./graphql.js":[6429,6429],"./groovy":[371,371],"./groovy.js":[371,371],"./haml":[1690,1690],"./haml.js":[1690,1690],"./handlebars":[9079,9079],"./handlebars.js":[9079,9079],"./haskell":[7300,7469],"./haskell.js":[7300,7469],"./haxe":[3376,3376],"./haxe.js":[3376,3376],"./hsp":[8678,8678],"./hsp.js":[8678,8678],"./http":[3323,3323],"./http.js":[3323,3323],"./hy":[4010,4010],"./hy.js":[4010,4010],"./inform7":[3916,3916],"./inform7.js":[3916,3916],"./ini":[5544,5544],"./ini.js":[5544,5544],"./irpf90":[1642,1642],"./irpf90.js":[1642,1642],"./isbl":[3018,7930,3018],"./isbl.js":[3018,7930,3018],"./java":[1489,1489],"./java.js":[1489,1489],"./javascript":[6191,6191],"./javascript.js":[6191,6191],"./jboss-cli":[6812,6812],"./jboss-cli.js":[6812,6812],"./json":[8772,8772],"./json.js":[8772,8772],"./julia":[1122,1122],"./julia-repl":[1799,1799],"./julia-repl.js":[1799,1799],"./julia.js":[1122,1122],"./kotlin":[5872,5872],"./kotlin.js":[5872,5872],"./lasso":[7074,7074],"./lasso.js":[7074,7074],"./latex":[7649,7649],"./latex.js":[7649,7649],"./ldif":[8881,8881],"./ldif.js":[8881,8881],"./leaf":[150,150],"./leaf.js":[150,150],"./less":[7015,7015],"./less.js":[7015,7015],"./lisp":[8093,8093],"./lisp.js":[8093,8093],"./livecodeserver":[9924,9924],"./livecodeserver.js":[9924,9924],"./livescript":[6252,6252],"./livescript.js":[6252,6252],"./llvm":[3660,3660],"./llvm.js":[3660,3660],"./lsl":[6561,6561],"./lsl.js":[6561,6561],"./lua":[3324,3324],"./lua.js":[3324,3324],"./makefile":[6503,6503],"./makefile.js":[6503,6503],"./markdown":[7274,7274],"./markdown.js":[7274,7274],"./mathematLine truncated
Binary file not shown.

Before

Width:  |  Height:  |  Size: 863 B

@@ -0,0 +1,75 @@
var y0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Nd={exports:{}},to={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Kd;function wv(){if(Kd)return to;Kd=1;var A=Symbol.for("react.transitional.element"),Q=Symbol.for("react.fragment");function v(T,Z,St){var $=null;if(St!==void 0&&($=""+St),Z.key!==void 0&&($=""+Z.key),"key"in Z){St={};for(var V in Z)V!=="key"&&(St[V]=Z[V])}else St=Z;return Z=St.ref,{$$typeof:A,type:T,key:$,ref:Z!==void 0?Z:null,props:St}}return to.Fragment=Q,to.jsx=v,to.jsxs=v,to}var jd;function qv(){return jd||(jd=1,Nd.exports=wv()),Nd.exports}var at=qv(),Bd={exports:{}},zt={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Vd;function Lv(){if(Vd)return zt;Vd=1;var A=Symbol.for("react.transitional.element"),Q=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),St=Symbol.for("react.consumer"),$=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),U=Symbol.for("react.memo"),nt=Symbol.for("react.lazy"),it=Symbol.iterator;function ct(p){return p===null||typeof p!="object"?null:(p=it&&p[it]||p["@@iterator"],typeof p=="function"?p:null)}var lt={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vt=Object.assign,yt={};function Ut(p,Y,dt){this.props=p,this.context=Y,this.refs=yt,this.updater=dt||lt}Ut.prototype.isReactComponent={},Ut.prototype.setState=function(p,Y){if(typeof p!="object"&&typeof p!="function"&&p!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,p,Y,"setState")},Ut.prototype.forceUpdate=function(p){this.updater.enqueueForceUpdate(this,p,"forceUpdate")};function fe(){}fe.prototype=Ut.prototype;function ne(p,Y,dt){this.props=p,this.context=Y,this.refs=yt,this.updater=dt||lt}var le=ne.prototype=new fe;le.constructor=ne,Vt(le,Ut.prototype),le.isPureReactComponent=!0;var Ce=Array.isArray,pt={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function pe(p,Y,dt,st,J,xt){return dt=xt.ref,{$$typeof:A,type:p,key:Y,ref:dt!==void 0?dt:null,props:xt}}function ve(p,Y){return pe(p.type,Y,void 0,void 0,void 0,p.props)}function I(p){return typeof p=="object"&&p!==null&&p.$$typeof===A}function bt(p){var Y={"=":"=0",":":"=2"};return"$"+p.replace(/[=:]/g,function(dt){return Y[dt]})}var Le=/\/+/g;function wt(p,Y){return typeof p=="object"&&p!==null&&p.key!=null?bt(""+p.key):Y.toString(36)}function Nt(){}function Te(p){switch(p.status){case"fulfilled":return p.value;case"rejected":throw p.reason;default:switch(typeof p.status=="string"?p.then(Nt,Nt):(p.status="pending",p.then(function(Y){p.status==="pending"&&(p.status="fulfilled",p.value=Y)},function(Y){p.status==="pending"&&(p.status="rejected",p.reason=Y)})),p.status){case"fulfilled":return p.value;case"rejected":throw p.reason}}throw p}function F(p,Y,dt,st,J){var xt=typeof p;(xt==="undefined"||xt==="boolean")&&(p=null);var Et=!1;if(p===null)Et=!0;else switch(xt){case"bigint":case"string":case"number":Et=!0;break;case"object":switch(p.$$typeof){case A:case Q:Et=!0;break;case nt:return Et=p._init,F(Et(p._payload),Y,dt,st,J)}}if(Et)return J=J(p),Et=st===""?"."+wt(p,0):st,Ce(J)?(dt="",Et!=null&&(dt=Et.replace(Le,"$&/")+"/"),F(J,Y,dt,"",function(ce){return ce})):J!=null&&(I(J)&&(J=ve(J,dt+(J.key==null||p&&p.key===J.key?"":(""+J.key).replace(Le,"$&/")+"/")+Et)),Y.push(J)),1;Et=0;var $e=st===""?".":st+":";if(Ce(p))for(var Xt=0;Xt<p.length;Xt++)st=p[Xt],xt=$e+wt(st,Xt),Et+=F(st,Y,dt,xt,J);else if(Xt=ct(p),typeof Xt=="function")for(p=Xt.call(p),Xt=0;!(st=p.next()).done;)st=st.value,xt=$e+wt(st,Xt++),Et+=F(st,Y,dt,xt,J);else if(xt==="object"){if(typeof p.then=="function")return F(Te(p),Y,dt,st,J);throw Y=String(p),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Et}function X(p,Y,dt){if(p==null)return p;var st=[],J=0;return F(p,st,"","",function(xt){return Y.call(dt,xt,J++)}),st}function ft(p){if(p._status===-1){var Y=p._result;Y=Y(),Y.then(function(dt){(p._status===0||p._status===-1)&&(p._status=1,p._result=dt)},function(dt){(p._status===0||p._status===-1)&&(p._status=2,p._result=dt)}),p._status===-1&&(p._status=0,p._result=Y)}if(p._status===1)return p._result.default;throw p._result}var k=typeof reportError=="function"?reportError:function(p){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof p=="object"&&p!==null&&typeof p.message=="string"?String(p.message):String(p),error:p});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",p);return}console.error(p)};function It(){}return zt.Children={map:X,forEach:function(p,Y,dt){X(p,function(){Y.apply(this,arguments)},dt)},count:function(p){var Y=0;return X(p,function(){Y++}),Y},toArray:function(p){return X(p,function(Y){return Y})||[]},only:function(p){if(!I(p))throw Error("React.Children.only expected to receive a single React element child.");return p}},zt.Component=Ut,zt.Fragment=v,zt.Profiler=Z,zt.PureComponent=ne,zt.StrictMode=T,zt.Suspense=L,zt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=pt,zt.act=function(){throw Error("act(...) is not supported in production builds of React.")},zt.cache=function(p){return function(){return p.apply(null,arguments)}},zt.cloneElement=function(p,YLine truncated
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Wd;function Yv(){return Wd||(Wd=1,function(A){function Q(X,ft){var k=X.length;X.push(ft);t:for(;0<k;){var It=k-1>>>1,p=X[It];if(0<Z(p,ft))X[It]=ft,X[k]=p,k=It;else break t}}function v(X){return X.length===0?null:X[0]}function T(X){if(X.length===0)return null;var ft=X[0],k=X.pop();if(k!==ft){X[0]=k;t:for(var It=0,p=X.length,Y=p>>>1;It<Y;){var dt=2*(It+1)-1,st=X[dt],J=dt+1,xt=X[J];if(0>Z(st,k))J<p&&0>Z(xt,st)?(X[It]=xt,X[J]=k,It=J):(X[It]=st,X[dt]=k,It=dt);else if(J<p&&0>Z(xt,k))X[It]=xt,X[J]=k,It=J;else break t}}return ft}function Z(X,ft){var k=X.sortIndex-ft.sortIndex;return k!==0?k:X.id-ft.id}if(A.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var St=performance;A.unstable_now=function(){return St.now()}}else{var $=Date,V=$.now();A.unstable_now=function(){return $.now()-V}}var L=[],U=[],nt=1,it=null,ct=3,lt=!1,Vt=!1,yt=!1,Ut=typeof setTimeout=="function"?setTimeout:null,fe=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;function le(X){for(var ft=v(U);ft!==null;){if(ft.callback===null)T(U);else if(ft.startTime<=X)T(U),ft.sortIndex=ft.expirationTime,Q(L,ft);else break;ft=v(U)}}function Ce(X){if(yt=!1,le(X),!Vt)if(v(L)!==null)Vt=!0,Te();else{var ft=v(U);ft!==null&&F(Ce,ft.startTime-X)}}var pt=!1,ie=-1,pe=5,ve=-1;function I(){return!(A.unstable_now()-ve<pe)}function bt(){if(pt){var X=A.unstable_now();ve=X;var ft=!0;try{t:{Vt=!1,yt&&(yt=!1,fe(ie),ie=-1),lt=!0;var k=ct;try{e:{for(le(X),it=v(L);it!==null&&!(it.expirationTime>X&&I());){var It=it.callback;if(typeof It=="function"){it.callback=null,ct=it.priorityLevel;var p=It(it.expirationTime<=X);if(X=A.unstable_now(),typeof p=="function"){it.callback=p,le(X),ft=!0;break e}it===v(L)&&T(L),le(X)}else T(L);it=v(L)}if(it!==null)ft=!0;else{var Y=v(U);Y!==null&&F(Ce,Y.startTime-X),ft=!1}}break t}finally{it=null,ct=k,lt=!1}ft=void 0}}finally{ft?Le():pt=!1}}}var Le;if(typeof ne=="function")Le=function(){ne(bt)};else if(typeof MessageChannel<"u"){var wt=new MessageChannel,Nt=wt.port2;wt.port1.onmessage=bt,Le=function(){Nt.postMessage(null)}}else Le=function(){Ut(bt,0)};function Te(){pt||(pt=!0,Le())}function F(X,ft){ie=Ut(function(){X(A.unstable_now())},ft)}A.unstable_IdlePriority=5,A.unstable_ImmediatePriority=1,A.unstable_LowPriority=4,A.unstable_NormalPriority=3,A.unstable_Profiling=null,A.unstable_UserBlockingPriority=2,A.unstable_cancelCallback=function(X){X.callback=null},A.unstable_continueExecution=function(){Vt||lt||(Vt=!0,Te())},A.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):pe=0<X?Math.floor(1e3/X):5},A.unstable_getCurrentPriorityLevel=function(){return ct},A.unstable_getFirstCallbackNode=function(){return v(L)},A.unstable_next=function(X){switch(ct){case 1:case 2:case 3:var ft=3;break;default:ft=ct}var k=ct;ct=ft;try{return X()}finally{ct=k}},A.unstable_pauseExecution=function(){},A.unstable_requestPaint=function(){},A.unstable_runWithPriority=function(X,ft){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var k=ct;ct=X;try{return ft()}finally{ct=k}},A.unstable_scheduleCallback=function(X,ft,k){var It=A.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?It+k:It):k=It,X){case 1:var p=-1;break;case 2:p=250;break;case 5:p=1073741823;break;case 4:p=1e4;break;default:p=5e3}return p=k+p,X={id:nt++,callback:ft,priorityLevel:X,startTime:k,expirationTime:p,sortIndex:-1},k>It?(X.sortIndex=k,Q(U,X),v(L)===null&&X===v(U)&&(yt?(fe(ie),ie=-1):yt=!0,F(Ce,k-It))):(X.sortIndex=p,Q(L,X),Vt||lt||(Vt=!0,Te())),X},A.unstable_shouldYield=I,A.unstable_wrapCallback=function(X){var ft=ct;return function(){var k=ct;ct=ft;try{return X.apply(this,arguments)}finally{ct=k}}}}(Ld)),Ld}var $d;function Gv(){return $d||($d=1,qd.exports=Yv()),qd.exports}var Yd={exports:{}},vn={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Fd;function Xv(){if(Fd)return vn;Fd=1;var A=Xd();function Q(L){var U="https://react.dev/errors/"+L;if(1<arguments.length){U+="?args[]="+encodeURIComponent(arguments[1]);for(var nt=2;nt<arguments.length;nt++)U+="&args[]="+encodeURIComponent(arguments[nt])}return"Minified React error #"+L+"; visit "+U+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function v(){}var T={d:{f:v,r:function(){throw Error(Q(522))},D:v,C:v,L:v,m:v,X:v,S:v,M:v},p:0,findDOMNode:null},Z=Symbol.for("react.portal");function St(L,U,nt){var it=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Z,key:it==null?null:""+it,children:L,containerInfo:U,implementation:nt}}var $=A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function V(L,U){if(L==="font")return"";if(typeof U=="string")return U==="use-credentials"?U:""}return vn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,vn.createPortal=function(L,U){var nt=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!U||U.nodeType!==1&&U.nodeType!==9&&U.nodeType!==11)throw Error(Q(299));return St(L,U,null,nt)},vn.flushSync=function(L){var U=$.T,nt=T.p;try{if($.T=null,T.p=2,L)return L()}finally{$.T=U,T.p=nt,T.d.f()}},vn.preconnect=function(L,U){typeof L=="string"&&(U?(U=U.crossOrigin,U=typeof U=="string"?U==="use-credentials"?U:"":void 0):U=null,T.d.C(L,U))},vn.prefetchDNS=function(L){typeof L=="string"&&T.d.D(L)},vn.preinit=function(L,U){if(typeof L=="string"&&U&&typeof U.as=="string"){var nt=U.as,it=V(nt,U.crossOrigin),ct=typeof U.integrity=="string"?U.integrity:void 0,lt=typeof U.fetchPriority=="string"?U.fetchPriority:void 0;nt==="style"?T.d.S(L,typeof U.precedence=="string"?U.precedence:void 0,{crossOrigin:it,integrity:ct,fetchPriority:lt}):nt==="script"&&T.d.X(L,{crossOrigin:it,integrity:ct,fetchPriority:lt,nonce:typeof U.nonce=="string"?U.nonce:void 0})}},vn.preinitModule=function(L,U){if(typeof L=="string")if(typeof U=="object"&&U!==null){if(U.as==null||U.as==="script"){var nt=V(U.as,U.crossOrigin);T.d.M(L,{crossOrigin:nt,integrity:typeof U.integrity=="string"?U.integrity:void 0,nonce:typeof U.nonce=="string"?U.nonce:void 0})}}else U==null&&T.d.M(L)},vn.preload=function(L,U){if(typeof L=="string"&&typeof U=="object"&&U!==null&&typeof U.as=="string"){var nt=U.as,it=V(nt,U.crossOrigin);T.d.L(L,nt,{crossOrigin:it,integrity:typeof U.integrity=="string"?U.integrity:void 0,nonce:typeof U.nonce=="string"?U.nonce:void 0,type:typeof U.type=="string"?U.type:void 0,fetchPriority:typeof U.fetchPriority=="string"?U.fetchPriority:void 0,referrerPolicy:typeof U.referrerPolicy=="string"?U.referrerPolicy:void 0,imageSrcSet:typeof U.imageSrcSet=="string"?U.imageSrcSet:void 0,imageSizes:typeof U.imageSizes=="string"?U.imageSizes:void 0,media:typeof U.media=="string"?U.media:void 0})}},vn.preloadModule=function(L,U){if(typeof L=="string")if(U){var nt=V(U.as,U.crossOrigin);T.d.m(L,{as:typeof U.as=="string"&&U.as!=="script"?U.as:void 0,crossOrigin:nt,integrity:typeof U.integrity=="string"?U.integrity:void 0})}else T.d.m(L)},vn.requestFormReset=function(L){T.d.r(L)},vn.unstable_batchedUpdates=function(L,U){return L(U)},vn.useFormState=function(L,U,nt){return $.H.useFormState(L,U,nt)},vn.useFormStatus=function(){return $.H.useHostTransitionStatus()},vn.version="19.0.0",vn}var kd;function Qv(){if(kd)return Yd.exports;kd=1;function A(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A)}catch(Q){console.error(Q)}}return A(),Yd.exports=Xv(),Yd.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Id;function Zv(){if(Id)return eo;Id=1;var A=Gv(),Q=Xd(),v=Qv();function T(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Z(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}var St=Symbol.for("react.element"),$=Symbol.for("react.transitional.element"),V=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),nt=Symbol.for("react.profiler"),it=Symbol.for("react.provider"),ct=Symbol.for("react.consumer"),lt=Symbol.for("react.context"),Vt=Symbol.for("react.forward_ref"),yt=Symbol.for("react.suspense"),Ut=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),Ce=Symbol.for("react.memo_cache_sentinel"),pt=Symbol.iterator;function ie(t){return t===null||typeof t!="object"?null:(t=pt&&t[pt]||t["@@iterator"],typeof t=="function"?t:null)}var pe=Symbol.for("react.client.reference");function ve(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===pe?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case L:return"Fragment";case V:return"Portal";case nt:return"Profiler";case U:return"StrictMode";case yt:return"Suspense";case Ut:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case lt:return(t.displayName||"Context")+".Provider";case ct:return(t._context.displayName||"Context")+".Consumer";case Vt:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case fe:return e=t.displayName||null,e!==null?e:ve(t.type)||"Memo";case ne:e=t._payload,t=t._init;try{return ve(t(e))}catch{}}return null}var I=Q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,bt=Object.assign,Le,wt;function Nt(t){if(Le===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Le=e&&e[1]||"",wt=-1<n.stack.indexOf(`
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Le+t+wt}var Te=!1;function F(t,e){if(!t||Te)return"";Te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(e){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(C){var x=C}Reflect.construct(t,[],q)}else{try{q.call()}catch(C){x=C}t.call(q.prototype)}}else{try{throw Error()}catch(C){x=C}(q=t())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(C){if(C&&x&&typeof C.stack=="string")return[C.stack,x.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=a.DetermineComponentFrameRoot(),s=c[0],d=c[1];if(s&&d){var y=s.split(`
`),b=d.split(`
`);for(i=a=0;a<y.length&&!y[a].includes("DetermineComponentFrameRoot");)a++;for(;i<b.length&&!b[i].includes("DetermineComponentFrameRoot");)i++;if(a===y.length||i===b.length)for(a=y.length-1,i=b.length-1;1<=a&&0<=i&&y[a]!==b[i];)i--;for(;1<=a&&0<=i;a--,i--)if(y[a]!==b[i]){if(a!==1||i!==1)do if(a--,i--,0>i||y[a]!==b[i]){var H=`
`+y[a].replace(" at new "," at ");return t.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",t.displayName)),H}while(1<=a&&0<=i);break}}}finally{Te=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Nt(n):""}function X(t){switch(t.tag){case 26:case 27:case 5:return Nt(t.type);case 16:return Nt("Lazy");case 13:return Nt("Suspense");case 19:return Nt("SuspenseList");case 0:case 15:return t=F(t.type,!1),t;case 11:return t=F(t.type.render,!1),t;case 1:return t=F(t.type,!0),t;default:return""}}function ft(t){try{var e="";do e+=X(t),t=t.return;while(t);return e}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}function k(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function It(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(k(t)!==t)throw Error(T(188))}function Y(t){var e=t.alternate;if(!e){if(e=k(t),e===null)throw Error(T(188));return e!==t?null:t}for(var n=t,a=e;;){var i=n.return;if(i===null)break;var c=i.alternate;if(c===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===n)return p(i),t;if(c===a)return p(i),e;c=c.sibling}throw Error(T(188))}if(n.return!==a.return)n=i,a=c;else{for(var s=!1,d=i.child;d;){if(d===n){s=!0,n=i,a=c;break}if(d===a){s=!0,a=i,n=c;break}d=d.sibling}if(!s){for(d=c.child;d;){if(d===n){s=!0,n=c,a=i;break}if(d===a){s=!0,a=c,n=i;break}d=d.sibling}if(!s)throw Error(T(189))}}if(n.alternate!==a)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?t:e}function dt(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=dt(t),e!==null)return e;t=t.sibling}return null}var st=Array.isArray,J=v.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xt={pending:!1,data:null,method:null,action:null},Et=[],$e=-1;function Xt(t){return{current:t}}function ce(t){0>$e||(t.current=Et[$e],Et[$e]=null,$e--)}function re(t,e){$e++,Et[$e]=t.current,t.current=e}var gn=Xt(null),fu=Xt(null),Nl=Xt(null),an=Xt(null);function cu(t,e){switch(re(Nl,e),re(fu,t),re(gn,null),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)&&(e=e.namespaceURI)?Ih(e):0;break;default:if(t=t===8?e.parentNode:e,e=t.tagName,t=t.namespaceURI)t=Ih(t),e=Ph(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ce(gn),re(gn,e)}function _a(){ce(gn),ce(fu),ce(Nl)}function Jn(t){t.memoizedState!==null&&re(an,t);var e=gn.current,n=Ph(e,t.type);e!==n&&(re(fu,t),re(gn,n))}function di(t){fu.current===t&&(ce(gn),ce(fu)),an.current===t&&(ce(an),mf._currentValue=xt)}var Wc=Object.prototype.hasOwnProperty,Gu=A.unstable_scheduleCallback,yn=A.unstable_cancelCallback,vi=A.unstable_shouldYield,Of=A.unstable_requestPaint,hl=A.unstable_now,gi=A.unstable_getCurrentPriorityLevel,uo=A.unstable_ImmediatePriority,ma=A.unstable_UserBlockingPriority,Bl=A.unstable_NormalPriority,$c=A.unstable_LowPriority,Rf=A.unstable_IdlePriority,Fc=A.log,kc=A.unstable_setDisableYieldValue,Xu=null,Fe=null;function Ic(t){if(Fe&&typeof Fe.onCommitFiberRoot=="function")try{Fe.onCommitFiberRoot(Xu,t,void 0,(t.current.flags&128)===128)}catch{}}function dl(t){if(typeof Fc=="function"&&kc(t),Fe&&typeof Fe.setStrictMode=="function")try{Fe.setStrictMode(Xu,t)}catch{}}var ke=Math.clz32?Math.clz32:S0,m0=Math.log,p0=Math.LN2;function S0(t){return t>>>=0,t===0?32:31-(m0(t)/p0|0)|0}var yi=128,_i=4194304;function Qu(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Mf(t,e){var n=t.pendingLanes;if(n===0)return 0;var a=0,i=t.suspendedLanes,c=t.pingedLanes,s=t.warmLanes;t=t.finishedLanes!==0;var d=n&134217727;return d!==0?(n=d&~i,n!==0?a=Qu(n):(c&=d,c!==0?a=Qu(c):t||(s=d&~s,s!==0&&(a=Qu(s))))):(d=n&~i,d!==0?a=Qu(d):c!==0?a=Qu(c):t||(s=n&~s,s!==0&&(a=Qu(s)))),a===0?0:e!==0&&e!==a&&!(e&i)&&(i=a&-a,s=e&-e,i>=s||i===32&&(s&4194176)!==0)?e:a}function mi(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function b0(t,e){switch(t){case 1:case 2:case 4:case 8:return e+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pc(){var t=yi;return yi<<=1,!(yi&4194176)&&(yi=128),t}function ao(){var t=_i;return _i<<=1,!(_i&62914560)&&(_i=4194304),t}function tr(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function pi(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function er(t,e,n,a,i,c){var s=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var d=t.entanglements,y=t.expirationTimes,b=t.hiddenUpdates;for(n=s&~n;0<n;){var H=31-ke(n),q=1<<H;d[H Line truncated
`).replace(od,"")}function At(t,e){return e=Bu(e),Bu(t)===e}function Cc(){}function Ot(t,e,n,a,i,c){switch(n){case"children":typeof a=="string"?e==="body"||e==="textarea"&&a===""||Wn(t,a):(typeof a=="number"||typeof a=="bigint")&&e!=="body"&&Wn(t,""+a);break;case"className":bi(t,"class",a);break;case"tabIndex":bi(t,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":bi(t,n,a);break;case"style":mo(t,a,c);break;case"data":if(e!=="object"){bi(t,"data",a);break}case"src":case"href":if(a===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(n);break}a=Oi(""+a),t.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){t.setAttribute(n,"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 c=="function"&&(n==="formAction"?(e!=="input"&&Ot(t,e,"name",i.name,i,null),Ot(t,e,"formEncType",i.formEncType,i,null),Ot(t,e,"formMethod",i.formMethod,i,null),Ot(t,e,"formTarget",i.formTarget,i,null)):(Ot(t,e,"encType",i.encType,i,null),Ot(t,e,"method",i.method,i,null),Ot(t,e,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(n);break}a=Oi(""+a),t.setAttribute(n,a);break;case"onClick":a!=null&&(t.onclick=Cc);break;case"onScroll":a!=null&&Yt("scroll",t);break;case"onScrollEnd":a!=null&&Yt("scrollend",t);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(T(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(T(60));t.innerHTML=n}}break;case"multiple":t.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":t.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){t.removeAttribute("xlink:href");break}n=Oi(""+a),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(n,""+a):t.removeAttribute(n);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":a&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":a===!0?t.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(n,a):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?t.setAttribute(n,a):t.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?t.removeAttribute(n):t.setAttribute(n,a);break;case"popover":Yt("beforetoggle",t),Yt("toggle",t),Df(t,"popover",a);break;case"xlinkActuate":gl(t,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":gl(t,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":gl(t,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":gl(t,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":gl(t,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":gl(t,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":gl(t,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":gl(t,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":gl(t,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Df(t,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=po.get(n)||n,Df(t,n,a))}}function _e(t,e,n,a,i,c){switch(n){case"style":mo(t,a,c);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(T(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(T(60));t.innerHTML=n}}break;case"children":typeof a=="string"?Wn(t,a):(typeof a=="number"||typeof a=="bigint")&&Wn(t,""+a);break;case"onScroll":a!=null&&Yt("scroll",t);break;case"onScrollEnd":a!=null&&Yt("scrollend",t);break;case"onClick":a!=null&&(t.onclick=Cc);break;case"suppressContentEditableWarning":case"suppressHydrationWar Line truncated
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/var Wv=lo.exports,ev;function $v(){return ev||(ev=1,function(A,Q){(function(){var v,T="4.17.21",Z=200,St="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",$="Expected a function",V="Invalid `variable` option passed into `_.template`",L="__lodash_hash_undefined__",U=500,nt="__lodash_placeholder__",it=1,ct=2,lt=4,Vt=1,yt=2,Ut=1,fe=2,ne=4,le=8,Ce=16,pt=32,ie=64,pe=128,ve=256,I=512,bt=30,Le="...",wt=800,Nt=16,Te=1,F=2,X=3,ft=1/0,k=9007199254740991,It=17976931348623157e292,p=NaN,Y=4294967295,dt=Y-1,st=Y>>>1,J=[["ary",pe],["bind",Ut],["bindKey",fe],["curry",le],["curryRight",Ce],["flip",I],["partial",pt],["partialRight",ie],["rearg",ve]],xt="[object Arguments]",Et="[object Array]",$e="[object AsyncFunction]",Xt="[object Boolean]",ce="[object Date]",re="[object DOMException]",gn="[object Error]",fu="[object Function]",Nl="[object GeneratorFunction]",an="[object Map]",cu="[object Number]",_a="[object Null]",Jn="[object Object]",di="[object Promise]",Wc="[object Proxy]",Gu="[object RegExp]",yn="[object Set]",vi="[object String]",Of="[object Symbol]",hl="[object Undefined]",gi="[object WeakMap]",uo="[object WeakSet]",ma="[object ArrayBuffer]",Bl="[object DataView]",$c="[object Float32Array]",Rf="[object Float64Array]",Fc="[object Int8Array]",kc="[object Int16Array]",Xu="[object Int32Array]",Fe="[object Uint8Array]",Ic="[object Uint8ClampedArray]",dl="[object Uint16Array]",ke="[object Uint32Array]",m0=/\b__p \+= '';/g,p0=/\b(__p \+=) '' \+/g,S0=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yi=/&(?:amp|lt|gt|quot|#39);/g,_i=/[&<>"']/g,Qu=RegExp(yi.source),Mf=RegExp(_i.source),mi=/<%-([\s\S]+?)%>/g,b0=/<%([\s\S]+?)%>/g,Pc=/<%=([\s\S]+?)%>/g,ao=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tr=/^\w*$/,pi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,er=/[\\^$.*+?()[\]{}|]/g,io=RegExp(er.source),xf=/^\s+/,fo=/\s/,co=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,A0=/\{\n\/\* \[wrapped with (.+)\] \*/,ru=/,? & /,Ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fn=/[()=,{}\[\]\/\s]/,pa=/\\(\\)?/g,nr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ro=/\w*$/,E0=/^[-+]0x[0-9a-f]+$/i,so=/^0b[01]+$/i,Si=/^\[object .+?Constructor\]$/,lr=/^0o[0-7]+$/i,Zu=/^(?:0|[1-9]\d*)$/,Sa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,su=/($^)/,ba=/['\n\r\u2028\u2029\\]/g,Oe="\\ud800-\\udfff",oo="\\u0300-\\u036f",ho="\\ufe20-\\ufe2f",Ku="\\u20d0-\\u20ff",ju=oo+ho+Ku,vl="\\u2700-\\u27bf",vo="a-z\\xdf-\\xf6\\xf8-\\xff",go="\\xac\\xb1\\xd7\\xf7",yo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",T0="\\u2000-\\u206f",Df=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",bi="A-Z\\xc0-\\xd6\\xd8-\\xde",gl="\\ufe0e\\ufe0f",_n=go+yo+T0+Df,zf="['’]",O0="["+Oe+"]",Ai="["+_n+"]",Ei="["+ju+"]",Ti="\\d+",R0="["+vl+"]",mn="["+vo+"]",Uf="[^"+Oe+_n+Ti+vl+vo+bi+"]",Cf="\\ud83c[\\udffb-\\udfff]",ur="(?:"+Ei+"|"+Cf+")",Vu="[^"+Oe+"]",Hf="(?:\\ud83c[\\udde6-\\uddff]){2}",Nf="[\\ud800-\\udbff][\\udc00-\\udfff]",Wn="["+bi+"]",_o="\\u200d",ar="(?:"+mn+"|"+Uf+")",mo="(?:"+Wn+"|"+Uf+")",Bf="(?:"+zf+"(?:d|ll|m|re|s|t|ve))?",po="(?:"+zf+"(?:D|LL|M|RE|S|T|VE))?",So=ur+"?",Oi="["+gl+"]?",ir="(?:"+_o+"(?:"+[Vu,Hf,Nf].join("|")+")"+Oi+So+")*",fr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Aa="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ju=Oi+So+ir,bo="(?:"+[R0,Hf,Nf].join("|")+")"+Ju,cr="(?:"+[Vu+Ei+"?",Ei,Hf,Nf,O0].join("|")+")",Ao=RegExp(zf,"g"),Ri=RegExp(Ei,"g"),Mi=RegExp(Cf+"(?="+Cf+")|"+cr+Ju,"g"),xi=RegExp([Wn+"?"+mn+"+"+Bf+"(?="+[Ai,Wn,"$"].join("|")+")",mo+"+"+po+"(?="+[Ai,Wn+ar,"$"].join("|")+")",Wn+"?"+ar+"+"+Bf,Wn+"+"+po,Aa,fr,Ti,bo].join("|"),"g"),ou=RegExp("["+_o+Oe+ju+gl+"]"),rr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Eo=-1,Pt={};Pt[$c]=Pt[Rf]=Pt[Fc]=Pt[kc]=Pt[Xu]=Pt[Fe]=Pt[Ic]=Pt[dl]=Pt[ke]=!0,Pt[xt]=Pt[Et]=Pt[ma]=Pt[Xt]=Pt[Bl]=Pt[ce]=Pt[gn]=Pt[fu]=Pt[an]=Pt[cu]=Pt[Jn]=Pt[Gu]=Pt[yn]=Pt[vi]=Pt[gi]=!1;var kt={};kt[xt]=kt[Et]=kt[ma]=kt[Bl]=kt[Xt]=kt[ce]=kt[$c]=kt[Rf]=kt[Fc]=kt[kc]=kt[Xu]=kt[an]=kt[cu]=kt[Jn]=kt[Gu]=kt[yn]=kt[vi]=kt[Of]=kt[Fe]=kt[Ic]=kt[dl]=kt[ke]=!0,kt[gn]=kt[fu]=kt[gi]=!1;var To={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",Line truncated
/* [wrapped with `+u+`] */
`)}function mh(l){return At(l)||Bu(l)||!!(Iu&&l&&l[Iu])}function il(l,u){var f=typeof l;return u=u??k,!!u&&(f=="number"||f!="symbol"&&Zu.test(l))&&l>-1&&l%1==0&&l<u}function Ge(l,u,f){if(!de(f))return!1;var r=typeof u;return(r=="number"?Ot(f)&&il(u,f.length):r=="string"&&u in f)?Vn(f[u],l):!1}function Ia(l,u){if(At(l))return!1;var f=typeof l;return f=="number"||f=="symbol"||f=="boolean"||l==null||Cn(l)?!0:tr.test(l)||!ao.test(l)||u!=null&&l in te(u)}function kl(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function he(l){var u=ul(l),f=h[u];if(typeof f!="function"||!(u in Tt.prototype))return!1;if(l===f)return!0;var r=ki(f);return!!r&&l===r[0]}function us(l){return!!Ln&&Ln in l}var ph=$f?lu:Hd;function be(l){var u=l&&l.constructor,f=typeof u=="function"&&u.prototype||Da;return l===f}function as(l){return l===l&&!de(l)}function Sh(l,u){return function(f){return f==null?!1:f[l]===u&&(u!==v||l in te(f))}}function bh(l){var u=hf(l,function(r){return f.size===U&&f.clear(),r}),f=u.cache;return u}function Ah(l,u){var f=l[1],r=u[1],o=f|r,g=o<(Ut|fe|pe),_=r==pe&&f==le||r==pe&&f==ve&&l[7].length<=u[8]||r==(pe|ve)&&u[7].length<=u[8]&&f==le;if(!(g||_))return l;r&Ut&&(l[2]=u[2],o|=f&Ut?0:ne);var m=u[3];if(m){var O=l[3];l[3]=O?$r(O,m,u[4]):m,l[4]=O?gu(l[3],nt):u[4]}return m=u[5],m&&(O=l[5],l[5]=O?Fr(O,m,u[6]):m,l[6]=O?gu(l[5],nt):u[6]),m=u[7],m&&(l[7]=m),r&pe&&(l[8]=l[8]==null?u[8]:_t(l[8],u[8])),l[9]==null&&(l[9]=u[9]),l[0]=u[0],l[1]=o,l}function Ue(l){var u=[];if(l!=null)for(var f in te(l))u.push(f);return u}function Rn(l){return Ie.call(l)}function Dl(l,u,f){return u=Lt(u===v?l.length-1:u,0),function(){for(var r=arguments,o=-1,g=Lt(r.length-u,0),_=D(g);++o<g;)_[o]=r[u+o];o=-1;for(var m=D(u+1);++o<u;)m[o]=r[o];return m[u]=f(_),rn(l,this,m)}}function is(l,u){return u.length<2?l:Jl(l,Tn(u,0,-1))}function Eh(l,u){for(var f=l.length,r=_t(u.length,f),o=en(l);r--;){var g=u[r];l[r]=il(g,f)?o[g]:v}return l}function fs(l,u){if(!(u==="constructor"&&typeof l[u]=="function")&&u!="__proto__")return l[u]}var Ac=xn(Zr),Ve=ta||function(l,u){return Re.setTimeout(l,u)},Mn=xn(V0);function cs(l,u,f){var r=u+"";return Mn(l,_h(r,rs(gh(r),f)))}function xn(l){var u=0,f=0;return function(){var r=kn(),o=Nt-(r-f);if(f=r,o>0){if(++u>=wt)return arguments[0]}else u=0;return l.apply(v,arguments)}}function tf(l,u){var f=-1,r=l.length,o=r-1;for(u=u===v?r:u;++f<u;){var g=oc(f,o),_=l[g];l[g]=l[f],l[f]=_}return l.length=u,l}var zl=bh(function(l){var u=[];return l.charCodeAt(0)===46&&u.push(""),l.replace(pi,function(f,r,o,g){u.push(o?g.replace(pa,"$1"):r||f)}),u});function nn(l){if(typeof l=="string"||Cn(l))return l;var u=l+"";return u=="0"&&1/l==-1/0?"-0":u}function dn(l){if(l!=null){try{return Ui.call(l)}catch{}try{return l+""}catch{}}return""}function rs(l,u){return wn(J,function(f){var r="_."+f[0];u&f[1]&&!Gf(l,r)&&l.push(r)}),l.sort()}function Ec(l){if(l instanceof Tt)return l.clone();var u=new An(l.__wrapped__,l.__chain__);return u.__actions__=en(l.__actions__),u.__index__=l.__index__,u.__values__=l.__values__,u}function Uu(l,u,f){(f?Ge(l,u,f):u===v)?u=1:u=Lt(Rt(u),0);var r=l==null?0:l.length;if(!r||u<1)return[];for(var o=0,g=0,_=D(Xn(r/u));o<r;)_[g++]=Tn(l,o,o+=u);return _}function Th(l){for(var u=-1,f=l==null?0:l.length,r=0,o=[];++u<f;){var g=l[u];g&&(o[r++]=g)}return o}function Pa(){var l=arguments.length;if(!l)return[];for(var u=D(l-1),f=arguments[0],r=l;r--;)u[r-1]=arguments[r];return wl(At(f)?en(f):[f],De(u,1))}var ef=Mt(function(l,u){return _e(l)?wa(l,De(u,1,_e,!0)):[]}),nf=Mt(function(l,u){var f=ln(u);return _e(f)&&(f=v),_e(l)?wa(l,De(u,1,_e,!0),ut(f,2)):[]}),ti=Mt(function(l,u){var f=ln(u);return _e(f)&&(f=v),_e(l)?wa(l,De(u,1,_e,!0),v,f):[]});function Oh(l,u,f){var r=l==null?0:l.length;return r?(u=f||u===v?1:Rt(u),Tn(l,u<0?0:u,r)):[]}function Rh(l,u,f){var r=l==null?0:l.length;return r?(u=f||u===v?1:Rt(u),u=r-u,Tn(l,0,u<0?0:u)):[]}function lf(l,u){return l&&l.length?Ka(l,ut(u,3),!0,!0):[]}function Mh(l,u){return l&&l.length?Ka(l,ut(u,3),!0):[]}function Tc(l,u,f,r){var o=l==null?0:l.length;return o?(f&&typeof f!="number"&&Ge(l,u,f)&&(f=0,r=o),sn(l,u,f,r)):[]}function ss(l,u,f){var r=l==null?0:l.length;if(!r)return-1;var o=f==null?0:Rt(f);return o<0&&(o=Lt(r+o,0)),Xf(l,ut(u,3),o)}function xh(l,u,f){var r=l==null?0:l.length;if(!r)return-1;var o=r-1;return f!==v&&(o=Rt(f),o=f<0?Lt(r+o,0):_t(o,r-1)),Xf(l,ut(u,3),o,!0)}function Dn(l){var u=l==null?0:l.length;return u?De(l,1):[]}function os(l){var u=l==null?0:l.length;return u?De(l,ft):[]}function Cu(l,u){var f=l==null?0:l.length;return f?(u=u===v?1:Rt(u),De(l,u)):[]}function Dh(l){for(var u=-1,f=l==null?0:l.length,r={};++u<f;){var o=l[u];r[o[0]]=o[1]}return r}function uf(l){return l&&l.length?l[0]:v}function sa(l,u,f){var r=l==null?0:l.length;if(!r)return-1;var o=f==null?0:Rt(f);return o<0&&(o=Lt(r+o,0)),Ta(l,u,o)}function zh(l){var u=l==null?0:l.length;return u?Tn(l,0,-1):[]}var hs=Mt(function(l){var u=se(l,Wl);return u.length&&u[0]===l[0] Line truncated
`;l.replace(K,function(gt,Gt,Kt,sl,Nn,ol){return Kt||(Kt=sl),G+=l.slice(N,ol).replace(ba,qo),Gt&&(m=!0,G+=`' +
__e(`+Gt+`) +
'`),Nn&&(O=!0,G+=`';
`+Nn+`;
__p += '`),Kt&&(G+=`' +
((__t = (`+Kt+`)) == null ? '' : __t) +
'`),N=ol+gt.length,gt}),G+=`';
`;var vt=Wt.call(u,"variable")&&u.variable;if(!vt)G=`with (obj) {
`+G+`
}
`;else if(fn.test(vt))throw new ot(V);G=(O?G.replace(m0,""):G).replace(p0,"$1").replace(S0,"$1;"),G="function("+(vt||"obj")+`) {
`+(vt?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(m?", __e = _.escape":"")+(O?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+G+`return __p
}`;var Ht=R(function(){return qt(g,tt+"return "+G).apply(v,_)});if(Ht.source=G,gf(Ht))throw Ht;return Ht}function d(l){return Ft(l).toLowerCase()}function y(l){return Ft(l).toUpperCase()}function b(l,u,f){if(l=Ft(l),l&&(f||u===v))return Bo(l);if(!l||!(u=Se(u)))return l;var r=qn(l),o=qn(u),g=Ma(r,o),_=xa(r,o)+1;return Fl(r,g,_).join("")}function H(l,u,f){if(l=Ft(l),l&&(f||u===v))return l.slice(0,mr(l)+1);if(!l||!(u=Se(u)))return l;var r=qn(l),o=xa(r,qn(u))+1;return Fl(r,0,o).join("")}function q(l,u,f){if(l=Ft(l),l&&(f||u===v))return l.replace(xf,"");if(!l||!(u=Se(u)))return l;var r=qn(l),o=Ma(r,qn(u));return Fl(r,o).join("")}function x(l,u){var f=bt,r=Le;if(de(u)){var o="separator"in u?u.separator:o;f="length"in u?Rt(u.length):f,r="omission"in u?Se(u.omission):r}l=Ft(l);var g=l.length;if(vu(l)){var _=qn(l);g=_.length}if(f>=g)return l;var m=f-_l(r);if(m<1)return r;var O=_?Fl(_,0,m).join(""):l.slice(0,m);if(o===v)return O+r;if(_&&(m+=O.length-m),Bc(o)){if(l.slice(m).search(o)){var N,w=O;for(o.global||(o=ql(o.source,Ft(ro.exec(o))+"g")),o.lastIndex=0;N=o.exec(w);)var G=N.index;O=O.slice(0,G===v?m:G)}}else if(l.indexOf(Se(o),m)!=m){var K=O.lastIndexOf(o);K>-1&&(O=O.slice(0,K))}return O+r}function C(l){return l=Ft(l),l&&Qu.test(l)?l.replace(yi,Xo):l}var P=Ru(function(l,u,f){return l+(f?" ":"")+u.toUpperCase()}),mt=vc("toUpperCase");function me(l,u,f){return l=Ft(l),u=f?v:u,u===v?Lo(l)?L0(l):H0(l):l.match(u)||[]}var R=Mt(function(l,u){try{return rn(l,v,u)}catch(f){return gf(f)?f:new ot(f)}}),S=Ml(function(l,u){return wn(u,function(f){f=nn(f),En(l,f,ga(l[f],l))}),l});function M(l){var u=l==null?0:l.length,f=ut();return l=u?se(l,function(r){if(typeof r[1]!="function")throw new bn($);return[f(r[0]),r[1]]}):[],Mt(function(r){for(var o=-1;++o<u;){var g=l[o];if(rn(g[0],this,r))return rn(g[1],this,r)}})}function B(l){return Dr(jt(l,it))}function W(l){return function(){return l}}function Ct(l,u){return l==null||l!==l?u:l}var et=yc(),ht=yc(!0);function Jt(l){return l}function Zt(l){return Br(typeof l=="function"?l:jt(l,it))}function Yu(l){return wr(jt(l,it))}function Dd(l,u){return sc(l,jt(u,it))}var av=Mt(function(l,u){return function(f){return La(f,l,u)}}),iv=Mt(function(l,u){return function(f){return La(l,f,u)}});function zd(l,u,f){var r=we(u),o=fa(u,r);f==null&&!(de(u)&&(o.length||!r.length))&&(f=u,u=l,l=this,o=fa(u,we(u)));var g=!(de(f)&&"chain"in f)||!!f.chain,_=lu(l);return wn(o,function(m){var O=u[m];l[m]=O,_&&(l.prototype[m]=function(){var N=this.__chain__;if(g||N){var w=l(this.__wrapped__),G=w.__actions__=en(this.__actions__);return G.push({func:O,args:arguments,thisArg:l}),w.__chain__=N,w}return O.apply(l,wl([this.value()],arguments))})}),l}function fv(){return Re._===this&&(Re._=Sr),this}function Ud(){}function cv(l){return l=Rt(l),Mt(function(u){return qr(u,l)})}var rv=el(se),sv=el(Uo),ov=el(vr);function Qd(l){return Ia(l)?Qf(nn(l)):rh(l)}function hv(l){return function(u){return l==null?v:Jl(l,u)}}var dv=es(),vv=es(!0);function Cd(){return[]}function Hd(){return!1}function gv(){return{}}function yv(){return""}function _v(){return!0}function mv(l,u){if(l=Rt(l),l<1||l>k)return[];var f=Y,r=_t(l,Y);u=ut(u),l-=Y;for(var o=du(r,u);++f<l;)u(f);return o}function pv(l){return At(l)?se(l,nn):Cn(l)?[l]:en(zl(Ft(l)))}function Sv(l){var u=++Ko;return Ft(l)+u}var bv=$i(function(l,u){return l+u},0),Av=nl("ceil"),Ev=$i(function(l,u){return l/u},1),Tv=nl("floor");function Ov(l){return l&&l.length?qa(l,Jt,fc):v}function Rv(l,u){return l&&l.length?qa(l,ut(u,2),fc):v}function Mv(l){return Ho(l,Jt)}function xv(l,u){return Ho(l,ut(u,2))}function Dv(l){return l&&l.length?qa(l,Jt,Ga):v}function zv(l,u){return l&&l.length?qa(l,ut(u,2),Ga):v}var Uv=$i(function(l,u){return l*u},1),Cv=nl("round"),Hv=$i(function(l,u){return l-u},0);function Nv(l){return l&&l.length?Kf(l,Jt):0}function Bv(l,u){return l&&l.length?Kf(l,ut(u,2)):0}return h.after=Rs,h.ary=Nu,h.assign=ci,h.assignIn=ri,h.assignInWith=yf,h.assignWith=Lc,h.at=js,h.before=fl,h.bind=ga,h.bindAll=S,h.bindKey=Jh,h.castArray=Bs,h.chain=Je,h.chunk=Uu,h.compact=Th,h.concat=Pa,h.cond=M,h.conforms=B,h.constant=W,h.countBy=Yh,h.create=Vs,h.curry=Ms,h.curryRight=xs,h.debounce=Ds,h.defaults=Yc,h.defaultsDeep=a0,h.defer=cd,h.delay=zs,h.difference=ef,h.differenceBy=nf,h.differenceWith=ti,h.drop=Oh,h.dropRight=Rh,h.dropRightWhile=lf,h.dropWhile=Mh,h.fill=Tc,h.filter=Es,h.flatMap=nd,h.flatMapDeep=Gh,h.flatMapDepth=Xh,h.flatten=Dn,h.flattenDeep=os,h.flattenDepth=Cu,h.flip=Wh,h.flow=et,h.flowRight=ht,h.fromPairs=Dh,h.functions=bd,h.functionsIn=Gc,h.groupBy=Qh,h.initial=zh,h.intersection=hs,h.intersectionBy=ds,h.intersectionWith=Il,h.invert=mf,h.invertBy=Ad,h.invokeMap=ld,h.iteratee=Zt,h.keyBy=Kh,h.keys=we,h.keysIn=un,h.map=nu,h.mapKeys=r0,h.mapValues=$s,h.matches=Yu,h.matchesProperty=Dd,h.memoize=hf,h.merge=s0,h.mergeWith=pf,h.method=av,h.methodOf=iv,h.mixin=zd,h.negate=Dc,h.nthArg=cv,h.omit=Ed,h.omitBy=Td,h.once=Us,h.orderBy=jh,h.over=rv,h.overArgs=Cs,h.overEvery=sv,h.overSome=ov,h.partial=Hs,h.p Line truncated
@@ -1,75 +0,0 @@
var g0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Cd={exports:{}},Ps={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Qd;function Bv(){if(Qd)return Ps;Qd=1;var T=Symbol.for("react.transitional.element"),Q=Symbol.for("react.fragment");function g(E,Z,Mt){var k=null;if(Mt!==void 0&&(k=""+Mt),Z.key!==void 0&&(k=""+Z.key),"key"in Z){Mt={};for(var $ in Z)$!=="key"&&(Mt[$]=Z[$])}else Mt=Z;return Z=Mt.ref,{$$typeof:T,type:E,key:k,ref:Z!==void 0?Z:null,props:Mt}}return Ps.Fragment=Q,Ps.jsx=g,Ps.jsxs=g,Ps}var Zd;function Nv(){return Zd||(Zd=1,Cd.exports=Bv()),Cd.exports}var at=Nv(),Hd={exports:{}},Dt={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Kd;function wv(){if(Kd)return Dt;Kd=1;var T=Symbol.for("react.transitional.element"),Q=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),Mt=Symbol.for("react.consumer"),k=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),U=Symbol.for("react.memo"),nt=Symbol.for("react.lazy"),it=Symbol.iterator;function ct(p){return p===null||typeof p!="object"?null:(p=it&&p[it]||p["@@iterator"],typeof p=="function"?p:null)}var lt={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Jt=Object.assign,yt={};function Nt(p,q,dt){this.props=p,this.context=q,this.refs=yt,this.updater=dt||lt}Nt.prototype.isReactComponent={},Nt.prototype.setState=function(p,q){if(typeof p!="object"&&typeof p!="function"&&p!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,p,q,"setState")},Nt.prototype.forceUpdate=function(p){this.updater.enqueueForceUpdate(this,p,"forceUpdate")};function fe(){}fe.prototype=Nt.prototype;function ne(p,q,dt){this.props=p,this.context=q,this.refs=yt,this.updater=dt||lt}var le=ne.prototype=new fe;le.constructor=ne,Jt(le,Nt.prototype),le.isPureReactComponent=!0;var Ce=Array.isArray,pt={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function pe(p,q,dt,rt,J,xt){return dt=xt.ref,{$$typeof:T,type:p,key:q,ref:dt!==void 0?dt:null,props:xt}}function ve(p,q){return pe(p.type,q,void 0,void 0,void 0,p.props)}function I(p){return typeof p=="object"&&p!==null&&p.$$typeof===T}function St(p){var q={"=":"=0",":":"=2"};return"$"+p.replace(/[=:]/g,function(dt){return q[dt]})}var qe=/\/+/g;function wt(p,q){return typeof p=="object"&&p!==null&&p.key!=null?St(""+p.key):q.toString(36)}function Ht(){}function Te(p){switch(p.status){case"fulfilled":return p.value;case"rejected":throw p.reason;default:switch(typeof p.status=="string"?p.then(Ht,Ht):(p.status="pending",p.then(function(q){p.status==="pending"&&(p.status="fulfilled",p.value=q)},function(q){p.status==="pending"&&(p.status="rejected",p.reason=q)})),p.status){case"fulfilled":return p.value;case"rejected":throw p.reason}}throw p}function V(p,q,dt,rt,J){var xt=typeof p;(xt==="undefined"||xt==="boolean")&&(p=null);var At=!1;if(p===null)At=!0;else switch(xt){case"bigint":case"string":case"number":At=!0;break;case"object":switch(p.$$typeof){case T:case Q:At=!0;break;case nt:return At=p._init,V(At(p._payload),q,dt,rt,J)}}if(At)return J=J(p),At=rt===""?"."+wt(p,0):rt,Ce(J)?(dt="",At!=null&&(dt=At.replace(qe,"$&/")+"/"),V(J,q,dt,"",function(ce){return ce})):J!=null&&(I(J)&&(J=ve(J,dt+(J.key==null||p&&p.key===J.key?"":(""+J.key).replace(qe,"$&/")+"/")+At)),q.push(J)),1;At=0;var $e=rt===""?".":rt+":";if(Ce(p))for(var Xt=0;Xt<p.length;Xt++)rt=p[Xt],xt=$e+wt(rt,Xt),At+=V(rt,q,dt,xt,J);else if(Xt=ct(p),typeof Xt=="function")for(p=Xt.call(p),Xt=0;!(rt=p.next()).done;)rt=rt.value,xt=$e+wt(rt,Xt++),At+=V(rt,q,dt,xt,J);else if(xt==="object"){if(typeof p.then=="function")return V(Te(p),q,dt,rt,J);throw q=String(p),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return At}function X(p,q,dt){if(p==null)return p;var rt=[],J=0;return V(p,rt,"","",function(xt){return q.call(dt,xt,J++)}),rt}function ft(p){if(p._status===-1){var q=p._result;q=q(),q.then(function(dt){(p._status===0||p._status===-1)&&(p._status=1,p._result=dt)},function(dt){(p._status===0||p._status===-1)&&(p._status=2,p._result=dt)}),p._status===-1&&(p._status=0,p._result=q)}if(p._status===1)return p._result.default;throw p._result}var F=typeof reportError=="function"?reportError:function(p){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof p=="object"&&p!==null&&typeof p.message=="string"?String(p.message):String(p),error:p});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",p);return}console.error(p)};function It(){}return Dt.Children={map:X,forEach:function(p,q,dt){X(p,function(){q.apply(this,arguments)},dt)},count:function(p){var q=0;return X(p,function(){q++}),q},toArray:function(p){return X(p,function(q){return q})||[]},only:function(p){if(!I(p))throw Error("React.Children.only expected to receive a single React element child.");return p}},Dt.Component=Nt,Dt.Fragment=g,Dt.Profiler=Z,Dt.PureComponent=ne,Dt.StrictMode=E,Dt.Suspense=G,Dt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=pt,Dt.act=function(){throw Error("act(...) is not supported in production builds of React.")},Dt.cache=function(p){return function(){return p.apply(null,arguments)}},Dt.cloneElement=function(p,qLine truncated
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Vd;function Lv(){return Vd||(Vd=1,function(T){function Q(X,ft){var F=X.length;X.push(ft);t:for(;0<F;){var It=F-1>>>1,p=X[It];if(0<Z(p,ft))X[It]=ft,X[F]=p,F=It;else break t}}function g(X){return X.length===0?null:X[0]}function E(X){if(X.length===0)return null;var ft=X[0],F=X.pop();if(F!==ft){X[0]=F;t:for(var It=0,p=X.length,q=p>>>1;It<q;){var dt=2*(It+1)-1,rt=X[dt],J=dt+1,xt=X[J];if(0>Z(rt,F))J<p&&0>Z(xt,rt)?(X[It]=xt,X[J]=F,It=J):(X[It]=rt,X[dt]=F,It=dt);else if(J<p&&0>Z(xt,F))X[It]=xt,X[J]=F,It=J;else break t}}return ft}function Z(X,ft){var F=X.sortIndex-ft.sortIndex;return F!==0?F:X.id-ft.id}if(T.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var Mt=performance;T.unstable_now=function(){return Mt.now()}}else{var k=Date,$=k.now();T.unstable_now=function(){return k.now()-$}}var G=[],U=[],nt=1,it=null,ct=3,lt=!1,Jt=!1,yt=!1,Nt=typeof setTimeout=="function"?setTimeout:null,fe=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;function le(X){for(var ft=g(U);ft!==null;){if(ft.callback===null)E(U);else if(ft.startTime<=X)E(U),ft.sortIndex=ft.expirationTime,Q(G,ft);else break;ft=g(U)}}function Ce(X){if(yt=!1,le(X),!Jt)if(g(G)!==null)Jt=!0,Te();else{var ft=g(U);ft!==null&&V(Ce,ft.startTime-X)}}var pt=!1,ie=-1,pe=5,ve=-1;function I(){return!(T.unstable_now()-ve<pe)}function St(){if(pt){var X=T.unstable_now();ve=X;var ft=!0;try{t:{Jt=!1,yt&&(yt=!1,fe(ie),ie=-1),lt=!0;var F=ct;try{e:{for(le(X),it=g(G);it!==null&&!(it.expirationTime>X&&I());){var It=it.callback;if(typeof It=="function"){it.callback=null,ct=it.priorityLevel;var p=It(it.expirationTime<=X);if(X=T.unstable_now(),typeof p=="function"){it.callback=p,le(X),ft=!0;break e}it===g(G)&&E(G),le(X)}else E(G);it=g(G)}if(it!==null)ft=!0;else{var q=g(U);q!==null&&V(Ce,q.startTime-X),ft=!1}}break t}finally{it=null,ct=F,lt=!1}ft=void 0}}finally{ft?qe():pt=!1}}}var qe;if(typeof ne=="function")qe=function(){ne(St)};else if(typeof MessageChannel<"u"){var wt=new MessageChannel,Ht=wt.port2;wt.port1.onmessage=St,qe=function(){Ht.postMessage(null)}}else qe=function(){Nt(St,0)};function Te(){pt||(pt=!0,qe())}function V(X,ft){ie=Nt(function(){X(T.unstable_now())},ft)}T.unstable_IdlePriority=5,T.unstable_ImmediatePriority=1,T.unstable_LowPriority=4,T.unstable_NormalPriority=3,T.unstable_Profiling=null,T.unstable_UserBlockingPriority=2,T.unstable_cancelCallback=function(X){X.callback=null},T.unstable_continueExecution=function(){Jt||lt||(Jt=!0,Te())},T.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):pe=0<X?Math.floor(1e3/X):5},T.unstable_getCurrentPriorityLevel=function(){return ct},T.unstable_getFirstCallbackNode=function(){return g(G)},T.unstable_next=function(X){switch(ct){case 1:case 2:case 3:var ft=3;break;default:ft=ct}var F=ct;ct=ft;try{return X()}finally{ct=F}},T.unstable_pauseExecution=function(){},T.unstable_requestPaint=function(){},T.unstable_runWithPriority=function(X,ft){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var F=ct;ct=X;try{return ft()}finally{ct=F}},T.unstable_scheduleCallback=function(X,ft,F){var It=T.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?It+F:It):F=It,X){case 1:var p=-1;break;case 2:p=250;break;case 5:p=1073741823;break;case 4:p=1e4;break;default:p=5e3}return p=F+p,X={id:nt++,callback:ft,priorityLevel:X,startTime:F,expirationTime:p,sortIndex:-1},F>It?(X.sortIndex=F,Q(U,X),g(G)===null&&X===g(U)&&(yt?(fe(ie),ie=-1):yt=!0,V(Ce,F-It))):(X.sortIndex=p,Q(G,X),Jt||lt||(Jt=!0,Te())),X},T.unstable_shouldYield=I,T.unstable_wrapCallback=function(X){var ft=ct;return function(){var F=ct;ct=ft;try{return X.apply(this,arguments)}finally{ct=F}}}}(wd)),wd}var Jd;function qv(){return Jd||(Jd=1,Nd.exports=Lv()),Nd.exports}var Ld={exports:{}},vn={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Wd;function Yv(){if(Wd)return vn;Wd=1;var T=Yd();function Q(G){var U="https://react.dev/errors/"+G;if(1<arguments.length){U+="?args[]="+encodeURIComponent(arguments[1]);for(var nt=2;nt<arguments.length;nt++)U+="&args[]="+encodeURIComponent(arguments[nt])}return"Minified React error #"+G+"; visit "+U+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function g(){}var E={d:{f:g,r:function(){throw Error(Q(522))},D:g,C:g,L:g,m:g,X:g,S:g,M:g},p:0,findDOMNode:null},Z=Symbol.for("react.portal");function Mt(G,U,nt){var it=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Z,key:it==null?null:""+it,children:G,containerInfo:U,implementation:nt}}var k=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function $(G,U){if(G==="font")return"";if(typeof U=="string")return U==="use-credentials"?U:""}return vn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,vn.createPortal=function(G,U){var nt=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!U||U.nodeType!==1&&U.nodeType!==9&&U.nodeType!==11)throw Error(Q(299));return Mt(G,U,null,nt)},vn.flushSync=function(G){var U=k.T,nt=E.p;try{if(k.T=null,E.p=2,G)return G()}finally{k.T=U,E.p=nt,E.d.f()}},vn.preconnect=function(G,U){typeof G=="string"&&(U?(U=U.crossOrigin,U=typeof U=="string"?U==="use-credentials"?U:"":void 0):U=null,E.d.C(G,U))},vn.prefetchDNS=function(G){typeof G=="string"&&E.d.D(G)},vn.preinit=function(G,U){if(typeof G=="string"&&U&&typeof U.as=="string"){var nt=U.as,it=$(nt,U.crossOrigin),ct=typeof U.integrity=="string"?U.integrity:void 0,lt=typeof U.fetchPriority=="string"?U.fetchPriority:void 0;nt==="style"?E.d.S(G,typeof U.precedence=="string"?U.precedence:void 0,{crossOrigin:it,integrity:ct,fetchPriority:lt}):nt==="script"&&E.d.X(G,{crossOrigin:it,integrity:ct,fetchPriority:lt,nonce:typeof U.nonce=="string"?U.nonce:void 0})}},vn.preinitModule=function(G,U){if(typeof G=="string")if(typeof U=="object"&&U!==null){if(U.as==null||U.as==="script"){var nt=$(U.as,U.crossOrigin);E.d.M(G,{crossOrigin:nt,integrity:typeof U.integrity=="string"?U.integrity:void 0,nonce:typeof U.nonce=="string"?U.nonce:void 0})}}else U==null&&E.d.M(G)},vn.preload=function(G,U){if(typeof G=="string"&&typeof U=="object"&&U!==null&&typeof U.as=="string"){var nt=U.as,it=$(nt,U.crossOrigin);E.d.L(G,nt,{crossOrigin:it,integrity:typeof U.integrity=="string"?U.integrity:void 0,nonce:typeof U.nonce=="string"?U.nonce:void 0,type:typeof U.type=="string"?U.type:void 0,fetchPriority:typeof U.fetchPriority=="string"?U.fetchPriority:void 0,referrerPolicy:typeof U.referrerPolicy=="string"?U.referrerPolicy:void 0,imageSrcSet:typeof U.imageSrcSet=="string"?U.imageSrcSet:void 0,imageSizes:typeof U.imageSizes=="string"?U.imageSizes:void 0,media:typeof U.media=="string"?U.media:void 0})}},vn.preloadModule=function(G,U){if(typeof G=="string")if(U){var nt=$(U.as,U.crossOrigin);E.d.m(G,{as:typeof U.as=="string"&&U.as!=="script"?U.as:void 0,crossOrigin:nt,integrity:typeof U.integrity=="string"?U.integrity:void 0})}else E.d.m(G)},vn.requestFormReset=function(G){E.d.r(G)},vn.unstable_batchedUpdates=function(G,U){return G(U)},vn.useFormState=function(G,U,nt){return k.H.useFormState(G,U,nt)},vn.useFormStatus=function(){return k.H.useHostTransitionStatus()},vn.version="19.0.0",vn}var $d;function Gv(){if($d)return Ld.exports;$d=1;function T(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(T)}catch(Q){console.error(Q)}}return T(),Ld.exports=Yv(),Ld.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Fd;function Xv(){if(Fd)return to;Fd=1;var T=qv(),Q=Yd(),g=Gv();function E(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Z(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}var Mt=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),$=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),nt=Symbol.for("react.profiler"),it=Symbol.for("react.provider"),ct=Symbol.for("react.consumer"),lt=Symbol.for("react.context"),Jt=Symbol.for("react.forward_ref"),yt=Symbol.for("react.suspense"),Nt=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),Ce=Symbol.for("react.memo_cache_sentinel"),pt=Symbol.iterator;function ie(t){return t===null||typeof t!="object"?null:(t=pt&&t[pt]||t["@@iterator"],typeof t=="function"?t:null)}var pe=Symbol.for("react.client.reference");function ve(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===pe?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case G:return"Fragment";case $:return"Portal";case nt:return"Profiler";case U:return"StrictMode";case yt:return"Suspense";case Nt:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case lt:return(t.displayName||"Context")+".Provider";case ct:return(t._context.displayName||"Context")+".Consumer";case Jt:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case fe:return e=t.displayName||null,e!==null?e:ve(t.type)||"Memo";case ne:e=t._payload,t=t._init;try{return ve(t(e))}catch{}}return null}var I=Q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,St=Object.assign,qe,wt;function Ht(t){if(qe===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);qe=e&&e[1]||"",wt=-1<n.stack.indexOf(`
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+qe+t+wt}var Te=!1;function V(t,e){if(!t||Te)return"";Te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(e){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(C){var x=C}Reflect.construct(t,[],L)}else{try{L.call()}catch(C){x=C}t.call(L.prototype)}}else{try{throw Error()}catch(C){x=C}(L=t())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(C){if(C&&x&&typeof C.stack=="string")return[C.stack,x.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=a.DetermineComponentFrameRoot(),s=c[0],d=c[1];if(s&&d){var y=s.split(`
`),b=d.split(`
`);for(i=a=0;a<y.length&&!y[a].includes("DetermineComponentFrameRoot");)a++;for(;i<b.length&&!b[i].includes("DetermineComponentFrameRoot");)i++;if(a===y.length||i===b.length)for(a=y.length-1,i=b.length-1;1<=a&&0<=i&&y[a]!==b[i];)i--;for(;1<=a&&0<=i;a--,i--)if(y[a]!==b[i]){if(a!==1||i!==1)do if(a--,i--,0>i||y[a]!==b[i]){var H=`
`+y[a].replace(" at new "," at ");return t.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",t.displayName)),H}while(1<=a&&0<=i);break}}}finally{Te=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Ht(n):""}function X(t){switch(t.tag){case 26:case 27:case 5:return Ht(t.type);case 16:return Ht("Lazy");case 13:return Ht("Suspense");case 19:return Ht("SuspenseList");case 0:case 15:return t=V(t.type,!1),t;case 11:return t=V(t.type.render,!1),t;case 1:return t=V(t.type,!0),t;default:return""}}function ft(t){try{var e="";do e+=X(t),t=t.return;while(t);return e}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}function F(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function It(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(F(t)!==t)throw Error(E(188))}function q(t){var e=t.alternate;if(!e){if(e=F(t),e===null)throw Error(E(188));return e!==t?null:t}for(var n=t,a=e;;){var i=n.return;if(i===null)break;var c=i.alternate;if(c===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===n)return p(i),t;if(c===a)return p(i),e;c=c.sibling}throw Error(E(188))}if(n.return!==a.return)n=i,a=c;else{for(var s=!1,d=i.child;d;){if(d===n){s=!0,n=i,a=c;break}if(d===a){s=!0,a=i,n=c;break}d=d.sibling}if(!s){for(d=c.child;d;){if(d===n){s=!0,n=c,a=i;break}if(d===a){s=!0,a=c,n=i;break}d=d.sibling}if(!s)throw Error(E(189))}}if(n.alternate!==a)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?t:e}function dt(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=dt(t),e!==null)return e;t=t.sibling}return null}var rt=Array.isArray,J=g.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xt={pending:!1,data:null,method:null,action:null},At=[],$e=-1;function Xt(t){return{current:t}}function ce(t){0>$e||(t.current=At[$e],At[$e]=null,$e--)}function re(t,e){$e++,At[$e]=t.current,t.current=e}var gn=Xt(null),fu=Xt(null),Bl=Xt(null),an=Xt(null);function cu(t,e){switch(re(Bl,e),re(fu,t),re(gn,null),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)&&(e=e.namespaceURI)?kh(e):0;break;default:if(t=t===8?e.parentNode:e,e=t.tagName,t=t.namespaceURI)t=kh(t),e=Ih(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ce(gn),re(gn,e)}function _a(){ce(gn),ce(fu),ce(Bl)}function Jn(t){t.memoizedState!==null&&re(an,t);var e=gn.current,n=Ih(e,t.type);e!==n&&(re(fu,t),re(gn,n))}function hi(t){fu.current===t&&(ce(gn),ce(fu)),an.current===t&&(ce(an),_f._currentValue=xt)}var Jc=Object.prototype.hasOwnProperty,Gu=T.unstable_scheduleCallback,yn=T.unstable_cancelCallback,di=T.unstable_shouldYield,Tf=T.unstable_requestPaint,hl=T.unstable_now,vi=T.unstable_getCurrentPriorityLevel,lo=T.unstable_ImmediatePriority,ma=T.unstable_UserBlockingPriority,Nl=T.unstable_NormalPriority,Wc=T.unstable_LowPriority,Of=T.unstable_IdlePriority,$c=T.log,Fc=T.unstable_setDisableYieldValue,Xu=null,Fe=null;function kc(t){if(Fe&&typeof Fe.onCommitFiberRoot=="function")try{Fe.onCommitFiberRoot(Xu,t,void 0,(t.current.flags&128)===128)}catch{}}function dl(t){if(typeof $c=="function"&&Fc(t),Fe&&typeof Fe.setStrictMode=="function")try{Fe.setStrictMode(Xu,t)}catch{}}var ke=Math.clz32?Math.clz32:m0,y0=Math.log,_0=Math.LN2;function m0(t){return t>>>=0,t===0?32:31-(y0(t)/_0|0)|0}var gi=128,yi=4194304;function Qu(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Rf(t,e){var n=t.pendingLanes;if(n===0)return 0;var a=0,i=t.suspendedLanes,c=t.pingedLanes,s=t.warmLanes;t=t.finishedLanes!==0;var d=n&134217727;return d!==0?(n=d&~i,n!==0?a=Qu(n):(c&=d,c!==0?a=Qu(c):t||(s=d&~s,s!==0&&(a=Qu(s))))):(d=n&~i,d!==0?a=Qu(d):c!==0?a=Qu(c):t||(s=n&~s,s!==0&&(a=Qu(s)))),a===0?0:e!==0&&e!==a&&!(e&i)&&(i=a&-a,s=e&-e,i>=s||i===32&&(s&4194176)!==0)?e:a}function _i(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function p0(t,e){switch(t){case 1:case 2:case 4:case 8:return e+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ic(){var t=gi;return gi<<=1,!(gi&4194176)&&(gi=128),t}function uo(){var t=yi;return yi<<=1,!(yi&62914560)&&(yi=4194304),t}function Pc(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function mi(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function tr(t,e,n,a,i,c){var s=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var d=t.entanglements,y=t.expirationTimes,b=t.hiddenUpdates;for(n=s&~n;0<n;){var H=31-ke(n),L=1<<H;d[H Line truncated
`).replace(rd,"")}function bt(t,e){return e=Nu(e),Nu(t)===e}function Uc(){}function Tt(t,e,n,a,i,c){switch(n){case"children":typeof a=="string"?e==="body"||e==="textarea"&&a===""||Wn(t,a):(typeof a=="number"||typeof a=="bigint")&&e!=="body"&&Wn(t,""+a);break;case"className":Si(t,"class",a);break;case"tabIndex":Si(t,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Si(t,n,a);break;case"style":_o(t,a,c);break;case"data":if(e!=="object"){Si(t,"data",a);break}case"src":case"href":if(a===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(n);break}a=Ti(""+a),t.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){t.setAttribute(n,"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 c=="function"&&(n==="formAction"?(e!=="input"&&Tt(t,e,"name",i.name,i,null),Tt(t,e,"formEncType",i.formEncType,i,null),Tt(t,e,"formMethod",i.formMethod,i,null),Tt(t,e,"formTarget",i.formTarget,i,null)):(Tt(t,e,"encType",i.encType,i,null),Tt(t,e,"method",i.method,i,null),Tt(t,e,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(n);break}a=Ti(""+a),t.setAttribute(n,a);break;case"onClick":a!=null&&(t.onclick=Uc);break;case"onScroll":a!=null&&Yt("scroll",t);break;case"onScrollEnd":a!=null&&Yt("scrollend",t);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(E(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(E(60));t.innerHTML=n}}break;case"multiple":t.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":t.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){t.removeAttribute("xlink:href");break}n=Ti(""+a),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(n,""+a):t.removeAttribute(n);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":a&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":a===!0?t.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(n,a):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?t.setAttribute(n,a):t.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?t.removeAttribute(n):t.setAttribute(n,a);break;case"popover":Yt("beforetoggle",t),Yt("toggle",t),xf(t,"popover",a);break;case"xlinkActuate":gl(t,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":gl(t,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":gl(t,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":gl(t,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":gl(t,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":gl(t,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":gl(t,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":gl(t,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":gl(t,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":xf(t,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=mo.get(n)||n,xf(t,n,a))}}function _e(t,e,n,a,i,c){switch(n){case"style":_o(t,a,c);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(E(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(E(60));t.innerHTML=n}}break;case"children":typeof a=="string"?Wn(t,a):(typeof a=="number"||typeof a=="bigint")&&Wn(t,""+a);break;case"onScroll":a!=null&&Yt("scroll",t);break;case"onScrollEnd":a!=null&&Yt("scrollend",t);break;case"onClick":a!=null&&(t.onclick=Uc);break;case"suppressContentEditableWarning":case"suppressHydrationWar Line truncated
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/var Vv=no.exports,Pd;function Jv(){return Pd||(Pd=1,function(T,Q){(function(){var g,E="4.17.21",Z=200,Mt="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",k="Expected a function",$="Invalid `variable` option passed into `_.template`",G="__lodash_hash_undefined__",U=500,nt="__lodash_placeholder__",it=1,ct=2,lt=4,Jt=1,yt=2,Nt=1,fe=2,ne=4,le=8,Ce=16,pt=32,ie=64,pe=128,ve=256,I=512,St=30,qe="...",wt=800,Ht=16,Te=1,V=2,X=3,ft=1/0,F=9007199254740991,It=17976931348623157e292,p=NaN,q=4294967295,dt=q-1,rt=q>>>1,J=[["ary",pe],["bind",Nt],["bindKey",fe],["curry",le],["curryRight",Ce],["flip",I],["partial",pt],["partialRight",ie],["rearg",ve]],xt="[object Arguments]",At="[object Array]",$e="[object AsyncFunction]",Xt="[object Boolean]",ce="[object Date]",re="[object DOMException]",gn="[object Error]",fu="[object Function]",Bl="[object GeneratorFunction]",an="[object Map]",cu="[object Number]",_a="[object Null]",Jn="[object Object]",hi="[object Promise]",Jc="[object Proxy]",Gu="[object RegExp]",yn="[object Set]",di="[object String]",Tf="[object Symbol]",hl="[object Undefined]",vi="[object WeakMap]",lo="[object WeakSet]",ma="[object ArrayBuffer]",Nl="[object DataView]",Wc="[object Float32Array]",Of="[object Float64Array]",$c="[object Int8Array]",Fc="[object Int16Array]",Xu="[object Int32Array]",Fe="[object Uint8Array]",kc="[object Uint8ClampedArray]",dl="[object Uint16Array]",ke="[object Uint32Array]",y0=/\b__p \+= '';/g,_0=/\b(__p \+=) '' \+/g,m0=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gi=/&(?:amp|lt|gt|quot|#39);/g,yi=/[&<>"']/g,Qu=RegExp(gi.source),Rf=RegExp(yi.source),_i=/<%-([\s\S]+?)%>/g,p0=/<%([\s\S]+?)%>/g,Ic=/<%=([\s\S]+?)%>/g,uo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pc=/^\w*$/,mi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tr=/[\\^$.*+?()[\]{}|]/g,ao=RegExp(tr.source),Mf=/^\s+/,io=/\s/,fo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,S0=/\{\n\/\* \[wrapped with (.+)\] \*/,ru=/,? & /,Ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fn=/[()=,{}\[\]\/\s]/,pa=/\\(\\)?/g,er=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,co=/\w*$/,b0=/^[-+]0x[0-9a-f]+$/i,ro=/^0b[01]+$/i,pi=/^\[object .+?Constructor\]$/,nr=/^0o[0-7]+$/i,Zu=/^(?:0|[1-9]\d*)$/,Sa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,su=/($^)/,ba=/['\n\r\u2028\u2029\\]/g,Oe="\\ud800-\\udfff",so="\\u0300-\\u036f",oo="\\ufe20-\\ufe2f",Ku="\\u20d0-\\u20ff",ju=so+oo+Ku,vl="\\u2700-\\u27bf",ho="a-z\\xdf-\\xf6\\xf8-\\xff",vo="\\xac\\xb1\\xd7\\xf7",go="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",A0="\\u2000-\\u206f",xf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Si="A-Z\\xc0-\\xd6\\xd8-\\xde",gl="\\ufe0e\\ufe0f",_n=vo+go+A0+xf,zf="['’]",E0="["+Oe+"]",bi="["+_n+"]",Ai="["+ju+"]",Ei="\\d+",T0="["+vl+"]",mn="["+ho+"]",Df="[^"+Oe+_n+Ei+vl+ho+Si+"]",Uf="\\ud83c[\\udffb-\\udfff]",lr="(?:"+Ai+"|"+Uf+")",Vu="[^"+Oe+"]",Cf="(?:\\ud83c[\\udde6-\\uddff]){2}",Hf="[\\ud800-\\udbff][\\udc00-\\udfff]",Wn="["+Si+"]",yo="\\u200d",ur="(?:"+mn+"|"+Df+")",_o="(?:"+Wn+"|"+Df+")",Bf="(?:"+zf+"(?:d|ll|m|re|s|t|ve))?",mo="(?:"+zf+"(?:D|LL|M|RE|S|T|VE))?",po=lr+"?",Ti="["+gl+"]?",ar="(?:"+yo+"(?:"+[Vu,Cf,Hf].join("|")+")"+Ti+po+")*",ir="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Aa="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ju=Ti+po+ar,So="(?:"+[T0,Cf,Hf].join("|")+")"+Ju,fr="(?:"+[Vu+Ai+"?",Ai,Cf,Hf,E0].join("|")+")",bo=RegExp(zf,"g"),Oi=RegExp(Ai,"g"),Ri=RegExp(Uf+"(?="+Uf+")|"+fr+Ju,"g"),Mi=RegExp([Wn+"?"+mn+"+"+Bf+"(?="+[bi,Wn,"$"].join("|")+")",_o+"+"+mo+"(?="+[bi,Wn+ur,"$"].join("|")+")",Wn+"?"+ur+"+"+Bf,Wn+"+"+mo,Aa,ir,Ei,So].join("|"),"g"),ou=RegExp("["+yo+Oe+ju+gl+"]"),cr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ao=-1,Pt={};Pt[Wc]=Pt[Of]=Pt[$c]=Pt[Fc]=Pt[Xu]=Pt[Fe]=Pt[kc]=Pt[dl]=Pt[ke]=!0,Pt[xt]=Pt[At]=Pt[ma]=Pt[Xt]=Pt[Nl]=Pt[ce]=Pt[gn]=Pt[fu]=Pt[an]=Pt[cu]=Pt[Jn]=Pt[Gu]=Pt[yn]=Pt[di]=Pt[vi]=!1;var kt={};kt[xt]=kt[At]=kt[ma]=kt[Nl]=kt[Xt]=kt[ce]=kt[Wc]=kt[Of]=kt[$c]=kt[Fc]=kt[Xu]=kt[an]=kt[cu]=kt[Jn]=kt[Gu]=kt[yn]=kt[di]=kt[Tf]=kt[Fe]=kt[kc]=kt[dl]=kt[ke]=!0,kt[gn]=kt[fu]=kt[vi]=!1;var Eo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",Line truncated
/* [wrapped with `+u+`] */
`)}function _h(l){return bt(l)||Nu(l)||!!(Iu&&l&&l[Iu])}function il(l,u){var f=typeof l;return u=u??F,!!u&&(f=="number"||f!="symbol"&&Zu.test(l))&&l>-1&&l%1==0&&l<u}function Ge(l,u,f){if(!de(f))return!1;var r=typeof u;return(r=="number"?Tt(f)&&il(u,f.length):r=="string"&&u in f)?Vn(f[u],l):!1}function Ia(l,u){if(bt(l))return!1;var f=typeof l;return f=="number"||f=="symbol"||f=="boolean"||l==null||Cn(l)?!0:Pc.test(l)||!uo.test(l)||u!=null&&l in te(u)}function kl(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function he(l){var u=ul(l),f=h[u];if(typeof f!="function"||!(u in Et.prototype))return!1;if(l===f)return!0;var r=Fi(f);return!!r&&l===r[0]}function ls(l){return!!qn&&qn in l}var mh=Wf?lu:Ud;function be(l){var u=l&&l.constructor,f=typeof u=="function"&&u.prototype||za;return l===f}function us(l){return l===l&&!de(l)}function ph(l,u){return function(f){return f==null?!1:f[l]===u&&(u!==g||l in te(f))}}function Sh(l){var u=of(l,function(r){return f.size===U&&f.clear(),r}),f=u.cache;return u}function bh(l,u){var f=l[1],r=u[1],o=f|r,v=o<(Nt|fe|pe),_=r==pe&&f==le||r==pe&&f==ve&&l[7].length<=u[8]||r==(pe|ve)&&u[7].length<=u[8]&&f==le;if(!(v||_))return l;r&Nt&&(l[2]=u[2],o|=f&Nt?0:ne);var m=u[3];if(m){var O=l[3];l[3]=O?Wr(O,m,u[4]):m,l[4]=O?gu(l[3],nt):u[4]}return m=u[5],m&&(O=l[5],l[5]=O?$r(O,m,u[6]):m,l[6]=O?gu(l[5],nt):u[6]),m=u[7],m&&(l[7]=m),r&pe&&(l[8]=l[8]==null?u[8]:_t(l[8],u[8])),l[9]==null&&(l[9]=u[9]),l[0]=u[0],l[1]=o,l}function Ue(l){var u=[];if(l!=null)for(var f in te(l))u.push(f);return u}function Rn(l){return Ie.call(l)}function zl(l,u,f){return u=qt(u===g?l.length-1:u,0),function(){for(var r=arguments,o=-1,v=qt(r.length-u,0),_=z(v);++o<v;)_[o]=r[u+o];o=-1;for(var m=z(u+1);++o<u;)m[o]=r[o];return m[u]=f(_),rn(l,this,m)}}function as(l,u){return u.length<2?l:Jl(l,Tn(u,0,-1))}function Ah(l,u){for(var f=l.length,r=_t(u.length,f),o=en(l);r--;){var v=u[r];l[r]=il(v,f)?o[v]:g}return l}function is(l,u){if(!(u==="constructor"&&typeof l[u]=="function")&&u!="__proto__")return l[u]}var bc=xn(Qr),Ve=ta||function(l,u){return Re.setTimeout(l,u)},Mn=xn(K0);function fs(l,u,f){var r=u+"";return Mn(l,yh(r,cs(vh(r),f)))}function xn(l){var u=0,f=0;return function(){var r=kn(),o=Ht-(r-f);if(f=r,o>0){if(++u>=wt)return arguments[0]}else u=0;return l.apply(g,arguments)}}function Pi(l,u){var f=-1,r=l.length,o=r-1;for(u=u===g?r:u;++f<u;){var v=sc(f,o),_=l[v];l[v]=l[f],l[f]=_}return l.length=u,l}var Dl=Sh(function(l){var u=[];return l.charCodeAt(0)===46&&u.push(""),l.replace(mi,function(f,r,o,v){u.push(o?v.replace(pa,"$1"):r||f)}),u});function nn(l){if(typeof l=="string"||Cn(l))return l;var u=l+"";return u=="0"&&1/l==-1/0?"-0":u}function dn(l){if(l!=null){try{return Di.call(l)}catch{}try{return l+""}catch{}}return""}function cs(l,u){return wn(J,function(f){var r="_."+f[0];u&f[1]&&!Yf(l,r)&&l.push(r)}),l.sort()}function Ac(l){if(l instanceof Et)return l.clone();var u=new An(l.__wrapped__,l.__chain__);return u.__actions__=en(l.__actions__),u.__index__=l.__index__,u.__values__=l.__values__,u}function Uu(l,u,f){(f?Ge(l,u,f):u===g)?u=1:u=qt(Ot(u),0);var r=l==null?0:l.length;if(!r||u<1)return[];for(var o=0,v=0,_=z(Xn(r/u));o<r;)_[v++]=Tn(l,o,o+=u);return _}function Eh(l){for(var u=-1,f=l==null?0:l.length,r=0,o=[];++u<f;){var v=l[u];v&&(o[r++]=v)}return o}function Pa(){var l=arguments.length;if(!l)return[];for(var u=z(l-1),f=arguments[0],r=l;r--;)u[r-1]=arguments[r];return wl(bt(f)?en(f):[f],ze(u,1))}var tf=Rt(function(l,u){return _e(l)?wa(l,ze(u,1,_e,!0)):[]}),ef=Rt(function(l,u){var f=ln(u);return _e(f)&&(f=g),_e(l)?wa(l,ze(u,1,_e,!0),ut(f,2)):[]}),ti=Rt(function(l,u){var f=ln(u);return _e(f)&&(f=g),_e(l)?wa(l,ze(u,1,_e,!0),g,f):[]});function Th(l,u,f){var r=l==null?0:l.length;return r?(u=f||u===g?1:Ot(u),Tn(l,u<0?0:u,r)):[]}function Oh(l,u,f){var r=l==null?0:l.length;return r?(u=f||u===g?1:Ot(u),u=r-u,Tn(l,0,u<0?0:u)):[]}function nf(l,u){return l&&l.length?Ka(l,ut(u,3),!0,!0):[]}function Rh(l,u){return l&&l.length?Ka(l,ut(u,3),!0):[]}function Ec(l,u,f,r){var o=l==null?0:l.length;return o?(f&&typeof f!="number"&&Ge(l,u,f)&&(f=0,r=o),sn(l,u,f,r)):[]}function rs(l,u,f){var r=l==null?0:l.length;if(!r)return-1;var o=f==null?0:Ot(f);return o<0&&(o=qt(r+o,0)),Gf(l,ut(u,3),o)}function Mh(l,u,f){var r=l==null?0:l.length;if(!r)return-1;var o=r-1;return f!==g&&(o=Ot(f),o=f<0?qt(r+o,0):_t(o,r-1)),Gf(l,ut(u,3),o,!0)}function zn(l){var u=l==null?0:l.length;return u?ze(l,1):[]}function ss(l){var u=l==null?0:l.length;return u?ze(l,ft):[]}function Cu(l,u){var f=l==null?0:l.length;return f?(u=u===g?1:Ot(u),ze(l,u)):[]}function xh(l){for(var u=-1,f=l==null?0:l.length,r={};++u<f;){var o=l[u];r[o[0]]=o[1]}return r}function lf(l){return l&&l.length?l[0]:g}function sa(l,u,f){var r=l==null?0:l.length;if(!r)return-1;var o=f==null?0:Ot(f);return o<0&&(o=qt(r+o,0)),Ta(l,u,o)}function zh(l){var u=l==null?0:l.length;return u?Tn(l,0,-1):[]}var os=Rt(function(l){var u=se(l,Wl);return u.length&&u[0]===l[0] Line truncated
`;l.replace(K,function(gt,Gt,Kt,sl,Bn,ol){return Kt||(Kt=sl),Y+=l.slice(B,ol).replace(ba,wo),Gt&&(m=!0,Y+=`' +
__e(`+Gt+`) +
'`),Bn&&(O=!0,Y+=`';
`+Bn+`;
__p += '`),Kt&&(Y+=`' +
((__t = (`+Kt+`)) == null ? '' : __t) +
'`),B=ol+gt.length,gt}),Y+=`';
`;var vt=Wt.call(u,"variable")&&u.variable;if(!vt)Y=`with (obj) {
`+Y+`
}
`;else if(fn.test(vt))throw new ot($);Y=(O?Y.replace(y0,""):Y).replace(_0,"$1").replace(m0,"$1;"),Y="function("+(vt||"obj")+`) {
`+(vt?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(m?", __e = _.escape":"")+(O?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Y+`return __p
}`;var Ct=R(function(){return Lt(v,tt+"return "+Y).apply(g,_)});if(Ct.source=Y,vf(Ct))throw Ct;return Ct}function d(l){return Ft(l).toLowerCase()}function y(l){return Ft(l).toUpperCase()}function b(l,u,f){if(l=Ft(l),l&&(f||u===g))return Bo(l);if(!l||!(u=Se(u)))return l;var r=Ln(l),o=Ln(u),v=Ma(r,o),_=xa(r,o)+1;return Fl(r,v,_).join("")}function H(l,u,f){if(l=Ft(l),l&&(f||u===g))return l.slice(0,_r(l)+1);if(!l||!(u=Se(u)))return l;var r=Ln(l),o=xa(r,Ln(u))+1;return Fl(r,0,o).join("")}function L(l,u,f){if(l=Ft(l),l&&(f||u===g))return l.replace(Mf,"");if(!l||!(u=Se(u)))return l;var r=Ln(l),o=Ma(r,Ln(u));return Fl(r,o).join("")}function x(l,u){var f=St,r=qe;if(de(u)){var o="separator"in u?u.separator:o;f="length"in u?Ot(u.length):f,r="omission"in u?Se(u.omission):r}l=Ft(l);var v=l.length;if(vu(l)){var _=Ln(l);v=_.length}if(f>=v)return l;var m=f-_l(r);if(m<1)return r;var O=_?Fl(_,0,m).join(""):l.slice(0,m);if(o===g)return O+r;if(_&&(m+=O.length-m),Bc(o)){if(l.slice(m).search(o)){var B,w=O;for(o.global||(o=Ll(o.source,Ft(co.exec(o))+"g")),o.lastIndex=0;B=o.exec(w);)var Y=B.index;O=O.slice(0,Y===g?m:Y)}}else if(l.indexOf(Se(o),m)!=m){var K=O.lastIndexOf(o);K>-1&&(O=O.slice(0,K))}return O+r}function C(l){return l=Ft(l),l&&Qu.test(l)?l.replace(gi,Go):l}var P=Ru(function(l,u,f){return l+(f?" ":"")+u.toUpperCase()}),mt=dc("toUpperCase");function me(l,u,f){return l=Ft(l),u=f?g:u,u===g?Lo(l)?w0(l):U0(l):l.match(u)||[]}var R=Rt(function(l,u){try{return rn(l,g,u)}catch(f){return vf(f)?f:new ot(f)}}),S=Ml(function(l,u){return wn(u,function(f){f=nn(f),En(l,f,ga(l[f],l))}),l});function M(l){var u=l==null?0:l.length,f=ut();return l=u?se(l,function(r){if(typeof r[1]!="function")throw new bn(k);return[f(r[0]),r[1]]}):[],Rt(function(r){for(var o=-1;++o<u;){var v=l[o];if(rn(v[0],this,r))return rn(v[1],this,r)}})}function N(l){return xr(jt(l,it))}function W(l){return function(){return l}}function Ut(l,u){return l==null||l!==l?u:l}var et=gc(),ht=gc(!0);function Vt(l){return l}function Zt(l){return Br(typeof l=="function"?l:jt(l,it))}function Yu(l){return Nr(jt(l,it))}function Md(l,u){return rc(l,jt(u,it))}var lv=Rt(function(l,u){return function(f){return qa(f,l,u)}}),uv=Rt(function(l,u){return function(f){return qa(l,f,u)}});function xd(l,u,f){var r=we(u),o=fa(u,r);f==null&&!(de(u)&&(o.length||!r.length))&&(f=u,u=l,l=this,o=fa(u,we(u)));var v=!(de(f)&&"chain"in f)||!!f.chain,_=lu(l);return wn(o,function(m){var O=u[m];l[m]=O,_&&(l.prototype[m]=function(){var B=this.__chain__;if(v||B){var w=l(this.__wrapped__),Y=w.__actions__=en(this.__actions__);return Y.push({func:O,args:arguments,thisArg:l}),w.__chain__=B,w}return O.apply(l,wl([this.value()],arguments))})}),l}function av(){return Re._===this&&(Re._=pr),this}function zd(){}function iv(l){return l=Ot(l),Rt(function(u){return wr(u,l)})}var fv=el(se),cv=el(Do),rv=el(dr);function Gd(l){return Ia(l)?Xf(nn(l)):ch(l)}function sv(l){return function(u){return l==null?g:Jl(l,u)}}var ov=ts(),hv=ts(!0);function Dd(){return[]}function Ud(){return!1}function dv(){return{}}function vv(){return""}function gv(){return!0}function yv(l,u){if(l=Ot(l),l<1||l>F)return[];var f=q,r=_t(l,q);u=ut(u),l-=q;for(var o=du(r,u);++f<l;)u(f);return o}function _v(l){return bt(l)?se(l,nn):Cn(l)?[l]:en(Dl(Ft(l)))}function mv(l){var u=++Zo;return Ft(l)+u}var pv=Wi(function(l,u){return l+u},0),Sv=nl("ceil"),bv=Wi(function(l,u){return l/u},1),Av=nl("floor");function Ev(l){return l&&l.length?La(l,Vt,ic):g}function Tv(l,u){return l&&l.length?La(l,ut(u,2),ic):g}function Ov(l){return Co(l,Vt)}function Rv(l,u){return Co(l,ut(u,2))}function Mv(l){return l&&l.length?La(l,Vt,Ga):g}function xv(l,u){return l&&l.length?La(l,ut(u,2),Ga):g}var zv=Wi(function(l,u){return l*u},1),Dv=nl("round"),Uv=Wi(function(l,u){return l-u},0);function Cv(l){return l&&l.length?Zf(l,Vt):0}function Hv(l,u){return l&&l.length?Zf(l,ut(u,2)):0}return h.after=Os,h.ary=Bu,h.assign=ci,h.assignIn=ri,h.assignInWith=gf,h.assignWith=Lc,h.at=Ks,h.before=fl,h.bind=ga,h.bindAll=S,h.bindKey=Vh,h.castArray=Bs,h.chain=Je,h.chunk=Uu,h.compact=Eh,h.concat=Pa,h.cond=M,h.conforms=N,h.constant=W,h.countBy=qh,h.create=js,h.curry=Rs,h.curryRight=Ms,h.debounce=xs,h.defaults=qc,h.defaultsDeep=u0,h.defer=id,h.delay=zs,h.difference=tf,h.differenceBy=ef,h.differenceWith=ti,h.drop=Th,h.dropRight=Oh,h.dropRightWhile=nf,h.dropWhile=Rh,h.fill=Ec,h.filter=As,h.flatMap=td,h.flatMapDeep=Yh,h.flatMapDepth=Gh,h.flatten=zn,h.flattenDeep=ss,h.flattenDepth=Cu,h.flip=Jh,h.flow=et,h.flowRight=ht,h.fromPairs=xh,h.functions=pd,h.functionsIn=Yc,h.groupBy=Xh,h.initial=zh,h.intersection=os,h.intersectionBy=hs,h.intersectionWith=Il,h.invert=_f,h.invertBy=Sd,h.invokeMap=ed,h.iteratee=Zt,h.keyBy=Zh,h.keys=we,h.keysIn=un,h.map=nu,h.mapKeys=c0,h.mapValues=Ws,h.matches=Yu,h.matchesProperty=Md,h.memoize=of,h.merge=r0,h.mergeWith=mf,h.method=lv,h.methodOf=uv,h.mixin=xd,h.negate=xc,h.nthArg=iv,h.omit=bd,h.omitBy=Ad,h.once=Ds,h.orderBy=Kh,h.over=fv,h.overArgs=Us,h.overEvery=cv,h.overSome=rv,h.partial=Cs,h.p Line truncated
@@ -1,6 +1,6 @@
{
"src/main.jsx": {
"file": "assets/main-CNyZ4sn3.js",
"file": "assets/main-BW8aQA7i.js",
"name": "main",
"src": "src/main.jsx",
"isEntry": true
@@ -1,78 +0,0 @@
var xE=Object.defineProperty;var CE=(e,t,r)=>t in e?xE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Xh=(e,t,r)=>(CE(e,typeof t!="symbol"?t+"":t,r),r);const EE="modulepreload",kE=function(e){return"/"+e},Jh={},LE=function(t,r,o){if(!r||r.length===0)return t();const l=document.getElementsByTagName("link");return Promise.all(r.map(s=>{if(s=kE(s),s in Jh)return;Jh[s]=!0;const c=s.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!o)for(let y=l.length-1;y>=0;y--){const w=l[y];if(w.href===s&&(!c||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${f}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":EE,c||(m.as="script",m.crossOrigin=""),m.href=s,document.head.appendChild(m),c)return new Promise((y,w)=>{m.addEventListener("load",y),m.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=s,window.dispatchEvent(c),!c.defaultPrevented)throw s})};var fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function IE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f0={exports:{}},ps={},d0={exports:{}},me={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ol=Symbol.for("react.element"),RE=Symbol.for("react.portal"),TE=Symbol.for("react.fragment"),OE=Symbol.for("react.strict_mode"),AE=Symbol.for("react.profiler"),NE=Symbol.for("react.provider"),PE=Symbol.for("react.context"),ME=Symbol.for("react.forward_ref"),BE=Symbol.for("react.suspense"),WE=Symbol.for("react.memo"),DE=Symbol.for("react.lazy"),bh=Symbol.iterator;function zE(e){return e===null||typeof e!="object"?null:(e=bh&&e[bh]||e["@@iterator"],typeof e=="function"?e:null)}var p0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h0=Object.assign,g0={};function $i(e,t,r){this.props=e,this.context=t,this.refs=g0,this.updater=r||p0}$i.prototype.isReactComponent={};$i.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function m0(){}m0.prototype=$i.prototype;function Sf(e,t,r){this.props=e,this.context=t,this.refs=g0,this.updater=r||p0}var xf=Sf.prototype=new m0;xf.constructor=Sf;h0(xf,$i.prototype);xf.isPureReactComponent=!0;var eg=Array.isArray,v0=Object.prototype.hasOwnProperty,Cf={current:null},w0={key:!0,ref:!0,__self:!0,__source:!0};function y0(e,t,r){var o,l={},s=null,c=null;if(t!=null)for(o in t.ref!==void 0&&(c=t.ref),t.key!==void 0&&(s=""+t.key),t)v0.call(t,o)&&!w0.hasOwnProperty(o)&&(l[o]=t[o]);var f=arguments.length-2;if(f===1)l.children=r;else if(1<f){for(var d=Array(f),m=0;m<f;m++)d[m]=arguments[m+2];l.children=d}if(e&&e.defaultProps)for(o in f=e.defaultProps,f)l[o]===void 0&&(l[o]=f[o]);return{$$typeof:ol,type:e,key:s,ref:c,props:l,_owner:Cf.current}}function $E(e,t){return{$$typeof:ol,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ef(e){return typeof e=="object"&&e!==null&&e.$$typeof===ol}function FE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var tg=/\/+/g;function Za(e,t){return typeof e=="object"&&e!==null&&e.key!=null?FE(""+e.key):t.toString(36)}function ku(e,t,r,o,l){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case ol:case RE:c=!0}}if(c)return c=e,l=l(c),e=o===""?"."+Za(c,0):o,eg(l)?(r="",e!=null&&(r=e.replace(tg,"$&/")+"/"),ku(l,t,r,"",function(m){return m})):l!=null&&(Ef(l)&&(l=$E(l,r+(!l.key||c&&c.key===l.key?"":(""+l.key).replace(tg,"$&/")+"/")+e)),t.push(l)),1;if(c=0,o=o===""?".":o+":",eg(e))for(var f=0;f<e.length;f++){s=e[f];var d=o+Za(s,f);c+=ku(s,t,r,d,l)}else if(d=zE(e),typeof d=="function")for(e=d.call(e),f=0;!(s=e.next()).done;)s=s.value,d=o+Za(s,f++),c+=ku(s,t,r,d,l);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function iu(e,t,r){if(e==null)return e;var o=[],l=0;return ku(e,o,"","",function(s){return t.call(r,s,l++)}),o}function UE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var wt={current:null},Lu={transition:null},jE={ReactCurrentDispatcher:wt,ReactCurrentBatchConfig:Lu,ReactCurrentOwner:Cf};me.Children={map:iu,forEach:function(e,t,r){iu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return iu(e,function(){t++}),t},toArray:function(e){return iu(e,function(t){return t})||[]},only:function(e){if(!Ef(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};me.Component=$i;me.Fragment=TE;me.Profiler=AE;me.PureComponent=Sf;me.StrictMode=OE;me.Suspense=BE;me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jE;me.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=h0({},e.props),l=e.key,s=e.ref,c=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,c=Cf.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var f=e.type.defaultProps;for(d in t)v0.call(t,d)&&!w0.hasOwnProperty(d)&&(o[d]=t[d]===void 0&&f!==void 0?f[d]:t[d])}var d=arguments.length-2;if(d===1)o.children=r;else if(1<d){f=Array(d);for(var m=0;m<d;m++)f[m]=arguments[m+2];o.children=f}return{$$typeof:ol,type:e.type,key:l,ref:s,props:o,_owner:c}};me.createContext=function(e){return e={$$typeof:PE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:NE,_conLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var GE=Z,VE=Symbol.for("react.element"),QE=Symbol.for("react.fragment"),qE=Object.prototype.hasOwnProperty,KE=GE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,YE={key:!0,ref:!0,__self:!0,__source:!0};function _0(e,t,r){var o,l={},s=null,c=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(c=t.ref);for(o in t)qE.call(t,o)&&!YE.hasOwnProperty(o)&&(l[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)l[o]===void 0&&(l[o]=t[o]);return{$$typeof:VE,type:e,key:s,ref:c,props:l,_owner:KE.current}}ps.Fragment=QE;ps.jsx=_0;ps.jsxs=_0;f0.exports=ps;var R=f0.exports,Ec={},S0={exports:{}},Ft={},x0={exports:{}},C0={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(F,G){var V=F.length;F.push(G);e:for(;0<V;){var X=V-1>>>1,we=F[X];if(0<l(we,G))F[X]=G,F[V]=we,V=X;else break e}}function r(F){return F.length===0?null:F[0]}function o(F){if(F.length===0)return null;var G=F[0],V=F.pop();if(V!==G){F[0]=V;e:for(var X=0,we=F.length,Re=we>>>1;X<Re;){var Ee=2*(X+1)-1,Ye=F[Ee],Ze=Ee+1,Tt=F[Ze];if(0>l(Ye,V))Ze<we&&0>l(Tt,Ye)?(F[X]=Tt,F[Ze]=V,X=Ze):(F[X]=Ye,F[Ee]=V,X=Ee);else if(Ze<we&&0>l(Tt,V))F[X]=Tt,F[Ze]=V,X=Ze;else break e}}return G}function l(F,G){var V=F.sortIndex-G.sortIndex;return V!==0?V:F.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],m=[],y=1,w=null,x=3,k=!1,A=!1,I=!1,N=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(F){for(var G=r(m);G!==null;){if(G.callback===null)o(m);else if(G.startTime<=F)o(m),G.sortIndex=G.expirationTime,t(d,G);else break;G=r(m)}}function M(F){if(I=!1,C(F),!A)if(r(d)!==null)A=!0,Fe(D);else{var G=r(m);G!==null&&pe(M,G.startTime-F)}}function D(F,G){A=!1,I&&(I=!1,v(B),B=-1),k=!0;var V=x;try{for(C(G),w=r(d);w!==null&&(!(w.expirationTime>G)||F&&!te());){var X=w.callback;if(typeof X=="function"){w.callback=null,x=w.priorityLevel;var we=X(w.expirationTime<=G);G=e.unstable_now(),typeof we=="function"?w.callback=we:w===r(d)&&o(d),C(G)}else o(d);w=r(d)}if(w!==null)var Re=!0;else{var Ee=r(m);Ee!==null&&pe(M,Ee.startTime-G),Re=!1}return Re}finally{w=null,x=V,k=!1}}var U=!1,O=null,B=-1,b=5,Q=-1;function te(){return!(e.unstable_now()-Q<b)}function ie(){if(O!==null){var F=e.unstable_now();Q=F;var G=!0;try{G=O(!0,F)}finally{G?oe():(U=!1,O=null)}}else U=!1}var oe;if(typeof _=="function")oe=function(){_(ie)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,se=ce.port2;ce.port1.onmessage=ie,oe=function(){se.postMessage(null)}}else oe=function(){N(ie,0)};function Fe(F){O=F,U||(U=!0,oe())}function pe(F,G){B=N(function(){F(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_continueExecution=function(){A||k||(A=!0,Fe(D))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return r(d)},e.unstable_next=function(F){switch(x){case 1:case 2:case 3:var G=3;break;default:G=x}var V=x;x=G;try{return F()}finally{x=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,G){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var V=x;x=F;try{return G()}finally{x=V}},e.unstable_scheduleCallback=function(F,G,V){var X=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?X+V:X):V=X,F){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=V+we,F={id:y++,callback:G,priorityLevel:F,startTime:V,expirationTime:we,sortIndex:-1},V>X?(F.sortIndex=V,t(m,F),r(d)===null&&F===r(m)&&(I?(v(B),B=-1):I=!0,pe(M,V-X))):(F.sortIndex=we,t(d,F),A||k||(A=!0,Fe(D))),F},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(F){var G=x;return function(){var V=x;x=G;try{return F.apply(this,arguments)}finally{x=V}}}})(C0);x0.exports=C0;var ZE=x0.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var E0=Z,$t=ZE;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var k0=new Set,Fo={};function qr(e,t){Ni(e,t),Ni(e+"Capture",t)}function Ni(e,t){for(Fo[e]=t,e=0;e<t.length;e++)k0.add(t[e])}var Un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kc=Object.prototype.hasOwnProperty,XE=/^[: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]*$/,ng={},rg={};function JE(e){return kc.call(rg,e)?!0:kc.call(ng,e)?!1:XE.test(e)?rg[e]=!0:(ng[e]=!0,!1)}function bE(e,t,r,o){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function e2(e,t,r,o){if(t===null||typeof t>"u"||bE(e,t,r,o))return!0;if(o)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function yt(e,t,r,o,l,s,c){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=l,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=c}var lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){lt[e]=new yt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];lt[t]=new yt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){lt[e]=new yt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){lt[e]=new yt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){lt[e]=new yt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){lt[e]=new yt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){lt[e]=new yt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){lt[e]=new yt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){lt[e]=new yt(e,5,!1,e.toLowerCase(),null,!1,!1)});var kf=/[\-:]([a-z])/g;function Lf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(kf,Lf);lt[t]=new yt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(kf,Lf);lt[t]=new yt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(kf,Lf);lt[t]=new yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){lt[e]=new yt(e,1,!1,e.toLowerCase(),null,!1,!1)});lt.xlinkHref=new yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){lt[e]=new yt(e,1,!1,e.toLowerCase(),null,!0,!0)});function If(e,t,r,o){var l=lt.hasOwnProperty(t)?lt[t]:null;(l!==null?l.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!==" Line truncated
`+Xa+e}var Ja=!1;function ba(e,t){if(!e||Ja)return"";Ja=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(m){var o=m}Reflect.construct(e,[],t)}else{try{t.call()}catch(m){o=m}e.call(t.prototype)}else{try{throw Error()}catch(m){o=m}e()}}catch(m){if(m&&o&&typeof m.stack=="string"){for(var l=m.stack.split(`
`),s=o.stack.split(`
`),c=l.length-1,f=s.length-1;1<=c&&0<=f&&l[c]!==s[f];)f--;for(;1<=c&&0<=f;c--,f--)if(l[c]!==s[f]){if(c!==1||f!==1)do if(c--,f--,0>f||l[c]!==s[f]){var d=`
`+l[c].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=c&&0<=f);break}}}finally{Ja=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Lo(e):""}function t2(e){switch(e.tag){case 5:return Lo(e.type);case 16:return Lo("Lazy");case 13:return Lo("Suspense");case 19:return Lo("SuspenseList");case 0:case 2:case 15:return e=ba(e.type,!1),e;case 11:return e=ba(e.type.render,!1),e;case 1:return e=ba(e.type,!0),e;default:return""}}function Tc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case gi:return"Fragment";case hi:return"Portal";case Lc:return"Profiler";case Rf:return"StrictMode";case Ic:return"Suspense";case Rc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case I0:return(e.displayName||"Context")+".Consumer";case L0:return(e._context.displayName||"Context")+".Provider";case Tf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Of:return t=e.displayName||null,t!==null?t:Tc(e.type)||"Memo";case ir:t=e._payload,e=e._init;try{return Tc(e(t))}catch{}}return null}function n2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Tc(t);case 8:return t===Rf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Sr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function T0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function r2(e){var t=T0(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var l=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(c){o=""+c,s.call(this,c)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(c){o=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lu(e){e._valueTracker||(e._valueTracker=r2(e))}function O0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=T0(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function Du(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Oc(e,t){var r=t.checked;return De({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function og(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=Sr(t.value!=null?t.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function A0(e,t){t=t.checked,t!=null&&If(e,"checked",t,!1)}function Ac(e,t){A0(e,t);var r=Sr(t.value),o=t.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Nc(e,t.type,r):t.hasOwnProperty("defaultValue")&&Nc(e,t.type,Sr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function lg(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Nc(e,t,r){(t!=="number"||Du(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Io=Array.isArray;function Li(e,t,r,o){if(e=e.options,t){t={};for(var l=0;l<r.length;l++)t["$"+r[l]]=!0;for(r=0;r<e.length;r++)l=t.hasOwnProperty("$"+e[r].value),e[r].selected!==l&&(e[r].selected=l),l&&o&&(e[r].defaultSelected=!0)}else{for(r=""+Sr(r),t=null,l=0;l<e.length;l++){if(e[l].value===r){e[l].selected=!0,o&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Pc(e,t){if(t.dan Line truncated
`).replace(pk,"")}function hu(e,t,r){if(t=Tg(t),Tg(e)!==t&&r)throw Error(H(425))}function Vu(){}var Qc=null,qc=null;function Kc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yc=typeof setTimeout=="function"?setTimeout:void 0,hk=typeof clearTimeout=="function"?clearTimeout:void 0,Og=typeof Promise=="function"?Promise:void 0,gk=typeof queueMicrotask=="function"?queueMicrotask:typeof Og<"u"?function(e){return Og.resolve(null).then(e).catch(mk)}:Yc;function mk(e){setTimeout(function(){throw e})}function dc(e,t){var r=t,o=0;do{var l=r.nextSibling;if(e.removeChild(r),l&&l.nodeType===8)if(r=l.data,r==="/$"){if(o===0){e.removeChild(l),Vo(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=l}while(r);Vo(t)}function hr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ag(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ui=Math.random().toString(36).slice(2),Cn="__reactFiber$"+Ui,Zo="__reactProps$"+Ui,jn="__reactContainer$"+Ui,Zc="__reactEvents$"+Ui,vk="__reactListeners$"+Ui,wk="__reactHandles$"+Ui;function Dr(e){var t=e[Cn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[jn]||r[Cn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Ag(e);e!==null;){if(r=e[Cn])return r;e=Ag(e)}return t}e=r,r=e.parentNode}return null}function sl(e){return e=e[Cn]||e[jn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function yi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function ws(e){return e[Zo]||null}var Xc=[],_i=-1;function Er(e){return{current:e}}function Ae(e){0>_i||(e.current=Xc[_i],Xc[_i]=null,_i--)}function Ie(e,t){_i++,Xc[_i]=e.current,e.current=t}var xr={},dt=Er(xr),Lt=Er(!1),jr=xr;function Pi(e,t){var r=e.type.contextTypes;if(!r)return xr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var l={},s;for(s in r)l[s]=t[s];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function It(e){return e=e.childContextTypes,e!=null}function Qu(){Ae(Lt),Ae(dt)}function Ng(e,t,r){if(dt.current!==xr)throw Error(H(168));Ie(dt,t),Ie(Lt,r)}function ym(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var l in o)if(!(l in t))throw Error(H(108,n2(e)||"Unknown",l));return De({},r,o)}function qu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xr,jr=dt.current,Ie(dt,e),Ie(Lt,Lt.current),!0}function Pg(e,t,r){var o=e.stateNode;if(!o)throw Error(H(169));r?(e=ym(e,t,jr),o.__reactInternalMemoizedMergedChildContext=e,Ae(Lt),Ae(dt),Ie(dt,e)):Ae(Lt),Ie(Lt,r)}var Dn=null,ys=!1,pc=!1;function _m(e){Dn===null?Dn=[e]:Dn.push(e)}function yk(e){ys=!0,_m(e)}function kr(){if(!pc&&Dn!==null){pc=!0;var e=0,t=Ce;try{var r=Dn;for(Ce=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}Dn=null,ys=!1}catch(l){throw Dn!==null&&(Dn=Dn.slice(e+1)),V0(Nf,kr),l}finally{Ce=t,pc=!1}}return null}var Si=[],xi=0,Ku=null,Yu=0,Zt=[],Xt=0,Hr=null,zn=1,$n="";function Br(e,t){Si[xi++]=Yu,Si[xi++]=Ku,Ku=e,Yu=t}function Sm(e,t,r){Zt[Xt++]=zn,Zt[Xt++]=$n,Zt[Xt++]=Hr,Hr=e;var o=zn;e=$n;var l=32-hn(o)-1;o&=~(1<<l),r+=1;var s=32-hn(t)+l;if(30<s){var c=l-l%5;s=(o&(1<<c)-1).toString(32),o>>=c,l-=c,zn=1<<32-hn(t)+l|r<<l|o,$n=s+e}else zn=1<<s|r<<l|o,$n=e}function Uf(e){e.return!==null&&(Br(e,1),Sm(e,1,0))}function jf(e){for(;e===Ku;)Ku=Si[--xi],Si[xi]=null,Yu=Si[--xi],Si[xi]=null;for(;e===Hr;)Hr=Zt[--Xt],Zt[Xt]=null,$n=Zt[--Xt],Zt[Xt]=null,zn=Zt[--Xt],Zt[Xt]=null}var zt=null,Dt=null,Pe=!1,pn=null;function xm(e,t){var r=Jt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Mg(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,zt=e,Dt=hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,zt=e,Dt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Hr!==null?{id:zn,overflow:$n}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Jt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,zt=e,Dt=null,!0):!1;default:return!1}}function Jc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function bc(e){if(Pe){var t=Dt;if(t){var r=t;if(!Mg(e,t)){if(Jc(e))throw Error(H(418));t=hr(r.nextSibling);var o=zt;t&&Mg(e,t)?xm(o,r):(e.flags=e.flags&-4097|2,Pe=!1,zt=e)}}else{if(Jc(e))throw Error(H(418));e.flags=e.flags&-4097|2,Pe=!1,zt=e}}}function Bg(e){for(e=e Line truncated
Error generating stack: `+s.message+`
`+s.stack}return{value:e,source:t,stack:l,digest:null}}function wc(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function rf(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Rk=typeof WeakMap=="function"?WeakMap:Map;function Zm(e,t,r){r=Fn(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){rs||(rs=!0,hf=o),rf(e,t)},r}function Xm(e,t,r){r=Fn(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var l=t.value;r.payload=function(){return o(l)},r.callback=function(){rf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){rf(e,t),typeof o!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var c=t.stack;this.componentDidCatch(t.value,{componentStack:c!==null?c:""})}),r}function Hg(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new Rk;var l=new Set;o.set(t,l)}else l=o.get(t),l===void 0&&(l=new Set,o.set(t,l));l.has(r)||(l.add(r),e=jk.bind(null,e,t,r),t.then(e,e))}function Gg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Vg(e,t,r,o,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Fn(-1,1),t.tag=2,gr(r,t,1))),r.lanes|=1),e)}var Tk=Qn.ReactCurrentOwner,kt=!1;function mt(e,t,r,o){t.child=e===null?Tm(t,null,r,o):Bi(t,e.child,r,o)}function Qg(e,t,r,o,l){r=r.render;var s=t.ref;return Oi(t,l),o=bf(e,t,r,o,s,l),r=ed(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Gn(e,t,l)):(Pe&&r&&Uf(t),t.flags|=1,mt(e,t,o,l),t.child)}function qg(e,t,r,o,l){if(e===null){var s=r.type;return typeof s=="function"&&!cd(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,Jm(e,t,s,o,l)):(e=Wu(r.type,null,o,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&l)){var c=s.memoizedProps;if(r=r.compare,r=r!==null?r:qo,r(c,o)&&e.ref===t.ref)return Gn(e,t,l)}return t.flags|=1,e=wr(s,o),e.ref=t.ref,e.return=t,t.child=e}function Jm(e,t,r,o,l){if(e!==null){var s=e.memoizedProps;if(qo(s,o)&&e.ref===t.ref)if(kt=!1,t.pendingProps=o=s,(e.lanes&l)!==0)e.flags&131072&&(kt=!0);else return t.lanes=e.lanes,Gn(e,t,l)}return of(e,t,r,o,l)}function bm(e,t,r){var o=t.pendingProps,l=o.children,s=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ie(ki,Wt),Wt|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ie(ki,Wt),Wt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=s!==null?s.baseLanes:r,Ie(ki,Wt),Wt|=o}else s!==null?(o=s.baseLanes|r,t.memoizedState=null):o=r,Ie(ki,Wt),Wt|=o;return mt(e,t,l,r),t.child}function ev(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function of(e,t,r,o,l){var s=It(r)?jr:dt.current;return s=Pi(t,s),Oi(t,l),r=bf(e,t,r,o,s,l),o=ed(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Gn(e,t,l)):(Pe&&o&&Uf(t),t.flags|=1,mt(e,t,r,l),t.child)}function Kg(e,t,r,o,l){if(It(r)){var s=!0;qu(t)}else s=!1;if(Oi(t,l),t.stateNode===null)Pu(e,t),Im(t,r,o),nf(t,r,o,l),o=!0;else if(e===null){var c=t.stateNode,f=t.memoizedProps;c.props=f;var d=c.context,m=r.contextType;typeof m=="object"&&m!==null?m=en(m):(m=It(r)?jr:dt.current,m=Pi(t,m));var y=r.getDerivedStateFromProps,w=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function";w||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(f!==o||d!==m)&&$g(t,c,o,m),or=!1;var x=t.memoizedState;c.state=x,Ju(t,o,c,l),d=t.memoizedState,f!==o||x!==d||Lt.current||or?(typeof y=="function"&&(tf(t,r,y,o),d=t.memoizedState),(f=or||zg(t,r,f,o,x,d,m))?(w||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=d),c.props=o,c.state=d,c.context=m,o=f):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{c=t.stateNode,km(e,t),f=t.memoizedProps,m=t.type===t.elementType?f:fn(t.type,f),c.props=m,w=t.pendingProps,x=c.context,d=r.contextType,typeof d=="object"&&d!==null?d=en(d):(d=It(r)?jr:dt.current,d=Pi(t,d));var k=r.getDerivedStateFromProps;(y=typeof k=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(f!==w||x!==d)&&$g(t,c,o,d),or=!1,x=t.memoizedState,c.state=x,Ju(t,o,c,l);var A=t.memoizedS Line truncated
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/us.exports;(function(e,t){(function(){var r,o="4.17.21",l=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",f="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",m=500,y="__lodash_placeholder__",w=1,x=2,k=4,A=1,I=2,N=1,v=2,_=4,C=8,M=16,D=32,U=64,O=128,B=256,b=512,Q=30,te="...",ie=800,oe=16,ce=1,se=2,Fe=3,pe=1/0,F=9007199254740991,G=17976931348623157e292,V=0/0,X=4294967295,we=X-1,Re=X>>>1,Ee=[["ary",O],["bind",N],["bindKey",v],["curry",C],["curryRight",M],["flip",b],["partial",D],["partialRight",U],["rearg",B]],Ye="[object Arguments]",Ze="[object Array]",Tt="[object AsyncFunction]",Hi="[object Boolean]",Gi="[object Date]",zv="[object DOMException]",pl="[object Error]",hl="[object Function]",_d="[object GeneratorFunction]",nn="[object Map]",Vi="[object Number]",$v="[object Null]",Ln="[object Object]",Sd="[object Promise]",Fv="[object Proxy]",Qi="[object RegExp]",rn="[object Set]",qi="[object String]",gl="[object Symbol]",Uv="[object Undefined]",Ki="[object WeakMap]",jv="[object WeakSet]",Yi="[object ArrayBuffer]",Zr="[object DataView]",Ts="[object Float32Array]",Os="[object Float64Array]",As="[object Int8Array]",Ns="[object Int16Array]",Ps="[object Int32Array]",Ms="[object Uint8Array]",Bs="[object Uint8ClampedArray]",Ws="[object Uint16Array]",Ds="[object Uint32Array]",Hv=/\b__p \+= '';/g,Gv=/\b(__p \+=) '' \+/g,Vv=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xd=/&(?:amp|lt|gt|quot|#39);/g,Cd=/[&<>"']/g,Qv=RegExp(xd.source),qv=RegExp(Cd.source),Kv=/<%-([\s\S]+?)%>/g,Yv=/<%([\s\S]+?)%>/g,Ed=/<%=([\s\S]+?)%>/g,Zv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xv=/^\w*$/,Jv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zs=/[\\^$.*+?()[\]{}|]/g,bv=RegExp(zs.source),$s=/^\s+/,e1=/\s/,t1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,n1=/\{\n\/\* \[wrapped with (.+)\] \*/,r1=/,? & /,i1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,o1=/[()=,{}\[\]\/\s]/,l1=/\\(\\)?/g,u1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kd=/\w*$/,s1=/^[-+]0x[0-9a-f]+$/i,a1=/^0b[01]+$/i,c1=/^\[object .+?Constructor\]$/,f1=/^0o[0-7]+$/i,d1=/^(?:0|[1-9]\d*)$/,p1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ml=/($^)/,h1=/['\n\r\u2028\u2029\\]/g,vl="\\ud800-\\udfff",g1="\\u0300-\\u036f",m1="\\ufe20-\\ufe2f",v1="\\u20d0-\\u20ff",Ld=g1+m1+v1,Id="\\u2700-\\u27bf",Rd="a-z\\xdf-\\xf6\\xf8-\\xff",w1="\\xac\\xb1\\xd7\\xf7",y1="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_1="\\u2000-\\u206f",S1=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Td="A-Z\\xc0-\\xd6\\xd8-\\xde",Od="\\ufe0e\\ufe0f",Ad=w1+y1+_1+S1,Fs="['’]",x1="["+vl+"]",Nd="["+Ad+"]",wl="["+Ld+"]",Pd="\\d+",C1="["+Id+"]",Md="["+Rd+"]",Bd="[^"+vl+Ad+Pd+Id+Rd+Td+"]",Us="\\ud83c[\\udffb-\\udfff]",E1="(?:"+wl+"|"+Us+")",Wd="[^"+vl+"]",js="(?:\\ud83c[\\udde6-\\uddff]){2}",Hs="[\\ud800-\\udbff][\\udc00-\\udfff]",Xr="["+Td+"]",Dd="\\u200d",zd="(?:"+Md+"|"+Bd+")",k1="(?:"+Xr+"|"+Bd+")",$d="(?:"+Fs+"(?:d|ll|m|re|s|t|ve))?",Fd="(?:"+Fs+"(?:D|LL|M|RE|S|T|VE))?",Ud=E1+"?",jd="["+Od+"]?",L1="(?:"+Dd+"(?:"+[Wd,js,Hs].join("|")+")"+jd+Ud+")*",I1="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",R1="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Hd=jd+Ud+L1,T1="(?:"+[C1,js,Hs].join("|")+")"+Hd,O1="(?:"+[Wd+wl+"?",wl,js,Hs,x1].join("|")+")",A1=RegExp(Fs,"g"),N1=RegExp(wl,"g"),Gs=RegExp(Us+"(?="+Us+")|"+O1+Hd,"g"),P1=RegExp([Xr+"?"+Md+"+"+$d+"(?="+[Nd,Xr,"$"].join("|")+")",k1+"+"+Fd+"(?="+[Nd,Xr+zd,"$"].join("|")+")",Xr+"?"+zd+"+"+$d,Xr+"+"+Fd,R1,I1,Pd,T1].join("|"),"g"),M1=RegExp("["+Dd+vl+Ld+Od+"]"),B1=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,W1=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],D1=-1,Te={};Te[Ts]=Te[Os]=Te[As]=Te[Ns]=Te[Ps]=Te[Ms]=Te[Bs]=Te[Ws]=Te[Ds]=!0,Te[Ye]=Te[Ze]=Te[Yi]=Te[Hi]=Te[Zr]=Te[Gi]=Te[pl]=Te[hl]=Te[nn]=Te[Vi]=Te[Ln]=Te[Qi]=Te[rn]=Te[qi]=Te[Ki]=!1;var Le={};Le[Ye]=Le[Ze]=Le[Yi]=Le[Zr]=Le[Hi]=Le[Gi]=Le[Ts]=Le[Os]=Le[As]=Le[Ns]=Le[Ps]=Le[nn]=Le[Vi]=Le[Ln]=Le[Qi]=Le[rn]=Le[qi]=Le[gl]=Le[Ms]=Le[Bs]=Le[Ws]=Le[Ds]=!0,Le[pl]=Le[hl]=Le[Ki]=!1;var z1={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",Line truncated
/* [wrapped with `+i+`] */
`)}function e_(n){return ue(n)||Mr(n)||!!(dp&&n&&n[dp])}function Nn(n,i){var u=typeof n;return i=i??F,!!i&&(u=="number"||u!="symbol"&&d1.test(n))&&n>-1&&n%1==0&&n<i}function ht(n,i,u){if(!Me(u))return!1;var a=typeof i;return(a=="number"?St(u)&&Nn(i,u.length):a=="string"&&i in u)?un(u[i],n):!1}function Aa(n,i){if(ue(n))return!1;var u=typeof n;return u=="number"||u=="symbol"||u=="boolean"||n==null||Pt(n)?!0:Xv.test(n)||!Zv.test(n)||i!=null&&n in ke(i)}function t_(n){var i=typeof n;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?n!=="__proto__":n===null}function Na(n){var i=ql(n),u=h[i];if(typeof u!="function"||!(i in ge.prototype))return!1;if(n===u)return!0;var a=Ra(u);return!!a&&n===a[0]}function n_(n){return!!sp&&sp in n}var r_=Cl?Pn:Ya;function so(n){var i=n&&n.constructor,u=typeof i=="function"&&i.prototype||ni;return n===u}function sh(n){return n===n&&!Me(n)}function ah(n,i){return function(u){return u==null?!1:u[n]===i&&(i!==r||n in ke(u))}}function i_(n){var i=bl(n,function(a){return u.size===m&&u.clear(),a}),u=i.cache;return i}function o_(n,i){var u=n[1],a=i[1],p=u|a,g=p<(N|v|O),S=a==O&&u==C||a==O&&u==B&&n[7].length<=i[8]||a==(O|B)&&i[7].length<=i[8]&&u==C;if(!(g||S))return n;a&N&&(n[2]=i[2],p|=u&N?0:_);var E=i[3];if(E){var T=n[3];n[3]=T?Vp(T,E,i[4]):E,n[4]=T?Zn(n[3],y):i[4]}return E=i[5],E&&(T=n[5],n[5]=T?Qp(T,E,i[6]):E,n[6]=T?Zn(n[5],y):i[6]),E=i[7],E&&(n[7]=E),a&O&&(n[8]=n[8]==null?i[8]:ut(n[8],i[8])),n[9]==null&&(n[9]=i[9]),n[0]=i[0],n[1]=p,n}function l_(n){var i=[];if(n!=null)for(var u in ke(n))i.push(u);return i}function u_(n){return kl.call(n)}function ch(n,i,u){return i=Qe(i===r?n.length-1:i,0),function(){for(var a=arguments,p=-1,g=Qe(a.length-i,0),S=P(g);++p<g;)S[p]=a[i+p];p=-1;for(var E=P(i+1);++p<i;)E[p]=a[p];return E[i]=u(S),Ot(n,this,E)}}function fh(n,i){return i.length<2?n:Ar(n,qt(i,0,-1))}function s_(n,i){for(var u=n.length,a=ut(i.length,u),p=_t(n);a--;){var g=i[a];n[a]=Nn(g,u)?p[g]:r}return n}function Pa(n,i){if(!(i==="constructor"&&typeof n[i]=="function")&&i!="__proto__")return n[i]}var dh=hh(Bp),ao=Cw||function(n,i){return tt.setTimeout(n,i)},Ma=hh(Ay);function ph(n,i,u){var a=i+"";return Ma(n,by(a,a_(Zy(a),u)))}function hh(n){var i=0,u=0;return function(){var a=Iw(),p=oe-(a-u);if(u=a,p>0){if(++i>=ie)return arguments[0]}else i=0;return n.apply(r,arguments)}}function Yl(n,i){var u=-1,a=n.length,p=a-1;for(i=i===r?a:i;++u<i;){var g=ma(u,p),S=n[g];n[g]=n[u],n[u]=S}return n.length=i,n}var gh=i_(function(n){var i=[];return n.charCodeAt(0)===46&&i.push(""),n.replace(Jv,function(u,a,p,g){i.push(p?g.replace(l1,"$1"):a||u)}),i});function _n(n){if(typeof n=="string"||Pt(n))return n;var i=n+"";return i=="0"&&1/n==-pe?"-0":i}function Pr(n){if(n!=null){try{return El.call(n)}catch{}try{return n+""}catch{}}return""}function a_(n,i){return Ht(Ee,function(u){var a="_."+u[0];i&u[1]&&!yl(n,a)&&n.push(a)}),n.sort()}function mh(n){if(n instanceof ge)return n.clone();var i=new Vt(n.__wrapped__,n.__chain__);return i.__actions__=_t(n.__actions__),i.__index__=n.__index__,i.__values__=n.__values__,i}function c_(n,i,u){(u?ht(n,i,u):i===r)?i=1:i=Qe(ae(i),0);var a=n==null?0:n.length;if(!a||i<1)return[];for(var p=0,g=0,S=P(Al(a/i));p<a;)S[g++]=qt(n,p,p+=i);return S}function f_(n){for(var i=-1,u=n==null?0:n.length,a=0,p=[];++i<u;){var g=n[i];g&&(p[a++]=g)}return p}function d_(){var n=arguments.length;if(!n)return[];for(var i=P(n-1),u=arguments[0],a=n;a--;)i[a-1]=arguments[a];return Yn(ue(u)?_t(u):[u],nt(i,1))}var p_=de(function(n,i){return Ue(n)?ro(n,nt(i,1,Ue,!0)):[]}),h_=de(function(n,i){var u=Kt(i);return Ue(u)&&(u=r),Ue(n)?ro(n,nt(i,1,Ue,!0),ee(u,2)):[]}),g_=de(function(n,i){var u=Kt(i);return Ue(u)&&(u=r),Ue(n)?ro(n,nt(i,1,Ue,!0),r,u):[]});function m_(n,i,u){var a=n==null?0:n.length;return a?(i=u||i===r?1:ae(i),qt(n,i<0?0:i,a)):[]}function v_(n,i,u){var a=n==null?0:n.length;return a?(i=u||i===r?1:ae(i),i=a-i,qt(n,0,i<0?0:i)):[]}function w_(n,i){return n&&n.length?Ul(n,ee(i,3),!0,!0):[]}function y_(n,i){return n&&n.length?Ul(n,ee(i,3),!0):[]}function __(n,i,u,a){var p=n==null?0:n.length;return p?(u&&typeof u!="number"&&ht(n,i,u)&&(u=0,a=p),dy(n,i,u,a)):[]}function vh(n,i,u){var a=n==null?0:n.length;if(!a)return-1;var p=u==null?0:ae(u);return p<0&&(p=Qe(a+p,0)),_l(n,ee(i,3),p)}function wh(n,i,u){var a=n==null?0:n.length;if(!a)return-1;var p=a-1;return u!==r&&(p=ae(u),p=u<0?Qe(a+p,0):ut(p,a-1)),_l(n,ee(i,3),p,!0)}function yh(n){var i=n==null?0:n.length;return i?nt(n,1):[]}function S_(n){var i=n==null?0:n.length;return i?nt(n,pe):[]}function x_(n,i){var u=n==null?0:n.length;return u?(i=i===r?1:ae(i),nt(n,i)):[]}function C_(n){for(var i=-1,u=n==null?0:n.length,a={};++i<u;){var p=n[i];a[p[0]]=p[1]}return a}function _h(n){return n&&n.length?n[0]:r}function E_(n,i,u){var a=n==null?0:n.length;if(!a)return-1;var p=u==null?0:ae(u);return p<0&&(p=Qe(a+p,0)),Jr(n,i,p)}function k_(n){var i=n==null?0:n.length;return i?qt(n,0,-1):[]}var L_=de(function(n){var i=Ne(n,Sa);return i.length&&i[0]===n[0]?fa(i):[]}),I_=d Line truncated
`;n.replace(q,function(re,he,ve,Mt,gt,Bt){return ve||(ve=Mt),j+=n.slice(z,Bt).replace(h1,rw),he&&(E=!0,j+=`' +
__e(`+he+`) +
'`),gt&&(T=!0,j+=`';
`+gt+`;
__p += '`),ve&&(j+=`' +
((__t = (`+ve+`)) == null ? '' : __t) +
'`),z=Bt+re.length,re}),j+=`';
`;var ne=xe.call(i,"variable")&&i.variable;if(!ne)j=`with (obj) {
`+j+`
}
`;else if(o1.test(ne))throw new le(f);j=(T?j.replace(Hv,""):j).replace(Gv,"$1").replace(Vv,"$1;"),j="function("+(ne||"obj")+`) {
`+(ne?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(E?", __e = _.escape":"")+(T?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+j+`return __p
}`;var fe=Kh(function(){return _e(g,J+"return "+j).apply(r,S)});if(fe.source=j,$a(fe))throw fe;return fe}function TC(n){return Se(n).toLowerCase()}function OC(n){return Se(n).toUpperCase()}function AC(n,i,u){if(n=Se(n),n&&(u||i===r))return rp(n);if(!n||!(i=Nt(i)))return n;var a=on(n),p=on(i),g=ip(a,p),S=op(a,p)+1;return tr(a,g,S).join("")}function NC(n,i,u){if(n=Se(n),n&&(u||i===r))return n.slice(0,up(n)+1);if(!n||!(i=Nt(i)))return n;var a=on(n),p=op(a,on(i))+1;return tr(a,0,p).join("")}function PC(n,i,u){if(n=Se(n),n&&(u||i===r))return n.replace($s,"");if(!n||!(i=Nt(i)))return n;var a=on(n),p=ip(a,on(i));return tr(a,p).join("")}function MC(n,i){var u=Q,a=te;if(Me(i)){var p="separator"in i?i.separator:p;u="length"in i?ae(i.length):u,a="omission"in i?Nt(i.omission):a}n=Se(n);var g=n.length;if(br(n)){var S=on(n);g=S.length}if(u>=g)return n;var E=u-ei(a);if(E<1)return a;var T=S?tr(S,0,E).join(""):n.slice(0,E);if(p===r)return T+a;if(S&&(E+=T.length-E),Fa(p)){if(n.slice(E).search(p)){var z,$=T;for(p.global||(p=na(p.source,Se(kd.exec(p))+"g")),p.lastIndex=0;z=p.exec($);)var j=z.index;T=T.slice(0,j===r?E:j)}}else if(n.indexOf(Nt(p),E)!=E){var q=T.lastIndexOf(p);q>-1&&(T=T.slice(0,q))}return T+a}function BC(n){return n=Se(n),n&&Qv.test(n)?n.replace(xd,cw):n}var WC=ui(function(n,i,u){return n+(u?" ":"")+i.toUpperCase()}),Ha=Yp("toUpperCase");function qh(n,i,u){return n=Se(n),i=u?r:i,i===r?ow(n)?pw(n):Z1(n):n.match(i)||[]}var Kh=de(function(n,i){try{return Ot(n,r,i)}catch(u){return $a(u)?u:new le(u)}}),DC=An(function(n,i){return Ht(i,function(u){u=_n(u),Tn(n,u,Da(n[u],n))}),n});function zC(n){var i=n==null?0:n.length,u=ee();return n=i?Ne(n,function(a){if(typeof a[1]!="function")throw new Gt(c);return[u(a[0]),a[1]]}):[],de(function(a){for(var p=-1;++p<i;){var g=n[p];if(Ot(g[0],this,a))return Ot(g[1],this,a)}})}function $C(n){return cy(Qt(n,w))}function Ga(n){return function(){return n}}function FC(n,i){return n==null||n!==n?i:n}var UC=Xp(),jC=Xp(!0);function Ct(n){return n}function Va(n){return Ip(typeof n=="function"?n:Qt(n,w))}function HC(n){return Tp(Qt(n,w))}function GC(n,i){return Op(n,Qt(i,w))}var VC=de(function(n,i){return function(u){return io(u,n,i)}}),QC=de(function(n,i){return function(u){return io(n,u,i)}});function Qa(n,i,u){var a=Xe(i),p=zl(i,a);u==null&&!(Me(i)&&(p.length||!a.length))&&(u=i,i=n,n=this,p=zl(i,Xe(i)));var g=!(Me(u)&&"chain"in u)||!!u.chain,S=Pn(n);return Ht(p,function(E){var T=i[E];n[E]=T,S&&(n.prototype[E]=function(){var z=this.__chain__;if(g||z){var $=n(this.__wrapped__),j=$.__actions__=_t(this.__actions__);return j.push({func:T,args:arguments,thisArg:n}),$.__chain__=z,$}return T.apply(n,Yn([this.value()],arguments))})}),n}function qC(){return tt._===this&&(tt._=yw),this}function qa(){}function KC(n){return n=ae(n),de(function(i){return Ap(i,n)})}var YC=Ea(Ne),ZC=Ea(Jd),XC=Ea(Ys);function Yh(n){return Aa(n)?Zs(_n(n)):Iy(n)}function JC(n){return function(i){return n==null?r:Ar(n,i)}}var bC=bp(),eE=bp(!0);function Ka(){return[]}function Ya(){return!1}function tE(){return{}}function nE(){return""}function rE(){return!0}function iE(n,i){if(n=ae(n),n<1||n>F)return[];var u=X,a=ut(n,X);i=ee(i),n-=X;for(var p=bs(a,i);++u<n;)i(u);return p}function oE(n){return ue(n)?Ne(n,_n):Pt(n)?[n]:_t(gh(Se(n)))}function lE(n){var i=++vw;return Se(n)+i}var uE=Gl(function(n,i){return n+i},0),sE=ka("ceil"),aE=Gl(function(n,i){return n/i},1),cE=ka("floor");function fE(n){return n&&n.length?Dl(n,Ct,ca):r}function dE(n,i){return n&&n.length?Dl(n,ee(i,2),ca):r}function pE(n){return tp(n,Ct)}function hE(n,i){return tp(n,ee(i,2))}function gE(n){return n&&n.length?Dl(n,Ct,ha):r}function mE(n,i){return n&&n.length?Dl(n,ee(i,2),ha):r}var vE=Gl(function(n,i){return n*i},1),wE=ka("round"),yE=Gl(function(n,i){return n-i},0);function _E(n){return n&&n.length?Js(n,Ct):0}function SE(n,i){return n&&n.length?Js(n,ee(i,2)):0}return h.after=HS,h.ary=Lh,h.assign=Ox,h.assignIn=Fh,h.assignInWith=ru,h.assignWith=Ax,h.at=Nx,h.before=Ih,h.bind=Da,h.bindAll=DC,h.bindKey=Rh,h.castArray=tx,h.chain=Ch,h.chunk=c_,h.compact=f_,h.concat=d_,h.cond=zC,h.conforms=$C,h.constant=Ga,h.countBy=_S,h.create=Px,h.curry=Th,h.curryRight=Oh,h.debounce=Ah,h.defaults=Mx,h.defaultsDeep=Bx,h.defer=GS,h.delay=VS,h.difference=p_,h.differenceBy=h_,h.differenceWith=g_,h.drop=m_,h.dropRight=v_,h.dropRightWhile=w_,h.dropWhile=y_,h.fill=__,h.filter=xS,h.flatMap=kS,h.flatMapDeep=LS,h.flatMapDepth=IS,h.flatten=yh,h.flattenDeep=S_,h.flattenDepth=x_,h.flip=QS,h.flow=UC,h.flowRight=jC,h.fromPairs=C_,h.functions=jx,h.functionsIn=Hx,h.groupBy=RS,h.initial=k_,h.intersection=L_,h.intersectionBy=I_,h.intersectionWith=R_,h.invert=Vx,h.invertBy=Qx,h.invokeMap=OS,h.iteratee=Va,h.keyBy=AS,h.keys=Xe,h.keysIn=xt,h.map=Xl,h.mapKeys=Kx,h.mapValues=Yx,h.matches=HC,h.matchesProperty=GC,h.memoize=bl,h.merge=Zx,h.mergeWith=Uh,h.method=VC,h.methodOf=QC,h.mixin=Qa,h.negate=eu,h.nthArg=KC,h.omit=Xx,h.omitBy=Jx,h.once=qS,h.orderBy=NS,h.over=YC,h.overArgs=KS,h.overEvery=ZC,h.overSome=XC,h.pa Line truncated
`;function sr({blocks:e=[],arrows:t=[],arrowId:r,rotate:o=!1,rotateNegative:l=!1,flip:s=!1,lines:c=[],children:f=[],includeInlineStyle:d=!1,effect:m,...y}){Z.useEffect(()=>m==null?void 0:m()),r=r||Math.floor(Math.random()*Math.pow(2,4*8)).toString(16),f?Symbol.iterator in f||(f=[f]):f=[],y.className||(y.className=""),y.className+=" cBuilderSvg";const w=()=>d?R.jsx("style",{children:bk}):R.jsx(R.Fragment,{});return R.jsxs("svg",{viewBox:"0 0 100 100",...y,children:[R.jsx(w,{}),R.jsxs("defs",{children:[R.jsx("marker",{id:`arrow_${r}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"2.5",markerHeight:"2.5",orient:"auto-start-reverse",fill:"currentColor",className:"cBuilderSvg__marker",markerUnits:"strokeWidth",children:R.jsx("path",{d:"M 0 0 L 10 5 L 0 10 Z"})}),R.jsx("clipPath",{id:`main_clip_${r}`,clipPathUnits:"userSpaceOnUse",children:R.jsx("rect",{x:5,y:5,width:90,height:90,rx:11.75})}),R.jsx("clipPath",{id:`clip1_${r}`,clipPathUnits:"userSpaceOnUse",children:R.jsx("path",{d:"M 0 0 L 25 0 L 25 100 L 0 100 Z"})}),R.jsx("clipPath",{id:`clip2_${r}`,clipPathUnits:"userSpaceOnUse",children:R.jsx("path",{d:"M72.5 0 L 97.5 0 L 97.5 100 L 72.5 100 Z"})}),R.jsx("clipPath",{id:`clip3_${r}`,clipPathUnits:"userSpaceOnUse",children:R.jsx("path",{d:"M75 25 L 80 25 A 5 5 0 0 0 85 30 L 85 80 A 5 5 0 0 0 80 85 L 30 85 A 5 5 0 0 0 25 80 L 25 75 L 70 75 A 5 5 0 0 0 75 70 Z"})}),R.jsx("clipPath",{id:`clip4_${r}`,clipPathUnits:"userSpaceOnUse",children:R.jsx("rect",{x:20,y:70,width:60,height:15,rx:5})})]}),R.jsx("g",{transform:o?void 0:`rotate(${l?"-":""}90)`,x:0,y:0,width:100,height:100,children:R.jsxs("g",{transform:o?void 0:`scale(${s?"1,-1":"1,1"})`,x:0,y:0,width:100,height:100,children:[R.jsx("rect",{width:95,height:95,x:2.5,y:2.5,rx:15,fill:"none",stroke:"none",strokeWidth:5,"data-role":"background"}),R.jsxs("g",{id:"mainarea",clipPath:`url(#main_clip_${r})`,children:[e.map((x,k)=>R.jsx("rect",{fill:"currentColor",rx:5,...x},k)),t.map(x=>R.jsx("path",{d:"M "+(x instanceof Array?x:x.points).map(({x:k,y:A})=>`${k} ${A}`).join(" L "),rx:20,fill:"none",strokeWidth:6,stroke:"currentColor",strokeLinejoin:"round",markerStart:["both","start"].includes(x.marker)?`url(#arrow_${r})`:void 0,markerEnd:["both","end",void 0].includes(x.marker)?`url(#arrow_${r})`:void 0,className:"cBuilderSvg__arrow"},JSON.stringify(x))),c.map(x=>R.jsx("path",{d:"M "+(x instanceof Array?x:x.points).map(({x:k,y:A})=>`${k} ${A}`).join(" L "),rx:20,fill:"none",strokeWidth:6,stroke:"currentColor",strokeLinejoin:"round",className:x.className||void 0},JSON.stringify(x))),f]}),R.jsx("rect",{width:95,height:95,x:2.5,y:2.5,rx:15,fill:"none",stroke:"currentColor",strokeWidth:5,"data-role":"outerborder"})]})})]})}function e3({pattern:e="start",horizontal:t=!0,...r}){const l=[{width:60},{width:80},{width:40}].map((s,c)=>({...s,height:23.4,className:"cBuilderSvg__box--outlined",y:5+90*c/3+1.3+2,x:(()=>e==="end"?97.5-s.width:e==="center"?50-s.width/2:2.5)()}));return R.jsx(sr,{blocks:l,rotate:t,...r})}function cn({...e}){return e.className=[e.className||"","cBuilderSvg__image-icon"].join(" ").trim().replace(/\s+/," "),R.jsxs("svg",{...e,viewBox:"0 0 90 90",children:[R.jsx("rect",{x:0,y:0,className:"cBuilderSvg__box--secondaryColoring",width:90,height:90,rx:10,fill:"currentColor"}),R.jsx("path",{d:"M4 86 L 25 28 L 55 68 L 69 50 L 84 86Z",stroke:"currentColor",strokeWidth:"6",fill:"currentColor",strokeLinejoin:"round"}),R.jsx("circle",{r:"10",cx:"70",cy:"20",fill:"currentColor",stroke:"currentColor"})]})}const So=[[{x:35,y:84},{x:16,y:84}],[{x:65,y:84},{x:84,y:84}]];function t3({behavior:e="wrap",horizontal:t=!1,...r}){r.className=r.className||"",r.className+=" cBuilderSvg--wrap-icon";const o=[],l=[],s=[];let c=4,f=c,d=[57,31],m,y,w,x,k,A;switch(e){case"carousel":o.push({width:15,height:40,x:0,y:20,className:"cBuilderSvg__box--outlined"}),o.push({width:66,height:60,x:17,y:10,className:"cBuilderSvg__box--outlined"}),o.push({width:15,height:40,x:85,y:20,className:"cBuilderSvg__box--outlined"}),o.push({height:3,width:40,y:25,x:22,rx:0}),o.push({height:3,width:30,y:32,x:22,rx:0}),o.push({height:3,width:52,y:39,x:22,rx:0}),o.push({height:3,width:22,y:46,x:22,rx:0}),l.push([{x:35,y:84},{x:16,y:84}]),l.push([{x:65,y:84},{x:84,y:84}]);break;case"table":case"table-carousel":c=1.3,w=e==="table-carousel"?78:70,x=e==="table-carousel"?11:15,m=e==="table-carousel"?20:0,y=e==="table-carousel"?1:3;for(let I=0;I<y;I++)o.push({height:85/3-4-2*c,width:w,y:7.5+85*I/3+c+2+m,x,className:"cBuilderSvg__box--outlined"});e==="table-carousel"&&l.splice(0,0,...So.map(I=>I.map(N=>({x:N.x,y:N.y-15}))));break;case"mini-grid":case"grid-carousel":case"mini-grid-carousel":case"grid":k=e.startsWith("mini")?3:2,y=e.startsWith("mini")?3:2,A=88,m=e==="grid-carousel"?7:0,e.startsWith("mini")&&(f=10,c=5),e==="grid-carousel"&&(y=1,k=3),e.endsWith("carousel")&&(A=e.startsWith("mini")?68:54,l.splice(l.length,0,...So.map(I=>I.map(N=>({x:N.x,y:N.y-5}))))),e==="mini-grid"&&(m=10,A=68),e==="mini-grid-carousel"& Line truncated
<div
class="ipsLoading"
style="width:${oe.width}px; height:${oe.height}px; position:static !important;"
>
<div class="ipsRichText ipsWidget__content ipsWidget__padding">
${ie}
</div>
</div>`)}else c.current.style.height=`${oe.height}px`,c.current.style.width=`${oe.width}px`;setTimeout(async()=>{let se;try{se=await window.ips.fetch(U.action,{data:b,method:"post",bypassRedirect:!0})}catch(Fe){window.Debug.error(Fe)}_.hide(),D.remove(),t("default"),d({}),s(se)},100)})),_.addContentProcessor(U=>{var b,Q;const O=(b=D.parentElement)==null?void 0:b.getBoundingClientRect();if(O){const te=D.parentElement;te.style.width=O.width+"px",te.style.height=O.height+"px";const ie=(Q=U.closest(".ipsDialog"))==null?void 0:Q.getAttribute("id");if(ie){const oe=(ce,{dialogID:se})=>{ie===se&&(te.style.width="",te.style.height="",te.appendChild(D),N(D),window.$(document).off("hideDialog",oe))};window.$(document).on("hideDialog",oe)}}let B=D;for(;B;){if(B.parentElement===U)return;B=B.parentElement}U.innerHTML="",U.appendChild(D),N(D,!0)}),d({element:D,configId:M,dialogRef:_})}t("editing")}}}}function rl(e){return(e instanceof Element?e:document).querySelector("[data-ipsconfigform]")}function L3(e){return!1}function I3({blockID:e,title:t,config:r,update:o,defaultConfiguration:l,blank:s,getArea:c,contentRaw:f,selectArea:d},m){const[y,w]=Z.useState("default"),x=Z.useRef(null),k=Q=>{y==="default"&&Q==="editing"&&e.startsWith("app_cms_Wysiwyg")&&(_==null||_()),w(Q)};let A=!1;const{area:I}=Z.useContext(Yr),{setEditing:N,editForm:v,captureHeight:_,blockUsesInlineEditing:C,toolList:M,tiptapRef:D,toolListWrap:U}=k3({blockID:e,setState:k,state:y,blockArea:I,title:t,reloadContent:B,contentRaw:f},m);Z.useEffect(()=>{if(y==="default"){const Q=e.split("_");(!Q[3]||s)&&(A=!Q[3],A&&(e+=`_${Math.random().toString(36).slice(2,9)}`),B(),k("loading"))}}),Z.useEffect(()=>{var Q;r&&x.current&&((Q=x.current)==null?void 0:Q.dataset.menuListenerSet)!=="true"&&(x.current.dataset.menuListenerSet="true",window.$(document).trigger("contentChange",[window.$(x.current.parentElement)]),x.current.addEventListener("ipsMenuOpened",async te=>{if(await new Promise(oe=>setTimeout(oe,1)),C){await d(),b(),await N();return}let ie=`${window.ips.getSetting("baseURL")}index.php?${Object.entries(fl()).map(([oe,ce])=>`${encodeURIComponent(oe)}=${encodeURIComponent(ce)}`).join("&")}&do=getConfiguration&block=${encodeURIComponent(e)}&pageApp=${encodeURIComponent(document.body.dataset.pageapp)}&pageModule=${encodeURIComponent(document.body.dataset.pagemodule)}&pageController=${encodeURIComponent(document.body.dataset.pagecontroller)}&pageArea=${encodeURIComponent(I)}&area=${encodeURIComponent(I)}`;try{if(await R3(),O()==="modal"){b();const oe=window.ips.ui.dialog.create({title:t,url:ie,forceReload:!0,destructOnClose:!0,remoteSubmit:!0});oe.show(),document.querySelectorAll(`[id="${e}_edit_menu"]`).ipsHide();const ce=qn.throttle(se=>{se.dialogID===oe.dialogID&&(se.stopImmediatePropagation(),se.preventDefault(),B(se.response))},200);document.addEventListener("dialogSubmission",ce,{once:!0})}else te.menu.html(window.$("<div/>").addClass("ipsLoading").css({height:"100px"})),setTimeout(async()=>{const oe=await window.ips.fetch(ie),ce=te.menu.get(0);if(ce.id)for(const se of document.querySelectorAll(`[id="${ce.id}"]`))se!==ce&&se.remove();te.menu.html(oe).find("form").on("submit",async se=>{var Fe;se.preventDefault();try{const pe=await window.ips.fetch(window.$(se.currentTarget).attr("action"),{data:window.$(se.currentTarget).serialize(),type:"post"});typeof pe=="object"||((Fe=pe==null?void 0:pe.toLowerCase)==null?void 0:Fe.call(pe))==="ok"?(await B(pe),te.menu.trigger("closeMenu")):typeof pe=="string"&&te.menu.html(pe)}catch(pe){window.Debug.warn(pe),window.ips.ui.alert.show({type:"alert",icon:"warn",message:window.ips.getString("sidebarConfigError"),callbacks:{}})}}),te.menu.trigger("contentChange",[te.menu])},10);document.body.dispatchEvent(new ss(null))}catch(oe){window.Debug.warn(oe),window.ips.ui.alert("Something went wrong when loading the configuration settings")}await d()}))});function O(){var Q;return((Q=Vn(e))==null?void 0:Q.dataset.menustyle)||"none"}async function B(Q){const te={blockID:e,title:t,config:r,blank:!1,contentRaw:"Error"};(Q==null?void 0:Q.areaClasses)instanceof Array&&(te.areaClasses=Array.from(new Set(Q.areaClasses)));try{const ie=await Mv(e,l,I,A,c().wrapBehavior);te.contentRaw=ie,te.defaultConfiguration=void 0,o==null||o(te),k("default")}catch(ie){o==null||o(te),k("contentLoadError"),window.Debug.log("something went wrong when loading a block's content."),window.Debug.error(ie)}}function b(){document.querySelectorAll(`[id="${e}_edit_menu"]`).ipsHide()}return{reloadContent:B,state:y,setState:k,editForm:v,blockUsesInlineEditing:C,manageBlockRef:x,toolList:M,tiptapRef:D,toolListWrap:U}}function dl(e){return e.split("_").slice(0,3).join("_")}function Vn(e){if(typeof e!="string")return window.Debug.warn("Could not get a block base because the id is not a string"),null;const t=dl(e);return t?document.querySelector(`[data-role="availableBlocks"] :is([data-blockID="${t}"],[data-blockID*="${t}_"])`):(window.Debug.warn(`The block id ${JSON.stringifLine truncated
`)),await window.ips.ui.editorv5.whenLoaded();const se=document.createElement("div");se.setAttribute("hidden",""),document.body.appendChild(se);const[Fe,pe]=await window.ips.utils.tiptap.editorInstance(se,{...window.ips.ui.editorv5.buildConfig({}),content:ce});if(await new Promise(F=>setTimeout(F)),ce=Fe.getHTML(),Fe.destroy(),pe.unmount(),se.remove(),ce){O={orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:"table",otherOptions:{},widgets:[{title:"WYSIWYG Editor",blockID:"app_cms_Wysiwyg",config:!0,blank:!1,contentRaw:ce,defaultConfiguration:{content:ce}}]};break}throw new Error(`The data from the drop event did not include ${oe}, so the block could not be inserted in the widget area tree`)}const b=(B==null?void 0:B.blockID)||((A=O==null?void 0:O.widgets)==null?void 0:A[0].blockID),Q=b?Vn(b):null;if(new Set(((N=(I=Q==null?void 0:Q.dataset)==null?void 0:I.widgetDisallowedAreas)==null?void 0:N.split(",").map(oe=>oe.trim()))||[]).has(w)){document.querySelectorAll("section.cWidgetContainer:not([data-controller])").forEach(oe=>{oe.removeAttribute("hidden"),oe.querySelectorAll(":scope > .cWidgetContainer__menu_region").forEach(ce=>ce.style.display="")});return}const ie=y.current;if(ie){if(B.blockID.startsWith("app_cms_Blocks:")){const F=Vn(B.blockID),G=F==null?void 0:F.dataset.customblockid;if(!G)throw new Error("The dropped block is a custom block but the block id is invalid");const V=await window.ips.fetch(window.ips.getSetting("baseURL"),{method:"get",data:{app:"cms",module:"pages",controller:"builder",do:"getCustomBlockContent",id:G}});if(typeof V.content!="string"||typeof V.block_key!="string"||typeof((v=V.configuration)==null?void 0:v.blocktitle)!="string")throw new TypeError("Could not add a custom block because the server didn't return a string for it's content, blocktitle data attribute, or block key (as in the key of the custom block)");B.contentRaw=V.content,B.defaultConfiguration={cms_widget_custom_block:V.block_key},B.blockID=`app_cms_Blocks_${Math.round(Math.random()*Math.pow(16,8)).toString(16)}`,B.blockTitle=V.configuration.blocktitle}const oe=Av(ie,k.clientX,k.clientY),ce=B.areaDetails,se={title:B.blockTitle,blockID:B.blockID,config:B.config,blank:B.blank,contentRaw:B.contentRaw||"<div class='ipsLoading'></div>"};B.defaultConfiguration&&(se.defaultConfiguration=se.configuration=B.defaultConfiguration),O=O||{orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:(ce==null?void 0:ce.wrapBehavior)||B.ipsWrapBehavior||((M=(C=(_=yd(B.blockID))==null?void 0:_.values())==null?void 0:C.next())==null?void 0:M.value)||"table",otherOptions:{...ce==null?void 0:ce.otherOptions},widgets:[se]};const Fe=await Bv(),pe=[];if(Number.isInteger(B==null?void 0:B.areaId)&&B.area===w&&B.pageHash===Fe&&pe.push(B.areaId),pe.includes(f))return;if(dl(O.widgets[0].blockID)===O.widgets[0].blockID){O.widgets[0].blockID+="_";for(let F=0;F<6;F++)O.widgets[0].blockID+=Math.round(Math.random()*16).toString(16);O.widgets[0].contentRaw=await Mv(O.widgets[0].blockID,O.widgets[0].defaultConfiguration,w,!0,O.wrapBehavior),O.widgets[0].blank=!1}if((D=y==null?void 0:y.current)!=null&&D.closest(".cWidgetContainer--carousel")&&O.wrapBehavior in be&&(O.wrapBehavior=be[O.wrapBehavior],O.widgets.length&&(O.widgets[0].blank=!0,O.widgets[0].contentRaw=`<div class="ipsLoading">${O.widgets[0].contentRaw||""}</div>`)),["before","after"].includes(oe))O.orientation=e,c==null||c(O,oe==="before",pe);else if(!t.length&&s.length){const F={orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:r,otherOptions:l,widgets:s,areaId:f};o({newState:{children:oe===0?[O,F]:[F,O],wrapBehavior:"wrap",widgets:[],otherOptions:{}},toRemove:pe})}else t.splice(oe,0,O),o({newState:{children:t},toRemove:pe});(U=y.current)==null||U.dispatchEvent(new il({widget:O.widgets[0],area:w}))}}catch(O){window.Debug.warn(O),window.Debug.log("Could not insert the content dropped inside a widget area"),window.ips.ui.alert.show({message:"This content cannot be dropped in the page"})}document.querySelectorAll("section.cWidgetContainer:not([data-controller])").forEach(O=>{O.removeAttribute("hidden"),O.querySelectorAll(":scope > .cWidgetContainer__menu_region").forEach(B=>B.style.display="")})},onDragOver:k=>{k.preventDefault(),k.stopPropagation(),W3({e:k,ref:y,orientation:e,wrapBehavior:r,getParent:d,children:t,clientX:k.clientX,clientY:k.clientY,blockArea:w})}}}function M3(e,t){if(e!=null&&e.classList.contains("cWidgetContainer--dragInside")){const r=e.getBoundingClientRect();let o;if(e.scrollWidth<=r.width)return!1;if(t<r.left+Math.min(r.width/10,70))o="prev";else if(t>r.right-Math.max(r.width/10,70))o="next";else return!1;if(o&&!window.ips.ui.carousel.containerAtEnd(e,o))return B3(e,o),!0}return!1}const B3=qn.throttle((e,t)=>{e.dispatchEvent(new CustomEvent("scrollPanels",{detail:{direction:t,loop:!1}}))},1e3),W3=qn.throttle(function({ref:e,orientation:t,wrapBehavior:r,getParent:o,children:l,clientX:s,clientY:c,Line truncated
`+k.message,window.Debug.warn(k)}}},200);function pi(e,t,r=400){var o;rt.has(e)||rt.set(e,new Map);for(const l of t.split(/\s+/).filter(s=>!!s)){rt.get(e).has(l)&&(clearTimeout(rt.get(e).get(l)),rt.get(e).delete(l)),e.classList.add(l),document.querySelectorAll(`.${l}`).forEach(c=>{var f;if(c!==e){c.classList.remove(l);const d=(f=rt.get(c))==null?void 0:f.get(l);d&&(clearTimeout(d),rt.get(c).delete(l))}});const s=setTimeout(()=>{var f;e.classList.remove(l);const c=(f=rt.get(e))==null?void 0:f.get(l);c&&(clearTimeout(c),rt.get(e).delete(l),rt.get(e).size||rt.delete(e))},r);rt.get(e).set(l,s)}(o=rt.get(e))!=null&&o.size||rt.delete(e)}setInterval(()=>{for(const e of rt.keys())if(e.closest("body")!==document.body){for(const t of rt.get(e).values())clearTimeout(t);rt.delete(e)}},5e3);const rt=new Map;function D3({wrapBehavior:e,widgets:t,scrollRef:r}){const o=Z.useRef(null),l=e==="carousel"&&!t.length;Z.useEffect(()=>{if(l&&(d(),r.current)){const y=r.current;fs.set(y,d);const w=k=>{var M;const[A,I,N]=c(),v=((M=k==null?void 0:k.detail)==null?void 0:M.direction)||"next",_=v!=="prev"&&(A>=I-1||N[I-1].getBoundingClientRect().right<=y.getBoundingClientRect().right);if(v==="prev"&&A===0||v!=="prev"&&_)return;const C=y.querySelector(`[data-carousel-arrow="${v}"]`);C instanceof HTMLElement&&m({target:C})};y.addEventListener("scrollPanels",w);const x=new ResizeObserver(qn.debounce(d,100));return x.observe(r.current),()=>{fs.delete(y),y.removeEventListener("scrollPanels",w),x.disconnect()}}});function s(){var y;return(y=r.current)!=null&&y.classList.contains("cWidgetContainer--carousel")?r.current:null}function c(){var I;const y=s(),w=y==null?void 0:y.querySelectorAll(":scope > .cWidgetContainer");if(!w)throw new ReferenceError;const x=w.length;if(_f.has(y))return[parseInt(((I=o.current)==null?void 0:I.dataset.actualOffset)||"0"),x,w];const k=y.getBoundingClientRect();let A;for(A=0;A<x;A++)if(w[A].getBoundingClientRect().left>=k.left-1)return[A,x,w];return[x-1,x,w]}function f(){var k,A;const y=(k=r.current)==null?void 0:k.getBoundingClientRect(),w=(A=r.current)==null?void 0:A.querySelectorAll(":scope > .cWidgetContainer");if(!y||!(w!=null&&w.length)||w.length===1)return 1;const x=Math.abs(w[w.length-1].getBoundingClientRect().right-w[0].getBoundingClientRect().left);if(x){let I=Math.ceil(x/y.width);return w.length>2&&w[w.length-1].getBoundingClientRect().right-w[w.length-2].getBoundingClientRect().left>y.width&&I++,I}return 1}function d(){if(!o.current)return;let[y,w]=c();const x=f();y=Math.min(y,x),w=Math.min(w,x),o.current.innerText=`${y+1}/${w}`,o.current.closest(".cWidgetContainer__carousel-buttons").querySelectorAll("button").forEach(k=>w<=1?k.setAttribute("disabled",""):k.removeAttribute("disabled"))}function m(y){const w=s();if(!w)return;const x=y.target instanceof HTMLElement&&y.target.dataset.carouselArrow||"next",[k,A,I]=c();if(I.length<=1)return;const N=w.getBoundingClientRect(),v=x!=="prev"&&(k+1>=A||I[A-1].getBoundingClientRect().right<=N.right),_=(x==="prev"&&k===0?A-1:v?0:k+(x==="prev"?-1:1))%A;let C=(_===A-1?I[_].getBoundingClientRect().right:I[_].getBoundingClientRect().left)-N.left;o.current.dataset.actualOffset=`${_}`,_f.add(w),w.scrollTo({left:r.current.scrollLeft+C,behavior:"smooth"}),d()}return{indicatorRef:o,scroll:m}}const _f=new WeakSet,fs=new WeakMap;function Wv(e,t=!1){var r,o;if((r=e.classList)!=null&&r.contains("cWidgetContainer--carousel")&&e.querySelector(".ipsWidget__content--wrap--editing")){const l=e.querySelector(".ipsWidget__content--wrap--editing"),s=(o=window.ips.ui.editorv5.getObj(window.$(l.querySelector("[data-ipseditorv5]"))))==null?void 0:o.getInstance();t?l==null||l.dispatchEvent(new CustomEvent("ips:editorHidePanes",{detail:{instance:s},bubbles:!0,cancelable:!0})):l.dispatchEvent(new CustomEvent("ips:editorShowPanes",{detail:{instance:s},bubbles:!0,cancelable:!0}))}}function c0(e){let t=e.target;for(;t instanceof HTMLElement;){if(Wv(t),fs.has(t)){let r=!1;const o=e.stopPropagation;if(e.stopPropagation=(function(){r=!0,o.call(this)}).bind(e),fs.get(t)(e),_f.delete(t),r)break;e.stopPropagation=o.bind(e)}t=t.parentElement}}"onscrollend"in HTMLElement.prototype?window.addEventListener("scrollend",c0,{capture:!0}):window.addEventListener("scroll",qn.debounce(c0,200),{capture:!0});window.addEventListener("scroll",e=>{var r;let t=e.target;(r=t==null?void 0:t.classList)!=null&&r.contains("cWidgetContainer--carousel")&&Wv(t,!0)},{capture:!0});function z3({widgets:e,scrollRef:t,wrapBehavior:r}){const{indicatorRef:o,scroll:l}=D3({widgets:e,scrollRef:t,wrapBehavior:r});return R.jsxs("div",{className:"cWidgetContainer__carousel-buttons","data-controller":"core.front.widgets.carouselControls",children:[R.jsx("div",{className:"cWidgetContainer__carousel-indicator",ref:o}),[["prev","left"],["next","right"]].map(([s,c])=>R.jsx("button",{onClick:l,"data-carousel-arrow":s,children:R.jsx("i",{className:`fa-solid fa-chevron-${c}`})},s))]})}function Dv({...e}){var O,B,b,Q,te,ie,oe,ce,se,Fe,pe;const{ Line truncated
@@ -0,0 +1,26 @@
Copyright (c) 2022-2023 OddBird
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,193 @@
# Popover Attribute Polyfill
[![Build Status](https://github.com/oddbird/popover-polyfill/actions/workflows/test.yml/badge.svg)](https://github.com/oddbird/popover-polyfill/actions/workflows/test.yml) [![npm version](https://badge.fury.io/js/@oddbird%2Fpopover-polyfill.svg)](https://badge.fury.io/js/@oddbird%2Fpopover-polyfill) [![Netlify Status](https://api.netlify.com/api/v1/badges/35bc7ba7-97a2-4e41-93ed-5141988adb1e/deploy-status)](https://app.netlify.com/sites/popover-polyfill/deploys)
- [Demo](https://popover.oddbird.net/)
- [Explainer](https://open-ui.org/components/popover.research.explainer/)
This polyfills the HTML `popover` attribute and
`showPopover`/`hidePopover`/`togglePopover` methods onto HTMLElement, as well as
the `popovertarget` and `popovertargetaction` attributes on Button elements.
## Polyfill Installation
### Download a copy
The simplest, recommended way to install the polyfill is to copy it into your
project.
Download `popover.js` (or `popover.min.js`) [from
unpkg.com](https://unpkg.com/browse/@oddbird/popover-polyfill/dist/) and add it
to the appropriate directory in your project. Then, include it where necessary
with a `<script>` tag:
```html
<script src="/path/to/popover.min.js" type="module"></script>
```
Or without [JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules):
```html
<script src="/path/to/popover.iife.min.js"></script>
```
Note that the JS will inject CSS styles into your document (or ShadowRoot).
### With npm
For more advanced configuration, you can install with
[npm](https://www.npmjs.com/):
```sh
npm install @oddbird/popover-polyfill
```
After installing, you’ll need to use appropriate tooling to use
`node_modules/@oddbird/popover-polyfill/dist/popover.js`.
For most tooling such as Vite, Webpack, and Parcel, that will look like this:
```js
import '@oddbird/popover-polyfill';
```
If you want to manually apply the polyfill, you can instead import the
`isSupported` and `apply` functions directly from
`node_modules/@oddbird/popover-polyfill/dist/popover-fn.js` file.
With most tooling:
```js
import { apply, isSupported } from '@oddbird/popover-polyfill/fn';
```
Or in CommonJS environments:
```js
const { apply, isSupported } = require('@oddbird/popover-polyfill/fn');
```
An `isPolyfilled` function is also available, to detect if the Popover methods
have been polyfilled:
```js
import { isPolyfilled } from '@oddbird/popover-polyfill/fn';
```
### Via CDN
For prototyping or testing, you can use the npm package via a Content Delivery
Network. Avoid using JavaScript CDNs in production, for [many good
reasons](https://blog.wesleyac.com/posts/why-not-javascript-cdn) such as
performance and robustness.
```html
<script
src="https://cdn.jsdelivr.net/npm/@oddbird/popover-polyfill@latest"
crossorigin="anonymous"
defer
></script>
```
## Usage
After installation the polyfill will automatically add the correct methods and
attributes to the HTMLElement class.
## Caveats
This polyfill is not a perfect replacement for the native behavior; there are
some caveats which will need accommodations:
- A native `popover` has a `:popover-open` pseudo selector when in the open
state. Pseudo selectors cannot be polyfilled within CSS, and so instead the
polyfill will add the `.\:popover-open` CSS class to any open popover. In
other words a popover in the open state will have `class=":popover-open"`. In
CSS the `:` character must be escaped with a backslash.
- The `:popover-open` selector within JavaScript methods has been polyfilled,
so both `.querySelector(':popover-open')` _and_
`.querySelector('.\:popover-open')` will work to select the same element.
`matches` and `closest` have also been patched, so
`.matches(':popover-open')` will work the same as
`.matches('.\:popover-open')`.
- Using native `:popover-open` in CSS that does not support native `popover`
results in an invalid selector, and so the entire declaration is thrown
away. This is important because if you intend to style a popover using
`.\:popover-open` it will need to be a separate declaration. For example,
`[popover]:popover-open, [popover].\:popover-open` will not work.
- Native `popover` elements use the `:top-layer` pseudo element which gets
placed above all other elements on the page, regardless of overflow or
z-index. This is not possible to polyfill, and so this library simply sets a
really high `z-index`. This means if a popover is within an element that has
`overflow:` or `position:` CSS, then there will be visual differences between
the polyfill and the native behavior.
- Native _invokers_ (that is, buttons or inputs using the `popovertarget`
attribute) on `popover=auto` will render in the accessibility tree as elements
with `expanded`. The only way to do this in the polyfill is setting the
`aria-expanded` attribute on those elements. This _may_ impact mutation
observers or frameworks which do DOM diffing, or it may interfere with other
code which sets `aria-expanded` on elements.
- The polyfill uses `adoptedStyleSheets` to inject CSS onto the page (and each
Shadow DOM). If it can't use that it'll generate a `<style>` tag instead. This
means you may see a `<style>` tag you didn't put there, and this _may_ impact
mutation observers or frameworks.
- For browsers which don't support `adoptedStyleSheets` on Shadow Roots, if
you are building a ShadowRoot by setting `.innerHTML`, you'll remove the
StyleSheet. Either polyfill `adoptedStyleSheets` or call
`injectStyles(myShadow)` to add the styles back in.
- Similarly, if you're using Declarative ShadowDOM or otherwise creating a
shadow root without calling `attachShadow`/`attachInternals`, then the
polyfill won't inject the styles (because it can't reference the
`shadowRoot`). You'll need to manually inject the styles yourself with
`injectStyles(myShadow)`.
- As a stylesheet is injected into the main document, if your host element is
a popover, styling with `:host` gets tricky beause `:host` styles always
take lower precedence than the main document styles. This is a limitation
of CSS and there's not a reasonable workaround. The best workaround for
now is to add `!important` to conflicting properties in your `:host` rule.
See [#147](https://github.com/oddbird/popover-polyfill/issues/147) for more.
- Given that the CSS is injected using JavaScript, you may find that you
temporarily see popovers as open while the JS is loading. To work around
this, you can add the following CSS to your project:
```css
@supports not selector(:popover-open) {
[popover]:not(.\:popover-open) {
display: none;
}
}
```
- When supported, the polyfill creates a cascade layer named `popover-polyfill`.
If your styles are not in layers then this should have no impact. If your
styles do use layers, you'll need to ensure the polyfill layer is declared
first. (e.g. `@layer popover-polyfill, other, layers;`)
- The polyfill will not work in browsers with partial popover support enabled,
and will also not attempt to make experimental support match the final spec.
## Contributing
Visit our [contribution guidelines](https://github.com/oddbird/popover-polyfill/blob/main/CONTRIBUTING.md).
## Sponsor OddBird's OSS Work
At OddBird, we love contributing to the languages & tools developers rely on.
We're currently working on polyfills
for new Popover & Anchor Positioning functionality,
as well as CSS specifications for functions, mixins, and responsive typography.
Help us keep this work sustainable
and centered on your needs as a developer!
We display sponsor logos and avatars
on our [website](https://www.oddbird.net/polyfill/#open-source-sponsors).
[Sponsor OddBird's OSS Work](https://opencollective.com/oddbird-open-source)
@@ -0,0 +1,69 @@
(function(){
var c=class extends Event{oldState;newState;constructor(t,{oldState:o="",newState:r="",...i}={}){super(t,i),this.oldState=String(o||""),this.newState=String(r||"")}},N=new WeakMap;function P(e,t,o){N.set(e,setTimeout(()=>{N.has(e)&&e.dispatchEvent(new c("toggle",{cancelable:!1,oldState:t,newState:o}))},0))}var x=globalThis.ShadowRoot||function(){},V=globalThis.HTMLDialogElement||function(){},b=new WeakMap,p=new WeakMap,h=new WeakMap;function y(e){return h.get(e)||"hidden"}var L=new WeakMap;function O(e){let t=e.popoverTargetElement;if(!(t instanceof HTMLElement))return;let o=y(t);e.popoverTargetAction==="show"&&o==="showing"||e.popoverTargetAction==="hide"&&o==="hidden"||(o==="showing"?v(t,!0,!0):f(t,!1)&&(L.set(t,e),H(t)))}function f(e,t){return!(e.popover!=="auto"&&e.popover!=="manual"||!e.isConnected||t&&y(e)!=="showing"||!t&&y(e)!=="hidden"||e instanceof V&&e.hasAttribute("open")||document.fullscreenElement===e)}function F(e){return e?Array.from(p.get(e.ownerDocument)||[]).indexOf(e)+1:0}function $(e){let t=W(e),o=U(e);return F(t)>F(o)?t:o}function M(e){let t=p.get(e);for(let o of t||[])if(!o.isConnected)t.delete(o);else return o;return null}function d(e){return typeof e.getRootNode=="function"?e.getRootNode():e.parentNode?d(e.parentNode):e}function W(e){for(;e;){if(e instanceof HTMLElement&&e.popover==="auto"&&h.get(e)==="showing")return e;if(e=e instanceof Element&&e.assignedSlot||e.parentElement||d(e),e instanceof x&&(e=e.host),e instanceof Document)return}}function U(e){for(;e;){let t=e.popoverTargetElement;if(t instanceof HTMLElement)return t;if(e=e.parentElement||d(e),e instanceof x&&(e=e.host),e instanceof Document)return}}function G(e){let t=new Map,o=0;for(let l of p.get(e.ownerDocument)||[])t.set(l,o),o+=1;t.set(e,o),o+=1;let r=null;function i(l){let a=W(l);if(a===null)return null;let T=t.get(a);(r===null||t.get(r)<T)&&(r=a)}return i(e.parentElement||d(e)),r}function Q(e){return e.hidden||e instanceof x||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e instanceof HTMLAnchorElement&&e.href===""?!1:typeof e.tabIndex=="number"&&e.tabIndex!==-1}function _(e){if(e.shadowRoot&&e.shadowRoot.delegatesFocus!==!0)return null;let t=e;t.shadowRoot&&(t=t.shadowRoot);let o=t.querySelector("[autofocus]");if(o)return o;{let l=t.querySelectorAll("slot");for(let a of l){let T=a.assignedElements({flatten:!0});for(let n of T){if(n.hasAttribute("autofocus"))return n;if(o=n.querySelector("[autofocus]"),o)return o}}}let r=e.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT),i=r.currentNode;for(;i;){if(Q(i))return i;i=r.nextNode()}}function J(e){_(e)?.focus()}var S=new WeakMap;function H(e){if(!f(e,!1))return;let t=e.ownerDocument;if(!e.dispatchEvent(new c("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!f(e,!1))return;let o=!1;if(e.popover==="auto"){let i=e.getAttribute("popover"),l=G(e)||t;if(w(l,!1,!0),i!==e.getAttribute("popover")||!f(e,!1))return}M(t)||(o=!0),S.delete(e);let r=t.activeElement;e.classList.add(":popover-open"),h.set(e,"showing"),b.has(t)||b.set(t,new Set),b.get(t).add(e),J(e),e.popover==="auto"&&(p.has(t)||p.set(t,new Set),p.get(t).add(e),C(L.get(e),!0)),o&&r&&e.popover==="auto"&&S.set(e,r),P(e,"closed","open")}function v(e,t=!1,o=!1){if(!f(e,!0))return;let r=e.ownerDocument;if(e.popover==="auto"&&(w(e,t,o),!f(e,!0))||(C(L.get(e),!1),L.delete(e),o&&(e.dispatchEvent(new c("beforetoggle",{oldState:"open",newState:"closed"})),!f(e,!0))))return;b.get(r)?.delete(e),p.get(r)?.delete(e),e.classList.remove(":popover-open"),h.set(e,"hidden"),o&&P(e,"open","closed");let i=S.get(e);i&&(S.delete(e),t&&i.focus())}function B(e,t=!1,o=!1){let r=M(e);for(;r;)v(r,t,o),r=M(e)}function w(e,t,o){let r=e.ownerDocument||e;if(e instanceof Document)return B(r,t,o);let i=null,l=!1;for(let a of p.get(r)||[])if(a===e)l=!0;else if(l){i=a;break}if(!l)return B(r,t,o);for(;i&&y(i)==="showing"&&p.get(r)?.size;)v(i,t,o)}var A=new WeakMap;function D(e){if(!e.isTrusted)return;let t=e.composedPath()[0];if(!t)return;let o=t.ownerDocument;if(!M(o))return;let i=$(t);if(i&&e.type==="pointerdown")A.set(o,i);else if(e.type==="pointerup"){let l=A.get(o)===i;A.delete(o),l&&w(i||o,!1,!0)}}var k=new WeakMap;function C(e,t=!1){if(!e)return;k.has(e)||k.set(e,e.getAttribute("aria-expanded"));let o=e.popoverTargetElement;if(o instanceof HTMLElement&&o.popover==="auto")e.setAttribute("aria-expanded",String(t));else{let r=k.get(e);r?e.setAttribute("aria-expanded",r):e.removeAttribute("aria-expanded")}}var q=globalThis.ShadowRoot||function(){};function j(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function g(e,t,o){let r=e[t];Object.defineProperty(e,t,{value(i){return r.call(this,o(i))}})}var X=/(^|[^\\]):popover-open\Line truncated
${e?"@layer popover-polyfill {":""}
:where([popover]) {
position: fixed;
z-index: 2147483647;
inset: 0;
padding: 0.25em;
width: fit-content;
height: fit-content;
border-width: initial;
border-color: initial;
border-image: initial;
border-style: solid;
background-color: canvas;
color: canvastext;
overflow: auto;
margin: auto;
}
:where([popover]:not(.\\:popover-open)) {
display: none;
}
:where(dialog[popover].\\:popover-open) {
display: block;
}
:where(dialog[popover][open]) {
display: revert;
}
:where([anchor].\\:popover-open) {
inset: auto;
}
:where([anchor]:popover-open) {
inset: auto;
}
@supports not (background-color: canvas) {
:where([popover]) {
background-color: white;
color: black;
}
}
@supports (width: -moz-fit-content) {
:where([popover]) {
width: -moz-fit-content;
height: -moz-fit-content;
}
}
@supports not (inset: 0) {
:where([popover]) {
top: 0;
left: 0;
right: 0;
bottom: 0;
}
}
${e?"}":""}
`}var m=null;function I(e){let t=Z();if(m===null)try{m=new CSSStyleSheet,m.replaceSync(t)}catch{m=!1}if(m===!1){let o=document.createElement("style");o.textContent=t,e instanceof Document?e.head.prepend(o):e.prepend(o)}else e.adoptedStyleSheets=[m,...e.adoptedStyleSheets]}function K(){if(typeof window>"u")return;window.ToggleEvent=window.ToggleEvent||c;function e(n){return n?.includes(":popover-open")&&(n=n.replace(X,"$1.\\:popover-open")),n}g(Document.prototype,"querySelector",e),g(Document.prototype,"querySelectorAll",e),g(Element.prototype,"querySelector",e),g(Element.prototype,"querySelectorAll",e),g(Element.prototype,"matches",e),g(Element.prototype,"closest",e),g(DocumentFragment.prototype,"querySelectorAll",e),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let n=(this.getAttribute("popover")||"").toLowerCase();return n===""||n=="auto"?"auto":"manual"},set(n){n===null?this.removeAttribute("popover"):this.setAttribute("popover",n)}},showPopover:{enumerable:!0,configurable:!0,value(){H(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){v(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(n){h.get(this)==="showing"&&n===void 0||n===!1?v(this,!0,!0):(n===void 0||n===!0)&&H(this)}}});let t=Element.prototype.attachShadow;t&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(n){let s=t.call(this,n);return I(s),s}}});let o=HTMLElement.prototype.attachInternals;o&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let n=o.call(this);return n.shadowRoot&&I(n.shadowRoot),n}}});let r=new WeakMap;function i(n){Object.defineProperties(n.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(s){if(s===null)this.removeAttribute("popovertarget"),r.delete(this);else if(s instanceof Element)this.setAttribute("popovertarget",""),r.set(this,s);else throw new TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let s=r.get(this);if(s&&s.isConnected)return s;if(s&&!s.isConnected)return r.delete(this),null;let u=d(this),E=this.getAttribute("popovertarget");return(u instanceof Document||u instanceof q)&&E&&u.getElementById(E)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let s=(this.getAttribute("popovertargetaction")||"").toLowerCase();return s==="show"||s==="hide"?s:"toggle"},set(s){this.setAttribute("popovertargetaction",s)}}})}i(HTMLButtonElement),i(HTMLInputElement);let l=n=>{let s=n.composedPath(),u=s[0];if(!(u instanceof Element)||u?.shadowRoot)return;let E=d(u);if(!(E instanceof q||E instanceof Document))return;let R=s.find(z=>z.matches?.("[popovertargetaction],[popovertarget]"));if(R){O(R),n.preventDefault();return}},a=n=>{let s=n.key,u=n.target;!n.defaultPrevented&&u&&(s==="Escape"||s==="Esc")&&w(u.ownerDocument,!0,!0)};(n=>{n.addEventListener("click",l),n.addEventListener("keydown",a),n.addEventListener("pointerdown",D),n.addEventListener("pointerup",D)})(document),I(document)}j()||K();
//# sourceMappingURL=popover.min.js.map
})();
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/events.ts", "../src/popover-helpers.ts", "../src/popover.ts", "../src/index.ts"],
"sourcesContent": ["export interface ToggleInit extends EventInit {\n oldState: string;\n newState: string;\n}\n\nexport class ToggleEvent extends Event {\n public oldState: string;\n public newState: string;\n constructor(\n type: string,\n { oldState = '', newState = '', ...init }: Partial<ToggleInit> = {},\n ) {\n super(type, init);\n this.oldState = String(oldState || '');\n this.newState = String(newState || '');\n }\n}\n\nconst popoverToggleTaskQueue = new WeakMap<HTMLElement, unknown>();\nexport function queuePopoverToggleEventTask(\n element: HTMLElement,\n oldState: string,\n newState: string,\n) {\n popoverToggleTaskQueue.set(\n element,\n setTimeout(() => {\n if (!popoverToggleTaskQueue.has(element)) return;\n element.dispatchEvent(\n new ToggleEvent('toggle', {\n cancelable: false,\n oldState,\n newState,\n }),\n );\n }, 0),\n );\n}\n", "import { queuePopoverToggleEventTask, ToggleEvent } from './events.js';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst ShadowRoot = globalThis.ShadowRoot || function () {};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst HTMLDialogElement = globalThis.HTMLDialogElement || function () {};\n\nconst topLayerElements = new WeakMap<Document, Set<HTMLElement>>();\nconst autoPopoverList = new WeakMap<Document, Set<HTMLElement>>();\nexport const visibilityState = new WeakMap<HTMLElement, 'hidden' | 'showing'>();\nfunction getPopoverVisibilityState(popover: HTMLElement): 'hidden' | 'showing' {\n return visibilityState.get(popover) || 'hidden';\n}\n\nconst popoverInvoker = new WeakMap<\n HTMLElement,\n HTMLButtonElement | HTMLInputElement\n>();\n\n// https://html.spec.whatwg.org/#popover-target-attribute-activation-behavior\nexport function popoverTargetAttributeActivationBehavior(\n element: HTMLButtonElement | HTMLInputElement,\n) {\n const popover = element.popoverTargetElement;\n if (!(popover instanceof HTMLElement)) {\n return;\n }\n const visibility = getPopoverVisibilityState(popover);\n if (element.popoverTargetAction === 'show' && visibility === 'showing') {\n return;\n }\n if (element.popoverTargetAction === 'hide' && visibility === 'hidden') return;\n if (visibility === 'showing') {\n hidePopover(popover, true, true);\n } else if (checkPopoverValidity(popover, false)) {\n popoverInvoker.set(popover, element);\n showPopover(popover);\n }\n}\n\n// https://whatpr.org/html/8221/popover.html#check-popover-validity\nfunction checkPopoverValidity(\n element: HTMLElement,\n expectedToBeShowing: boolean,\n) {\n if (element.popover !== 'auto' && element.popover !== 'manual') {\n return false;\n }\n if (!element.isConnected) return false;\n if (expectedToBeShowing && getPopoverVisibilityState(element) !== 'showing') {\n return false;\n }\n if (!expectedToBeShowing && getPopoverVisibilityState(element) !== 'hidden') {\n return false;\n }\n if (element instanceof HTMLDialogElement && element.hasAttribute('open')) {\n return false;\n }\n if (document.fullscreenElement === element) return false;\n return true;\n}\n\nfunction getStackPosition(popover?: Element) {\n if (!popover) return 0;\n return (\n Array.from(autoPopoverList.get(popover.ownerDocument) || []).indexOf(\n popover as HTMLElement,\n ) + 1\n );\n}\n\nfunction topMostClickedPopover(target: HTMLElement) {\n const clickedPopover = nearestInclusiveOpenPopover(target);\n const invokerPopover = nearestInclusiveTargetPopoverForInvoker(target);\n if (getStackPosition(clickedPopover) > getStackPosition(invokerPopover)) {\n return clickedPopover;\n }\n return invokerPopover;\n}\n\n// https://html.spec.whatwg.org/#topmost-auto-popover\nfunction topMostAutoPopover(document: Document): HTMLElement | null {\n const documentPopovers = autoPopoverList.get(document);\n for (const popover of documentPopovers || []) {\n if (!popover.isConnected) {\n documentPopovers!.delete(popover);\n } else {\n return popover;\n }\n }\n return null;\n}\n\nexport function getRootNode(node: Node): Node {\n if (typeof node.getRootNode === 'function') {\n return node.getRootNode();\n }\n if (node.parentNode) return getRootNode(node.parentNode);\n return node;\n}\n\n// https://html.spec.whatwg.org/#nearest-inclusive-open-popover\nfunction nearestInclusiveOpenPopover(\n node: Node | null,\n): HTMLElement | undefined {\n while (node) {\n if (\n node instanceof HTMLElement &&\n node.popover === 'auto' &&\n visibilityState.get(node) === 'showing'\n ) {\n return node;\n }\n node =\n (node instanceof Element && node.assignedSlot) ||\n node.parentElement ||\n getRootNode(node);\n if (node instanceof ShadowRoot) node = node.host;\n if (node instanceof Document) return;\n }\n}\n\n// https://html.spec.whatwg.org/#popover-light-dismiss:nearest-inclusive-tLine truncated
"mappings": "AAKO,IAAMA,EAAN,cAA0B,KAAM,CAC9B,SACA,SACP,YACEC,EACA,CAAE,SAAAC,EAAW,GAAI,SAAAC,EAAW,GAAI,GAAGC,CAAK,EAAyB,CAAC,EAClE,CACA,MAAMH,EAAMG,CAAI,EAChB,KAAK,SAAW,OAAOF,GAAY,EAAE,EACrC,KAAK,SAAW,OAAOC,GAAY,EAAE,CACvC,CACF,EAEME,EAAyB,IAAI,QAC5B,SAASC,EACdC,EACAL,EACAC,EACA,CACAE,EAAuB,IACrBE,EACA,WAAW,IAAM,CACVF,EAAuB,IAAIE,CAAO,GACvCA,EAAQ,cACN,IAAIP,EAAY,SAAU,CACxB,WAAY,GACZ,SAAAE,EACA,SAAAC,CACF,CAAC,CACH,CACF,EAAG,CAAC,CACN,CACF,CClCA,IAAMK,EAAa,WAAW,YAAc,UAAY,CAAC,EAGnDC,EAAoB,WAAW,mBAAqB,UAAY,CAAC,EAEjEC,EAAmB,IAAI,QACvBC,EAAkB,IAAI,QACfC,EAAkB,IAAI,QACnC,SAASC,EAA0BC,EAA4C,CAC7E,OAAOF,EAAgB,IAAIE,CAAO,GAAK,QACzC,CAEA,IAAMC,EAAiB,IAAI,QAMpB,SAASC,EACdC,EACA,CACA,IAAMH,EAAUG,EAAQ,qBACxB,GAAI,EAAEH,aAAmB,aACvB,OAEF,IAAMI,EAAaL,EAA0BC,CAAO,EAChDG,EAAQ,sBAAwB,QAAUC,IAAe,WAGzDD,EAAQ,sBAAwB,QAAUC,IAAe,WACzDA,IAAe,UACjBC,EAAYL,EAAS,GAAM,EAAI,EACtBM,EAAqBN,EAAS,EAAK,IAC5CC,EAAe,IAAID,EAASG,CAAO,EACnCI,EAAYP,CAAO,GAEvB,CAGA,SAASM,EACPH,EACAK,EACA,CAcA,MAbI,EAAAL,EAAQ,UAAY,QAAUA,EAAQ,UAAY,UAGlD,CAACA,EAAQ,aACTK,GAAuBT,EAA0BI,CAAO,IAAM,WAG9D,CAACK,GAAuBT,EAA0BI,CAAO,IAAM,UAG/DA,aAAmBR,GAAqBQ,EAAQ,aAAa,MAAM,GAGnE,SAAS,oBAAsBA,EAErC,CAEA,SAASM,EAAiBT,EAAmB,CAC3C,OAAKA,EAEH,MAAM,KAAKH,EAAgB,IAAIG,EAAQ,aAAa,GAAK,CAAC,CAAC,EAAE,QAC3DA,CACF,EAAI,EAJe,CAMvB,CAEA,SAASU,EAAsBC,EAAqB,CAClD,IAAMC,EAAiBC,EAA4BF,CAAM,EACnDG,EAAiBC,EAAwCJ,CAAM,EACrE,OAAIF,EAAiBG,CAAc,EAAIH,EAAiBK,CAAc,EAC7DF,EAEFE,CACT,CAGA,SAASE,EAAmBC,EAAwC,CAClE,IAAMC,EAAmBrB,EAAgB,IAAIoB,CAAQ,EACrD,QAAWjB,KAAWkB,GAAoB,CAAC,EACzC,GAAI,CAAClB,EAAQ,YACXkB,EAAkB,OAAOlB,CAAO,MAEhC,QAAOA,EAGX,OAAO,IACT,CAEO,SAASmB,EAAYC,EAAkB,CAC5C,OAAI,OAAOA,EAAK,aAAgB,WACvBA,EAAK,YAAY,EAEtBA,EAAK,WAAmBD,EAAYC,EAAK,UAAU,EAChDA,CACT,CAGA,SAASP,EACPO,EACyB,CACzB,KAAOA,GAAM,CACX,GACEA,aAAgB,aAChBA,EAAK,UAAY,QACjBtB,EAAgB,IAAIsB,CAAI,IAAM,UAE9B,OAAOA,EAOT,GALAA,EACGA,aAAgB,SAAWA,EAAK,cACjCA,EAAK,eACLD,EAAYC,CAAI,EACdA,aAAgB1B,IAAY0B,EAAOA,EAAK,MACxCA,aAAgB,SAAU,MAChC,CACF,CAGA,SAASL,EACPK,EACyB,CACzB,KAAOA,GAAM,CACX,IAAMC,EAAeD,EAA2B,qBAChD,GAAIC,aAAuB,YAAa,OAAOA,EAG/C,GAFAD,EAAOA,EAAK,eAAiBD,EAAYC,CAAI,EACzCA,aAAgB1B,IAAY0B,EAAOA,EAAK,MACxCA,aAAgB,SAAU,MAChC,CACF,CAGA,SAASE,EAAuBC,EAA6C,CAC3E,IAAMC,EAAmB,IAAI,IACzBC,EAAI,EACR,QAAWzB,KAAWH,EAAgB,IAAI0B,EAAW,aAAa,GAAK,CAAC,EACtEC,EAAiB,IAAIxB,EAASyB,CAAC,EAC/BA,GAAK,EAEPD,EAAiB,IAAID,EAAYE,CAAC,EAClCA,GAAK,EACL,IAAIH,EAA6C,KACjD,SAASI,EAAcC,EAAwB,CAC7C,IAAMC,EAAoBf,EAA4Bc,CAAS,EAC/D,GAAIC,IAAsB,KAAM,OAAO,KACvC,IAAMC,EAAoBL,EAAiB,IAAII,CAAiB,GAE9DN,IAA2B,MAC3BE,EAAiB,IAAIF,CAAsB,EAAIO,KAE/CP,EAAyBM,EAE7B,CACA,OAAAF,EAAcH,EAAW,eAAiBJ,EAAYI,CAAU,CAAC,EAC1DD,CACT,CAEA,SAASQ,EAAYC,EAA0B,CAmB7C,OAlBIA,EAAY,QAAUA,aAAuBrC,IAE/CqC,aAAuB,mBACvBA,aAAuB,kBACvBA,aAAuB,mBACvBA,aAAuB,qBACvBA,aAAuB,qBACvBA,aAAuB,mBACvBA,aAAuB,sBAEnBA,EAAY,UAGhBA,aAAuB,kBACvBA,EAAY,OAAS,UAInBA,aAAuB,mBAAqBA,EAAY,OAAS,GAC5D,GAGP,OAAOA,EAAY,UAAa,UAAYA,EAAY,WAAa,EAEzE,CAMA,SAASC,EAAcD,EAA0B,CAC/C,GACEA,EAAY,YACZA,EAAY,WAAW,iBAAmB,GAE1C,OAAO,KAET,IAAIE,EAA8CF,EAC9CE,EAAY,aACdA,EAAcA,EAAY,YAE5B,IAAIC,EAAoBD,EAAY,cAAc,aAAa,EAC/D,GAAIC,EACF,OAAOA,EACF,CACL,IAAMC,EAAQF,EAAY,iBAAiB,MAAM,EACjD,QAAWG,KAAQD,EAAO,CACxB,IAAME,EAAmBD,EAAK,iBAAiB,CAAE,QAAS,EAAK,CAAC,EAChE,QAAWE,KAAMD,EAAkB,CACjC,GAAIC,EAAG,aAAa,WAAW,EAC7B,OAAOA,EAGP,GADAJ,EAAoBI,EAAG,cAAc,aAAa,EAC9CJ,EACF,OAAOA,CAGb,CACF,CACF,CACA,IAAMK,EAASR,EAAY,cAAc,iBACvCE,EACA,WAAW,YACb,EACIO,EAA0BD,EAAO,YACrC,KAAOC,GAAY,CAEjB,GAAIV,EAAYU,CAAyB,EACvC,OAAOA,EAETA,EAAaD,EAAO,SAAS,CAC/B,CACF,CAGA,SAASE,EAAqBC,EAAsB,CACjDV,EAAcU,CAAO,GAAmB,MAAM,CACjD,CAEA,IAAMC,EAA4B,IAAI,QAG/B,SAASpC,EAAYJ,EAAsB,CAChD,GAAI,CAACG,EAAqBH,EAAS,EAAK,EACtC,OAEF,IAAMc,EAAWd,EAAQ,cAYzB,GAVE,CAACA,EAAQ,cACP,IAAIyC,EAAY,eAAgB,CAC9B,WAAY,GACZ,SAAU,SACV,SAAU,MACZ,CAAC,CACH,GAIE,CAACtC,EAAqBH,EAAS,EAAK,EACtC,OAEF,IAAI0C,EAAqB,GACzB,GAAI1C,EAAQ,UAAY,OAAQ,CAC9B,IAAM2C,EAAe3C,EAAQ,aAAa,SAAS,EAC7C4C,EAAWzB,EAAuBnB,CAAO,GAAKc,EAEpD,GADA+B,EAAqBD,EAAU,GAAO,EAAI,EAExCD,IAAiB3C,EAAQ,aAAa,SAAS,GAC/C,CAACG,EAAqBH,EAAS,EAAK,EAEpC,MAEJ,CACKa,EAAmBC,CAAQ,IAC9B4B,EAAqB,IAEvBF,EAA0B,OAAOxC,CAAO,EACxC,IAAM8C,EAA2BhC,EAAS,cAC1Cd,EAAQ,UAAU,IAAI,eAAe,EACrCL,EAAgB,IAAIK,EAAS,SAAS,EACjCP,EAAiB,IAAIqB,CAAQ,GAChCrB,EAAiB,IAAIqB,EAAU,IAAI,GAAK,EAE1CrB,EAAiB,IAAIqB,CAAQ,EAAG,IAAId,CAAO,EAC3CsC,EAAqBtC,CAAO,EACxBA,EAAQ,UAAY,SACjBN,EAAgB,IAAIoB,CAAQ,GAC/BpB,EAAgB,IAAIoB,EAAU,IAAI,GAAK,EAEzCpB,EAAgB,IAAIoB,CAAQ,EAAG,IAAId,CAAO,EAC1C+C,EAAuBjD,EAAe,IAAIE,CAAO,EAAG,EAAI,GAGxD0C,GACAI,GACA9C,EAAQ,UAAY,QAEpBwC,EAA0B,IAAIxC,EAAS8C,CAAwB,EAEjEE,EAA4BhD,EAAS,SAAU,MAAM,CACvD,CAGO,SAASE,EACdF,EACAiD,EAAuB,GACvBC,EAAa,GACb,CAEA,GAAI,CAAC/C,EAAqBH,EAAS,EAAI,EACrC,OAEF,IAAMc,EAAWd,EAAQ,cASzB,GARIA,EAAQ,UAAY,SACtB6C,EAAqB7C,EAASiD,EAAsBC,CAAU,EAC1D,CAAC/C,EAAqBH,EAAS,EAAI,KAIzC+C,EAAuBjD,EAAe,IAAIE,CAAO,EAAG,EAAK,EACzDF,EAAe,OAAOE,CAAO,EACzBkD,IACFlD,EAAQ,cACN,IAAIyC,EAAY,eAAgB,CAC9B,SAAU,OACV,SAAU,QACZ,CAAC,CACH,EACI,CAACtC,EAAqBH,EAAS,EAAI,IACrC,OAGJP,EAAiB,IAAIqB,CAAQ,GAAG,OAAOd,CAAO,EAC9CN,EAAgB,IAAIoB,CAAQ,GAAG,OAAOd,CAAO,EAC7CA,EAAQ,UAAU,OAAO,eAAe,EACxCL,EAAgB,IAAIK,EAAS,QAAQ,EACjCLine truncated
"names": ["ToggleEvent", "type", "oldState", "newState", "init", "popoverToggleTaskQueue", "queuePopoverToggleEventTask", "element", "ShadowRoot", "HTMLDialogElement", "topLayerElements", "autoPopoverList", "visibilityState", "getPopoverVisibilityState", "popover", "popoverInvoker", "popoverTargetAttributeActivationBehavior", "element", "visibility", "hidePopover", "checkPopoverValidity", "showPopover", "expectedToBeShowing", "getStackPosition", "topMostClickedPopover", "target", "clickedPopover", "nearestInclusiveOpenPopover", "invokerPopover", "nearestInclusiveTargetPopoverForInvoker", "topMostAutoPopover", "document", "documentPopovers", "getRootNode", "node", "nodePopover", "topMostPopoverAncestor", "newPopover", "popoverPositions", "i", "checkAncestor", "candidate", "candidateAncestor", "candidatePosition", "isFocusable", "focusTarget", "focusDelegate", "whereToLook", "autoFocusDelegate", "slots", "slot", "assignedElements", "el", "walker", "descendant", "popoverFocusingSteps", "subject", "previouslyFocusedElements", "ToggleEvent", "shouldRestoreFocus", "originalType", "ancestor", "hideAllPopoversUntil", "originallyFocusedElement", "setInvokerAriaExpanded", "queuePopoverToggleEventTask", "focusPreviousElement", "fireEvents", "previouslyFocusedElement", "closeAllOpenPopovers", "endpoint", "lastToHide", "foundEndpoint", "popoverPointerDownTargets", "lightDismissOpenPopovers", "event", "sameTarget", "initialAriaExpandedValue", "force", "initialValue", "ShadowRoot", "isSupported", "patchSelectorFn", "object", "name", "mapper", "original", "selector", "nonEscapedPopoverSelector", "hasLayerSupport", "getStyles", "useLayer", "popoverStyleSheet", "injectStyles", "root", "styles", "sheet", "apply", "ToggleEvent", "rewriteSelector", "value", "showPopover", "hidePopover", "force", "visibilityState", "originalAttachShadow", "options", "shadowRoot", "originalAttachInternals", "internals", "popoverTargetAssociatedElements", "applyPopoverInvokerElementMixin", "ElementClass", "targetElement", "getRootNode", "idref", "ShadowRoot", "handleInvokerActivation", "event", "composedPath", "target", "invoker", "el", "popoverTargetAttributeActivationBehavior", "onKeydown", "key", "hideAllPopoversUntil", "lightDismissOpenPopovers", "isSupported", "apply"]
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1 @@
const e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20version='1.2'%20viewBox='0%200%20100%20100'%20%3e%3crect%20fill='none'%20rx='13'%20height='76'%20width='94'%20y='12'%20x='3'%20stroke='currentColor'%20stroke-width='6'%20stroke-linejoin='miter'%20/%3e%3cpath%20d='M29,38L15,50L29,62'%20fill='none'%20stroke-width='9'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20/%3e%3cpath%20d='M71,38L85,50L71,62'%20fill='none'%20stroke-width='9'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20/%3e%3cpath%20d='M42,76L58,24'%20fill='none'%20stroke-width='9'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20/%3e%3c/svg%3e";export{e as default};
@@ -0,0 +1,215 @@
var IY=Object.defineProperty;var wY=(e,t,n)=>t in e?IY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ui=(e,t,n)=>wY(e,typeof t!="symbol"?t+"":t,n);var Tc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var GI={exports:{}},om={},YI={exports:{}},He={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var rd=Symbol.for("react.element"),xY=Symbol.for("react.portal"),DY=Symbol.for("react.fragment"),MY=Symbol.for("react.strict_mode"),LY=Symbol.for("react.profiler"),kY=Symbol.for("react.provider"),PY=Symbol.for("react.context"),BY=Symbol.for("react.forward_ref"),FY=Symbol.for("react.suspense"),UY=Symbol.for("react.memo"),GY=Symbol.for("react.lazy"),wR=Symbol.iterator;function YY(e){return e===null||typeof e!="object"?null:(e=wR&&e[wR]||e["@@iterator"],typeof e=="function"?e:null)}var $I={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},HI=Object.assign,zI={};function Ul(e,t,n){this.props=e,this.context=t,this.refs=zI,this.updater=n||$I}Ul.prototype.isReactComponent={};Ul.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ul.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function VI(){}VI.prototype=Ul.prototype;function kT(e,t,n){this.props=e,this.context=t,this.refs=zI,this.updater=n||$I}var PT=kT.prototype=new VI;PT.constructor=kT;HI(PT,Ul.prototype);PT.isPureReactComponent=!0;var xR=Array.isArray,WI=Object.prototype.hasOwnProperty,BT={current:null},qI={key:!0,ref:!0,__self:!0,__source:!0};function KI(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)WI.call(t,r)&&!qI.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:rd,type:e,key:o,ref:s,props:i,_owner:BT.current}}function $Y(e,t){return{$$typeof:rd,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function FT(e){return typeof e=="object"&&e!==null&&e.$$typeof===rd}function HY(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var DR=/\/+/g;function dh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?HY(""+e.key):t.toString(36)}function hf(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case rd:case xY:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+dh(s,0):r,xR(i)?(n="",e!=null&&(n=e.replace(DR,"$&/")+"/"),hf(i,t,n,"",function(u){return u})):i!=null&&(FT(i)&&(i=$Y(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(DR,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",xR(e))for(var a=0;a<e.length;a++){o=e[a];var l=r+dh(o,a);s+=hf(o,t,n,l,i)}else if(l=YY(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+dh(o,a++),s+=hf(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Tp(e,t,n){if(e==null)return e;var r=[],i=0;return hf(e,r,"","",function(o){return t.call(n,o,i++)}),r}function zY(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Yn={current:null},Ef={transition:null},VY={ReactCurrentDispatcher:Yn,ReactCurrentBatchConfig:Ef,ReactCurrentOwner:BT};function QI(){throw Error("act(...) is not supported in production builds of React.")}He.Children={map:Tp,forEach:function(e,t,n){Tp(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Tp(e,function(){t++}),t},toArray:function(e){return Tp(e,function(t){return t})||[]},only:function(e){if(!FT(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};He.Component=Ul;He.Fragment=DY;He.Profiler=LY;He.PureComponent=kT;He.StrictMode=MY;He.Suspense=FY;He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VY;He.act=QI;He.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=HI({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=BT.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)WI.call(t,l)&&!qI.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:rd,type:e.type,key:i,ref:o,props:r,_owner:s}};He.createContext=function(e){return e={$$typeof:PY,_currentValue:e,_currentValue2:e,_threadCountLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var WY=L,qY=Symbol.for("react.element"),KY=Symbol.for("react.fragment"),QY=Object.prototype.hasOwnProperty,jY=WY.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,XY={key:!0,ref:!0,__self:!0,__source:!0};function jI(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)QY.call(t,r)&&!XY.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:qY,type:e,key:o,ref:s,props:i,_owner:jY.current}}om.Fragment=KY;om.jsx=jI;om.jsxs=jI;GI.exports=om;var v=GI.exports,GE={},XI={exports:{}},yr={},ZI={exports:{}},JI={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(k,B){var z=k.length;k.push(B);e:for(;0<z;){var V=z-1>>>1,J=k[V];if(0<i(J,B))k[V]=B,k[z]=J,z=V;else break e}}function n(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var B=k[0],z=k.pop();if(z!==B){k[0]=z;e:for(var V=0,J=k.length,he=J>>>1;V<he;){var Re=2*(V+1)-1,fe=k[Re],ze=Re+1,st=k[ze];if(0>i(fe,z))ze<J&&0>i(st,fe)?(k[V]=st,k[ze]=z,V=ze):(k[V]=fe,k[Re]=z,V=Re);else if(ze<J&&0>i(st,z))k[V]=st,k[ze]=z,V=ze;else break e}}return B}function i(k,B){var z=k.sortIndex-B.sortIndex;return z!==0?z:k.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],p=1,f=null,_=3,m=!1,h=!1,E=!1,b=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(k){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=k)r(u),B.sortIndex=B.expirationTime,t(l,B);else break;B=n(u)}}function N(k){if(E=!1,C(k),!h)if(n(l)!==null)h=!0,$(O);else{var B=n(u);B!==null&&U(N,B.startTime-k)}}function O(k,B){h=!1,E&&(E=!1,S(D),D=-1),m=!0;var z=_;try{for(C(B),f=n(l);f!==null&&(!(f.expirationTime>B)||k&&!le());){var V=f.callback;if(typeof V=="function"){f.callback=null,_=f.priorityLevel;var J=V(f.expirationTime<=B);B=e.unstable_now(),typeof J=="function"?f.callback=J:f===n(l)&&r(l),C(B)}else r(l);f=n(l)}if(f!==null)var he=!0;else{var Re=n(u);Re!==null&&U(N,Re.startTime-B),he=!1}return he}finally{f=null,_=z,m=!1}}var x=!1,w=null,D=-1,q=5,Y=-1;function le(){return!(e.unstable_now()-Y<q)}function de(){if(w!==null){var k=e.unstable_now();Y=k;var B=!0;try{B=w(!0,k)}finally{B?se():(x=!1,w=null)}}else x=!1}var se;if(typeof y=="function")se=function(){y(de)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,ne=pe.port2;pe.port1.onmessage=de,se=function(){ne.postMessage(null)}}else se=function(){b(de,0)};function $(k){w=k,x||(x=!0,se())}function U(k,B){D=b(function(){k(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(k){k.callback=null},e.unstable_continueExecution=function(){h||m||(h=!0,$(O))},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(k){switch(_){case 1:case 2:case 3:var B=3;break;default:B=_}var z=_;_=B;try{return k()}finally{_=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(k,B){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var z=_;_=k;try{return B()}finally{_=z}},e.unstable_scheduleCallback=function(k,B,z){var V=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?V+z:V):z=V,k){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=z+J,k={id:p++,callback:B,priorityLevel:k,startTime:z,expirationTime:J,sortIndex:-1},z>V?(k.sortIndex=z,t(u,k),n(l)===null&&k===n(u)&&(E?(S(D),D=-1):E=!0,U(N,z-V))):(k.sortIndex=J,t(l,k),h||m||(h=!0,$(O))),k},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(k){var B=_;return function(){var z=_;_=B;try{return k.apply(this,arguments)}finally{_=z}}}})(JI);ZI.exports=JI;var ZY=ZI.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var JY=L,br=ZY;function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ew=new Set,mu={};function ha(e,t){Tl(e,t),Tl(e+"Capture",t)}function Tl(e,t){for(mu[e]=t,e=0;e<t.length;e++)ew.add(t[e])}var so=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),YE=Object.prototype.hasOwnProperty,e$=/^[: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]*$/,MR={},LR={};function t$(e){return YE.call(LR,e)?!0:YE.call(MR,e)?!1:e$.test(e)?LR[e]=!0:(MR[e]=!0,!1)}function n$(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function r$(e,t,n,r){if(t===null||typeof t>"u"||n$(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function $n(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var hn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){hn[e]=new $n(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];hn[t]=new $n(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){hn[e]=new $n(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){hn[e]=new $n(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){hn[e]=new $n(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){hn[e]=new $n(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){hn[e]=new $n(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){hn[e]=new $n(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){hn[e]=new $n(e,5,!1,e.toLowerCase(),null,!1,!1)});var UT=/[\-:]([a-z])/g;function GT(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(UT,GT);hn[t]=new $n(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(UT,GT);hn[t]=new $n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(UT,GT);hn[t]=new $n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){hn[e]=new $n(e,1,!1,e.toLowerCase(),null,!1,!1)});hn.xlinkHref=new $n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){hn[e]=new $n(e,1,!1,e.toLowerCase(),null,!0,!0)});function YT(e,t,n,r){var i=hn.hasOwnProperty(t)?hn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!== Line truncated
`+ph+e}var fh=!1;function _h(e,t){if(!e||fh)return"";fh=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),o=r.stack.split(`
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var l=`
`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{fh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Lc(e):""}function i$(e){switch(e.tag){case 5:return Lc(e.type);case 16:return Lc("Lazy");case 13:return Lc("Suspense");case 19:return Lc("SuspenseList");case 0:case 2:case 15:return e=_h(e.type,!1),e;case 11:return e=_h(e.type.render,!1),e;case 1:return e=_h(e.type,!0),e;default:return""}}function VE(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xa:return"Fragment";case ja:return"Portal";case $E:return"Profiler";case $T:return"StrictMode";case HE:return"Suspense";case zE:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case nw:return(e.displayName||"Context")+".Consumer";case tw:return(e._context.displayName||"Context")+".Provider";case HT:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zT:return t=e.displayName||null,t!==null?t:VE(e.type)||"Memo";case Po:t=e._payload,e=e._init;try{return VE(e(t))}catch{}}return null}function o$(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return VE(t);case 8:return t===$T?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function fs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function iw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function s$(e){var t=iw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yp(e){e._valueTracker||(e._valueTracker=s$(e))}function ow(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=iw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Uf(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function WE(e,t){var n=t.checked;return Nt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function PR(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function sw(e,t){t=t.checked,t!=null&&YT(e,"checked",t,!1)}function qE(e,t){sw(e,t);var n=fs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?KE(e,t.type,n):t.hasOwnProperty("defaultValue")&&KE(e,t.type,fs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function BR(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function KE(e,t,n){(t!=="number"||Uf(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var kc=Array.isArray;function cl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+fs(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function QE(e,t){if(t.dan Line truncated
`).replace(gH,"")}function wp(e,t,n){if(t=sN(t),sN(e)!==t&&n)throw Error(ie(425))}function qf(){}var lS=null,cS=null;function uS(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var dS=typeof setTimeout=="function"?setTimeout:void 0,hH=typeof clearTimeout=="function"?clearTimeout:void 0,aN=typeof Promise=="function"?Promise:void 0,EH=typeof queueMicrotask=="function"?queueMicrotask:typeof aN<"u"?function(e){return aN.resolve(null).then(e).catch(SH)}:dS;function SH(e){setTimeout(function(){throw e})}function Oh(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Tu(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Tu(t)}function rs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function lN(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Yl=Math.random().toString(36).slice(2),Ti="__reactFiber$"+Yl,Ru="__reactProps$"+Yl,ao="__reactContainer$"+Yl,pS="__reactEvents$"+Yl,TH="__reactListeners$"+Yl,bH="__reactHandles$"+Yl;function zs(e){var t=e[Ti];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ao]||n[Ti]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=lN(e);e!==null;){if(n=e[Ti])return n;e=lN(e)}return t}e=n,n=e.parentNode}return null}function sd(e){return e=e[Ti]||e[ao],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function tl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function um(e){return e[Ru]||null}var fS=[],nl=-1;function Ts(e){return{current:e}}function ht(e){0>nl||(e.current=fS[nl],fS[nl]=null,nl--)}function pt(e,t){nl++,fS[nl]=e.current,e.current=t}var _s={},On=Ts(_s),ir=Ts(!1),aa=_s;function bl(e,t){var n=e.type.contextTypes;if(!n)return _s;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function or(e){return e=e.childContextTypes,e!=null}function Kf(){ht(ir),ht(On)}function cN(e,t,n){if(On.current!==_s)throw Error(ie(168));pt(On,t),pt(ir,n)}function Kw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ie(108,o$(e)||"Unknown",i));return Nt({},n,r)}function Qf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_s,aa=On.current,pt(On,e),pt(ir,ir.current),!0}function uN(e,t,n){var r=e.stateNode;if(!r)throw Error(ie(169));n?(e=Kw(e,t,aa),r.__reactInternalMemoizedMergedChildContext=e,ht(ir),ht(On),pt(On,e)):ht(ir),pt(ir,n)}var Qi=null,dm=!1,Ah=!1;function Qw(e){Qi===null?Qi=[e]:Qi.push(e)}function yH(e){dm=!0,Qw(e)}function bs(){if(!Ah&&Qi!==null){Ah=!0;var e=0,t=it;try{var n=Qi;for(it=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Qi=null,dm=!1}catch(i){throw Qi!==null&&(Qi=Qi.slice(e+1)),Tw(WT,bs),i}finally{it=t,Ah=!1}}return null}var rl=[],il=0,jf=null,Xf=0,Br=[],Fr=0,la=null,Zi=1,Ji="";function Us(e,t){rl[il++]=Xf,rl[il++]=jf,jf=e,Xf=t}function jw(e,t,n){Br[Fr++]=Zi,Br[Fr++]=Ji,Br[Fr++]=la,la=e;var r=Zi;e=Ji;var i=32-oi(r)-1;r&=~(1<<i),n+=1;var o=32-oi(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Zi=1<<32-oi(t)+i|n<<i|r,Ji=o+e}else Zi=1<<o|n<<i|r,Ji=e}function tb(e){e.return!==null&&(Us(e,1),jw(e,1,0))}function nb(e){for(;e===jf;)jf=rl[--il],rl[il]=null,Xf=rl[--il],rl[il]=null;for(;e===la;)la=Br[--Fr],Br[Fr]=null,Ji=Br[--Fr],Br[Fr]=null,Zi=Br[--Fr],Br[Fr]=null}var Tr=null,Sr=null,Tt=!1,ti=null;function Xw(e,t){var n=Gr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function dN(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Tr=e,Sr=rs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Tr=e,Sr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=la!==null?{id:Zi,overflow:Ji}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Gr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Tr=e,Sr=null,!0):!1;default:return!1}}function _S(e){return(e.mode&1)!==0&&(e.flags&128)===0}function mS(e){if(Tt){var t=Sr;if(t){var n=t;if(!dN(e,t)){if(_S(e))throw Error(ie(418));t=rs(n.nextSibling);var r=Tr;t&&dN(e,t)?Xw(r,n):(e.flags=e.flags&-4097|2,Tt=!1,Tr=e)}}else{if(_S(e))throw Error(ie(418));e.flags=e.flags&-4097|2,Tt=!1,Tr=e}}}function pN(e){ Line truncated
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Mh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function SS(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var xH=typeof WeakMap=="function"?WeakMap:Map;function vx(e,t,n){n=no(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){o_||(o_=!0,IS=r),SS(e,t)},n}function Rx(e,t,n){n=no(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){SS(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){SS(e,t),typeof r!="function"&&(ss===null?ss=new Set([this]):ss.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function TN(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new xH;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=VH.bind(null,e,t,n),t.then(e,e))}function bN(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function yN(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=no(-1,1),t.tag=2,is(n,t,1))),n.lanes|=1),e)}var DH=mo.ReactCurrentOwner,nr=!1;function kn(e,t,n,r){t.child=e===null?ex(t,null,n,r):Cl(t,e.child,n,r)}function CN(e,t,n,r,i){n=n.render;var o=t.ref;return fl(t,i),r=fb(e,t,n,r,o,i),n=_b(),e!==null&&!nr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,co(e,t,i)):(Tt&&n&&tb(t),t.flags|=1,kn(e,t,r,i),t.child)}function vN(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!vb(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Nx(e,t,o,r,i)):(e=Af(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:yu,n(s,r)&&e.ref===t.ref)return co(e,t,i)}return t.flags|=1,e=ls(o,r),e.ref=t.ref,e.return=t,t.child=e}function Nx(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(yu(o,r)&&e.ref===t.ref)if(nr=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(nr=!0);else return t.lanes=e.lanes,co(e,t,i)}return TS(e,t,n,r,i)}function Ox(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},pt(al,gr),gr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,pt(al,gr),gr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,pt(al,gr),gr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,pt(al,gr),gr|=r;return kn(e,t,i,n),t.child}function Ax(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function TS(e,t,n,r,i){var o=or(n)?aa:On.current;return o=bl(t,o),fl(t,i),n=fb(e,t,n,r,o,i),r=_b(),e!==null&&!nr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,co(e,t,i)):(Tt&&r&&tb(t),t.flags|=1,kn(e,t,n,i),t.child)}function RN(e,t,n,r,i){if(or(n)){var o=!0;Qf(t)}else o=!1;if(fl(t,i),t.stateNode===null)Rf(e,t),Cx(t,n,r),ES(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Vr(u):(u=or(n)?aa:On.current,u=bl(t,u));var p=n.getDerivedStateFromProps,f=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&SN(t,s,r,u),Bo=!1;var _=t.memoizedState;s.state=_,e_(t,r,s,i),l=t.memoizedState,a!==r||_!==l||ir.current||Bo?(typeof p=="function"&&(hS(t,n,p,r),l=t.memoizedState),(a=Bo||EN(t,n,a,r,_,l,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,nx(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Jr(t.type,a),s.props=u,f=t.pendingProps,_=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Vr(l):(l=or(n)?aa:On.current,l=bl(t,l));var m=n.getDerivedStateFromProps;(p=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||_!==l)&&SN(t,s,r,l),Bo=!1,_=t.memoizedState,s.state=_,e_(t,r,s,i);var h=t.memoizedS Line truncated
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ol=L;function r2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var i2=typeof Object.is=="function"?Object.is:r2,o2=Ol.useState,s2=Ol.useEffect,a2=Ol.useLayoutEffect,l2=Ol.useDebugValue;function c2(e,t){var n=t(),r=o2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return a2(function(){i.value=n,i.getSnapshot=t,Bh(i)&&o({inst:i})},[e,n,t]),s2(function(){return Bh(i)&&o({inst:i}),e(function(){Bh(i)&&o({inst:i})})},[e]),l2(n),n}function Bh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i2(e,n)}catch{return!0}}function u2(e,t){return t()}var d2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u2:c2;Jx.useSyncExternalStore=Ol.useSyncExternalStore!==void 0?Ol.useSyncExternalStore:d2;Zx.exports=Jx;var Ib=Zx.exports;function pn(e){this.content=e}pn.prototype={constructor:pn,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new pn(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new pn(n)},addToStart:function(e,t){return new pn([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new pn(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new pn(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=pn.from(e),e.size?new pn(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=pn.from(e),e.size?new pn(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=pn.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};pn.from=function(e){if(e instanceof pn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new pn(t)};function eD(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=eD(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function tD(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=e.child(--i),a=t.child(--o),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,p=Math.min(s.text.length,a.text.length);for(;u<p&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let u=tD(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class Z{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>t&&r(l,i+a,o||null,s)!==!1&&l.content.size){let p=a+1;l.nodesBetween(Math.max(0,t-p),Math.min(l.content.size,n-p),r,i+p)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",s=!0;return this.nodesBetween(t,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=u},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new Z(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>t&&((s<t||l>n)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new Z(r,i)}cutByIndex(t,n){return t==n?Z.empty:t==0&&n==this.content.length?this:new Z(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new Z(i,o)}addToStart(t){return new Z([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Z(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.lenLine truncated
`)}}pa.empty=new pa(!0);class h2{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function lD(e){let t=[];do t.push(E2(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function E2(e){let t=[];do t.push(S2(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function S2(e){let t=y2(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=T2(e,t);else break;return t}function GN(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function T2(e,t){let n=GN(e),r=n;return e.eat(",")&&(e.next!="}"?r=GN(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function b2(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.isInGroup(t)&&i.push(s)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function y2(e){if(e.eat("(")){let t=lD(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=b2(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function C2(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,l){let u={term:l,to:a};return t[s].push(u),u}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(o(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=o(s.exprs[l],a);if(l==s.exprs.length-1)return u;i(u,a=n())}else if(s.type=="star"){let l=n();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u<s.min;u++){let p=n();i(o(s.expr,l),p),l=p}if(s.max==-1)i(o(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let p=n();r(l,p),i(o(s.expr,l),p),l=p}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function cD(e,t){return t-e}function YN(e,t){let n=[];return r(t),n.sort(cD);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&n.indexOf(l)==-1&&r(l)}}}function v2(e){let t=Object.create(null);return n(YN(e,0));function n(r){let i=[];r.forEach(s=>{e[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let p=0;p<i.length;p++)i[p][0]==a&&(u=i[p][1]);YN(e,l).forEach(p=>{u||i.push([a,u=[]]),u.indexOf(p)==-1&&u.push(p)})})});let o=t[r.join(",")]=new pa(r.indexOf(e.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(cD);o.next.push({type:i[s][0],next:t[a.join(",")]||n(a)})}return o}}function R2(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:u}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(u)==-1&&r.push(u)}o&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function uD(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function dD(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function pD(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let o=e[i];o.validate&&o.validate(t[i])}}function fD(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new O2(e,r,t[r]);return n}let $N=class _D{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=fD(t,r.attrs),this.defaultAttrs=uD(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==pa.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultA Line truncated
`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],a=t.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,o=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),a;hD.hasOwnProperty(s)&&this.parser.normalizeLists&&x2(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,r));e:if(l?l.ignore:w2.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let u,p=this.needsBlock;if(gD.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),u=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let f=l&&l.skip?n:this.readStyles(t,n);f&&this.addAll(t,f),u&&this.sync(o),this.needsBlock=p}else{let u=this.readStyles(t,n);u&&this.addElementByRule(t,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}o&&this.sync(a)&&this.open--}addAll(t,n,r,i){let o=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(s,n);this.findAtPoint(t,o)}findPlace(t,n,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(t);if(u&&(!i||i.length>u.length+a)&&(i=u,o=l,!u.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(t,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(t.type));let s=lt.none;for(let a of i.concat(t.marks))(o.type?o.type.allowsMarkType(a.type):qN(a.type,t.type))&&(s=a.addToSet(s));return o.content.push(t.mark(s)),!0}return!1}enter(t,n,r,i){let o=this.findPlace(t.create(n),r,!1);return o&&(o=this.enterInner(t,n,r,!0,i)),o}enterInner(t,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=zN(t,o,s.options);s.options&ru&&s.content.length==0&&(a|=ru);let l=lt.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):qN(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Fp(t,n,l,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Mu)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let p=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!p||p.name!=u&&!p.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function x2(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&hD.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function D2(e,t){return(e.matches||e.msMatchesSelector||e.webkit Line truncated
`))}})}function V2(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function W2(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new sn(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new ae(Z.from(s),0,0),1,!0))}function ro(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,p=n-2;u>o;u--,p--){let f=i.node(u),_=i.index(u);if(f.type.spec.isolating)return!1;let m=f.content.cutByIndex(_,f.childCount),h=r&&r[p+1];h&&(m=m.replaceChild(0,h.type.create(h.attrs)));let E=r&&r[p]||f;if(!f.canReplace(_+1,f.childCount)||!E.type.validContent(m))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function q2(e,t,n=1,r){let i=e.doc.resolve(t),o=Z.empty,s=Z.empty;for(let a=i.depth,l=i.depth-n,u=n-1;a>l;a--,u--){o=Z.from(i.node(a).copy(o));let p=r&&r[u];s=Z.from(p?p.type.create(p.attrs,s):i.node(a).copy(s))}e.step(new rn(t,t,new ae(o.append(s),n,n),!0))}function ys(e,t){let n=e.resolve(t),r=n.index();return RD(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function K2(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let o=t.child(i),s=o.type==r?e.type.schema.nodes.text:o.type;if(n=n.matchType(s),!n||!e.type.allowsMarks(o.marks))return!1}return n.validEnd}function RD(e,t){return!!(e&&t&&!e.isLeaf&&K2(e,t))}function ym(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,s,a=r.index(i);if(i==r.depth?(o=r.nodeBefore,s=r.nodeAfter):n>0?(o=r.node(i+1),a++,s=r.node(i).maybeChild(a)):(o=r.node(i).maybeChild(a-1),s=r.node(i+1)),o&&!o.isTextblock&&RD(o,s)&&r.node(i).canReplace(a,a+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function Q2(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,o=e.doc.resolve(t-n),s=o.node().type;if(i&&s.inlineContent){let p=s.whitespace=="pre",f=!!s.contentMatch.matchType(i);p&&!f?r=!1:!p&&f&&(r=!0)}let a=e.steps.length;if(r===!1){let p=e.doc.resolve(t+n);vD(e,p.node(),p.before(),a)}s.inlineContent&&xb(e,t+n-1,s,o.node().contentMatchAt(o.index()),r==null);let l=e.mapping.slice(a),u=l.map(t-n);if(e.step(new rn(u,l.map(t+n,-1),ae.empty,!0)),r===!0){let p=e.doc.resolve(u);CD(e,p.node(),p.before(),e.steps.length)}return e}function j2(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function Mb(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),u=r.node(s),p=!1;if(o==1)p=u.canReplace(l,l,i);else{let f=u.contentMatchAt(l).findWrapping(i.firstChild.type);p=f&&u.canReplaceWith(l,l,f[0])}if(p)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Cm(e,t,n=t,r=ae.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return ND(i,o,r)?new rn(t,n,r):new X2(i,o,r).fit()}function ND(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class X2{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Z.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=Z.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new ae(o,s,a);return t>-1?new sn(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new rn(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n+ Line truncated
`),f&&h==m.nodeValue.length)for(let E=m,b;E;E=E.parentNode){if(b=E.nextSibling){b.nodeName=="BR"&&(a=l={node:b.parentNode,offset:fn(b)+1});break}let S=E.pmViewDesc;if(S&&S.node&&S.node.isBlock)break}}else{let E=m.childNodes[h-1];f=E&&(E.nodeName=="BR"||E.contentEditable=="false")}}if(li&&p.focusNode&&p.focusNode!=l.node&&p.focusNode.nodeType==1){let m=p.focusNode.childNodes[p.focusOffset];m&&m.contentEditable=="false"&&(i=!0)}if(!(i||f&&Fn)&&_a(a.node,a.offset,p.anchorNode,p.anchorOffset)&&_a(l.node,l.offset,p.focusNode,p.focusOffset))return;let _=!1;if((u.extend||t==n)&&!f){u.collapse(a.node,a.offset);try{t!=n&&u.extend(l.node,l.offset),_=!0}catch{}}if(!_){if(t>n){let h=a;a=l,l=h}let m=document.createRange();m.setEnd(l.node,l.offset),m.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(m)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?t<=s&&n>=r:t<s&&n>r){let a=r+o.border,l=s-o.border;if(t>=a&&n<=l){this.dirty=t==r||n==s?Ks:dO,t==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Oi:o.markDirty(t-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Ks:Oi}r=s}this.dirty=Ks}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Ks:dO;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}}class YD extends dd{constructor(t,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==zr&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class wz extends dd{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class ma extends dd{constructor(t,n,r,i,o){super(t,[],r,i),this.mark=n,this.spec=o}static create(t,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return(!s||!s.dom)&&(s=Sa.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new ma(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Oi||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Oi&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=zr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=zr}}slice(t,n,r){let i=ma.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=zS(o,n,s,r)),t>0&&(o=zS(o,0,t,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class us extends dd{constructor(t,n,r,i,o,s,a,l,u){super(t,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,o,s){let a=o.nodeViews[n.type.name],l,u=a&&a(n,o,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,i),p=u&&u.dom,f=u&&u.contentDOM;if(n.isText){if(!p)p=document.createTextNode(n.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:f}=Sa.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),n.type.spec.draggable&&(p.draggable=!0));let _=p;return p=VD(p,r,n),u?l=new xz(t,n,r,i,p,f||null,_,u,o,s+1):n.isText?new Nm(t,n,r,i,p,_,o):new us(t,n,r,i,p,f||null,_,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.con Line truncated
`);return{dom:l,text:_,slice:t}}function Yb(e,t,n,r,i){let o=i.parent.type.spec.code,s,a;if(!n&&!t)return null;let l=t&&(r||o||!n);if(l){if(e.someProp("transformPastedText",_=>{t=_(t,o||r,e)}),o)return t?new ae(Z.from(e.state.schema.text(t.replace(/\r\n?/g,`
`))),0,0):ae.empty;let f=e.someProp("clipboardTextParser",_=>_(t,i,r,e));if(f)a=f;else{let _=i.marks(),{schema:m}=e.state,h=Sa.fromSchema(m);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(E=>{let b=s.appendChild(document.createElement("p"));E&&b.appendChild(h.serializeNode(m.text(E,_)))})}}else e.someProp("transformPastedHTML",f=>{n=f(n,e)}),s=Zz(n),ud&&Jz(s);let u=s&&s.querySelector("[data-pm-slice]"),p=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let f=+p[3];f>0;f--){let _=s.firstChild;for(;_&&_.nodeType!=1;)_=_.nextSibling;if(!_)break;s=_}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||nu.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||p),context:i,ruleFromNode(_){return _.nodeName=="BR"&&!_.nextSibling&&_.parentNode&&!Qz.test(_.parentNode.nodeName)?{ignore:!0}:null}})),p)a=eV(vO(a,+p[1],+p[2]),p[4]);else if(a=ae.maxOpen(jz(a.content,i),!0),a.openStart||a.openEnd){let f=0,_=0;for(let m=a.content.firstChild;f<a.openStart&&!m.type.spec.isolating;f++,m=m.firstChild);for(let m=a.content.lastChild;_<a.openEnd&&!m.type.spec.isolating;_++,m=m.lastChild);a=vO(a,f,_)}return e.someProp("transformPasted",f=>{a=f(a,e)}),a}const Qz=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function jz(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),o,s=[];if(e.forEach(a=>{if(!s)return;let l=i.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&o.length&&XD(l,o,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=ZD(s[s.length-1],o.length));let p=jD(a,l);s.push(p),i=i.matchType(p.type),o=l}}),s)return Z.from(s)}return e}function jD(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Z.from(e));return e}function XD(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=XD(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Z.from(jD(n,e,i+1))))}}function ZD(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,ZD(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Z.empty,!0);return e.copy(n.append(r))}function qS(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(o=0),i<r-1&&(a=qS(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Z.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function vO(e,t,n){return t<e.openStart&&(e=new ae(qS(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new ae(qS(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const JD={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let RO=null;function eM(){return RO||(RO=document.implementation.createHTMLDocument("title"))}let Kh=null;function Xz(e){let t=window.trustedTypes;return t?(Kh||(Kh=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Kh.createHTML(e)):e}function Zz(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=eM().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&JD[r[1].toLowerCase()])&&(e=i.map(o=>"<"+o+">").join("")+e+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=Xz(e),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function Jz(e){let t=e.querySelectorAll(Nn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function eV(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:o,openEnd:s}=e;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=Z.from(l.create(r[a+1],i)),o++,s++}return new ae(i,o,s)}const Un={},Gn={},tV={touchstart:!0,touchmove:!0};class nV{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function rV(e){for(let t in Un){let n=Un[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{oV(e,r)&&!$b(e,r)&&(e.editable||!(r.type in Gn))&&n(e,r)},tV[t]?{passive:!0}:void 0)}Fn&&e.dom.addEventL Line truncated
`).scrollIntoView()),!0)};function Zb(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const nW=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=Zb(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(Ae.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},SM=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof ar||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Zb(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(s,o.createAndFill());a.setSelection(be.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},TM=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(ro(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&$l(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function rW(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof Te&&t.selection.node.isBlock)return!r.parentOffset||!ro(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let o=[],s,a,l=!1,u=!1;for(let m=r.depth;;m--)if(r.node(m).isBlock){l=r.end(m)==r.pos+(r.depth-m),u=r.start(m)==r.pos-(r.depth-m),a=Zb(r.node(m-1).contentMatchAt(r.indexAfter(m-1))),o.unshift(l&&a?{type:a}:null),s=m;break}else{if(m==1)return!1;o.unshift(null)}let p=t.tr;(t.selection instanceof be||t.selection instanceof ar)&&p.deleteSelection();let f=p.mapping.map(r.pos),_=ro(p.doc,f,o.length,o);if(_||(o[0]=a?{type:a}:null,_=ro(p.doc,f,o.length,o)),!_)return!1;if(p.split(f,o.length,o),!l&&u&&r.node(s).type!=a){let m=p.mapping.map(r.before(s)),h=p.doc.resolve(m);a&&r.node(s-1).canReplaceWith(h.index(),h.index()+1,a)&&p.setNodeMarkup(p.mapping.map(r.before(s)),a)}return n&&n(p.scrollIntoView()),!0}}const iW=rW(),oW=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),t&&t(e.tr.setSelection(Te.create(e.doc,i))),!0)};function sW(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||ys(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function bM(e,t,n,r){let i=t.nodeBefore,o=t.nodeAfter,s,a,l=i.type.spec.isolating||o.type.spec.isolating;if(!l&&sW(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(n){let m=t.pos+o.nodeSize,h=Z.empty;for(let S=s.length-1;S>=0;S--)h=Z.from(s[S].create(null,h));h=Z.from(i.copy(h));let E=e.tr.step(new sn(t.pos-1,m,t.pos,m,new ae(h,1,0),s.length,!0)),b=E.doc.resolve(m+2*s.length);b.nodeAfter&&b.nodeAfter.type==i.type&&ys(E.doc,b.pos)&&E.join(b.pos),n(E.scrollIntoView())}return!0}let p=o.type.spec.isolating||r>0&&l?null:Ae.findFrom(t,1),f=p&&p.$from.blockRange(p.$to),_=f&&$l(f);if(_!=null&&_>=t.depth)return n&&n(e.tr.lift(f,_).scrollIntoView()),!0;if(u&&xl(o,"start",!0)&&xl(i,"end")){let m=i,h=[];for(;h.push(m),!m.isTextblock;)m=m.lastChild;let E=o,b=1;for(;!E.isTextblock;E=E.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,E.content)){if(n){let S=Z.empty;for(let C=h.length-1;C>=0;C--)S=Z.from(h[C].copy(S));let y=e.tr.step(new sn(t.pos-h.length,t.pos+o.nodeSize,t.pos+b,t.pos+o.nodeSize-b,new ae(S,h.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function yM(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(t.tr.setSelection(be.create(t.doc,e<0?i.start(o):i.end(o)))),!0):!1}}const aW=yM(-1),lW=yM(1);function cW(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&Db(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function BO(e,t=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(s,a,(l,u)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let p=n.doc.resolve(u),f=p.index();i=p.parent.canReplaceWith(f,f+1,e)}})}if(!i)return!1;if(r){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];o.setBlockType(a,l,e,t)}r(o.scrollIntoView())}return!0}}function Jb(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}Jb(Qb,pM,_M);Jb(Qb,gM,hM);Jb(EM,SM,TM,iW);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";functio Line truncated
`,textSerializers:s={}}=n||{};let a="";return e.nodesBetween(r,i,(l,u,p,f)=>{var _;l.isBlock&&u>r&&(a+=o);const m=s==null?void 0:s[l.type.name];if(m)return p&&(a+=m({node:l,pos:u,parent:p,index:f,range:t})),!1;l.isText&&(a+=(_=l==null?void 0:l.text)==null?void 0:_.slice(Math.max(r,u)-u,i-u))}),a}function RW(e,t){const n={from:0,to:e.content.size};return wM(e,n,t)}function xM(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function go(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function DM(e,t){const n=go(t,e.schema),{from:r,to:i,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function zt(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function NW(e,t){const n=zt(t,e.schema),{from:r,to:i}=e.selection,o=[];e.doc.nodesBetween(r,i,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function xm(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function ny(e,t){const n=xm(typeof t=="string"?t:t.name,e.schema);return n==="node"?NW(e,t):n==="mark"?DM(e,t):{}}function OW(e,t=JSON.stringify){const n={};return e.filter(r=>{const i=t(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function AW(e){const t=OW(e);return t.length===1?t:t.filter((n,r)=>!t.filter((o,s)=>s!==r).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function MM(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((i,o)=>{const s=[];if(i.ranges.length)i.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=n[o];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const u=t.slice(o).map(a,-1),p=t.slice(o).map(l),f=t.invert().map(u,-1),_=t.invert().map(p);r.push({oldRange:{from:f,to:_},newRange:{from:u,to:p}})})}),AW(r)}function ry(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function S_(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:ry(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function LM(e,t,n={}){return e.find(r=>r.type===t&&S_(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function GO(e,t,n={}){return!!LM(e,t,n)}function iy(e,t,n){var r;if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if((!i.node||!i.node.marks.some(p=>p.type===t))&&(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(p=>p.type===t)||(n=n||((r=i.node.marks[0])==null?void 0:r.attrs),!LM([...i.node.marks],t,n)))return;let s=i.index,a=e.start()+i.offset,l=s+1,u=a+i.node.nodeSize;for(;s>0&&GO([...e.parent.child(s-1).marks],t,n);)s-=1,a-=e.parent.child(s).nodeSize;for(;l<e.parent.childCount&&GO([...e.parent.child(l).marks],t,n);)u+=e.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function oy(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(i=>{const o=n.resolve(e),s=iy(o,i.type);s&&r.push({mark:i,...s})}):n.nodesBetween(e,t,(i,o)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),r}var IW=(e,t,n,r=20)=>{const i=e.doc.resolve(n);let o=r,s=null;for(;o>0&&s===null;){const a=i.node(o);(a==null?void 0:a.type.name)===t?s=a:o-=1}return[s,o]};function Jh(e,t){return t.nodes[e]||t.marks[e]||null}function xf(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=e.find(o=>o.type===t&&o.name===r);return i?i.attribute.keepOnSplit:!1}))}var wW=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(i,o,s,a)=>{var l,u;const p=((u=(l=i.type.spec).toText)==null?void 0:u.call(l,{node:i,pos:o,parent:s,index:a}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?p:p.slice(0,Math.max(0,r-o))}),n};function XS(e,t,n={}){const{empty:r,ranges:i}=e.selection,o=t?go(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(f=>o?o.name===f.type.name:!0).find(f=>S_(f.attrs,n,{strict:!1}));let s=0;const a=[];if(i.forEach(({$from:f,$to:_})=>{const m=f.pos,h=_.pos;e.doc.nodesBetween(m,h,(E,b)=>{if(!E.isText&&!E.marks.length)return;const S=Math.max(m,b),y=Math.min(h,b+E.nodeSize),C=y-S;s+=C,a.push(...E.marks.map(N=>({mark:N,from:S,to:y})))})}),s===0)return!1;const l=a.filter(f=>o?o.name===f.mark.type.name:!0).filter(f=>S_(f.mark.attrs,n,{strict:!1})).reduce((f,_)=>f+_.to-_.from,0),u=a.filter(f=>o?f.mark.type!==o&&f.mark.type.excludes(o):!0).reduce((f,_)=>f+_.to-_.from,0);return(l>0?l+u:l)>=s}function gs(e,t,n={}){const{from:r,to:i,empty:o}=e.selection,s=t?zt(t,e.schema):null,a=[];e.doc.nodesBetween(r,i,(f,_)=>{if(f.isText)return;con Line truncated
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function BW(e){return Object.prototype.toString.call(e).slice(8,-1)}function $p(e){return BW(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function FM(e,t){const n={...e};return $p(e)&&$p(t)&&Object.keys(t).forEach(r=>{$p(t[r])&&$p(e[r])?n[r]=FM(e[r],t[r]):n[r]=t[r]}),n}var sy=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...Ze(ye(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...Ze(ye(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){const t=this.extend({...this.config,addOptions:()=>FM(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},Hn=class UM extends sy{constructor(){super(...arguments),this.type="mark"}static create(t={}){const n=typeof t=="function"?t():t;return new UM(n)}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!!!s.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const l=s.find(u=>(u==null?void 0:u.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}};function FW(e){return typeof e=="number"}var GM=class{constructor(e){this.find=e.find,this.handler=e.handler}},UW=(e,t,n)=>{if(ry(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=e,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function GW(e){const{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:u,can:p}=new Im({editor:t,state:n}),f=[];return n.doc.nodesBetween(r,i,(m,h)=>{if(!m.isTextblock||m.type.spec.code)return;const E=Math.max(r,h),b=Math.min(i,h+m.content.size),S=m.textBetween(E-h,b-h,void 0,"");UW(S,o.find,s).forEach(C=>{if(C.index===void 0)return;const N=E+C.index+1,O=N+C[0].length,x={from:n.tr.mapping.map(N),to:n.tr.mapping.map(O)},w=o.handler({state:n,range:x,match:C,commands:l,chain:u,can:p,pasteEvent:s,dropEvent:a});f.push(w)})}),f.every(m=>m!==null)}var Hp=null,YW=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function $W(e){const{editor:t,rules:n}=e;let r=null,i=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:p,from:f,to:_,rule:m,pasteEvt:h})=>{const E=p.tr,b=Am({state:p,transaction:E});if(!(!GW({editor:t,state:b,from:Math.max(f-1,0),to:_.b-1,rule:m,pasteEvent:h,dropEvent:a})||!E.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,E}};return n.map(p=>new Fe({view(f){const _=h=>{var E;r=(E=f.dom.parentElement)!=null&&E.contains(h.target)?f.dom.parentElement:null,r&&(Hp=t)},m=()=>{Hp&&(Hp=null)};return window.addEventListener("dragstart",_),window.addEventListener("dragend",m),{destroy(){window.removeEventListener("dragstart",_),window.removeEventListener("dragend",m)}}},props:{handleDOMEvents:{drop:(f,_)=>{if(o=r===f.dom.parentElement,a=_,!o){const m=Hp;m!=null&&m.isEditable&&setTimeout(()=>{const h=m.state.selection;h&&m.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(f,_)=>{var m;const h=(m=_.clipboardData)==null?void 0:m.getData("text/html");return s=_,i=!!(h!=null&&h.includes("data-pm-slice")),!1}}},appendTransaction:(f,_,m)=>{const h=f[0],E=h.getMeta("uiEvent")==="paste"&&!i,b=h.getMeta("uiEvent")==="drop"&&!o,S=h.getMeta("applyPasteRules"),y=!!S;if(!E&&!b&&!y)return;if(y){let{text:O}=S;typeof O=="string"?O=O:O=pd(Z.from(O),m.schema);const{from:x}=S,w=x+O.length,D=YW(O);return l({rule:p,state:m,from:x,to:{b:w},pasteEvt:D})}const C=_.doc.content.findDiffStart(m.doc.content),N=_.doc.content.findDiffEnd(m.doc.content);if(!(!FW(C)||!N||C===N.b))return l({rule:p,state:m,from:C,to:N,pasteEvt:s})}}))}var Mm=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=IM(e),this.schema=CW(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{const n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Jh(t.name,this.schema)},r=ye(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){const{editor:e}=this,t=ty([...this.extensions].reverse()),n=[],r=[],i=t.map(o=>{const s={name:o.name,options: Line truncated
position: relative;
}
.ProseMirror {
word-wrap: break-word;
white-space: pre-wrap;
white-space: break-spaces;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}
.ProseMirror [contenteditable="false"] {
white-space: normal;
}
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
white-space: pre-wrap;
}
.ProseMirror pre {
white-space: pre-wrap;
}
img.ProseMirror-separator {
display: inline !important;
border: none !important;
margin: 0 !important;
width: 0 !important;
height: 0 !important;
}
.ProseMirror-gapcursor {
display: none;
pointer-events: none;
position: absolute;
margin: 0;
}
.ProseMirror-gapcursor:after {
content: "";
display: block;
position: absolute;
top: -2px;
width: 20px;
border-top: 1px solid black;
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}
@keyframes ProseMirror-cursor-blink {
to {
visibility: hidden;
}
}
.ProseMirror-hideselection *::selection {
background: transparent;
}
.ProseMirror-hideselection *::-moz-selection {
background: transparent;
}
.ProseMirror-hideselection * {
caret-color: transparent;
}
.ProseMirror-focused .ProseMirror-gapcursor {
display: block;
}`;function Jq(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}var tL=class extends EW{constructor(e={}){super(),this.css=null,this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:i,moved:o})=>this.options.onDrop(r,i,o)),this.on("paste",({event:r,slice:i})=>this.options.onPaste(r,i)),this.on("delete",this.options.onDelete);const t=this.createDoc(),n=BM(t,this.options.autofocus);this.editorState=qs.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const e=this.editorView.dom;e!=null&&e.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=Jq(Zq,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.editorState=this.state.apply(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){const n=OM(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let n=t;if([].concat(e).forEach(i=>{const o=typeof i=="string"?`${i}$`:i.key;n=n.filter(s=>!s.key.startsWith(o))}),t.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;const r=[...this.options.enableCoreExtensions?[QM,$M.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),WM,XM,ZM,eL,KM,JM,qM].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new Mm(r,this)}createCommandManager(){this.commandManager=new Im({editor:this})}createSchema(){this.sche Line truncated
`,textSerializers:n={}}=e||{};return RW(this.state.doc,{blockSeparator:t,textSerializers:{...xM(this.schema),...n}})}get isEmpty(){return Dm(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new Xq(t,this)}get $doc(){return this.$pos(0)}};function uo(e){return new fd({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ze(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),u=n.from+a.indexOf(s),p=u+s.length;if(oy(n.from,n.to,t.doc).filter(m=>m.mark.type.excluded.find(E=>E===e.type&&E!==m.mark.type)).filter(m=>m.to>u).length)return null;p<n.to&&o.delete(p,n.to),u>n.from&&o.delete(n.from+l,u);const _=n.from+l+s.length;o.addMark(n.from+l,_,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function ay(e){return new fd({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ze(e.getAttributes,void 0,r)||{},{tr:o}=t,s=n.from;let a=n.to;const l=e.type.create(i);if(r[1]){const u=r[0].lastIndexOf(r[1]);let p=s+u;p>a?p=a:a=p+r[1].length;const f=r[0][r[0].length-1];o.insertText(f,s+r[0].length-1),o.replaceWith(p,a,l)}else if(r[0]){const u=e.type.isInline?s:s-1;o.insert(u,e.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()}})}function ZS(e){return new fd({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=Ze(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function Lt(e){return new fd({find:e.find,handler:({state:t,range:n,match:r})=>{let i=e.replace,o=n.from;const s=n.to;if(r[1]){const a=r[0].lastIndexOf(r[1]);i+=r[0].slice(a+r[1].length),o+=a;const l=o-s;l>0&&(i=r[0].slice(a-l,a)+i,o=s)}t.tr.insertText(i,o,s)}})}function Dl(e){return new fd({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const o=Ze(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),u=l&&Db(l,e.type,o);if(!u)return null;if(s.wrap(l,u),e.keepMarks&&e.editor){const{selection:f,storedMarks:_}=t,{splittableMarks:m}=e.editor.extensionManager,h=_||f.$to.parentOffset&&f.$from.marks();if(h){const E=h.filter(b=>m.includes(b.type.name));s.ensureMarks(E)}}if(e.keepAttributes){const f=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(f,o).run()}const p=s.doc.resolve(n.from-1).nodeBefore;p&&p.type===e.type&&ys(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,p))&&s.join(n.from-1)}})}function eK(e,t){const{selection:n}=e,{$from:r}=n;if(n instanceof Te){const o=r.index();return r.parent.canReplaceWith(o,o+1,t)}let i=r.depth;for(;i>=0;){const o=r.index(i);if(r.node(i).contentMatchAt(o).matchType(t))return!0;i-=1}return!1}function tK(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function nK(e,t,n={}){const{state:r}=t,{doc:i,tr:o}=r,s=e;i.descendants((a,l)=>{const u=o.mapping.map(l),p=o.mapping.map(l)+a.nodeSize;let f=null;if(a.marks.forEach(m=>{if(m!==s)return!1;f=m}),!f)return;let _=!1;if(Object.keys(n).forEach(m=>{n[m]!==f.attrs[m]&&(_=!0)}),_){const m=e.type.create({...e.attrs,...n});o.removeMark(u,p,e.type),o.addMark(u,p,m)}}),o.docChanged&&t.view.dispatch(o)}var ct=class nL extends sy{constructor(){super(...arguments),this.type="node"}static create(t={}){const n=typeof t=="function"?t():t;return new nL(n)}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}},rK=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,i,o,s,a;const{view:l}=this.editor,u=e.target,p=u.nodeType===3?(t=u.parentElement)==null?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(u)||!p)return;let f=0,_=0;if(this.dom!==p){const y=this.dom.getBoundingClientRect(),C=p.getBoundingClientRect(),N=(i=e.offsetX)!=null?i:(r=e.nativeEvent)==null?void 0:r.offsetX,O=(s=e.offsetY)!=null?s:(o=e.nativeEvent)==null?void 0:o.offsetY;f=C.x-y.x+N,_=C.y-y.y+O}const m=this.dom.cloneNode(!0);try{const y=this.dom.getBoundingClientRect();m.style.width=`${Math.round(y.width)}px`,m.style.height=`${Math.round(y.height)}px`,m.style.boxSizing="border-box",m.style.pointerEvents="none"}catch{}let h=null;tr Line truncated
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var km=L,aK=Ib;function lK(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cK=typeof Object.is=="function"?Object.is:lK,uK=aK.useSyncExternalStore,dK=km.useRef,pK=km.useEffect,fK=km.useMemo,_K=km.useDebugValue;iL.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=dK(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=fK(function(){function l(m){if(!u){if(u=!0,p=m,m=r(m),i!==void 0&&s.hasValue){var h=s.value;if(i(h,m))return f=h}return f=m}if(h=f,cK(p,m))return h;var E=r(m);return i!==void 0&&i(h,E)?(p=m,h):(p=m,f=E)}var u=!1,p,f,_=n===void 0?null:n;return[function(){return l(t())},_===null?void 0:function(){return l(_())}]},[t,n,r,i]);var a=uK(e,o[0],o[1]);return pK(function(){s.hasValue=!0,s.value=a},[a]),_K(a),a};rL.exports=iL;var mK=rL.exports,gK=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},hK=({contentComponent:e})=>{const t=Ib.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return v.jsx(v.Fragment,{children:Object.values(t)})};function EK(){const e=new Set;let t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:n2.createPortal(r.reactElement,r.element,n)},e.forEach(i=>i())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(i=>i())}}}var SK=class extends rr.Component{constructor(e){var t;super(e),this.editorContentRef=rr.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=EK(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;const t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!((e=t.options.element)!=null&&e.firstChild)))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:e,innerRef:t,...n}=this.props;return v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:gK(t,this.editorContentRef),...n}),(e==null?void 0:e.contentComponent)&&v.jsx(hK,{contentComponent:e.contentComponent})]})}},TK=L.forwardRef((e,t)=>{const n=rr.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return rr.createElement(SK,{key:n,innerRef:t,...e})}),bK=rr.memo(TK),yK=typeof window<"u"?L.useLayoutEffect:L.useEffect,CK=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function vK(e){var t;const[n]=L.useState(()=>new CK(e.editor)),r=mK.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:sK);return yK(()=>n.watch(e.editor),[e.editor,n]),L.useDebugValue(r),r}var RK=!1,JS=typeof window>"u",NK=JS||!!(typeof window<"u"&&window.next),OK=class oL{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){return this.optLine truncated
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/T_.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,p="__lodash_placeholder__",f=1,_=2,m=4,h=1,E=2,b=1,S=2,y=4,C=8,N=16,O=32,x=64,w=128,D=256,q=512,Y=30,le="...",de=800,se=16,pe=1,ne=2,$=3,U=1/0,k=9007199254740991,B=17976931348623157e292,z=NaN,V=4294967295,J=V-1,he=V>>>1,Re=[["ary",w],["bind",b],["bindKey",S],["curry",C],["curryRight",N],["flip",q],["partial",O],["partialRight",x],["rearg",D]],fe="[object Arguments]",ze="[object Array]",st="[object AsyncFunction]",Et="[object Boolean]",ke="[object Date]",Xt="[object DOMException]",Ot="[object Error]",zn="[object Function]",Ce="[object GeneratorFunction]",bt="[object Map]",yt="[object Number]",Zt="[object Null]",Vt="[object Object]",ve="[object Promise]",_e="[object Proxy]",Xe="[object RegExp]",Ee="[object Set]",Ye="[object String]",Jt="[object Symbol]",Vn="[object Undefined]",Wn="[object WeakMap]",oe="[object WeakSet]",K="[object ArrayBuffer]",ee="[object DataView]",ue="[object Float32Array]",Ne="[object Float64Array]",Je="[object Int8Array]",En="[object Int16Array]",To="[object Int32Array]",ya="[object Uint8Array]",yd="[object Uint8ClampedArray]",Cd="[object Uint16Array]",vd="[object Uint32Array]",Gy=/\b__p \+= '';/g,Yy=/\b(__p \+=) '' \+/g,$y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,zm=/&(?:amp|lt|gt|quot|#39);/g,Vm=/[&<>"']/g,Hy=RegExp(zm.source),zy=RegExp(Vm.source),Vy=/<%-([\s\S]+?)%>/g,Wy=/<%([\s\S]+?)%>/g,Wm=/<%=([\s\S]+?)%>/g,qy=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ky=/^\w*$/,Qy=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rd=/[\\^$.*+?()[\]{}|]/g,jy=RegExp(Rd.source),Nd=/^\s+/,Xy=/\s/,Zy=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jy=/\{\n\/\* \[wrapped with (.+)\] \*/,eC=/,? & /,tC=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,nC=/[()=,{}\[\]\/\s]/,rC=/\\(\\)?/g,iC=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qm=/\w*$/,oC=/^[-+]0x[0-9a-f]+$/i,sC=/^0b[01]+$/i,aC=/^\[object .+?Constructor\]$/,lC=/^0o[0-7]+$/i,cC=/^(?:0|[1-9]\d*)$/,uC=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kl=/($^)/,dC=/['\n\r\u2028\u2029\\]/g,Ql="\\ud800-\\udfff",pC="\\u0300-\\u036f",fC="\\ufe20-\\ufe2f",_C="\\u20d0-\\u20ff",Km=pC+fC+_C,Qm="\\u2700-\\u27bf",jm="a-z\\xdf-\\xf6\\xf8-\\xff",mC="\\xac\\xb1\\xd7\\xf7",gC="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hC="\\u2000-\\u206f",EC=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Xm="A-Z\\xc0-\\xd6\\xd8-\\xde",Zm="\\ufe0e\\ufe0f",Jm=mC+gC+hC+EC,Od="['’]",SC="["+Ql+"]",eg="["+Jm+"]",jl="["+Km+"]",tg="\\d+",TC="["+Qm+"]",ng="["+jm+"]",rg="[^"+Ql+Jm+tg+Qm+jm+Xm+"]",Xl="\\ud83c[\\udffb-\\udfff]",ig="(?:"+jl+"|"+Xl+")",Ad="[^"+Ql+"]",Zl="(?:\\ud83c[\\udde6-\\uddff]){2}",Jl="[\\ud800-\\udbff][\\udc00-\\udfff]",bo="["+Xm+"]",Id="\\u200d",ec="(?:"+ng+"|"+rg+")",wd="(?:"+bo+"|"+rg+")",tc="(?:"+Od+"(?:d|ll|m|re|s|t|ve))?",xd="(?:"+Od+"(?:D|LL|M|RE|S|T|VE))?",Dd=ig+"?",nc="["+Zm+"]?",Ca="(?:"+Id+"(?:"+[Ad,Zl,Jl].join("|")+")"+nc+Dd+")*",rc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Md="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ic=nc+Dd+Ca,Ld="(?:"+[TC,Zl,Jl].join("|")+")"+ic,bC="(?:"+[Ad+jl+"?",jl,Zl,Jl,SC].join("|")+")",yC=RegExp(Od,"g"),UP=RegExp(jl,"g"),og=RegExp(Xl+"(?="+Xl+")|"+bC+ic,"g"),GP=RegExp([bo+"?"+ng+"+"+tc+"(?="+[eg,bo,"$"].join("|")+")",wd+"+"+xd+"(?="+[eg,bo+ec,"$"].join("|")+")",bo+"?"+ec+"+"+tc,bo+"+"+xd,Md,rc,tg,Ld].join("|"),"g"),YP=RegExp("["+Id+Ql+Km+Zm+"]"),$P=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,HP=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],zP=-1,_t={};_t[ue]=_t[Ne]=_t[Je]=_t[En]=_t[To]=_t[ya]=_t[yd]=_t[Cd]=_t[vd]=!0,_t[fe]=_t[ze]=_t[K]=_t[Et]=_t[ee]=_t[ke]=_t[Ot]=_t[zn]=_t[bt]=_t[yt]=_t[Vt]=_t[Xe]=_t[Ee]=_t[Ye]=_t[Wn]=!1;var ut={};ut[fe]=ut[ze]=ut[K]=ut[ee]=ut[Et]=ut[ke]=ut[ue]=ut[Ne]=ut[Je]=ut[En]=ut[To]=ut[bt]=ut[yt]=ut[Vt]=ut[Xe]=ut[Ee]=ut[Ye]=ut[Jt]=ut[ya]=ut[yd]=ut[Cd]=ut[vd]=!0,ut[Ot]=ut[zn]=ut[Wn]=!1;var VP={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c"Line truncated
/* [wrapped with `+d+`] */
`)}function aB(c){return Me(c)||Ms(c)||!!(VC&&c&&c[VC])}function ki(c,d){var g=typeof c;return d=d??k,!!d&&(g=="number"||g!="symbol"&&cC.test(c))&&c>-1&&c%1==0&&c<d}function xn(c,d,g){if(!Ct(g))return!1;var T=typeof d;return(T=="number"?Kn(g)&&ki(d,g.length):T=="string"&&d in g)?Qr(g[d],c):!1}function Wg(c,d){if(Me(c))return!1;var g=typeof c;return g=="number"||g=="symbol"||g=="boolean"||c==null||fr(c)?!0:Ky.test(c)||!qy.test(c)||d!=null&&c in at(d)}function lB(c){var d=typeof c;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?c!=="__proto__":c===null}function qg(c){var d=cp(c),g=A[d];if(typeof g!="function"||!(d in Ve.prototype))return!1;if(c===g)return!0;var T=Hg(g);return!!T&&c===T[0]}function cB(c){return!!YC&&YC in c}var uB=Ud?Pi:uh;function hc(c){var d=c&&c.constructor,g=typeof d=="function"&&d.prototype||Aa;return c===g}function Yv(c){return c===c&&!Ct(c)}function $v(c,d){return function(g){return g==null?!1:g[c]===d&&(d!==n||c in at(g))}}function dB(c){var d=mp(c,function(T){return g.size===u&&g.clear(),T}),g=d.cache;return d}function pB(c,d){var g=c[1],T=d[1],R=g|T,I=R<(b|S|w),M=T==w&&g==C||T==w&&g==D&&c[7].length<=d[8]||T==(w|D)&&d[7].length<=d[8]&&g==C;if(!(I||M))return c;T&b&&(c[2]=d[2],R|=g&b?0:y);var P=d[3];if(P){var H=c[3];c[3]=H?vv(H,P,d[4]):P,c[4]=H?vo(c[3],p):d[4]}return P=d[5],P&&(H=c[5],c[5]=H?Rv(H,P,d[6]):P,c[6]=H?vo(c[5],p):d[6]),P=d[7],P&&(c[7]=P),T&w&&(c[8]=c[8]==null?d[8]:Sn(c[8],d[8])),c[9]==null&&(c[9]=d[9]),c[0]=d[0],c[1]=R,c}function fB(c){var d=[];if(c!=null)for(var g in at(c))d.push(g);return d}function _B(c){return Yd.call(c)}function Hv(c,d,g){return d=qt(d===n?c.length-1:d,0),function(){for(var T=arguments,R=-1,I=qt(T.length-d,0),M=W(I);++R<I;)M[R]=T[d+R];R=-1;for(var P=W(d+1);++R<d;)P[R]=T[R];return P[d]=g(M),ur(c,this,P)}}function zv(c,d){return d.length<2?c:ws(c,Ir(d,0,-1))}function mB(c,d){for(var g=c.length,T=Sn(d.length,g),R=qn(c);T--;){var I=d[T];c[T]=ki(I,g)?R[I]:n}return c}function Kg(c,d){if(!(d==="constructor"&&typeof c[d]=="function")&&d!="__proto__")return c[d]}var Vv=qv(_v),Ec=w0||function(c,d){return cn.setTimeout(c,d)},Qg=qv(F1);function Wv(c,d,g){var T=d+"";return Qg(c,sB(T,gB(rB(T),g)))}function qv(c){var d=0,g=0;return function(){var T=L0(),R=se-(T-g);if(g=T,R>0){if(++d>=de)return arguments[0]}else d=0;return c.apply(n,arguments)}}function dp(c,d){var g=-1,T=c.length,R=T-1;for(d=d===n?T:d;++g<d;){var I=xg(g,R),M=c[I];c[I]=c[g],c[g]=M}return c.length=d,c}var Kv=dB(function(c){var d=[];return c.charCodeAt(0)===46&&d.push(""),c.replace(Qy,function(g,T,R,I){d.push(R?I.replace(rC,"$1"):T||g)}),d});function pi(c){if(typeof c=="string"||fr(c))return c;var d=c+"";return d=="0"&&1/c==-U?"-0":d}function Ds(c){if(c!=null){try{return Gd.call(c)}catch{}try{return c+""}catch{}}return""}function gB(c,d){return Rr(Re,function(g){var T="_."+g[0];d&g[1]&&!kd(c,T)&&c.push(T)}),c.sort()}function Qv(c){if(c instanceof Ve)return c.clone();var d=new Or(c.__wrapped__,c.__chain__);return d.__actions__=qn(c.__actions__),d.__index__=c.__index__,d.__values__=c.__values__,d}function hB(c,d,g){(g?xn(c,d,g):d===n)?d=1:d=qt(Le(d),0);var T=c==null?0:c.length;if(!T||d<1)return[];for(var R=0,I=0,M=W(qd(T/d));R<T;)M[I++]=Ir(c,R,R+=d);return M}function EB(c){for(var d=-1,g=c==null?0:c.length,T=0,R=[];++d<g;){var I=c[d];I&&(R[T++]=I)}return R}function SB(){var c=arguments.length;if(!c)return[];for(var d=W(c-1),g=arguments[0],T=c;T--;)d[T-1]=arguments[T];return Co(Me(g)?qn(g):[g],un(d,1))}var TB=Ue(function(c,d){return kt(c)?pc(c,un(d,1,kt,!0)):[]}),bB=Ue(function(c,d){var g=wr(d);return kt(g)&&(g=n),kt(c)?pc(c,un(d,1,kt,!0),Oe(g,2)):[]}),yB=Ue(function(c,d){var g=wr(d);return kt(g)&&(g=n),kt(c)?pc(c,un(d,1,kt,!0),n,g):[]});function CB(c,d,g){var T=c==null?0:c.length;return T?(d=g||d===n?1:Le(d),Ir(c,d<0?0:d,T)):[]}function vB(c,d,g){var T=c==null?0:c.length;return T?(d=g||d===n?1:Le(d),d=T-d,Ir(c,0,d<0?0:d)):[]}function RB(c,d){return c&&c.length?rp(c,Oe(d,3),!0,!0):[]}function NB(c,d){return c&&c.length?rp(c,Oe(d,3),!0):[]}function OB(c,d,g,T){var R=c==null?0:c.length;return R?(g&&typeof g!="number"&&xn(c,d,g)&&(g=0,T=R),S1(c,d,g,T)):[]}function jv(c,d,g){var T=c==null?0:c.length;if(!T)return-1;var R=g==null?0:Le(g);return R<0&&(R=qt(T+R,0)),Pd(c,Oe(d,3),R)}function Xv(c,d,g){var T=c==null?0:c.length;if(!T)return-1;var R=T-1;return g!==n&&(R=Le(g),R=g<0?qt(T+R,0):Sn(R,T-1)),Pd(c,Oe(d,3),R,!0)}function Zv(c){var d=c==null?0:c.length;return d?un(c,1):[]}function AB(c){var d=c==null?0:c.length;return d?un(c,U):[]}function IB(c,d){var g=c==null?0:c.length;return g?(d=d===n?1:Le(d),un(c,d)):[]}function wB(c){for(var d=-1,g=c==null?0:c.length,T={};++d<g;){var R=c[d];T[R[0]]=R[1]}return T}function Jv(c){return c&&c.length?c[0]:n}function xB(c,d,g){var T=c==null?0:c.length;if(!T)return-1;var R=g==null?0:Le(g);return R<0&&(R=qt(T+R,0)),va(c,d,R)}function DB(c){var d=c==null?0:c.length;return d?Ir(c,0,-1):[]}var MB=Ue(function(c){var d=St(c,Pg);return d.length&&d[0]===c[0]?Ng(d):[]}),LB=Ue( Line truncated
`;c.replace(ce,function(we,$e,We,_r,Dn,mr){return We||(We=_r),te+=c.slice(j,mr).replace(dC,u0),$e&&(P=!0,te+=`' +
__e(`+$e+`) +
'`),Dn&&(H=!0,te+=`';
`+Dn+`;
__p += '`),We&&(te+=`' +
((__t = (`+We+`)) == null ? '' : __t) +
'`),j=mr+we.length,we}),te+=`';
`;var Ie=nt.call(d,"variable")&&d.variable;if(!Ie)te=`with (obj) {
`+te+`
}
`;else if(nC.test(Ie))throw new De(a);te=(H?te.replace(Gy,""):te).replace(Yy,"$1").replace($y,"$1;"),te="function("+(Ie||"obj")+`) {
`+(Ie?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(P?", __e = _.escape":"")+(H?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+te+`return __p
}`;var Pe=OR(function(){return et(I,Se+"return "+te).apply(n,M)});if(Pe.source=te,eh(Pe))throw Pe;return Pe}function PG(c){return tt(c).toLowerCase()}function BG(c){return tt(c).toUpperCase()}function FG(c,d,g){if(c=tt(c),c&&(g||d===n))return PC(c);if(!c||!(d=pr(d)))return c;var T=qr(c),R=qr(d),I=BC(T,R),M=FC(T,R)+1;return Io(T,I,M).join("")}function UG(c,d,g){if(c=tt(c),c&&(g||d===n))return c.slice(0,GC(c)+1);if(!c||!(d=pr(d)))return c;var T=qr(c),R=FC(T,qr(d))+1;return Io(T,0,R).join("")}function GG(c,d,g){if(c=tt(c),c&&(g||d===n))return c.replace(Nd,"");if(!c||!(d=pr(d)))return c;var T=qr(c),R=BC(T,qr(d));return Io(T,R).join("")}function YG(c,d){var g=Y,T=le;if(Ct(d)){var R="separator"in d?d.separator:R;g="length"in d?Le(d.length):g,T="omission"in d?pr(d.omission):T}c=tt(c);var I=c.length;if(Ra(c)){var M=qr(c);I=M.length}if(g>=I)return c;var P=g-Na(T);if(P<1)return T;var H=M?Io(M,0,P).join(""):c.slice(0,P);if(R===n)return H+T;if(M&&(P+=H.length-P),th(R)){if(c.slice(P).search(R)){var j,X=H;for(R.global||(R=hg(R.source,tt(qm.exec(R))+"g")),R.lastIndex=0;j=R.exec(X);)var te=j.index;H=H.slice(0,te===n?P:te)}}else if(c.indexOf(pr(R),P)!=P){var ce=H.lastIndexOf(R);ce>-1&&(H=H.slice(0,ce))}return H+T}function $G(c){return c=tt(c),c&&Hy.test(c)?c.replace(zm,h0):c}var HG=Ma(function(c,d,g){return c+(g?" ":"")+d.toUpperCase()}),ih=Av("toUpperCase");function NR(c,d,g){return c=tt(c),d=g?n:d,d===n?p0(c)?T0(c):r0(c):c.match(d)||[]}var OR=Ue(function(c,d){try{return ur(c,n,d)}catch(g){return eh(g)?g:new De(g)}}),zG=Li(function(c,d){return Rr(d,function(g){g=pi(g),Di(c,g,Zg(c[g],c))}),c});function VG(c){var d=c==null?0:c.length,g=Oe();return c=d?St(c,function(T){if(typeof T[1]!="function")throw new Nr(s);return[g(T[0]),T[1]]}):[],Ue(function(T){for(var R=-1;++R<d;){var I=c[R];if(ur(I[0],this,T))return ur(I[1],this,T)}})}function WG(c){return h1(Ar(c,f))}function oh(c){return function(){return c}}function qG(c,d){return c==null||c!==c?d:c}var KG=wv(),QG=wv(!0);function jn(c){return c}function sh(c){return sv(typeof c=="function"?c:Ar(c,f))}function jG(c){return lv(Ar(c,f))}function XG(c,d){return cv(c,Ar(d,f))}var ZG=Ue(function(c,d){return function(g){return fc(g,c,d)}}),JG=Ue(function(c,d){return function(g){return fc(c,g,d)}});function ah(c,d,g){var T=en(d),R=ep(d,T);g==null&&!(Ct(d)&&(R.length||!T.length))&&(g=d,d=c,c=this,R=ep(d,en(d)));var I=!(Ct(g)&&"chain"in g)||!!g.chain,M=Pi(c);return Rr(R,function(P){var H=d[P];c[P]=H,M&&(c.prototype[P]=function(){var j=this.__chain__;if(I||j){var X=c(this.__wrapped__),te=X.__actions__=qn(this.__actions__);return te.push({func:H,args:arguments,thisArg:c}),X.__chain__=j,X}return H.apply(c,Co([this.value()],arguments))})}),c}function eY(){return cn._===this&&(cn._=N0),this}function lh(){}function tY(c){return c=Le(c),Ue(function(d){return uv(d,c)})}var nY=Ug(St),rY=Ug(xC),iY=Ug(ug);function AR(c){return Wg(c)?dg(pi(c)):L1(c)}function oY(c){return function(d){return c==null?n:ws(c,d)}}var sY=Dv(),aY=Dv(!0);function ch(){return[]}function uh(){return!1}function lY(){return{}}function cY(){return""}function uY(){return!0}function dY(c,d){if(c=Le(c),c<1||c>k)return[];var g=V,T=Sn(c,V);d=Oe(d),c-=V;for(var R=_g(T,d);++g<c;)d(g);return R}function pY(c){return Me(c)?St(c,pi):fr(c)?[c]:qn(Kv(tt(c)))}function fY(c){var d=++v0;return tt(c)+d}var _Y=sp(function(c,d){return c+d},0),mY=Gg("ceil"),gY=sp(function(c,d){return c/d},1),hY=Gg("floor");function EY(c){return c&&c.length?Jd(c,jn,Rg):n}function SY(c,d){return c&&c.length?Jd(c,Oe(d,2),Rg):n}function TY(c){return LC(c,jn)}function bY(c,d){return LC(c,Oe(d,2))}function yY(c){return c&&c.length?Jd(c,jn,Ig):n}function CY(c,d){return c&&c.length?Jd(c,Oe(d,2),Ig):n}var vY=sp(function(c,d){return c*d},1),RY=Gg("round"),NY=sp(function(c,d){return c-d},0);function OY(c){return c&&c.length?fg(c,jn):0}function AY(c,d){return c&&c.length?fg(c,Oe(d,2)):0}return A.after=jF,A.ary=oR,A.assign=BU,A.assignIn=SR,A.assignInWith=Sp,A.assignWith=FU,A.at=UU,A.before=sR,A.bind=Zg,A.bindAll=zG,A.bindKey=aR,A.castArray=lU,A.chain=nR,A.chunk=hB,A.compact=EB,A.concat=SB,A.cond=VG,A.conforms=WG,A.constant=oh,A.countBy=OF,A.create=GU,A.curry=lR,A.curryRight=cR,A.debounce=uR,A.defaults=YU,A.defaultsDeep=$U,A.defer=XF,A.delay=ZF,A.difference=TB,A.differenceBy=bB,A.differenceWith=yB,A.drop=CB,A.dropRight=vB,A.dropRightWhile=RB,A.dropWhile=NB,A.fill=OB,A.filter=IF,A.flatMap=DF,A.flatMapDeep=MF,A.flatMapDepth=LF,A.flatten=Zv,A.flattenDeep=AB,A.flattenDepth=IB,A.flip=JF,A.flow=KG,A.flowRight=QG,A.fromPairs=wB,A.functions=QU,A.functionsIn=jU,A.groupBy=kF,A.initial=DB,A.intersection=MB,A.intersectionBy=LB,A.intersectionWith=kB,A.invert=ZU,A.invertBy=JU,A.invokeMap=BF,A.iteratee=sh,A.keyBy=FF,A.keys=en,A.keysIn=Qn,A.map=fp,A.mapKeys=tG,A.mapValues=nG,A.matches=jG,A.matchesProperty=XG,A.memoize=mp,A.merge=rG,A.mergeWith=TR,A.method=ZG,A.methodOf=JG,A.mixin=ah,A.negate=gp,A.nthArg=tY,A.omit=iG,A.omitBy=oG,A.once=eU,A.orderBy=UF,A.over=nY,A.overArgs=tU,A.overEvery=rY,A.overS Line truncated
`);return!o||!s?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0?!1:r.nodeAt(a)?e.commands.command(({tr:u})=>(u.setSelection(Ae.near(r.resolve(a))),!0)):e.commands.exitCode()}}},addInputRules(){return[ZS({find:ZK,type:this.type,getAttributes:e=>({language:e[1]})}),ZS({find:JK,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Fe({key:new Ge("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i==null?void 0:i.mode;if(!n||!o)return!1;const{tr:s,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,`
`));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(be.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),t3=e3;function yL(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&yL(n)}),e}let nA=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function CL(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Xo(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const n3="</span>",rA=e=>!!e.scope,r3=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};let i3=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=CL(t)}openNode(t){if(!rA(t))return;const n=r3(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){rA(t)&&(this.buffer+=n3)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}};const iA=(e={})=>{const t={children:[]};return Object.assign(t,e),t};let o3=class vL{constructor(){this.rootNode=iA(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=iA({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{vL._collapse(n)}))}},s3=class extends o3{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new i3(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function zu(e){return e?typeof e=="string"?e:e.source:null}function RL(e){return Ta("(?=",e,")")}function a3(e){return Ta("(?:",e,")*")}function l3(e){return Ta("(?:",e,")?")}function Ta(...e){return e.map(n=>zu(n)).join("")}function c3(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function uy(...e){return"("+(c3(e).capture?"":"?:")+e.map(r=>zu(r)).join("|")+")"}function NL(e){return new RegExp(e.toString()+"|").exec("").length-1}function u3(e,t){const n=e&&e.exec(t);return n&&n.index===0}const d3=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function dy(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let o=zu(r),s="";for(;o.length>0;){const a=d3.exec(o);if(!a){s+=o;break}s+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+i):(s+=a[0],a[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}const p3=/\b\B/,OL="[a-zA-Z]\\w*",py="[a-zA-Z_]\\w*",AL="\\b\\d+(\\.\\d+)?",IL="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",wL="\\b(0b[01]+)",f3="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",_3=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Ta(t,/.*\b/,e.binary,/\b.*/)),Xo({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Vu={begin:"\\\\[\\s\\S]",relevance:0},m3={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Vu]},g3={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Vu]},h3={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Bm=function(e,t,n={}){const r=Xo({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=uy("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Ta(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},E3=Bm("//","$"),S3=Bm("/\\*","\\*/"),T3=Bm("#","$" Line truncated
https://github.com/highlightjs/highlight.js/issues/2277`),z=$,B=U),k===void 0&&(k=!0);const V={code:B,language:z};pe("before:highlight",V);const J=V.result?V.result:f(V.language,V.code,k);return J.code=V.code,pe("after:highlight",J),J}function f($,U,k,B){const z=Object.create(null);function V(oe,K){return oe.keywords[K]}function J(){if(!ve.keywords){Xe.addText(Ee);return}let oe=0;ve.keywordPatternRe.lastIndex=0;let K=ve.keywordPatternRe.exec(Ee),ee="";for(;K;){ee+=Ee.substring(oe,K.index);const ue=yt.case_insensitive?K[0].toLowerCase():K[0],Ne=V(ve,ue);if(Ne){const[Je,En]=Ne;if(Xe.addText(ee),ee="",z[ue]=(z[ue]||0)+1,z[ue]<=K3&&(Ye+=En),Je.startsWith("_"))ee+=K[0];else{const To=yt.classNameAliases[Je]||Je;fe(K[0],To)}}else ee+=K[0];oe=ve.keywordPatternRe.lastIndex,K=ve.keywordPatternRe.exec(Ee)}ee+=Ee.substring(oe),Xe.addText(ee)}function he(){if(Ee==="")return;let oe=null;if(typeof ve.subLanguage=="string"){if(!t[ve.subLanguage]){Xe.addText(Ee);return}oe=f(ve.subLanguage,Ee,!0,_e[ve.subLanguage]),_e[ve.subLanguage]=oe._top}else oe=m(Ee,ve.subLanguage.length?ve.subLanguage:null);ve.relevance>0&&(Ye+=oe.relevance),Xe.__addSublanguage(oe._emitter,oe.language)}function Re(){ve.subLanguage!=null?he():J(),Ee=""}function fe(oe,K){oe!==""&&(Xe.startScope(K),Xe.addText(oe),Xe.endScope())}function ze(oe,K){let ee=1;const ue=K.length-1;for(;ee<=ue;){if(!oe._emit[ee]){ee++;continue}const Ne=yt.classNameAliases[oe[ee]]||oe[ee],Je=K[ee];Ne?fe(Je,Ne):(Ee=Je,J(),Ee=""),ee++}}function st(oe,K){return oe.scope&&typeof oe.scope=="string"&&Xe.openNode(yt.classNameAliases[oe.scope]||oe.scope),oe.beginScope&&(oe.beginScope._wrap?(fe(Ee,yt.classNameAliases[oe.beginScope._wrap]||oe.beginScope._wrap),Ee=""):oe.beginScope._multi&&(ze(oe.beginScope,K),Ee="")),ve=Object.create(oe,{parent:{value:ve}}),ve}function Et(oe,K,ee){let ue=u3(oe.endRe,ee);if(ue){if(oe["on:end"]){const Ne=new nA(oe);oe["on:end"](K,Ne),Ne.isMatchIgnored&&(ue=!1)}if(ue){for(;oe.endsParent&&oe.parent;)oe=oe.parent;return oe}}if(oe.endsWithParent)return Et(oe.parent,K,ee)}function ke(oe){return ve.matcher.regexIndex===0?(Ee+=oe[0],1):(Wn=!0,0)}function Xt(oe){const K=oe[0],ee=oe.rule,ue=new nA(ee),Ne=[ee.__beforeBegin,ee["on:begin"]];for(const Je of Ne)if(Je&&(Je(oe,ue),ue.isMatchIgnored))return ke(K);return ee.skip?Ee+=K:(ee.excludeBegin&&(Ee+=K),Re(),!ee.returnBegin&&!ee.excludeBegin&&(Ee=K)),st(ee,oe),ee.returnBegin?0:K.length}function Ot(oe){const K=oe[0],ee=U.substring(oe.index),ue=Et(ve,oe,ee);if(!ue)return lA;const Ne=ve;ve.endScope&&ve.endScope._wrap?(Re(),fe(K,ve.endScope._wrap)):ve.endScope&&ve.endScope._multi?(Re(),ze(ve.endScope,oe)):Ne.skip?Ee+=K:(Ne.returnEnd||Ne.excludeEnd||(Ee+=K),Re(),Ne.excludeEnd&&(Ee=K));do ve.scope&&Xe.closeNode(),!ve.skip&&!ve.subLanguage&&(Ye+=ve.relevance),ve=ve.parent;while(ve!==ue.parent);return ue.starts&&st(ue.starts,oe),Ne.returnEnd?0:K.length}function zn(){const oe=[];for(let K=ve;K!==yt;K=K.parent)K.scope&&oe.unshift(K.scope);oe.forEach(K=>Xe.openNode(K))}let Ce={};function bt(oe,K){const ee=K&&K[0];if(Ee+=oe,ee==null)return Re(),0;if(Ce.type==="begin"&&K.type==="end"&&Ce.index===K.index&&ee===""){if(Ee+=U.slice(K.index,K.index+1),!i){const ue=new Error(`0 width match regex (${$})`);throw ue.languageName=$,ue.badRule=Ce.rule,ue}return 1}if(Ce=K,K.type==="begin")return Xt(K);if(K.type==="illegal"&&!k){const ue=new Error('Illegal lexeme "'+ee+'" for mode "'+(ve.scope||"<unnamed>")+'"');throw ue.mode=ve,ue}else if(K.type==="end"){const ue=Ot(K);if(ue!==lA)return ue}if(K.type==="illegal"&&ee==="")return Ee+=`
`,1;if(Vn>1e5&&Vn>K.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ee+=ee,ee.length}const yt=D($);if(!yt)throw ra(o.replace("{}",$)),new Error('Unknown language: "'+$+'"');const Zt=z3(yt);let Vt="",ve=B||Zt;const _e={},Xe=new a.__emitter(a);zn();let Ee="",Ye=0,Jt=0,Vn=0,Wn=!1;try{if(yt.__emitTokens)yt.__emitTokens(U,Xe);else{for(ve.matcher.considerAll();;){Vn++,Wn?Wn=!1:ve.matcher.considerAll(),ve.matcher.lastIndex=Jt;const oe=ve.matcher.exec(U);if(!oe)break;const K=U.substring(Jt,oe.index),ee=bt(K,oe);Jt=oe.index+ee}bt(U.substring(Jt))}return Xe.finalize(),Vt=Xe.toHTML(),{language:$,value:Vt,relevance:Ye,illegal:!1,_emitter:Xe,_top:ve}}catch(oe){if(oe.message&&oe.message.includes("Illegal"))return{language:$,value:oE(U),illegal:!0,relevance:0,_illegalBy:{message:oe.message,index:Jt,context:U.slice(Jt-100,Jt+100),mode:oe.mode,resultSoFar:Vt},_emitter:Xe};if(i)return{language:$,value:oE(U),illegal:!1,relevance:0,errorRaised:oe,_emitter:Xe,_top:ve};throw oe}}function _($){const U={value:oE($),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return U._emitter.addText($),U}function m($,U){U=U||a.languages||Object.keys(t);const k=_($),B=U.filter(D).filter(Y).map(Re=>f(Re,$,!1));B.unshift(k);const z=B.sort((Re,fe)=>{if(Re.relevance!==fe.relevance)return fe.relevance-Re.relevance;if(Re.language&&fe.language){if(D(Re.language).supersetOf===fe.language)return 1;if(D(fe.language).supersetOf===Re.language)return-1}return 0}),[V,J]=z,he=V;return he.secondBest=J,he}function h($,U,k){const B=U&&n[U]||k;$.classList.add("hljs"),$.classList.add(`language-${B}`)}function E($){let U=null;const k=u($);if(l(k))return;if(pe("before:highlightElement",{el:$,language:k}),$.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",$);return}if($.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn($)),a.throwUnescapedHTML))throw new q3("One of your code blocks includes unescaped HTML.",$.innerHTML);U=$;const B=U.textContent,z=k?p(B,{language:k,ignoreIllegals:!0}):m(B);$.innerHTML=z.value,$.dataset.highlighted="yes",h($,k,z.language),$.result={language:z.language,re:z.relevance,relevance:z.relevance},z.secondBest&&($.secondBest={language:z.secondBest.language,relevance:z.secondBest.relevance}),pe("after:highlightElement",{el:$,result:z,text:B})}function b($){a=aA(a,$)}const S=()=>{N(),Ga("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){N(),Ga("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let C=!1;function N(){function $(){N()}if(document.readyState==="loading"){C||window.addEventListener("DOMContentLoaded",$,!1),C=!0;return}document.querySelectorAll(a.cssSelector).forEach(E)}function O($,U){let k=null;try{k=U(e)}catch(B){if(ra("Language definition for '{}' could not be registered.".replace("{}",$)),i)ra(B);else throw B;k=s}k.name||(k.name=$),t[$]=k,k.rawDefinition=U.bind(null,e),k.aliases&&q(k.aliases,{languageName:$})}function x($){delete t[$];for(const U of Object.keys(n))n[U]===$&&delete n[U]}function w(){return Object.keys(t)}function D($){return $=($||"").toLowerCase(),t[$]||t[n[$]]}function q($,{languageName:U}){typeof $=="string"&&($=[$]),$.forEach(k=>{n[k.toLowerCase()]=U})}function Y($){const U=D($);return U&&!U.disableAutodetect}function le($){$["before:highlightBlock"]&&!$["before:highlightElement"]&&($["before:highlightElement"]=U=>{$["before:highlightBlock"](Object.assign({block:U.el},U))}),$["after:highlightBlock"]&&!$["after:highlightElement"]&&($["after:highlightElement"]=U=>{$["after:highlightBlock"](Object.assign({block:U.el},U))})}function de($){le($),r.push($)}function se($){const U=r.indexOf($);U!==-1&&r.splice(U,1)}function pe($,U){const k=$;r.forEach(function(B){B[k]&&B[k](U)})}function ne($){return Ga("10.7.0","highlightBlock will be removed entirely in v12.0"),Ga("10.7.0","Please use highlightElement now."),E($)}Object.assign(e,{highlight:p,highlightAuto:m,highlightAll:N,highlightElement:E,highlightBlock:ne,configure:b,initHighlighting:S,initHighlightingOnLoad:y,registerLanguage:O,unregisterLanguage:x,listLanguages:w,getLanguage:D,registerAliases:q,autoDetection:Y,inherit:aA,addPlugin:de,removePlugin:se}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=W3,e.regex={concat:Ta,lookahead:RL,either:uy,optional:l3,anyNumberOfTimes:a3};for(const $ in Wp)typeof Wp[$]=="object"&&yL(Wp[$]);return Object.assign(e,Wp),e},Ml=LL({});Ml.newInstance=()=>LL({});var Q3=Ml;Ml.HighlightJS=Ml;Ml.default=Ml;const j3=Fl(Q3);function kL(e,t=[]){return e.map(n=>{const r=[...t,...n.properties?n.properties.className:[]];return n.children?kL(n.children,r):{text:n.value,classes:r}}).flat()}function cA(e Line truncated
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}function Bj(e){const t="[a-z][a-zA-Z0-9_]*",n={className:"string",begin:"\\$.{1}"},r={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:t+":",relevance:0},e.C_NUMBER_MODE,r,n,{begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{begin:"#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,n,e.C_NUMBER_MODE,r]}]}}function Fj(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}function Uj(e){const t={className:"variable",begin:/\b_+[a-zA-Z]\w*/},n={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},r={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},i=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],o=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],s=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachmentsCargo","addWeaponWithAttachmentsCargoGlobal","admin","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityCurveRTD","airDensityRTD","airplaneThrottle","airportSide","AISFinishHeal","alive","all3DENEntities","allActiveTitleEffects","allAddonsInfo","allAirports","allControls","allCurators","allCutLayers","allDead","allDeadMen","allDiaryRecords","allDiarySubjects","allDisplays","allEnv3DSoundSources","allGroups","allLODs","allMapMarkers","allMines","allMissionObjects","allObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowedService","allowFileOperations","allowFleeing","allowGetIn","allowService","allowSprint","allPlayers","allSimpleObjects","allSites","allTurrets","allUnits","allUnitsUAV","allUsers","allVariables","ambientTemperature","ammo","ammoOnPylon","and","animate","animateBay","animateDoor","animatePylon","animateSouLine truncated
]*?"'`},{begin:`"[^\r
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},e.COMMENT("^[ ]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}function $j(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}const Hj=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),zj=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Vj=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],Wj=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],qj=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],Kj=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","backgrou Line truncated
(multipart)?`,end:`\\]
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}function Xj(e){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}function Zj(e){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}function Jj(e){const t=e.regex,n=/[a-zA-Z_][a-zA-Z0-9_]*/,r={className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:t.concat(/\$/,t.optional(/::/),n,"(::",n,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[r]}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r]}}function e5(e){const t=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...t,"set","list","map"]},end:">",contains:["self"]}]}}function t5(e){const t={className:"number",begin:"[1-9][0-9]*",relevance:0},n={className:"symbol",begin:":[^\\]]+"},r={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,n]},i={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,n]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[r,i,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT Line truncated
`},u]}}const G5=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),Y5=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],$5=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],YL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],$L=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],H5=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","fon Line truncated
]`,m={scope:"string",variants:[u,l,p,f]},h={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},E=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],S=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:b,literal:(se=>{const pe=[];return se.forEach(ne=>{pe.push(ne),ne.toLowerCase()===ne?pe.push(ne.toUpperCase()):pe.push(ne.toLowerCase())}),pe})(E),built_in:S},N=se=>se.map(pe=>pe.replace(/\|\d+$/,"")),O={variants:[{match:[/new/,t.concat(_,"+"),t.concat("(?!",N(S).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},x=t.concat(r,"\\b(?!\\()"),w={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),x],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),x],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},D={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},q={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[D,o,w,e.C_BLOCK_COMMENT_MODE,m,h,O]},Y={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",N(b).join("\\b|"),"|",N(S).join("\\b|"),"\\b)"),r,t.concat(_,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[q]};q.contains.push(Y);const le=[D,w,e.C_BLOCK_COMMENT_MODE,m,h,O],de={begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:E,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:E,keyword:["new","array"]},contains:["self",...le]},...le,{scope:"meta",match:i}]};return{case_insensitive:!1,keywords:C,contains:[de,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},o,Y,w,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},O,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:C,contains:["self",o,w,e.C_BLOCK_COMMENT_MODE,m,h]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trai Line truncated
https://github.com/highlightjs/highlight.js/issues/2277`),V=U,z=k),B===void 0&&(B=!0);const J={code:z,language:V};ne("before:highlight",J);const he=J.result?J.result:f(J.language,J.code,B);return he.code=J.code,ne("after:highlight",he),he}function f(U,k,B,z){const V=Object.create(null);function J(K,ee){return K.keywords[ee]}function he(){if(!_e.keywords){Ee.addText(Ye);return}let K=0;_e.keywordPatternRe.lastIndex=0;let ee=_e.keywordPatternRe.exec(Ye),ue="";for(;ee;){ue+=Ye.substring(K,ee.index);const Ne=Zt.case_insensitive?ee[0].toLowerCase():ee[0],Je=J(_e,Ne);if(Je){const[En,To]=Je;if(Ee.addText(ue),ue="",V[Ne]=(V[Ne]||0)+1,V[Ne]<=S6&&(Jt+=To),En.startsWith("_"))ue+=ee[0];else{const ya=Zt.classNameAliases[En]||En;ze(ee[0],ya)}}else ue+=ee[0];K=_e.keywordPatternRe.lastIndex,ee=_e.keywordPatternRe.exec(Ye)}ue+=Ye.substring(K),Ee.addText(ue)}function Re(){if(Ye==="")return;let K=null;if(typeof _e.subLanguage=="string"){if(!t[_e.subLanguage]){Ee.addText(Ye);return}K=f(_e.subLanguage,Ye,!0,Xe[_e.subLanguage]),Xe[_e.subLanguage]=K._top}else K=m(Ye,_e.subLanguage.length?_e.subLanguage:null);_e.relevance>0&&(Jt+=K.relevance),Ee.__addSublanguage(K._emitter,K.language)}function fe(){_e.subLanguage!=null?Re():he(),Ye=""}function ze(K,ee){K!==""&&(Ee.startScope(ee),Ee.addText(K),Ee.endScope())}function st(K,ee){let ue=1;const Ne=ee.length-1;for(;ue<=Ne;){if(!K._emit[ue]){ue++;continue}const Je=Zt.classNameAliases[K[ue]]||K[ue],En=ee[ue];Je?ze(En,Je):(Ye=En,he(),Ye=""),ue++}}function Et(K,ee){return K.scope&&typeof K.scope=="string"&&Ee.openNode(Zt.classNameAliases[K.scope]||K.scope),K.beginScope&&(K.beginScope._wrap?(ze(Ye,Zt.classNameAliases[K.beginScope._wrap]||K.beginScope._wrap),Ye=""):K.beginScope._multi&&(st(K.beginScope,ee),Ye="")),_e=Object.create(K,{parent:{value:_e}}),_e}function ke(K,ee,ue){let Ne=k9(K.endRe,ue);if(Ne){if(K["on:end"]){const Je=new gA(K);K["on:end"](ee,Je),Je.isMatchIgnored&&(Ne=!1)}if(Ne){for(;K.endsParent&&K.parent;)K=K.parent;return K}}if(K.endsWithParent)return ke(K.parent,ee,ue)}function Xt(K){return _e.matcher.regexIndex===0?(Ye+=K[0],1):(oe=!0,0)}function Ot(K){const ee=K[0],ue=K.rule,Ne=new gA(ue),Je=[ue.__beforeBegin,ue["on:begin"]];for(const En of Je)if(En&&(En(K,Ne),Ne.isMatchIgnored))return Xt(ee);return ue.skip?Ye+=ee:(ue.excludeBegin&&(Ye+=ee),fe(),!ue.returnBegin&&!ue.excludeBegin&&(Ye=ee)),Et(ue,K),ue.returnBegin?0:ee.length}function zn(K){const ee=K[0],ue=k.substring(K.index),Ne=ke(_e,K,ue);if(!Ne)return yA;const Je=_e;_e.endScope&&_e.endScope._wrap?(fe(),ze(ee,_e.endScope._wrap)):_e.endScope&&_e.endScope._multi?(fe(),st(_e.endScope,K)):Je.skip?Ye+=ee:(Je.returnEnd||Je.excludeEnd||(Ye+=ee),fe(),Je.excludeEnd&&(Ye=ee));do _e.scope&&Ee.closeNode(),!_e.skip&&!_e.subLanguage&&(Jt+=_e.relevance),_e=_e.parent;while(_e!==Ne.parent);return Ne.starts&&Et(Ne.starts,K),Je.returnEnd?0:ee.length}function Ce(){const K=[];for(let ee=_e;ee!==Zt;ee=ee.parent)ee.scope&&K.unshift(ee.scope);K.forEach(ee=>Ee.openNode(ee))}let bt={};function yt(K,ee){const ue=ee&&ee[0];if(Ye+=K,ue==null)return fe(),0;if(bt.type==="begin"&&ee.type==="end"&&bt.index===ee.index&&ue===""){if(Ye+=k.slice(ee.index,ee.index+1),!i){const Ne=new Error(`0 width match regex (${U})`);throw Ne.languageName=U,Ne.badRule=bt.rule,Ne}return 1}if(bt=ee,ee.type==="begin")return Ot(ee);if(ee.type==="illegal"&&!B){const Ne=new Error('Illegal lexeme "'+ue+'" for mode "'+(_e.scope||"<unnamed>")+'"');throw Ne.mode=_e,Ne}else if(ee.type==="end"){const Ne=zn(ee);if(Ne!==yA)return Ne}if(ee.type==="illegal"&&ue==="")return 1;if(Wn>1e5&&Wn>ee.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ye+=ue,ue.length}const Zt=q(U);if(!Zt)throw ia(o.replace("{}",U)),new Error('Unknown language: "'+U+'"');const Vt=m6(Zt);let ve="",_e=z||Vt;const Xe={},Ee=new a.__emitter(a);Ce();let Ye="",Jt=0,Vn=0,Wn=0,oe=!1;try{if(Zt.__emitTokens)Zt.__emitTokens(k,Ee);else{for(_e.matcher.considerAll();;){Wn++,oe?oe=!1:_e.matcher.considerAll(),_e.matcher.lastIndex=Vn;const K=_e.matcher.exec(k);if(!K)break;const ee=k.substring(Vn,K.index),ue=yt(ee,K);Vn=K.index+ue}yt(k.substring(Vn))}return Ee.finalize(),ve=Ee.toHTML(),{language:U,value:ve,relevance:Jt,illegal:!1,_emitter:Ee,_top:_e}}catch(K){if(K.message&&K.message.includes("Illegal"))return{language:U,value:uE(k),illegal:!0,relevance:0,_illegalBy:{message:K.message,index:Vn,context:k.slice(Vn-100,Vn+100),mode:K.mode,resultSoFar:ve},_emitter:Ee};if(i)return{language:U,value:uE(k),illegal:!1,relevance:0,errorRaised:K,_emitter:Ee,_top:_e};throw K}}function _(U){const k={value:uE(U),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return k._emitter.addText(U),k}function m(U,k){k=k||a.languages||Object.keys(t);const B=_(U),z=k.filter(q).filter(le).map(fe=>f(fe,U,!1));z.unshift(B);const V=z.sort((fe,ze)=>{if(fe.relevance!==ze.relevance)return ze.relevance-fe.relevance;if(fe.language&&ze.language){if(q(fe.language).supersetOf===ze.language)return 1;if(q(ze.language).supers Line truncated
`);return!r||!i?!1:!!e.chain().command(({tr:o})=>(o.delete(t.pos-2,t.pos),!0)).exitCode().run()}function D6(){if(this.options.codeMode)return!1;const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?!!this.editor.commands.clearNodes():!1}function M6({editor:e}){const t=e.state.selection.$from.parent.textContent.slice(0,e.state.selection.$from.parentOffset);return(t==null?void 0:t.split(`
`))||[]}const Ey=["arduino","bash","c","cpp","csharp","css","diff","go","graphql","ini","java","javascript","json","kotlin","less","lua","makefile","markdown","objectivec","perl","php","php-template","plaintext","powershell","python","python-repl","r","ruby","rust","scss","shell","sql","swift","typescript","vbnet","wasm","xml","yaml","ipsphtml","ipscss"],Qu=gL.extend({parseHTML(){return[{tag:"li",getAttrs:e=>{var t;if(((t=e.childNodes)==null?void 0:t.length)>1){const n=document.createElement("div");n.innerHTML=e.innerHTML,e.innerHTML="",e.appendChild(n)}return null}}]}});function Qt(e,t="",n=!0){const r=i=>{t&&(i.message=t+": "+i.message),window.Debug[n?"warn":"error"](i)};try{const i=e();return i instanceof Promise?new Promise(o=>{i.catch(r).finally(()=>o(!1))}):!0}catch(i){return r(i),!1}}const Mt=Wu.extend({draggable:!0,addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this)}},addAttributes(){var e;return{language:{default:this.options.defaultLanguage||((e=this.options.allowedLanguages)==null?void 0:e[0])||"plaintext",parseHTML:t=>{var r,i;const n=(r=(()=>{if(t.hasAttribute("language"))return t.getAttribute("language");for(const o of t.classList)if(o.match(/^language-([a-z0-9\-_]+)$/i))return o.match(/^language-([a-z0-9\-_]+)$/i)[1];if(t.dataset.language&&t.dataset.language in R_)return R_[t.dataset.language];for(const o of t.querySelectorAll("code")){if(o.hasAttribute("language"))return o.getAttribute("language");for(const s of o.classList)if(s.match(/^language-([a-z0-9\-_]+)$/i))return s.match(/^language-([a-z0-9\-_]+)$/i)[1]}})())==null?void 0:r.toLowerCase();return this.options.codeMode&&(!n||!Ey.includes(n)||n!==this.options.defaultLanguage&&this.options.allowedLanguages&&!this.options.allowedLanguages.includes(n))?this.options.defaultLanguage||((i=this.options.allowedLanguages)==null?void 0:i[0])||"plaintext":n}}}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),codeMode:!1,allowedLanguages:null}},renderHTML({HTMLAttributes:e}){var n;const t=this.options.codeMode?this.editor.options.lastLang||((n=this.editor.options.allowedLanguages)==null?void 0:n[0])||"plaintext":e.language;return["pre",{spellcheck:"false",class:`${this.options.codeMode?"":"ipsCode "}language-${t}`,"data-language":hs[t]||t},["code",{},0]]},onUpdate({editor:e}){this.options.codeMode&&e.options.lastLang&&e.options.lastLang!==e.getAttributes(this).language&&e.chain().setCodeBlock({language:e.options.lastLang}).run()},addKeyboardShortcuts(){const e=this.editor;return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{var o;if(!e.state.selection.empty||((o=e.state.selection.$from.parent)==null?void 0:o.type.name)!==this.name)return!1;if(D6.call(this))return!0;if(!this.options.codeMode&&(!e.state.selection.$from.parent.attrs.language||["plaintext","bash","shell","zsh","sh"].includes(e.state.selection.$from.parent.attrs.language)))return!1;const n=e.state.selection.$from.parent.textContent.slice(0,e.state.selection.$from.parentOffset),r=e.state.selection.$from.parent.textContent.slice(e.state.selection.$from.parentOffset);if(n&&r){for(const s in nn)if(n.endsWith(s)&&r.startsWith(nn[s]))return e.chain().deleteRange({from:e.state.selection.from-s.length,to:e.state.selection.from+nn[s].length}).setTextSelection(e.state.selection.from-s.length).focus().run()}const i=n.match(/(\t)[^\n]*(\n\t+)$/);return i?e.chain().deleteRange({from:e.state.selection.from-i[2].length,to:e.state.selection.from}).setTextSelection(e.state.selection.from-i[2].length).focus().run():!1},Enter:({editor:t})=>{var y,C,N,O,x,w,D,q,Y,le,de;if(x6.call(this,{editor:t}))return!0;const{$from:r}=t.state.selection,{parent:i}=r;if(!t.state.selection.empty||(i==null?void 0:i.type.name)!==this.name||!this.options.codeMode&&(!i.attrs.language||["plaintext","bash","shell","zsh","sh"].includes(i.attrs.language)))return!1;const o=M6({editor:t});if(!o.length)return!1;const s=o[o.length-1],a=o[o.length-2];let l=((C=(y=s.match(/^\t*/))==null?void 0:y[0])==null?void 0:C.length)||0,u=!1;const p=i.attrs.language,f=["ipsphtml","xml","html","xhtml","html5"].includes(p),_=["ipscss","css","scss","sass","less"].includes(p),m=["plaintext","rtf","markdown","md","bbcode"].includes(p),h=f?/(<[^>/]*>)$/:/([{[(.:]|->)$/,E=f?/(<\/[^/>]*>)$/:/^\s*([}\])]+[,;]?)$/;let b=!1;if(!f&&!_&&!m&&s.match(/^\s+(\.|->)?[a-z0-9_-]/i))if(s.match(/^\s+(\.|->)/))b=!0,l--;else{let se=1;for(;se<o.length&&((x=(O=(N=o[o.length-1-se])==null?void 0:N.match(/^\t*/))==null?void 0:O[0])==null?void 0:x.length)<=l;)se++;(w=o[o.length-se])!=null&&w.match(/(\.|->)\s*$/)&&(b=!0,l--)}let S=!1;if(!b)if(s.match(h)){const se=s.match(h)[0];if((f||se in nn)&&t.state.selection.$from.parentOffset<t.state.selection.$from.parent.textContent.length){const pe=((Y=(q=(D=t.state.doc.slice(t.state.selection.from,t.state.selection.from-t.state.selection.$from.parentOffset+t.state.selection.$from.parent.textContent.length))==null?void 0:D.content)==null?void 0:q.content)==null?void 0:Y.re Line truncated
`+" ".repeat(l);u?(se-=s.length,ne=s.replace(/^\t/,"")+ne):S&&(pe=`
`+(l>1?" ".repeat(l-1):""),ne+=pe);let $=this.editor.chain().insertContentAt({from:se,to:t.state.selection.from},{type:"text",text:ne});return pe&&($=$.setTextSelection(t.state.selection.from+ne.length-pe.length)),$.focus().run()}return!1},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown||this.options.codeMode)return!1;const{state:n}=t,{selection:r,doc:i}=n,{$from:o,empty:s}=r;if(!s||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const l=o.after();return l===void 0||i.nodeAt(l)?!1:!!t.commands.exitCode()},ArrowUp:L6.bind(this),Tab:Jp.bind(this,!1,{editor:e}),"Shift-Tab":Jp.bind(this,!0,{editor:e}),"Alt-Tab":Jp.bind(this,!1,{editor:e},!0),"Shift-Alt-Tab":Jp.bind(this,!0,{editor:e},!0)}},addProseMirrorPlugins(){var t;const e={};for(const n in nn)e[nn[n]]=n;return[...((t=this.parent)==null?void 0:t.call(this))||[],new Fe({key:new Ge("ipsCodeModeSyntaxHelpers"),props:{handleKeyDown:(n,r)=>{var o;if(!(r instanceof KeyboardEvent)||r.metaKey||r.altKey)return;const i=this.editor;if(((o=r.key)==null?void 0:o.toLowerCase())in nn)return r.key.toLowerCase()in e&&vA({editor:i,opener:r.key.toLowerCase()})?!0:!!k6({editor:i,char:r.key.toLowerCase()});if(r.key.toLowerCase()in e)return!!vA({editor:i,opener:e[r.key.toLowerCase()]})}}})]}});function L6({editor:e}){if(e.options.codeMode)return!1;const{$from:t,empty:n}=e.state.selection;if(t.nodeBefore||!n||t.parent.type!==this.type)return!1;let r=0,i;for(const s of[...t.path].reverse()){if(!Number.isInteger(s)&&(r++,r===2))break;i=s}return!r||!Number.isInteger(i)||i!==0||!(t.parentOffset===0)?!1:(e.chain().insertContentAt(t.before(),"<p>&nbsp;</p>",{updateSelection:!0}).run(),!0)}function Jp(e=!1,{editor:t=null},n=!1){var r,i,o,s;if((!t.state.selection.empty||e)&&t.isActive(this.name)&&(t.options.codeMode||[...t.state.selection.$from.path].reverse()[3]===[...t.state.selection.$to.path].reverse()[3]))return t.state.selection.empty&&e&&t.state.selection.$from.parentOffset===0||Qt(()=>{t.chain().command(({tr:a,chain:l})=>{var u,p,f,_;try{const{from:m,to:h}=t.state.selection,E=[...t.state.selection.$from.path].reverse()[3]+1;let b=m;if(b>[...t.state.selection.$from.path].reverse()[3]){for(;b>[...t.state.selection.$from.path].reverse()[3]&&!((u=a.doc.slice(b-1,b--).content.content[0])!=null&&u.textContent.startsWith(`
`)););b++}const S=((p=a.doc.slice(b,h).content.content[0])==null?void 0:p.textContent)||"",y=m-b,C=S.split(`
`),N=C.map(w=>e?w.replace(/^\t/,""):" "+w).join(`
`);let O=!1;try{e&&C.length>1&&C[C.length-1].match(/^\t/)&&((_=(f=a.doc.slice(h,h+1))==null?void 0:f.content.content[0])==null?void 0:_.textContent)===" "&&(O=!0)}catch{}a.insertText(N,b,h);const x={from:b+y,to:b+N.length};e&&S.startsWith(" ")?x.from--:e||x.from++,O&&x.to++,E>x.from&&(x.from=E),l().setTextSelection(x).focus().run()}catch{}return!0}).run()},"Something went wrong when modifying indents in a codeblock selection"),!0;if(!n&&t.isActive(Qu.name))return!1;if(t.state.selection.empty){if(e){if(t.state.selection.$from.parentOffset>0){const a=t.state.doc.slice(t.state.selection.from-1,t.state.selection.from);if(((i=(r=a==null?void 0:a.content)==null?void 0:r.content[0])==null?void 0:i.textContent)===" "){const{from:l}=t.state.selection;return t.chain().command(({tr:u})=>(u.deleteRange(l-1,l),!0)).setTextSelection({from:l-1,to:l-1}).run(),!0}}if(t.state.selection.$from.parentOffset<t.state.selection.$from.parent.nodeSize-2){const a=t.state.doc.slice(t.state.selection.from,t.state.selection.from+1);if(((s=(o=a==null?void 0:a.content)==null?void 0:o.content[0])==null?void 0:s.textContent)===" "){const{from:l}=t.state.selection;return t.chain().command(({tr:u})=>(u.deleteRange(l,l+1),!0)).setTextSelection({from:l,to:l}).run(),!0}}}}else return!0;return t.chain().insertContent(" ").focus().run(),!0}function k6({editor:e,char:t}){var f,_,m;if(!(t in nn))return!1;const{$from:n,$to:r}=e.state.selection,i=n.parent,o=r.parent;if(((f=i==null?void 0:i.type)==null?void 0:f.name)!==Wu.name||i!==o)return!1;if(e.state.selection.empty)return e.chain().insertContent(`${t}${nn[t]}`).setTextSelection(e.state.selection.from+t.length).focus().run();const s=i.textContent;let a=s.slice(n.parentOffset,r.parentOffset);if(!a)return!1;if(['"',"'","`"].includes(t)){const h=new RegExp(`(^|[^\\\\])\\${t}`,"g");a=a.replaceAll(h,`$1\\${t}`).replaceAll(/\n/g,"\\n")}let l="",u=0;if(a.match(/\n/)){const E=s.slice(0,n.parentOffset).split(`
`).pop(),b=s.slice(r.parentOffset).split(`
`).shift();let S=Math.max(0,((m=(_=E.match(/^\t*/))==null?void 0:_[0])==null?void 0:m.length)+1);E.match(/^\t*$/)&&b.match(/^\t+$/)&&(S+=b.match(/^\t+$/)[0].length),b.match(/^\s*$/)&&(a=a.replace(/^\s*?\n\s*(.?)/,"$1")),u=S+1;const y=" ".repeat(S),C=new RegExp(`\\n\\t{0,${S?S-1:0}}`,"g");if(a=a.replaceAll(C,`
${y}`),a=`${t}
${y}${a}
${y?y.slice(0,y.length-1):""}${nn[t]}`,r.parentOffset<s.length)try{const N=s.slice(r.parentOffset,r.parentOffset+1);N!=null&&N.match(/\n/)||(l=`
`+(y?y.slice(0,y.length-1):""),a+=l)}catch{}}else a=`${t}${a}${nn[t]}`;const p={from:e.state.selection.from+t.length+u,to:e.state.selection.from+a.length-nn[t].length-l.length-(u?u-1:0)};return e.chain().insertContentAt({from:e.state.selection.from,to:e.state.selection.to},{type:"text",text:a}).setTextSelection(p).focus().run()}function vA({editor:e,opener:t}){var o;if(!(t in nn)||!e.state.selection.empty)return!1;const{$from:n}=e.state.selection,r=n.parent;if((r==null?void 0:r.type.name)!==Wu.name)return!1;const i=(o=n.parent)==null?void 0:o.textContent;if(n.parentOffset<1||n.parentOffset>=i.length)return!1;try{const s=n.parentOffset;let a=i==null?void 0:i.slice(s,s+nn[t].length);if(!a)return;if(a.startsWith(nn[t]))return s>0&&['"',"'","`"].includes(t)&&(i==null?void 0:i[s-1])==="\\"?e.chain().insertContent({type:"text",text:nn[t]}).focus().run():e.chain().setTextSelection(e.state.selection.from+nn[t].length).focus().run()}catch{return!1}return!1}const nn={"{":"}","[":"]","(":")","'":"'",'"':'"',"`":"`"};function P6(e){const t=[...e.state.selection.$from.path].reverse()[2],n=t==null?void 0:t.type.name;return n===Yr.name?[n,{level:t.attrs.level||1}]:[n||"",{}]}function Yc(e){var n;if(e[0]===Yr.name)return`Heading ${((n=e[1])==null?void 0:n.level)||""}`;const t=e[0]in cT?e[0]:Ht.name;return cT[t]}function B6(e){if(e in RA)return[RA[e],{}];const t=Yc([Yr.name,{}]);if(e.startsWith(t)){const n=parseInt(e.replace("Heading","").trim())||1;return[Yr.name,{level:n}]}return[Ht.name,{}]}const cT={[Ai.name]:"Ordered List",[fo.name]:"Bullet List",[Mt.name]:"Code Block",[Ht.name]:"Paragraph"},RA=Object.fromEntries([...Object.entries(cT)].map(e=>e.reverse())),dE=new WeakMap;function F6(e){if(!dE.has(e)){const t=[...$c].filter(i=>!(i===Yr.name&&e.options.restrictions.has("heading"))&&e.extensionManager.extensions.some(o=>o.name===i)),n=[],r=e.extensionManager.extensions.find(i=>i.name===Yr.name);t.forEach(i=>{i===Yr.name?r.options.levels.forEach(o=>n.push([Yr.name,{level:o}])):n.push([i,{}])}),dE.set(e,n)}return dE.get(e)}const $c=new Set([Ht.name,Mt.name,Yr.name]);function U6({...e}){const{editor:t}=L.useContext(xe),n=P6(t);e.dropdownOptions=e.dropdownOptions||{},e.dropdownOptions.className=e.dropdownOptions.className||"",e.dropdownOptions.className=[...e.dropdownOptions.className.split(/\s+/),"ipsRichText"].join(" ");const r=F6(t);return v.jsx(vs,{current:v.jsx(v.Fragment,{children:v.jsx("i",{className:"fa-solid fa-paragraph"})}),currentValue:Yc(n),blank:v.jsx(NA,{block:[Ht.title,{}]}),items:r.filter(i=>i[0]!==Mt.name).map(i=>[Yc(i),v.jsx(NA,{block:i},Yc(i))]),itemProps:Object.fromEntries(r.map(i=>[Yc(i),{disabled:!t.can().convertBlocks(i)}])),onChange:i=>{const o=B6(i);t.chain().convertBlocks(o).focus().run()},...e,dropdownOptions:{...e.dropdownOptions,location:"se"}})}function NA({block:e,style:t=!0}){if(e[0]===Yr.name){const n=`h${e[1].level}`,r=window.ips.getString(`editor_node--heading_${e[1].level}`);return t?v.jsx(n,{children:r}):v.jsx(v.Fragment,{children:r})}if(e[0]===Mt.name){const n=window.ips.getString("editor_node--code_block");return t?v.jsx("code",{children:n}):v.jsx(v.Fragment,{children:n})}return v.jsx(v.Fragment,{children:window.ips.getString("editor_node--paragraph")})}var ju=Hn.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",qe(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Xu=Hn.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",qe(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}});const G6=ct.create({name:"ipsLatexContainer",group:"inline",inline:!0,content:"text*",renderHTML(){return["span",{class:"ipsLatexContainer"},0]},parseHTML(){return[{tag:"span",getAttrs:e=>e.classList.contains("ipsLatexContainer")&&null}]}});var gd=ct.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",qe(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!eK(t,t.schema.nodes[this.name]))return!1;const{selection:n}=t,{$to:r}=n,i=e();return kM(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.commandLine truncated
`,K6="️",Q6="‍",gE="";let ef=null,tf=null;function j6(e=[]){const t={};Jn.groups=t;const n=new Jn;ef==null&&(ef=IA($6)),tf==null&&(tf=IA(H6)),re(n,"'",Y_),re(n,"{",au),re(n,"}",lu),re(n,"[",N_),re(n,"]",O_),re(n,"(",A_),re(n,")",I_),re(n,"<",w_),re(n,">",x_),re(n,"(",D_),re(n,")",M_),re(n,"「",L_),re(n,"」",k_),re(n,"『",P_),re(n,"』",B_),re(n,"<",F_),re(n,">",U_),re(n,"&",G_),re(n,"*",$_),re(n,"@",Uo),re(n,"`",z_),re(n,"^",V_),re(n,":",zo),re(n,",",by),re(n,"$",W_),re(n,".",gi),re(n,"=",q_),re(n,"!",yy),re(n,"-",kr),re(n,"%",cu),re(n,"|",K_),re(n,"+",Q_),re(n,"#",j_),re(n,"?",uu),re(n,'"',Cy),re(n,"/",hi),re(n,";",vy),re(n,"~",du),re(n,"_",X_),re(n,"\\",H_),re(n,"・",Sk);const r=It(n,$i,Sy,{[uT]:!0});It(r,$i,r);const i=It(r,Yi,hk,{[su]:!0}),o=It(r,Dc,Ek,{[Hc]:!0}),s=It(n,Yi,Vi,{[dT]:!0});It(s,$i,i),It(s,Yi,s),It(i,$i,i),It(i,Yi,i);const a=It(n,Dc,_T,{[pT]:!0});It(a,Yi),It(a,$i,o),It(a,Dc,a),It(o,$i,o),It(o,Yi),It(o,Dc,o);const l=re(n,mE,Ty,{[pE]:!0}),u=re(n,AA,hT,{[pE]:!0}),p=It(n,_E,hT,{[pE]:!0});re(n,gE,p),re(u,mE,l),re(u,gE,p),It(u,_E,p),re(p,AA),re(p,mE),It(p,_E,p),re(p,gE,p);const f=It(n,fE,Tk,{[gk]:!0});re(f,"#"),It(f,fE,f),re(f,K6,f);const _=re(f,Q6);re(_,"#"),It(_,fE,f);const m=[[Yi,s],[$i,i]],h=[[Yi,null],[Dc,a],[$i,o]];for(let E=0;E<ef.length;E++)Do(n,ef[E],mT,Vi,m);for(let E=0;E<tf.length;E++)Do(n,tf[E],gT,_T,h);js(mT,{tld:!0,ascii:!0},t),js(gT,{utld:!0,alpha:!0},t),Do(n,"file",Mf,Vi,m),Do(n,"mailto",Mf,Vi,m),Do(n,"http",Qa,Vi,m),Do(n,"https",Qa,Vi,m),Do(n,"ftp",Qa,Vi,m),Do(n,"ftps",Qa,Vi,m),js(Mf,{scheme:!0,ascii:!0},t),js(Qa,{slashscheme:!0,ascii:!0},t),e=e.sort((E,b)=>E[0]>b[0]?1:-1);for(let E=0;E<e.length;E++){const b=e[E][0],y=e[E][1]?{[z6]:!0}:{[V6]:!0};b.indexOf("-")>=0?y[fT]=!0:Yi.test(b)?$i.test(b)?y[su]=!0:y[dT]=!0:y[uT]=!0,OA(n,b,b,y)}return OA(n,"localhost",Zu,{ascii:!0}),n.jd=new Jn(Z_),{start:n,tokens:Object.assign({groups:t},bk)}}function yk(e,t){const n=X6(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=e,l=null,u=0,p=null,f=-1,_=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(f=0,_=0,p=a):f>=0&&(f+=n[s].length,_++),u+=n[s].length,o+=n[s].length,s++;o-=f,s-=_,u-=f,i.push({t:p.t,v:t.slice(o-u,o),s:o-u,e:o})}return i}function X6(e){const t=[],n=e.length;let r=0;for(;r<n;){let i=e.charCodeAt(r),o,s=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function Do(e,t,n,r,i){let o;const s=t.length;for(let a=0;a<s-1;a++){const l=t[a];e.j[l]?o=e.j[l]:(o=new Jn(r),o.jr=i.slice(),e.j[l]=o),e=o}return o=new Jn(n),o.jr=i.slice(),e.j[t[s-1]]=o,o}function IA(e){const t=[],n=[];let r=0,i="0123456789";for(;r<e.length;){let o=0;for(;i.indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+o),10);s>0;s--)n.pop();r+=o}else n.push(e[r]),r++}return t}const Pl={defaultProtocol:"http",events:null,format:wA,formatHref:wA,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Um(e,t=null){let n=Object.assign({},Pl);e&&(n=Object.assign(n,e instanceof Um?e.o:e));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}Um.prototype={o:Pl,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:Pl[e],typeof i=="function"&&r&&(i=i(t,n))):typeof i=="function"&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function wA(e){return e}var Z6=Object.freeze({__proto__:null,Options:Um,defaults:Pl});function Ck(e,t){this.t="token",this.v=e,this.tk=t}Ck.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Pl.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),o=this.toFormattedString(e),s={},a=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),p=e.getObj("attributes",n,t),f=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),Line truncated
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);gt.customSchemes.push([e,t])}function oX(){gt.scanner=j6(gt.customSchemes);for(let e=0;e<gt.tokenQueue.length;e++)gt.tokenQueue[e][1]({scanner:gt.scanner});gt.parser=eX(gt.scanner.tokens);for(let e=0;e<gt.pluginQueue.length;e++)gt.pluginQueue[e][1]({scanner:gt.scanner,parser:gt.parser});return gt.initialized=!0,gt}function Ry(e){return gt.initialized||oX(),tX(gt.parser.start,e,yk(gt.scanner.start,e))}Ry.scan=yk;function Ny(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new Um(n),i=Ry(e),o=[];for(let s=0;s<i.length;s++){const a=i[s];a.isLink&&(!t||a.t===t)&&r.check(a)&&o.push(a.toFormattedObject(r))}return o}var Oy="[\0-   ᠎ -\u2029  ]",sX=new RegExp(Oy),aX=new RegExp(`${Oy}$`),lX=new RegExp(Oy,"g");function cX(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function uX(e){return new Fe({key:new Ge("autolink"),appendTransaction:(t,n,r)=>{const i=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,a=vM(n.doc,[...t]);if(MM(a).forEach(({newRange:u})=>{const p=TW(r.doc,u,m=>m.isTextblock);let f,_;if(p.length>1)f=p[0],_=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ");else if(p.length){const m=r.doc.textBetween(u.from,u.to," "," ");if(!aX.test(m))return;f=p[0],_=r.doc.textBetween(f.pos,u.to,void 0," ")}if(f&&_){const m=_.split(sX).filter(Boolean);if(m.length<=0)return!1;const h=m[m.length-1],E=f.pos+_.lastIndexOf(h);if(!h)return!1;const b=Ry(h).map(S=>S.toObject(e.defaultProtocol));if(!cX(b))return!1;b.filter(S=>S.isLink).map(S=>({...S,from:E+S.start+1,to:E+S.end+1})).filter(S=>r.schema.marks.code?!r.doc.rangeHasMark(S.from,S.to,r.schema.marks.code):!0).filter(S=>e.validate(S.value)).filter(S=>e.shouldAutoLink(S.value)).forEach(S=>{oy(S.from,S.to,r.doc).some(y=>y.mark.type===e.type)||s.addMark(S.from,S.to,e.type.create({href:S.href}))})}}),!!s.steps.length)return s}})}function dX(e){return new Fe({key:new Ge("handleClickLink"),props:{handleClick:(t,n,r)=>{var i,o;if(r.button!==0||!t.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{let p=r.target;const f=[];for(;p.nodeName!=="DIV";)f.push(p),p=p.parentNode;s=f.find(_=>_.nodeName==="A")}if(!s)return!1;const a=ny(t.state,e.type.name),l=(i=s==null?void 0:s.href)!=null?i:a.href,u=(o=s==null?void 0:s.target)!=null?o:a.target;return e.enableClickSelection&&e.editor.commands.extendMarkRange(e.type.name),s&&l?(window.open(l,u),!0):!1}}})}function pX(e){return new Fe({key:new Ge("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:i}=t,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach(u=>{a+=u.textContent});const l=Ny(a,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!l?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}function Bs(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!e||e.replace(lX,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var $a=Hn.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){MA(e);return}MA(e.scheme,e.optionalSlashes)})},onDestroy(){iX()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!Bs(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!Bs(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!Bs(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",qe(this.options.HTMLAttributes,e),0]:["a",qe(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Bs(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMar Line truncated
`+t.message,window.Debug.error(t),Ei=null}).finally(()=>{for(const t of Mc)t(Ei),Mc.delete(t);if(!window.Debug.isEnabled()){const t=86400*(window.ips.getSetting("memberID")?1e3:7e3);window.ips.utils.db.set(GA,"",Ei,!1,Math.round((Date.now()+t)/1e3))}e(Ei)})}})}function Uk(e){var t,n,r,i;return((i=(r=(n=(t=window==null?void 0:window.ips)==null?void 0:t.utils)==null?void 0:n.iconpicker)==null?void 0:r.getEmojiSearchTree)==null?void 0:i.call(r).getShortCode(e))??e.toLowerCase().trim().replaceAll(/[^\p{L}\p{N}\s]+/gu,"").replaceAll(/\s+/g,"_").replaceAll(/_+/g,"_")}let NE=!1;function u8({iconPicked:e,children:t,...n}){var u,p,f;const{editor:r}=L.useContext(xe),i=L.useRef(null),o=L.useRef(null),s=L.useMemo(()=>{const _=window.navigator.userAgent.toLowerCase();return _.includes("safari")&&!_.includes("chrome")&&_.includes("macintosh")&&!_.includes("iphone")&&!_.includes("ipad")},[])&&!window.safari_test_toolbar_iconpicker,a=L.useMemo(()=>{var m,h,E;const _={customEmoji:!0,nativeEmoji:!0,allowedTypes:[]};return(m=r.options.restrictions)!=null&&m.has("native_emoji")&&(_.nativeEmoji=!1),(h=r.options.restrictions)!=null&&h.has("custom_emoji")&&(_.customEmoji=!1),(_.customEmoji||_.nativeEmoji)&&_.allowedTypes.push("emoji"),(E=r.options.restrictions)!=null&&E.has("fa_icons")||_.allowedTypes.push("fa"),_},[(u=r.options.restrictions)==null?void 0:u.has("native_emoji"),(p=r.options.restrictions)==null?void 0:p.has("custom_emoji"),(f=r.options.restrictions)==null?void 0:f.has("fa_icons")]),l=L.useCallback(()=>{var _;if(!a.allowedTypes.length){window.ips.ui.alert.show({message:window.ips.getString("iconpicker_error_fatal"),type:"alert"});return}(_=window.ips.utils.iconpicker.pick({defaultTab:"emoji",container:o.current,submitOnClick:!0,afterHide:s?void 0:()=>{var m;(m=o.current)==null||m.dispatchEvent(new CustomEvent("ipsAnchorClose",{bubbles:!0}))},shortCodeFixer:Uk,...a}))==null||_.then(m=>{e==null||e(m)})},[e,s,a]);return L.useEffect(()=>{NE||(NE=!0,window.Debug.log("Preloading icons for the editor"),window.ips.utils.iconpicker.loadFa6().then(()=>{window.ips.utils.fontawesome.buildSearchTree(),window.ips.utils.iconpicker.compileEmojiSearchIndex(!0)}))},[NE]),a.allowedTypes.length?s?v.jsx($t,{ref:i,...n,onClick:l,children:t}):v.jsxs(v.Fragment,{children:[v.jsx($t,{ref:i,...n,children:t}),v.jsx(ln,{closeOnPanelActivity:!1,afterOpen:()=>{if(!o.current.querySelector(".ipsIconPicker"))l();else try{setTimeout(()=>{var _;return(_=o.current.querySelector('[name="icon_picker_search_box"]'))==null?void 0:_.focus()},150)}catch{}},anchorActiveClasses:[["ipsEditor__toolbar-item--active"]],anchorInactiveClasses:[["ipsEditor__toolbar-item--inactive"]],ref:o,className:"ipsEditor__iconpicker-wrap ipsBox",anchorRef:i,location:"se"})]}):v.jsx(v.Fragment,{})}function Gk({current:e,onChange:t,...n}){let{update:r,...i}=Ed(e);const{node:o}=L.useContext(Eo);e=e||(i==null?void 0:i.alignStyle),e in EE||(e="regular");let s="wrapNone";e==="left"||e==="inline"?s="wrap":e==="right"&&(s="wrapInverted");const a={};return v.jsx(vs,{current:v.jsx(hl,{name:s}),currentValue:EE[e],items:Object.fromEntries([...Object.entries(EE)].filter(([l])=>{var u;return l!=="inline"||[ot.name,cr.name].includes((u=o==null?void 0:o.type)==null?void 0:u.name)}).map(([l,u])=>(a[u]=l,[u,v.jsx(hl,{name:d8[l]||"wrapNone"},l)]))),onChange:l=>{const u=a[l];return t instanceof Function?t(u):r==null?void 0:r({alignStyle:u})},...n,dropdownOptions:{location:i.inNodeView?"s":"se"}})}const d8={regular:"wrapNone",right:"wrapInverted",left:"wrap",inline:"wrap"},Bl={1:"inherit",2:"initial",3:"revert",4:"revert-layer",5:"unset",6:"serif",7:"sans-serif",8:"monospace",9:"cursive",10:"fantasy",11:"system-ui",12:"ui-serif",13:"ui-sans-serif",14:"ui-monospace",15:"ui-rounded",16:"emoji",17:"math",18:"fangsong"},Yk={Default:{main:1,fallbacks:[]},Helvetica:{main:"Helvetica",fallbacks:["Arial",7]},Arial:{main:"Arial",fallbacks:["Helvetica",7]},"Arial Black":{main:"Arial Black",fallbacks:["Impact","Arial","Helvetica",7]},Verdana:{main:"Verdana",fallbacks:["Arial","Helvetica",7]},Tahoma:{main:"Tahoma",fallbacks:["Verdana","Arial","Helvetica",7]},"Trebuchet MS":{main:"Trebuchet MS",fallbacks:["Arial","Helvetica",7]},Impact:{main:"Impact",fallbacks:["Arial Black","Arial",7]},"Gill Sans":{main:"Gill Sans",fallbacks:["Arial",7]},"Times New Roman":{main:"Times New Roman",fallbacks:["Georgia",6]},Georgia:{main:"Georgia",fallbacks:["Times New Roman",6]},Palatino:{main:"Palatino",fallbacks:["Times New Roman","Georgia",6]},Baskerville:{main:"Baskerville",fallbacks:["Times New Roman","Georgia",6]},"Andalé Mono":{main:"Andale Mono",fallbacks:[8]},Courier:{main:"Courier",fallbacks:[8]},Monaco:{main:"Monaco",fallbacks:["Console Sans",8]},"Bradley Hand":{main:"Bradley Hand",fallbacks:[9]},"Brush Script MT":{main:"Brush Script MT",fallbacks:[9]},Luminari:{main:"Luminari",fallbacks:[9]}},xy=["80%","90%","100%","125%","150%","175%","200%"],J_="100%",Ju=Hn.create({name:"IPSTextSize",addAttributes(){return{size:{def Line truncated
`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:p})=>{if(p&&l&&s){const f=l.filter(_=>a.includes(_.type.name));u.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Bf=ct.create({name:"doc",topNode:!0,content:"block+"});const EP=je.create({name:"ipsAutosave",addCommands(){return{clearAutosave:()=>({editor:e,chain:t})=>(e.options.autoSaveKey&&(window.ips.utils.db.remove("editorSave",e.options.autoSaveKey),t().hideMessage("autosave").run()),!0)}},onUpdate(){this.storage.updateCallback()},onCreate(){var e,t;if(this.storage.initial=this.editor.getHTML(),(e=this.editor)!=null&&e.options.autoSaveKey){const n=window.ips.utils.db.get("editorSave",this.editor.options.autoSaveKey);if((t=n==null?void 0:n.content)!=null&&t.trim()&&(!n.time||Date.now()/1e3-86400*3<parseInt(n.time))){const r=new DOMParser().parseFromString(n.content,"text/html");if(!(r.body.innerText.trim().length||r.body.querySelector("iframe,img,video,audio,a,embed,.ipsEmoji,.ipsEmbeddedVideo,.ipsEmbeddedBrightcove,.ipsEmbeddedOther,.ipsEmbeddedPhoto")))return;this.editor.chain().setContent(n.content).command(({tr:i,chain:o})=>(!i.docChanged||SP(i.doc)?o().undo().hideMessage("autosave").run():o().showMessage("autosave").focus().run(),!0)).run()}}this.storage.updateCallback=gn.debounce(()=>{var n;(n=this.editor)!=null&&n.options.autoSaveKey&&(this.editor.getHTML().trim()&&this.editor.getHTML()!=="<p></p>"?window.ips.utils.db.set("editorSave",this.editor.options.autoSaveKey,{content:this.editor.getHTML(),time:Math.round(Date.now()/1e3)}):this.editor.commands.clearAutosave(),this.editor.commands.hideMessage("autosave"))},500)},addStorage(){return{initial:"",updateCallback:()=>{}}}});function SP(e){var t,n,r;return e.textContent==="<p></p>"?!0:!((t=e.textContent)!=null&&t.trim().length||![Bf.name,Ht.name,Ri.name,td.name].includes(e.type.name)||(r=(n=e.content)==null?void 0:n.content)!=null&&r.length&&!e.content.content.some(i=>!SP(i)))}function E7(){const{editor:e}=L.useContext(xe);return v.jsxs(v.Fragment,{children:[window.ips.getString("editor_tool--autosave-message-before")," ",v.jsx("button",{className:"ipsEditor__autosave-clear",onClick:()=>e.chain().clearAutosave().setContent(e.storage[EP.name].initial||"").focus().run(),children:window.ips.getString("editor_tool--autosave-message-inner")}),window.ips.getString("editor_tool--autosave-message-after")]})}function S7({positions:e="",href:t}){const{editor:n}=L.useContext(xe),r=()=>{if(!e.length){n.commands.hideMessage("autoembed");return}let i=n.chain();for(const o of e)i=i.command(({tr:s,chain:a})=>a().insertContentAt({from:Math.max(0,s.mapping.map(o[0])),to:Math.min(s.doc.nodeSize-2,s.mapping.map(o[1]))},`<a href="${encodeURI(t)}" >${o[2]}</a>`));i.hideMessage("autoembed").focus().run()};return v.jsxs(v.Fragment,{children:[window.ips.getString("editor_tool--autoembed-message-before"),v.jsx("button",{className:"ipsEditor__autosave-clear",onClick:r,children:window.ips.getString("editor_tool--autoembed-message-inner")}),window.ips.getString("editor_tool--autoembed-message-after")]})}function T7(){const{editor:e}=L.useContext(xe),t=()=>{if(!e.storage[Ke.name].autolinked){e.commands.hideMessage("autolink");return}const n=e.storage[Ke.name].autolinked,{from:r,to:i}=e.state.selection;e.chain().setTextSelection({from:n.from,to:n.to}).unsetMark(Ke.name).setTextSelection({from:r,to:i}).focus().hideMessage("autolink").run()};return v.jsxs(v.Fragment,{children:[window.ips.getString("editor_tool--autolink-message-before"),v.jsx("button",{className:"ipsEditor__autosave-clear",onClick:t,children:window.ips.getString("editor_tool--autolink-message-inner")}),window.ips.getString("editor_tool--autolink-message-after")]})}function gI({name:e}){const{editor:t}=L.useContext(xe);return v.jsxs("div",{className:`ipsEditor__global-message ipsEditor__global-message--${e}`,children:[v.jsxs("div",{className:"ipsEditor__global-message-content",children:[v.jsx("i",{className:"fa-solid fa-circle-info"}),"  ",v.jsx(b7,{name:e})]}),v.jsx("button",{className:"ipsEditor__global-message-close",onClick:()=>t==null?void 0:t.commands.hideMessage(e),children:v.jsx("i",{className:"fa-solid fa-times-circle"})})]})}function b7({name:e}){const{messages:t}=L.useContext(DT),n=t.get(e);switch(e){case"autosave":return v.jsx(E7,{});case"autoembed":return v.jsx(S7,{...n});case"autolink":return v.jsx(T7,{});default:return typeof n=="string"&&n?v.jsx("span",{"data-ipseditorcustommessage":"true",dangerouslySetInnerHTML:{__html:n}}):v.jsx(v.Fragment,{children:"This is a global message!"})}}consLine truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x7(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TI(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 bI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TI(Object(n),!0).forEach(function(r){x7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function D7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(i,o){return o(i)},r)}}function Vc(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return t.apply(n,[].concat(i,a))}}}function nm(e){return{}.toString.call(e).includes("Object")}function M7(e){return!Object.keys(e).length}function nd(e){return typeof e=="function"}function L7(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function k7(e,t){return nm(t)||ps("changeType"),Object.keys(t).some(function(n){return!L7(e,n)})&&ps("changeField"),t}function P7(e){nd(e)||ps("selectorType")}function B7(e){nd(e)||nm(e)||ps("handlerType"),nm(e)&&Object.values(e).some(function(t){return!nd(t)})&&ps("handlersType")}function F7(e){e||ps("initialIsRequired"),nm(e)||ps("initialType"),M7(e)&&ps("initialContent")}function U7(e,t){throw new Error(e[t]||e.default)}var G7={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},ps=Vc(U7)(G7),ff={changes:k7,selector:P7,handler:B7,initial:F7};function Y7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ff.initial(e),ff.handler(t);var n={current:e},r=Vc(z7)(n,t),i=Vc(H7)(n),o=Vc(ff.changes)(e),s=Vc($7)(n);function a(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(p){return p};return ff.selector(u),u(n.current)}function l(u){D7(r,i,o,s)(u)}return[a,l]}function $7(e,t){return nd(t)?t(e.current):t}function H7(e,t){return e.current=bI(bI({},e.current),t),t}function z7(e,t,n){return nd(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var V7={create:Y7},W7={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function q7(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return t.apply(n,[].concat(i,a))}}}function K7(e){return{}.toString.call(e).includes("Object")}function Q7(e){return e||yI("configIsRequired"),K7(e)||yI("configType"),e.urls?(j7(),{paths:{vs:e.urls.monacoBase}}):e}function j7(){console.warn(TP.deprecation)}function X7(e,t){throw new Error(e[t]||e.default)}var TP={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
You are using deprecated way of configuration.
Instead of using
monaco.config({ urls: { monacoBase: '...' } })
use
monaco.config({ paths: { vs: '...' } })
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
`},yI=q7(X7)(TP),Z7={config:Q7},J7=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduceRight(function(o,s){return s(o)},i)}};function bP(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],bP(e[n],t[n]))}),EI(EI({},e),t)}var eJ={type:"cancelation",msg:"operation is manually canceled"};function ME(e){var t=!1,n=new Promise(function(r,i){e.then(function(o){return t?i(eJ):r(o)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var tJ=V7.create({config:W7,isInitialized:!1,resolve:null,reject:null,monaco:null}),yP=N7(tJ,2),bd=yP[0],$m=yP[1];function nJ(e){var t=Z7.config(e),n=t.monaco,r=R7(t,["monaco"]);$m(function(i){return{config:bP(i.config,r),monaco:n}})}function rJ(){var e=bd(function(t){var n=t.monaco,r=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:r,resolve:i}});if(!e.isInitialized){if($m({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),ME(LE);if(window.monaco&&window.monaco.editor)return CP(window.monaco),e.resolve(window.monaco),ME(LE);J7(iJ,sJ)(aJ)}return ME(LE)}function iJ(e){return document.body.appendChild(e)}function oJ(e){var t=document.createElement("script");return e&&(t.src=e),t}function sJ(e){var t=bd(function(r){var i=r.config,o=r.reject;return{config:i,reject:o}}),n=oJ("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function aJ(){var e=bd(function(n){var r=n.config,i=n.resolve,o=n.reject;return{config:r,resolve:i,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){CP(n),e.resolve(n)},function(n){e.reject(n)})}function CP(e){bd().monaco||$m({monaco:e})}function lJ(){return bd(function(e){var t=e.monaco;return t})}var LE=new Promise(function(e,t){return $m({resolve:e,reject:t})}),rm={config:nJ,init:rJ,__getMonacoInstance:lJ},cJ={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},kE=cJ,uJ={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},dJ=uJ;function pJ({children:e}){return rr.createElement("div",{style:dJ.container},e)}var fJ=pJ,_J=fJ;function mJ({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:o,wrapperProps:s}){return rr.createElement("section",{style:{...kE.wrapper,width:e,height:t},...s},!n&&rr.createElement(_J,null,r),rr.createElement("div",{ref:i,style:{...kE.fullWidth,...!n&&kE.hide},className:o}))}var gJ=mJ,vP=L.memo(gJ);function hJ(e){L.useEffect(e,[])}var RP=hJ;function EJ(e,t,n=!0){let r=L.useRef(!0);L.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var hr=EJ;function fu(){}function ll(e,t,n,r){return SJ(e,r)||TJ(e,t,n,r)}function SJ(e,t){return e.editor.getModel(NP(e,t))}function TJ(e,t,n,r){return e.editor.createModel(t,n,r?NP(e,r):void 0)}function NP(e,t){return e.Uri.parse(t)}function bJ({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:l=!1,theme:u="light",loading:p="Loading...",options:f={},height:_="100%",width:m="100%",className:h,wrapperProps:E={},beforeMount:b=fu,onMount:S=fu}){let[y,C]=L.useState(!1),[N,O]=L.useState(!0),x=L.useRef(null),w=L.useRef(null),D=L.useRef(null),q=L.useRef(S),Y=L.useRef(b),le=L.useRef(!1);RP(()=>{let ne=rm.init();return ne.then($=>(w.current=$)&&O(!1)).catch($=>($==null?void 0:$.type)!=="cancelation"&&console.error("Monaco initialization: error:",$)),()=>x.current?pe():ne.cancel()}),hr(()=>{if(x.current&&w.current){let ne=x.current.getOriginalEditor(),$=ll(w.current,e||"",r||n||"text",o||"");$!==ne.getModel()&&ne.setModel($)}},[o],y),hr(()=>{if(x.current&&w.current){let ne=x.current.getModifiedEditor(),$=ll(w.current,t||"",i||n||"text",s||"");$!==ne.getModel()&&ne.setModel($)}},[s],y),hr(()=>{let ne=x.current.getModifiedEditor();ne.getOption(w.current.editor.EditorOption.readOnly)?ne.setValue(t||""):t!==ne.getValue()&&(ne.executeEdits("",[{range:ne.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),ne.pushUndoStop())},[t],y),hr(()=>{var ne,$;($=(ne=x.current)==null?void 0:ne.getModel())==null||$.original.setValue(e||"")},[e],y),hr(()=>{let{original:ne,modified:$}=x.current.getModel();w.current.editor.setModelLanguage(ne,r||n||"text"),w.current.editor.setModelLanguage($,i||n||"text")},[n,r,i],y),hr(()=>{var ne;(ne=w.current)==null||ne.editor.setTheme(u)},[u],y),hr(()=>{var ne;(ne=x.current)==null||ne.updateOptions(f)},[f],y);let de=L.useCallback(()=>{var U;if(!w.current)return;Y.current(w.current);let ne=ll(w.current,e||"",r||n||"text",o||""),$=ll(w.current,t||"",i||n||"text",s||"");(U=x.current)==null||U.setModel({original:ne,modified:$})},[n,t,i,e,r,o,s]),se=L.useCallback(()=>{var ne;!le.current&&D.current&&(x.current=w.current.editor.createDiffEditor(D.current,{automaticLayout:!0,...f}),de(),(ne=w.current)==null||ne.editor.setTheme(u),C(!0),le.current=!0)},[f,u,de]);L.u Line truncated
${u.message}`,window.Debug.warn(u),n.commands.showMessage("file-attach","Couldn't insert one or more files pasted or dropped in the editor.")),n.commands.removeAttachment(a))}}}))}return o.run(),!0}}},addProseMirrorPlugins(){return[Uee({mimeTypes:this.options.allowedMimeTypes,handler:e=>this.options.onPaste(this.editor,e)})]}}).configure({onPaste(e,t){return e.commands.injectAttachments(t)},onDrop(e,t){return e.commands.injectAttachments(t)}});class Yee extends Event{constructor(t){super("injectFile"),this.data=t}}const $ee=["name","group","isInline","isBlock","isText","content","isLeaf","selectable","exitable","atom","addOptions","addKeyboardShortcuts","addAttributes","addGlobalAttributes","addStorage","addCommands","renderHTML","parseHTML","onCreate","onUpdate","onBeforeCreate","onFocus","onBlur","onBeforeCreate","onSelectionUpdate","onDestroy","onTransaction","priority","defaultOptions","addInputRules","addPasteRules","addProseMirrorPlugins","marks","addNodeView","whitespace","defining","isolating","renderText"];function Hee(e,t){var a,l,u;if(!e.ipsPlugins){e.ipsPlugins={buttons:{},extensions:[],nodes:[],marks:[]};return}e.ipsPlugins.buttons={},Array.isArray((a=e.ipsPlugins)==null?void 0:a.extensions)?s(e.ipsPlugins.extensions,je):e.ipsPlugins.extensions=[],Array.isArray((l=e.ipsPlugins)==null?void 0:l.nodes)?s(e.ipsPlugins.nodes,ct):e.ipsPlugins.nodes=[],Array.isArray((u=e.ipsPlugins)==null?void 0:u.marks)?s(e.ipsPlugins.marks,Hn):e.ipsPlugins.marks=[],e.ipsPlugins.nestedToolbars={},e.pluginButtonKeys=new Set;const n=new Set(e.tools.toolbar);for(const p in e.ipsPlugins.buttons)for(const{before:f,after:_}of e.ipsPlugins.buttons[p].locations){let m,h=!1;if(typeof _=="string"&&_ in KA){const E=KA[_];e.ipsPlugins.nestedToolbars[E]=e.ipsPlugins.nestedToolbars[E]||[...Es[E]],e.ipsPlugins.nestedToolbars[E].push(`custom:${p}`),h=!0}else if(typeof _=="string"&&n.has(_))m=e.tools.toolbar.indexOf(_)+1;else if(typeof f=="string"&&n.has(f))m=e.tools.toolbar.indexOf(f);else if(!f&&!_||f===null||_===null)m=e.tools.toolbar.length;else continue;e.pluginButtonKeys.add(`custom:${p}`),h||(n.add(`custom:${p}`),e.tools.toolbar.splice(m,0,`custom:${p}`))}function r(p){for(const f of p.attributes)["class","style","id","src","title","rel","alt"].includes(f.name.toLowerCase())||p.removeAttribute(f.name);for(const f of p.querySelectorAll(":scope > *"))r(f)}function i(p,f){var _;if(p.addButtons instanceof Function){const m=p.addButtons.bind(f)();if(typeof m!="object")throw new TypeError;const h=new DOMParser;for(const E in m){let{html:b,command:S,locations:y,element:C,isActive:N,isAvailable:O}=m[E];if(typeof b!="string"&&!(C instanceof HTMLElement)||!(S instanceof Function)||!Array.isArray(y))throw new TypeError;N!==void 0&&typeof N!="boolean"&&!(N instanceof Function)&&(window.Debug.warn(`Expected isActive to be a boolean or a Function, got a ${typeof N}. Casting to boolean.`),N=!!N),O!==void 0&&typeof O!="boolean"&&!(O instanceof Function)&&(window.Debug.warn(`Expected isAvailable to be a boolean or a Function, got a ${typeof O}. Casting to boolean.`),O=!!O);const x=[];for(const Y of y)if(Y===null)x.push({after:null,before:void 0});else if(typeof Y=="object"){if(![void 0,null].includes(Y.before)&&typeof Y.before!="string"||![void 0,null].includes(Y.after)&&typeof Y.after!="string")throw new TypeError;x.push({after:Y.after,before:Y.before})}else typeof Y=="string"?x.push({after:Y,before:void 0}):x.push({after:void 0,before:void 0});y=x;const w=["script","link","style","pre","code","iframe","object","embed","noscript","video"];if(C instanceof Element)C.querySelectorAll(w.join(",")).forEach(Y=>Y.remove());else{const Y=h.parseFromString(b,"text/html");if(!(Y instanceof Document))throw new RangeError("The html passed in for the button is not readable");if(Y.querySelectorAll(w.join(",")).forEach(le=>le.remove()),!(((_=Y==null?void 0:Y.body)==null?void 0:_.firstElementChild)instanceof HTMLElement)||!Y.body.firstElementChild.innerHTML.length)throw new RangeError("The html passed in for the button is not readable");C=Y.body.firstElementChild}if(r(C),w.includes(C.tagName.toLowerCase()))throw new RangeError(`The element of type ${C.tagName} cannot be used as a toolbar button`);const D=C.cloneNode(!0),q=`${p.name}_${E}`;e.ipsPlugins.buttons[q]={get element(){return D},set element(Y){throw new Error("Cannot update the element of an ipsPlugin button!")},get command(){return S.bind(f)},set command(Y){throw new Error("Cannot update the command of an ipsPlugin button!")},get isActive(){return N instanceof Function?N.bind(f):N},set isActive(Y){throw new Error("Cannot update the isActive property of an ipsPlugin button!")},get isAvailable(){return O instanceof Function?O.bind(f):O},set isAvailable(Y){throw new Error("Cannot update the isAvailable property of an ipsPlugin button!")},get locations(){return y},set locations(Y){throw new Error("Cannot update properties of ipsPlugin buttons")}}}delete p.addButtons}}function o(p){for(const f of Object. Line truncated
${m.message}`,window.Debug.warn(m)}}}const UE=je.create({name:"ipsHomeEnd",addKeyboardShortcuts(){return{Home:({editor:e})=>(Qt(()=>{var i,o,s;const{$from:t}=e.state.selection,n=t.pos-t.parentOffset;let r=t.pos;for(;r>n;){const a=e.state.doc.slice(r-1,r);if(((i=a.content.content[0])==null?void 0:i.textContent)===`
`||((s=(o=a.content.content[0])==null?void 0:o.type)==null?void 0:s.name)===td.name)break;r--}e.chain().setTextSelection(r).focus().run()},"Something went wrong handling the 'Home' key press"),!0),End:({editor:e})=>(Qt(()=>{var i,o,s;const{$to:t}=e.state.selection,n=[...t.path].reverse()[3]+t.parent.nodeSize-1;let r=t.pos;for(;r<n;){const a=e.state.doc.slice(r,r+1);if(((i=a.content.content[0])==null?void 0:i.textContent)===`
`||((s=(o=a.content.content[0])==null?void 0:o.type)==null?void 0:s.name)===td.name)break;r++}e.chain().setTextSelection(r).focus().run()},"Something went wrong handling the 'End' key press"),!0)}}}),zee=je.create({name:"IPSSimpleRichText",addProseMirrorPlugins(){return[new Fe({key:new Ge("ipsSimpleRichTextPlugin"),filterTransaction:e=>!(this.editor.options.lengthFunction instanceof Function&&typeof this.editor.options.maxLength=="number"&&this.editor.options.lengthFunction(pd(e.doc.content,this.editor.schema))>this.editor.options.maxLength),appendTransaction:(e,t,n)=>{const r=[];let i;const{from:o,to:s}=n.selection;n.doc.descendants((l,u)=>{var p,f;if(typeof l.textContent=="string"&&!l.textContent&&!l.isInline){const _=n.doc.resolve(u),m=Vee(_,n.doc),h=Wee(_,n.doc);if([o,s].some(E=>m.pos<E&&h.pos>E)){if(i===void 0&&e.some(E=>{var b;return(b=E.steps)==null?void 0:b.length})){let E=1,b=l;for(;(f=(p=b.content)==null?void 0:p.content)!=null&&f.length;)E++,b=b.content.content[0];i=E+u}return!1}return r.push([u,u+l.nodeSize]),!1}if(l.isInline||!l.content.content.length)return!1});const{tr:a}=n;for(const[l,u]of r.reverse())a.delete(l,u);if(i!==void 0){const l=be.atStart(n.doc).from,u=be.atEnd(n.doc).to,p=be.create(n.doc,jo(i,l,u));o===p.from&&o===s||a.setSelection(p)}return a}})]},addKeyboardShortcuts(){return{Enter:({editor:e})=>{const t=e.view.dom.closest("form");if(t){let n=t.querySelector('button:is([type="submit"], :not([type]))');n||(n=document.createElement("button"),n.setAttribute("type","button"),n.setAttribute("hidden",""),t.appendChild(n),setTimeout(()=>n.documentElement===document.documentElement&&n.remove(),200)),n.click()}return!0},"Shift-Enter":({editor:e})=>(e.isActive(Qu.name)?e.commands.splitListItem(Qu.name):e.commands.splitBlock(),!1)}},onCreate(){this.editor.view.dom.addEventListener("clear",e=>{var t;this.editor.commands.setContent(((t=e.detail)==null?void 0:t.content)||"")})}});function Vee(e,t){var r,i;const n=[...e.path].reverse();for(;n.length>=3;){if(n[1]>0){let o=n[2].content.content[n[1]-1],s=0;for(;o;)o=(i=(r=o.content)==null?void 0:r.content)!=null&&i.length?o.content.content[o.content.content.length-1]:null,s++;return t.resolve(e.pos-s)}n.splice(0,3)}return t.resolve(0)}function Wee(e,t){var r,i;const n=[...e.path].reverse();for(;n.length>=3;){if(n[1]<n[2].content.content.length-1){let o=n[2].content.content[n[1]+1],s=0;for(;o;)s++,o=(i=(r=o.content)==null?void 0:r.content)==null?void 0:i[0];return t.resolve(e.pos+n[2].content.content[n[1]].nodeSize+s)}n.splice(0,3)}return t.resolve(t.nodeSize-2)}const qee=je.create({name:"ipsClearNewLine",addOptions(){return{removeNewLinesBefore:[]}},addStorage(){return{observedNodes:[Mt.name,cr.name,oo.name,_o.name,Ly.name,ot.name]}},onCreate(){this.options.removeNewLinesBefore.length&&(this.storage.observedNodes=[...new Set([...this.storage.observedNodes,...this.options.removeNewLinesBefore])])},addKeyboardShortcuts(){return{Backspace:({editor:e})=>{var o,s,a,l,u,p,f;const{observedNodes:t}=this.storage;if(!(t!=null&&t.length))return;const n=e.state.selection;if(!n.empty)return;const r=n.$from.parent;if(!r||r.type.name!==Ht.name)return;const i=[...n.$from.path].reverse();if(r.content.size){if(!((u=(l=r==null?void 0:r.content)==null?void 0:l.content)!=null&&u.length)||r.content.content.length<2||((p=n.$from.nodeAfter)==null?void 0:p.type.name)!==td.name||!t.includes((f=r.content.content[n.$from.parentOffset+1])==null?void 0:f.type.name))return;const _=i[1];let m;if(_!==0){if(!t.includes(r.content.content[_-1]))return;m=n.from-r.content.content[_-1].nodeSize}else{const h=i[5],E=i[4],b=h.type.name===oo.name?1:0;E>b&&t.includes(h.content.content[E-1].type.name)&&(m=i[3]-h.content.content[E-1].nodeSize)}return(typeof m!="number"||Number.isNaN(m))&&(m=n.from),e.chain().deleteRange({from:n.from,to:n.from+1}).setNodeSelection(m).run(),!0}else{const _=i[5],m=i[4];if(!_||m===void 0)return;const h=_.content.content[m+1];if(!h||!(h.type.name===Ht.name&&h.content.content.length===1&&t.includes((o=h.content.content[0])==null?void 0:o.type.name)||t.includes(h.type.name)))return;const E=_.type.name===oo.name?1:0;if(m>E&&!t.includes(_.content.content[m-1].type.name))return;const b=i[3];let S=m>E?b-_.content.content[m-1].nodeSize:m;return Number.isNaN(S)&&(window.Debug.warn(new RangeError(`The position following an empty line deletion couldn't be determined. Most likely, the previous sibling's position cannot be determined. (Prev sib size: ${(s=_.content.content[m])==null?void 0:s.nodeSize}; current parent pos: ${b})`)),S=n.from,Number.isNaN(S))?void 0:(S>=n.from&&h.type.name===Ht.name&&h.content.content.length===1&&t.includes((a=h==null?void 0:h.content.content[0])==null?void 0:a.type.name)&&S++,e.chain().deleteRange({from:b,to:b+r.nodeSize}).setNodeSelection(S).run(),!0)}},Escape:()=>{if(this.editor.state.selection.empty&&Py(this.editor.state.selection.$from,this.editor.state).size)return this.editor.chain().stronglyRemoveAllMarks().focus().run(),!0}}},addComma Line truncated
`);return n.chain().insertContentAt({from:a,to:h},{type:Mt.name,attrs:f,content:[{type:"text",text:E}]}).setNodeSelection(a)}}}}),Qee=ct.create({name:"IPSLazyLoadLegacy",parseHTML(){return[{tag:"*",getAttrs:e=>(window.ips.utils.lazyload.parseLazyLoadElements(e,!1),!1)}]},renderHTML(){return window.Debug.warn("The IPSLazyLoadLegacy node fixer is being rendered as HTML, but should never exist in the ProseMirror Node tree. This will create one empty <i-lazy-load-dummy-element> wrapper"),["i-lazy-load-dummy-element",0]},priority:1e4}),Hm=[[/(\{\{)(?=[^\n]*}})/,[{token:"delimiter",next:"@ipsTemplateTag"}]],[/(\{)([a-zA-Z0-9-]+)(=)(?=[^\n]*})/,["delimiter","attribute.name",{token:"delimiter",next:"@ipsPlugin"}]],[/(\{)(\$)(?=[a-zA-Z][^\n]*})/,["delimiter",{token:"symbol",goBack:2,next:"@ipsTemplateVar"}]]],jee=Hm.map(([e])=>{const t=e.toString().replace(/^\//,"").replace(/\/[a-z0-9]*$/,"");return t.match(/^\((\?[:=!])?\\\{/)?t.replace(/^\((\?[:=!])?\\\{/,"($1").replace(/^\((\?[:=!])?\)/,""):!1}).filter(e=>typeof e=="string"),PP={ipsRoot:[...Hm],ipsPlugin:[[/(})/,{token:"delimiter",next:"@pop"}],[/(")/,{token:"attribute.value",next:"@ipsPlugin_nestedPHP_dq",nextEmbedded:"phpSimplified"}],[/(')/,{token:"attribute.value",next:"@ipsPlugin_nestedPHP_sq",nextEmbedded:"phpSimplified"}],[/([a-zA-Z0-9-_]+)(=)/,["attribute.name","delimiter"]],[/\s/],[/./,{token:"@rematch",next:"@pop"}]],ipsPlugin_nestedPHP_dq:[[/(})/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/(")/,{token:"attribute.value",next:"@pop",nextEmbedded:"@pop"}],{include:"@ipsTemplateKeywords"},[/[^}"]+/]],ipsPlugin_nestedPHP_sq:[[/(})/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/(')/,{token:"attribute.value",next:"@pop",nextEmbedded:"@pop"}],{include:"@ipsTemplateKeywords"},[/[^}']+/]],ipsTemplateTag:[[/(if|else|elseif|endif|foreach|endforeach)/,{token:"keyword",next:"@ipsTemplateTag_inner",nextEmbedded:"phpSimplified"}],[/(}})/,[{token:"delimiter",next:"@pop"}]],[/(.)/,{token:"",goBack:1,next:"@ipsTemplateTag_inner",nextEmbedded:"phpSimplified"}]],ipsTemplateTag_inner:[[/(}})/,{token:"delimiter",next:"@pop",nextEmbedded:"@pop",goBack:2}],{include:"@ipsTemplateKeywords"},[/[^}]*|}(?!})/]],ipsTemplateVar:[[/(})/,{token:"delimiter",next:"@pop"}],[/(\|)([a-zA-Z0-9_-]+)([^|}a-zA-Z0-9_-])/,["delimiter","keyword",{token:"",goBack:1,next:"@pop"}]],[/(\|)([a-zA-Z0-9_-]+)/,[{token:"delimiter"},{token:"keyword"}]],[/(\|)/,"delimiter"],[/(\{\$)/,{token:"",goBack:1,next:"@ipsTemplateVar_inner",nextEmbedded:"phpSimplified"}],[/(.)/,{token:"@rematch",next:"@pop",goBack:1}]],ipsTemplateVar_inner:[[/([|}])/,{token:"",next:"@pop",nextEmbedded:"@pop",goBack:1}],[/[^|}]+/]],ipsTemplateKeywords:[[/(member|request|setting|cookie)(\.)(?=[a-zA-Z_])*/,["constant.php","delimiter.php"]]]};function tr(e){if(["string","number","boolean","symbol"].includes(typeof e)||[null,void 0,Number.NaN].includes(e))return e;if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(t=>tr(t));if(typeof e=="object"){const t={};for(const n in e)t[n]=tr(e[n]);return t}return e}function Xee(e){e=tr(e);const t=e.loader;let n,r=!1,i=new Set;return e.loader=async()=>{if(n)return n;if(r)return await new Promise(s=>i.add(s));r=!0;let o=await(t==null?void 0:t())||{conf:{},language:{tokenizer:{}}};o=tr(o),o.language.languageId=e.id;for(const s of["tokenizer"]){if(!o.language[s])continue;const a={};for(const l in o.language[s]){const u=[];o.language[s][l].forEach(p=>{if(Array.isArray(p)&&p.length>=1&&p[0]instanceof RegExp){const f=p[0].toString().replace(/^\//,"").replace(/\/[a-z]*$/,""),_=/(^|[^\\])(\[\^)([^{]*?[^\\{])(])(\+\??|\*)?/g,m=f.replaceAll(_,(...h)=>{var b;let E=h[2]+h[3]+h[4]+h[5];return(b=h[3])!=null&&b.includes("{")||(E="(?:\\{[^"+h[3]+"{]*|[^"+h[3]+"{]"+h[5]+")"),h[1]+E});if(m!==f){const h=FP(p);h&&(u.push(h.newRule),Object.assign(a,h.scopes)),u.push([new RegExp(`${m}`,p[0].flags),...tr(p.slice(1))]);return}}u.push(p)}),o.language[s][l]=u,o.language[s][l].splice(0,0,...tr(Hm))}Object.assign(o.language[s],a),Object.assign(o.language[s],PP),o.language.tokenPostfix=".phtml"}return delete o.language.stateNames,o.conf.brackets=o.conf.brackets||o.language.brackets||[],o.conf.brackets.some(s=>Array.isArray(s)&&s[0]==="{"&&s[1]==="}"||!Array.isArray(s)&&s.open==="{"&&s.close==="}")||o.conf.brackets.push(["{","}"]),o.conf.brackets.some(s=>Array.isArray(s)&&s[0]==="{{"&&s[1]==="}}"||!Array.isArray(s)&&s.open==="{{"&&s.close==="}}")||o.conf.brackets.push(["{{","}}"]),n=o,r=!1,setTimeout(()=>{i.forEach(s=>s(n)),i.clear()}),n},e}const BP={"(":")","(?:":")","[":"]","{":"}"};function kI(e=""){var u;let t,n=[],r=0,i=0,o=0,s=!0,a=[],l=!1;for(;(t=e.slice(r).match(/[\[\]{})]|\((?:\?[!=:])?/))&&t;){let p=e.slice(r,r+t.index);if(r+=t.index+t.length,(((u=p.match(/\\+$/))==null?void 0:u[0].length)||0)%2){(!n.length||n[n.length-1].bracket!=="{")&&(s=!1);continue}if(!l&&!n.some(({bracket:f})=>f==="(")&&(l=!0),n.length&&n[n.length-1].bracket==="["&&t[0]!=="]"){s=!1;continue}if(!(n.leng Line truncated
`}}),...(_=e.restrictions)!=null&&_.has("tables")?[!1]:[_P.configure({resizable:!0,cellMinWidth:((m=e.table)==null?void 0:m.cellMinWidth)||20}),dP,uP,cP],gP,qee,Eee.configure({class:"ipsEditor__drop-cursor",width:3})].filter(C=>!!C);return window.navigator.platform==="MacIntel"&&t.push(UE),e.autoSaveKey&&t.push(EP),e.postkey&&(t.push(Gee),t.push(ot.configure({externalImages:!((h=e.restrictions)!=null&&h.has("external_image")),externalVideos:!((E=e.restrictions)!=null&&E.has("external_video")),float:!((b=e.restrictions)!=null&&b.has("float"))}))),(S=e.restrictions)!=null&&S.has("heading")||t.push(Yr.configure({levels:(y=e.restrictions)!=null&&y.has("heading_1")?[2,3,4,5,6]:[1,2,3,4,5,6]})),t.push(Qee),t}async function PI(e,t){var n,r,i,o,s;if(await Fk(),e.pluginButtonKeys=new Set,e.simpleRichText?(delete e.codeMode,e.tools={toolbar:[...Zk]},e.react&&MK(e.react)):await CA(),e.restrictions&&Symbol.iterator in e.restrictions?e.restrictions=new Set(e.restrictions):(delete e.restrictions,e.restrictions=new Set),e.jQuery=e.jQuery||window.jQuery,e.editorProps={attributes:{class:e.codeMode?"":"ipsRichText"}},e.itemStates={},e.restrictions.has("native_emoji")&&!e.restrictions.has("custom_emoji")&&!await window.ips.utils.iconpicker.hasCustomEmoji()&&e.restrictions.add("custom_emoji"),e.supportedTextColors&&Object.getPrototypeOf(e.supportedTextColors)===Object.prototype)for(const a in e.supportedTextColors)e.supportedBoxColors=e.supportedBoxColors&&Object.getPrototypeOf(e.supportedBoxColors)===Object.prototype?e.supportedBoxColors:{},!(a in e.supportedBoxColors)&&(e.supportedBoxColors[a]=e.supportedTextColors[a]);if(e.extensions=await Zee(e),!(e.messagesContainer instanceof Element)&&((n=t==null?void 0:t.closest(".ipsEditor"))!=null&&n.querySelector('[data-role="editor-messages-container"]'))&&(e.messagesContainer=(r=t==null?void 0:t.closest(".ipsEditor"))==null?void 0:r.querySelector('[data-role="editor-messages-container"]')),e.codeMode){for(e.tools={toolbar:["codelanguage"]},await CA(),((i=window.ips)==null?void 0:i.getSetting)instanceof Function&&rm.config({paths:{vs:window.ips.getSetting("monaco-vs-root")||new URL(window.ips.getSetting("baseURL"),window.location.href).toString().replace(/\/+$/,"")+"/applications/core/interface/static/tiptap/monaco/vs"}});(o=e.allowedLanguages)!=null&&o.includes("txt");)e.allowedLanguages.splice(e.allowedLanguages.indexOf("txt"),1,"plaintext");const a=[],l=await rm.init();if((!!e.hasTags||["ipsphtml","ipscss","ipsplaintext"].some(p=>{var f;return(f=e.allowedLanguages)==null?void 0:f.includes(p)}))&&((s=e.allowedLanguages)!=null&&s.length||(e.allowedLanguages=["plaintext"]),[["html","ipsphtml"],["css","ipscss"],["plaintext","ipsplaintext"]].forEach(([p,f])=>{var _;for(;(_=e.allowedLanguages)!=null&&_.includes(p);)e.allowedLanguages.splice(e.allowedLanguages.indexOf(p),1,...e.allowedLanguages.includes(f)?[]:[f])})),[["html","ipsphtml"],["css","ipscss"],["plaintext","ipsplaintext"]].forEach(([p,f])=>{var _;if((_=e.allowedLanguages)!=null&&_.includes(f)){const m=l.languages.getLanguages().find(E=>E.id===p),h=Xee({...m,id:f,aliases:void 0,mimetypes:[],extensions:[]});for(a.push(h);e.allowedLanguages.includes(p);)e.allowedLanguages.splice(e.allowedLanguages.indexOf(p),1)}}),a.length){const p=l.languages.getLanguages().find(E=>E.id==="php");let f,_,m=new Set;const h={...p,id:"phpSimplified",aliases:void 0,mimetypes:[],extensions:[],loader:async()=>{if(f)return f;if(_)return new Promise(b=>m.add(b));_=!0;const E=tr(await p.loader());return E.language.languageId="phpSimplified",E.language.tokenizer={phpRoot:E.language.tokenizer.phpRoot,...E.language.tokenizer},E.language.tokenizer.phpRoot.splice(0,0,...tr(PP.ipsTemplateKeywords)),E.language.tokenizer.root.splice(0,0,{include:"phpRoot"}),f=E,setTimeout(()=>{m.forEach(b=>{try{b(f)}catch(S){console.error(S)}}),m.clear()}),f}};a.splice(0,0,h),a.forEach(E=>{l.languages.register(E),l.languages.registerTokensProviderFactory(E.id,{create:async()=>(await E.loader()).language}),l.languages.onLanguageEncountered(E.id,async()=>{l.languages.setLanguageConfiguration(E.id,(await E.loader()).conf)})})}return e}if(e.simpleRichText||Hee(e,e.extensions),e.stockrepliesenabled){const a=await Dy();Object.keys(a).length?window.Debug.log("Loaded stock replies"):(e.stockrepliesenabled=!1,window.Debug.log("No stock replies, disabling the button"))}if(!e.codeMode){for(const a in e.tools)e.tools[a]=e.tools[a].filter(l=>l==="giphy"&&!e.giphyenabled||l==="stockreply"&&!e.stockrepliesenabled?!1:!(e.hidebuttons instanceof Array&&e.hidebuttons.includes(l)));e.parseOptions=e.parseOptions||{},e.parseOptions.preserveWhitespace=!1}return e.tools.toolbar&&e.tools.toolbar[0]!=="block"&&(e.tools.toolbar=["block",...e.tools.toolbar.filter(a=>a!=="block")]),e}let BI=!1;function Jee(){if(!BI){for(const e of["click","focus","keydown","keyup"])document.addEventListener(e,t=>{var n,r,i;(r=(n=t.target)==null?void 0:n.closest)!=null&&r.call(n,".ipsEditor__toolbar-item--unavailable")&&(t Line truncated
@@ -1,218 +0,0 @@
var uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var QA={exports:{}},Vf={},jA={exports:{}},He={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Wu=Symbol.for("react.element"),VB=Symbol.for("react.portal"),WB=Symbol.for("react.fragment"),qB=Symbol.for("react.strict_mode"),KB=Symbol.for("react.profiler"),QB=Symbol.for("react.provider"),jB=Symbol.for("react.context"),XB=Symbol.for("react.forward_ref"),ZB=Symbol.for("react.suspense"),JB=Symbol.for("react.memo"),eG=Symbol.for("react.lazy"),ZR=Symbol.iterator;function tG(e){return e===null||typeof e!="object"?null:(e=ZR&&e[ZR]||e["@@iterator"],typeof e=="function"?e:null)}var XA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ZA=Object.assign,JA={};function Al(e,t,n){this.props=e,this.context=t,this.refs=JA,this.updater=n||XA}Al.prototype.isReactComponent={};Al.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Al.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function eI(){}eI.prototype=Al.prototype;function _T(e,t,n){this.props=e,this.context=t,this.refs=JA,this.updater=n||XA}var fT=_T.prototype=new eI;fT.constructor=_T;ZA(fT,Al.prototype);fT.isPureReactComponent=!0;var JR=Array.isArray,tI=Object.prototype.hasOwnProperty,mT={current:null},nI={key:!0,ref:!0,__self:!0,__source:!0};function rI(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)tI.call(t,r)&&!nI.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Wu,type:e,key:o,ref:s,props:i,_owner:mT.current}}function nG(e,t){return{$$typeof:Wu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function gT(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wu}function rG(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var eN=/\/+/g;function qg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?rG(""+e.key):t.toString(36)}function t_(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Wu:case VB:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+qg(s,0):r,JR(i)?(n="",e!=null&&(n=e.replace(eN,"$&/")+"/"),t_(i,t,n,"",function(u){return u})):i!=null&&(gT(i)&&(i=nG(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(eN,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",JR(e))for(var a=0;a<e.length;a++){o=e[a];var l=r+qg(o,a);s+=t_(o,t,n,l,i)}else if(l=tG(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+qg(o,a++),s+=t_(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function sp(e,t,n){if(e==null)return e;var r=[],i=0;return t_(e,r,"","",function(o){return t.call(n,o,i++)}),r}function iG(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Un={current:null},n_={transition:null},oG={ReactCurrentDispatcher:Un,ReactCurrentBatchConfig:n_,ReactCurrentOwner:mT};function iI(){throw Error("act(...) is not supported in production builds of React.")}He.Children={map:sp,forEach:function(e,t,n){sp(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return sp(e,function(){t++}),t},toArray:function(e){return sp(e,function(t){return t})||[]},only:function(e){if(!gT(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};He.Component=Al;He.Fragment=WB;He.Profiler=KB;He.PureComponent=_T;He.StrictMode=qB;He.Suspense=ZB;He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oG;He.act=iI;He.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ZA({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=mT.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)tI.call(t,l)&&!nI.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Wu,type:e.type,key:i,ref:o,props:r,_owner:s}};He.createContext=function(e){return e={$$typeof:jB,_currentValue:e,_currentValue2:e,_threadCountLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var sG=k,aG=Symbol.for("react.element"),lG=Symbol.for("react.fragment"),cG=Object.prototype.hasOwnProperty,uG=sG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dG={key:!0,ref:!0,__self:!0,__source:!0};function oI(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)cG.call(t,r)&&!dG.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:aG,type:e,key:o,ref:s,props:i,_owner:uG.current}}Vf.Fragment=lG;Vf.jsx=oI;Vf.jsxs=oI;QA.exports=Vf;var N=QA.exports,yE={},sI={exports:{}},gr={},aI={exports:{}},lI={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(D,H){var V=D.length;D.push(H);e:for(;0<V;){var q=V-1>>>1,te=D[q];if(0<i(te,H))D[q]=H,D[V]=te,V=q;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var H=D[0],V=D.pop();if(V!==H){D[0]=V;e:for(var q=0,te=D.length,ue=te>>>1;q<ue;){var Be=2*(q+1)-1,Ee=D[Be],Oe=Be+1,vt=D[Oe];if(0>i(Ee,V))Oe<te&&0>i(vt,Ee)?(D[q]=vt,D[Oe]=V,q=Oe):(D[q]=Ee,D[Be]=V,q=Be);else if(Oe<te&&0>i(vt,V))D[q]=vt,D[Oe]=V,q=Oe;else break e}}return H}function i(D,H){var V=D.sortIndex-H.sortIndex;return V!==0?V:D.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],p=1,_=null,f=3,g=!1,h=!1,E=!1,b=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(D){for(var H=n(u);H!==null;){if(H.callback===null)r(u);else if(H.startTime<=D)r(u),H.sortIndex=H.expirationTime,t(l,H);else break;H=n(u)}}function O(D){if(E=!1,C(D),!h)if(n(l)!==null)h=!0,ne(A);else{var H=n(u);H!==null&&x(O,H.startTime-D)}}function A(D,H){h=!1,E&&(E=!1,T(U),U=-1),g=!0;var V=f;try{for(C(H),_=n(l);_!==null&&(!(_.expirationTime>H)||D&&!ae());){var q=_.callback;if(typeof q=="function"){_.callback=null,f=_.priorityLevel;var te=q(_.expirationTime<=H);H=e.unstable_now(),typeof te=="function"?_.callback=te:_===n(l)&&r(l),C(H)}else r(l);_=n(l)}if(_!==null)var ue=!0;else{var Be=n(u);Be!==null&&x(O,Be.startTime-H),ue=!1}return ue}finally{_=null,f=V,g=!1}}var w=!1,L=null,U=-1,$=5,B=-1;function ae(){return!(e.unstable_now()-B<$)}function be(){if(L!==null){var D=e.unstable_now();B=D;var H=!0;try{H=L(!0,D)}finally{H?pe():(w=!1,L=null)}}else w=!1}var pe;if(typeof y=="function")pe=function(){y(be)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,ee=de.port2;de.port1.onmessage=be,pe=function(){ee.postMessage(null)}}else pe=function(){b(be,0)};function ne(D){L=D,w||(w=!0,pe())}function x(D,H){U=b(function(){D(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){h||g||(h=!0,ne(A))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(D){switch(f){case 1:case 2:case 3:var H=3;break;default:H=f}var V=f;f=H;try{return D()}finally{f=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,H){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var V=f;f=D;try{return H()}finally{f=V}},e.unstable_scheduleCallback=function(D,H,V){var q=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?q+V:q):V=q,D){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=V+te,D={id:p++,callback:H,priorityLevel:D,startTime:V,expirationTime:te,sortIndex:-1},V>q?(D.sortIndex=V,t(u,D),n(l)===null&&D===n(u)&&(E?(T(U),U=-1):E=!0,x(O,V-q))):(D.sortIndex=te,t(l,D),h||g||(h=!0,ne(A))),D},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(D){var H=f;return function(){var V=f;f=H;try{return D.apply(this,arguments)}finally{f=V}}}})(lI);aI.exports=lI;var pG=aI.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var _G=k,mr=pG;function oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var cI=new Set,iu={};function oa(e,t){pl(e,t),pl(e+"Capture",t)}function pl(e,t){for(iu[e]=t,e=0;e<t.length;e++)cI.add(t[e])}var ji=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),CE=Object.prototype.hasOwnProperty,fG=/^[: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]*$/,tN={},nN={};function mG(e){return CE.call(nN,e)?!0:CE.call(tN,e)?!1:fG.test(e)?nN[e]=!0:(tN[e]=!0,!1)}function gG(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hG(e,t,n,r){if(t===null||typeof t>"u"||gG(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Bn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var un={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){un[e]=new Bn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];un[t]=new Bn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){un[e]=new Bn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){un[e]=new Bn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){un[e]=new Bn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){un[e]=new Bn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){un[e]=new Bn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){un[e]=new Bn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){un[e]=new Bn(e,5,!1,e.toLowerCase(),null,!1,!1)});var hT=/[\-:]([a-z])/g;function ET(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(hT,ET);un[t]=new Bn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(hT,ET);un[t]=new Bn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(hT,ET);un[t]=new Bn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){un[e]=new Bn(e,1,!1,e.toLowerCase(),null,!1,!1)});un.xlinkHref=new Bn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){un[e]=new Bn(e,1,!1,e.toLowerCase(),null,!0,!0)});function ST(e,t,n,r){var i=un.hasOwnProperty(t)?un[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!== Line truncated
`+Kg+e}var Qg=!1;function jg(e,t){if(!e||Qg)return"";Qg=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),o=r.stack.split(`
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var l=`
`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Qg=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Rc(e):""}function EG(e){switch(e.tag){case 5:return Rc(e.type);case 16:return Rc("Lazy");case 13:return Rc("Suspense");case 19:return Rc("SuspenseList");case 0:case 2:case 15:return e=jg(e.type,!1),e;case 11:return e=jg(e.type.render,!1),e;case 1:return e=jg(e.type,!0),e;default:return""}}function OE(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ua:return"Fragment";case Fa:return"Portal";case RE:return"Profiler";case TT:return"StrictMode";case NE:return"Suspense";case vE:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dI:return(e.displayName||"Context")+".Consumer";case uI:return(e._context.displayName||"Context")+".Provider";case bT:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yT:return t=e.displayName||null,t!==null?t:OE(e.type)||"Memo";case yo:t=e._payload,e=e._init;try{return OE(e(t))}catch{}}return null}function SG(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return OE(t);case 8:return t===TT?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _I(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function TG(e){var t=_I(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lp(e){e._valueTracker||(e._valueTracker=TG(e))}function fI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_I(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function y_(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function AE(e,t){var n=t.checked;return Nt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function iN(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function mI(e,t){t=t.checked,t!=null&&ST(e,"checked",t,!1)}function IE(e,t){mI(e,t);var n=Jo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?wE(e,t.type,n):t.hasOwnProperty("defaultValue")&&wE(e,t.type,Jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function oN(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function wE(e,t,n){(t!=="number"||y_(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Nc=Array.isArray;function Za(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Jo(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function DE(e,t){if(t.dan Line truncated
`).replace(wY,"")}function gp(e,t,n){if(t=AN(t),AN(e)!==t&&n)throw Error(oe(425))}function w_(){}var zE=null,VE=null;function WE(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qE=typeof setTimeout=="function"?setTimeout:void 0,DY=typeof clearTimeout=="function"?clearTimeout:void 0,IN=typeof Promise=="function"?Promise:void 0,xY=typeof queueMicrotask=="function"?queueMicrotask:typeof IN<"u"?function(e){return IN.resolve(null).then(e).catch(MY)}:qE;function MY(e){setTimeout(function(){throw e})}function ch(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),cu(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);cu(t)}function $o(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function wN(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var wl=Math.random().toString(36).slice(2),gi="__reactFiber$"+wl,fu="__reactProps$"+wl,Xi="__reactContainer$"+wl,KE="__reactEvents$"+wl,LY="__reactListeners$"+wl,kY="__reactHandles$"+wl;function xs(e){var t=e[gi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xi]||n[gi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wN(e);e!==null;){if(n=e[gi])return n;e=wN(e)}return t}e=n,n=e.parentNode}return null}function Qu(e){return e=e[gi]||e[Xi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ha(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(oe(33))}function jf(e){return e[fu]||null}var QE=[],$a=-1;function as(e){return{current:e}}function mt(e){0>$a||(e.current=QE[$a],QE[$a]=null,$a--)}function lt(e,t){$a++,QE[$a]=e.current,e.current=t}var es={},bn=as(es),Zn=as(!1),Ks=es;function _l(e,t){var n=e.type.contextTypes;if(!n)return es;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Jn(e){return e=e.childContextTypes,e!=null}function D_(){mt(Zn),mt(bn)}function DN(e,t,n){if(bn.current!==es)throw Error(oe(168));lt(bn,t),lt(Zn,n)}function rw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(oe(108,SG(e)||"Unknown",i));return Nt({},n,r)}function x_(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||es,Ks=bn.current,lt(bn,e),lt(Zn,Zn.current),!0}function xN(e,t,n){var r=e.stateNode;if(!r)throw Error(oe(169));n?(e=rw(e,t,Ks),r.__reactInternalMemoizedMergedChildContext=e,mt(Zn),mt(bn),lt(bn,e)):mt(Zn),lt(Zn,n)}var Hi=null,Xf=!1,uh=!1;function iw(e){Hi===null?Hi=[e]:Hi.push(e)}function PY(e){Xf=!0,iw(e)}function ls(){if(!uh&&Hi!==null){uh=!0;var e=0,t=et;try{var n=Hi;for(et=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Hi=null,Xf=!1}catch(i){throw Hi!==null&&(Hi=Hi.slice(e+1)),II(RT,ls),i}finally{et=t,uh=!1}}return null}var za=[],Va=0,M_=null,L_=0,Dr=[],xr=0,Qs=null,zi=1,Vi="";function vs(e,t){za[Va++]=L_,za[Va++]=M_,M_=e,L_=t}function ow(e,t,n){Dr[xr++]=zi,Dr[xr++]=Vi,Dr[xr++]=Qs,Qs=e;var r=zi;e=Vi;var i=32-Jr(r)-1;r&=~(1<<i),n+=1;var o=32-Jr(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,zi=1<<32-Jr(t)+i|n<<i|r,Vi=o+e}else zi=1<<o|n<<i|r,Vi=e}function MT(e){e.return!==null&&(vs(e,1),ow(e,1,0))}function LT(e){for(;e===M_;)M_=za[--Va],za[Va]=null,L_=za[--Va],za[Va]=null;for(;e===Qs;)Qs=Dr[--xr],Dr[xr]=null,Vi=Dr[--xr],Dr[xr]=null,zi=Dr[--xr],Dr[xr]=null}var _r=null,pr=null,St=!1,Qr=null;function sw(e,t){var n=Lr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function MN(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_r=e,pr=$o(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_r=e,pr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Qs!==null?{id:zi,overflow:Vi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Lr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,_r=e,pr=null,!0):!1;default:return!1}}function jE(e){return(e.mode&1)!==0&&(e.flags&128)===0}function XE(e){if(St){var t=pr;if(t){var n=t;if(!MN(e,t)){if(jE(e))throw Error(oe(418));t=$o(n.nextSibling);var r=_r;t&&MN(e,t)?sw(r,n):(e.flags=e.flags&-4097|2,St=!1,_r=e)}}else{if(jE(e))throw Error(oe(418));e.flags=e.flags&-4097|2,St=!1,_r=e}}}function LN(e){ Line truncated
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function mh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function tS(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var VY=typeof WeakMap=="function"?WeakMap:Map;function Mw(e,t,n){n=Ki(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){H_||(H_=!0,dS=r),tS(e,t)},n}function Lw(e,t,n){n=Ki(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){tS(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){tS(e,t),typeof r!="function"&&(Vo===null?Vo=new Set([this]):Vo.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function HN(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new VY;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=oH.bind(null,e,t,n),t.then(e,e))}function $N(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function zN(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ki(-1,1),t.tag=2,zo(n,t,1))),n.lanes|=1),e)}var WY=no.ReactCurrentOwner,Xn=!1;function xn(e,t,n,r){t.child=e===null?cw(t,null,n,r):ml(t,e.child,n,r)}function VN(e,t,n,r,i){n=n.render;var o=t.ref;return nl(t,i),r=VT(e,t,n,r,o,i),n=WT(),e!==null&&!Xn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ji(e,t,i)):(St&&n&&MT(t),t.flags|=1,xn(e,t,r,i),t.child)}function WN(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!nb(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,kw(e,t,o,r,i)):(e=p_(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:du,n(s,r)&&e.ref===t.ref)return Ji(e,t,i)}return t.flags|=1,e=qo(o,r),e.ref=t.ref,e.return=t,t.child=e}function kw(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(du(o,r)&&e.ref===t.ref)if(Xn=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Xn=!0);else return t.lanes=e.lanes,Ji(e,t,i)}return nS(e,t,n,r,i)}function Pw(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},lt(Ka,cr),cr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,lt(Ka,cr),cr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,lt(Ka,cr),cr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,lt(Ka,cr),cr|=r;return xn(e,t,i,n),t.child}function Fw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function nS(e,t,n,r,i){var o=Jn(n)?Ks:bn.current;return o=_l(t,o),nl(t,i),n=VT(e,t,n,r,o,i),r=WT(),e!==null&&!Xn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ji(e,t,i)):(St&&r&&MT(t),t.flags|=1,xn(e,t,n,i),t.child)}function qN(e,t,n,r,i){if(Jn(n)){var o=!0;x_(t)}else o=!1;if(nl(t,i),t.stateNode===null)c_(e,t),xw(t,n,r),eS(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ur(u):(u=Jn(n)?Ks:bn.current,u=_l(t,u));var p=n.getDerivedStateFromProps,_=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function";_||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&YN(t,s,r,u),Co=!1;var f=t.memoizedState;s.state=f,F_(t,r,s,i),l=t.memoizedState,a!==r||f!==l||Zn.current||Co?(typeof p=="function"&&(JE(t,n,p,r),l=t.memoizedState),(a=Co||GN(t,n,a,r,f,l,u))?(_||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,dw(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:qr(t.type,a),s.props=u,_=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ur(l):(l=Jn(n)?Ks:bn.current,l=_l(t,l));var g=n.getDerivedStateFromProps;(p=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==_||f!==l)&&YN(t,s,r,l),Co=!1,f=t.memoizedState,s.state=f,F_(t,r,s,i);var h=t.memoizedS Line truncated
`)}}Js.empty=new Js(!0);class yH{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function mD(e){let t=[];do t.push(CH(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function CH(e){let t=[];do t.push(RH(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function RH(e){let t=OH(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=NH(e,t);else break;return t}function lv(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function NH(e,t){let n=lv(e),r=n;return e.eat(",")&&(e.next!="}"?r=lv(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function vH(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.isInGroup(t)&&i.push(s)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function OH(e){if(e.eat("(")){let t=mD(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=vH(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function AH(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,l){let u={term:l,to:a};return t[s].push(u),u}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(o(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=o(s.exprs[l],a);if(l==s.exprs.length-1)return u;i(u,a=n())}else if(s.type=="star"){let l=n();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u<s.min;u++){let p=n();i(o(s.expr,l),p),l=p}if(s.max==-1)i(o(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let p=n();r(l,p),i(o(s.expr,l),p),l=p}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function gD(e,t){return t-e}function cv(e,t){let n=[];return r(t),n.sort(gD);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&n.indexOf(l)==-1&&r(l)}}}function IH(e){let t=Object.create(null);return n(cv(e,0));function n(r){let i=[];r.forEach(s=>{e[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let p=0;p<i.length;p++)i[p][0]==a&&(u=i[p][1]);cv(e,l).forEach(p=>{u||i.push([a,u=[]]),u.indexOf(p)==-1&&u.push(p)})})});let o=t[r.join(",")]=new Js(r.indexOf(e.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(gD);o.next.push({type:i[s][0],next:t[a.join(",")]||n(a)})}return o}}function wH(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:u}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(u)==-1&&r.push(u)}o&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function hD(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function ED(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function SD(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let o=e[i];o.validate&&o.validate(t[i])}}function TD(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new xH(e,r,t[r]);return n}let uv=class bD{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=TD(t,r.attrs),this.defaultAttrs=hD(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Js.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultA Line truncated
`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],a=t.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,o=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),a;RD.hasOwnProperty(s)&&this.parser.normalizeLists&&PH(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,r));e:if(l?l.ignore:kH.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let u,p=this.needsBlock;if(CD.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),u=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let _=l&&l.skip?n:this.readStyles(t,n);_&&this.addAll(t,_),u&&this.sync(o),this.needsBlock=p}else{let u=this.readStyles(t,n);u&&this.addElementByRule(t,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r)||this.leafFallback(t,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}o&&this.sync(a)&&this.open--}addAll(t,n,r,i){let o=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(s,n);this.findAtPoint(t,o)}findPlace(t,n){let r,i;for(let o=this.open;o>=0;o--){let s=this.nodes[o],a=s.findWrapping(t);if(a&&(!r||r.length>a.length)&&(r=a,i=s,!a.length)||s.solid)break}if(!r)return null;this.sync(i);for(let o=0;o<r.length;o++)n=this.enterInner(r[o],null,n,!1);return n}insertNode(t,n){if(t.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let r=this.findPlace(t,n);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(t.type));let o=ot.none;for(let s of r.concat(t.marks))(i.type?i.type.allowsMarkType(s.type):mv(s.type,t.type))&&(o=s.addToSet(o));return i.content.push(t.mark(o)),!0}return!1}enter(t,n,r,i){let o=this.findPlace(t.create(n),r);return o&&(o=this.enterInner(t,n,r,!0,i)),o}enterInner(t,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=pv(t,o,s.options);s.options&qc&&s.content.length==0&&(a|=qc);let l=ot.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):mv(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Rp(t,n,l,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=yu)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let p=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!p||p.name!=u&&!p.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function PH(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&RD.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function FH(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Line truncated
`))}})}function jH(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function XH(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Xt(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new le(Z.from(s),0,0),1,!0))}function ol(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,p=n-2;u>o;u--,p--){let _=i.node(u),f=i.index(u);if(_.type.spec.isolating)return!1;let g=_.content.cutByIndex(f,_.childCount),h=r&&r[p+1];h&&(g=g.replaceChild(0,h.type.create(h.attrs)));let E=r&&r[p]||_;if(!_.canReplace(f+1,_.childCount)||!E.type.validContent(g))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function ZH(e,t,n=1,r){let i=e.doc.resolve(t),o=Z.empty,s=Z.empty;for(let a=i.depth,l=i.depth-n,u=n-1;a>l;a--,u--){o=Z.from(i.node(a).copy(o));let p=r&&r[u];s=Z.from(p?p.type.create(p.attrs,s):i.node(a).copy(s))}e.step(new Kt(t,t,new le(o.append(s),n,n),!0))}function cs(e,t){let n=e.resolve(t),r=n.index();return xD(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function JH(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let o=t.child(i),s=o.type==r?e.type.schema.nodes.text:o.type;if(n=n.matchType(s),!n||!e.type.allowsMarks(o.marks))return!1}return n.validEnd}function xD(e,t){return!!(e&&t&&!e.isLeaf&&JH(e,t))}function lm(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,s,a=r.index(i);if(i==r.depth?(o=r.nodeBefore,s=r.nodeAfter):n>0?(o=r.node(i+1),a++,s=r.node(i).maybeChild(a)):(o=r.node(i).maybeChild(a-1),s=r.node(i+1)),o&&!o.isTextblock&&xD(o,s)&&r.node(i).canReplace(a,a+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function e$(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,o=e.doc.resolve(t-n),s=o.node().type;if(i&&s.inlineContent){let p=s.whitespace=="pre",_=!!s.contentMatch.matchType(i);p&&!_?r=!1:!p&&_&&(r=!0)}let a=e.steps.length;if(r===!1){let p=e.doc.resolve(t+n);DD(e,p.node(),p.before(),a)}s.inlineContent&&lb(e,t+n-1,s,o.node().contentMatchAt(o.index()),r==null);let l=e.mapping.slice(a),u=l.map(t-n);if(e.step(new Kt(u,l.map(t+n,-1),le.empty,!0)),r===!0){let p=e.doc.resolve(u);wD(e,p.node(),p.before(),e.steps.length)}return e}function t$(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function n$(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),u=r.node(s),p=!1;if(o==1)p=u.canReplace(l,l,i);else{let _=u.contentMatchAt(l).findWrapping(i.firstChild.type);p=_&&u.canReplaceWith(l,l,_[0])}if(p)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function cm(e,t,n=t,r=le.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return MD(i,o,r)?new Kt(t,n,r):new r$(i,o,r).fit()}function MD(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class r${constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Z.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=Z.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new le(o,s,a);return t>-1?new Xt(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Kt(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n+ Line truncated
`),_&&h==g.nodeValue.length)for(let E=g,b;E;E=E.parentNode){if(b=E.nextSibling){b.nodeName=="BR"&&(a=l={node:b.parentNode,offset:sn(b)+1});break}let T=E.pmViewDesc;if(T&&T.node&&T.node.isBlock)break}}else{let E=g.childNodes[h-1];_=E&&(E.nodeName=="BR"||E.contentEditable=="false")}}if(ri&&p.focusNode&&p.focusNode!=l.node&&p.focusNode.nodeType==1){let g=p.focusNode.childNodes[p.focusOffset];g&&g.contentEditable=="false"&&(i=!0)}if(!(i||_&&kn)&&ea(a.node,a.offset,p.anchorNode,p.anchorOffset)&&ea(l.node,l.offset,p.focusNode,p.focusOffset))return;let f=!1;if((u.extend||t==n)&&!_){u.collapse(a.node,a.offset);try{t!=n&&u.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(t>n){let h=a;a=l,l=h}let g=document.createRange();g.setEnd(l.node,l.offset),g.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(g)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?t<=s&&n>=r:t<s&&n>r){let a=r+o.border,l=s-o.border;if(t>=a&&n<=l){this.dirty=t==r||n==s?ks:Mv,t==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Ci:o.markDirty(t-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?ks:Ci}r=s}this.dirty=ks}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?ks:Mv;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class KD extends ed{constructor(t,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==Fr&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class P$ extends ed{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class ta extends ed{constructor(t,n,r,i,o){super(t,[],r,i),this.mark=n,this.spec=o}static create(t,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return(!s||!s.dom)&&(s=aa.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new ta(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Ci||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Ci&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Fr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Fr}}slice(t,n,r){let i=ta.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=OS(o,n,s,r)),t>0&&(o=OS(o,0,t,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class jo extends ed{constructor(t,n,r,i,o,s,a,l,u){super(t,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,o,s){let a=o.nodeViews[n.type.name],l,u=a&&a(n,o,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,i),p=u&&u.dom,_=u&&u.contentDOM;if(n.isText){if(!p)p=document.createTextNode(n.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:_}=aa.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!_&&!n.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),n.type.spec.draggable&&(p.draggable=!0));let f=p;return p=ZD(p,r,n),u?l=new F$(t,n,r,i,p,_||null,f,u,o,s+1):n.isText?new pm(t,n,r,i,p,f,o):new jo(t,n,r,i,p,_||null,f,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Z.empty)}return t}matchesNode(t,n,r){return this.dirty==Fr&&t.eq(this. Line truncated
`);return{dom:l,text:f,slice:t}}function ix(e,t,n,r,i){let o=i.parent.type.spec.code,s,a;if(!n&&!t)return null;let l=t&&(r||o||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,o||r,e)}),o)return t?new le(Z.from(e.state.schema.text(t.replace(/\r\n?/g,`
`))),0,0):le.empty;let _=e.someProp("clipboardTextParser",f=>f(t,i,r,e));if(_)a=_;else{let f=i.marks(),{schema:g}=e.state,h=aa.fromSchema(g);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(E=>{let b=s.appendChild(document.createElement("p"));E&&b.appendChild(h.serializeNode(g.text(E,f)))})}}else e.someProp("transformPastedHTML",_=>{n=_(n,e)}),s=i2(n),Ju&&o2(s);let u=s&&s.querySelector("[data-pm-slice]"),p=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let _=+p[3];_>0;_--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Wc.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||p),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!t2.test(f.parentNode.nodeName)?{ignore:!0}:null}})),p)a=s2(Wv(a,+p[1],+p[2]),p[4]);else if(a=le.maxOpen(n2(a.content,i),!0),a.openStart||a.openEnd){let _=0,f=0;for(let g=a.content.firstChild;_<a.openStart&&!g.type.spec.isolating;_++,g=g.firstChild);for(let g=a.content.lastChild;f<a.openEnd&&!g.type.spec.isolating;f++,g=g.lastChild);a=Wv(a,_,f)}return e.someProp("transformPasted",_=>{a=_(a,e)}),a}const t2=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function n2(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),o,s=[];if(e.forEach(a=>{if(!s)return;let l=i.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&o.length&&sx(l,o,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=ax(s[s.length-1],o.length));let p=ox(a,l);s.push(p),i=i.matchType(p.type),o=l}}),s)return Z.from(s)}return e}function ox(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Z.from(e));return e}function sx(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=sx(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Z.from(ox(n,e,i+1))))}}function ax(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,ax(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Z.empty,!0);return e.copy(n.append(r))}function wS(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(o=0),i<r-1&&(a=wS(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Z.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function Wv(e,t,n){return t<e.openStart&&(e=new le(wS(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new le(wS(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const lx={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let qv=null;function cx(){return qv||(qv=document.implementation.createHTMLDocument("title"))}let Ih=null;function r2(e){let t=window.trustedTypes;return t?(Ih||(Ih=t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Ih.createHTML(e)):e}function i2(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=cx().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&lx[r[1].toLowerCase()])&&(e=i.map(o=>"<"+o+">").join("")+e+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=r2(e),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function o2(e){let t=e.querySelectorAll(Sn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function s2(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:o,openEnd:s}=e;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=Z.from(l.create(r[a+1],i)),o++,s++}return new le(i,o,s)}const Pn={},Fn={},a2={touchstart:!0,touchmove:!0};class l2{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function c2(e){for(let t in Pn){let n=Pn[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{d2(e,r)&&!mb(e,r)&&(e.editable||!(r.type in Fn))&&n(e,r)},a2[t]?{passive:!0}:void 0)}kn&&e.dom.addEventListener("input",()=>null), Line truncated
`).scrollIntoView()),!0)};function Rx(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const uz=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=Rx(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(we.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},dz=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof ti||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Rx(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(s,o.createAndFill());a.setSelection(ye.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},pz=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(ol(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Dl(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},_z=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),t&&t(e.tr.setSelection(Ce.create(e.doc,i))),!0)};function fz(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||cs(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function Nx(e,t,n,r){let i=t.nodeBefore,o=t.nodeAfter,s,a,l=i.type.spec.isolating||o.type.spec.isolating;if(!l&&fz(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(n){let g=t.pos+o.nodeSize,h=Z.empty;for(let T=s.length-1;T>=0;T--)h=Z.from(s[T].create(null,h));h=Z.from(i.copy(h));let E=e.tr.step(new Xt(t.pos-1,g,t.pos,g,new le(h,1,0),s.length,!0)),b=E.doc.resolve(g+2*s.length);b.nodeAfter&&b.nodeAfter.type==i.type&&cs(E.doc,b.pos)&&E.join(b.pos),n(E.scrollIntoView())}return!0}let p=o.type.spec.isolating||r>0&&l?null:we.findFrom(t,1),_=p&&p.$from.blockRange(p.$to),f=_&&Dl(_);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(_,f).scrollIntoView()),!0;if(u&&yl(o,"start",!0)&&yl(i,"end")){let g=i,h=[];for(;h.push(g),!g.isTextblock;)g=g.lastChild;let E=o,b=1;for(;!E.isTextblock;E=E.firstChild)b++;if(g.canReplace(g.childCount,g.childCount,E.content)){if(n){let T=Z.empty;for(let C=h.length-1;C>=0;C--)T=Z.from(h[C].copy(T));let y=e.tr.step(new Xt(t.pos-h.length,t.pos+o.nodeSize,t.pos+b,t.pos+o.nodeSize-b,new le(T,h.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function vx(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(t.tr.setSelection(ye.create(t.doc,e<0?i.start(o):i.end(o)))),!0):!1}}const mz=vx(-1),gz=vx(1);function hz(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&cb(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function oO(e,t=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(s,a,(l,u)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let p=n.doc.resolve(u),_=p.index();i=p.parent.canReplaceWith(_,_+1,e)}})}if(!i)return!1;if(r){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];o.setBlockType(a,l,e,t)}r(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function Ez(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o);if(!s)return!1;let a=r?n.tr:null;return Sz(a,s,e,t)?(r&&r(a.scrollIntoView()),!0):!1}}function Sz(e,t,n,r=null){let i=!1,o=t,s=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=s.resolve(t.start-2);o=new Q_(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new Q_(t.$from,s.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let a=cb(o,n,r,t);return a?(e&&Tz(e,t,a,i,n),!0):!1}function Tz(e,t,n,r,i){let o=Z.empty;for(let p=n.length-1;p>=0;p--)o=Z.from(n[p].type.create(n[p].attrs,o));e.step(new Xt(t.start-(r?2:0),t.end,t.start,t.end,new le(o,0,0),n.length,!0));let s=0;for(let p=0;p<n.length;p++)n[p].type==i&&(s=p+1);let a=n.length-s,l=t.start+n.length-(r?2:0),u=t.parent;for(let p=t.startIndex,_=t.endIndex,f=!0;p<_;p++,f=!1)!f&&ol(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=u.child(p).nodeSize;return e}function bz(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type= Line truncated
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function xz(e){return Object.prototype.toString.call(e).slice(8,-1)}function Op(e){return xz(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function hm(e,t){const n={...e};return Op(e)&&Op(t)&&Object.keys(t).forEach(r=>{Op(t[r])&&Op(e[r])?n[r]=hm(e[r],t[r]):n[r]=t[r]}),n}class en{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(ge(this,"addOptions",{name:this.name}))),this.storage=Ue(ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new en(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>hm(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new en(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(ge(n,"addOptions",{name:n.name})),n.storage=Ue(ge(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!!!s.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const l=s.find(u=>(u==null?void 0:u.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}}function Mz(e){return typeof e=="number"}class Lz{constructor(t){this.find=t.find,this.handler=t.handler}}const kz=(e,t,n)=>{if(yb(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=e,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function Pz(e){const{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:u,can:p}=new mm({editor:t,state:n}),_=[];return n.doc.nodesBetween(r,i,(g,h)=>{if(!g.isTextblock||g.type.spec.code)return;const E=Math.max(r,h),b=Math.min(i,h+g.content.size),T=g.textBetween(E-h,b-h,void 0,"");kz(T,o.find,s).forEach(C=>{if(C.index===void 0)return;const O=E+C.index+1,A=O+C[0].length,w={from:n.tr.mapping.map(O),to:n.tr.mapping.map(A)},L=o.handler({state:n,range:w,match:C,commands:l,chain:u,can:p,pasteEvent:s,dropEvent:a});_.push(L)})}),_.every(g=>g!==null)}const Fz=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function Uz(e){const{editor:t,rules:n}=e;let r=null,i=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:p,from:_,to:f,rule:g,pasteEvt:h})=>{const E=p.tr,b=fm({state:p,transaction:E});if(!(!Pz({editor:t,state:b,from:Math.max(_-1,0),to:f.b-1,rule:g,pasteEvent:h,dropEvent:a})||!E.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,E}};return n.map(p=>new Xe({view(_){const f=g=>{var h;r=!((h=_.dom.parentElement)===null||h===void 0)&&h.contains(g.target)?_.dom.parentElement:null};return window.addEventListener("dragstart",f),{destroy(){window.removeEventListener("dragstart",f)}}},props:{handleDOMEvents:{drop:(_,f)=>(o=r===_.dom.parentElement,a=f,!1),paste:(_,f)=>{var g;const h=(g=f.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return s=f,i=!!(h!=null&&h.includes("data-pm-slice")),!1}}},appendTransaction:(_,f,g)=>{const h=_[0],E=h.getMeta("uiEvent")==="paste"&&!i,b=h.getMeta("uiEvent")==="drop"&&!o,T=h.getMeta("applyPasteRules"),y=!!T;if(!E&&!b&&!y)return;if(y){let{text:A}=T;typeof A=="string"?A=A:A=td(Z.from(A),g.schema);const{from:w}=T,L=w+A.length,U=Fz(A);return l({rule:p,state:g,from:w,to:{b:L},pasteEvt:U})}const C=f.doc.content.findDiffStart(g.doc.content),O=f.doc.content.findDiffEnd(g.doc.content);if(!(!Mz(C)||!O||C===O.b))return l({rule:p,state:g,from:C,to:O,pasteEvt:s})}}))}function Bz(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}class ja{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=ja.resolve(t),this.schema=Az(this.extensions,n),this.setupExtensions()}static resolve(t){const n=ja.sort(ja.flatten(t)),r=Bz(n.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}' Line truncated
`,textSerializers:s={}}=n||{};let a="";return e.nodesBetween(r,i,(l,u,p,_)=>{var f;l.isBlock&&u>r&&(a+=o);const g=s==null?void 0:s[l.type.name];if(g)return p&&(a+=g({node:l,pos:u,parent:p,index:_,range:t})),!1;l.isText&&(a+=(f=l==null?void 0:l.text)===null||f===void 0?void 0:f.slice(Math.max(r,u)-u,i-u))}),a}function wx(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const Gz=gt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Xe({key:new Qe("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map(p=>p.$from.pos)),a=Math.max(...o.map(p=>p.$to.pos)),l=wx(n);return Ix(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),Yz=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),Hz=(e=!1)=>({commands:t})=>t.setContent("",e),$z=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:s})=>{e.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:p}=t,_=u.resolve(p.map(l)),f=u.resolve(p.map(l+a.nodeSize)),g=_.blockRange(f);if(!g)return;const h=Dl(g);if(a.type.isTextblock){const{defaultType:E}=_.parent.contentMatchAt(_.index());t.setNodeMarkup(g.start,E)}(h||h===0)&&t.lift(g,h)})}),!0},zz=e=>t=>e(t),Vz=()=>({state:e,dispatch:t})=>dz(e,t),Wz=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,o.content),r.setSelection(new ye(r.doc.resolve(s-1))),!0},qz=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){const a=i.before(o),l=i.after(o);e.delete(a,l).scrollIntoView()}return!0}return!1},Kz=e=>({tr:t,state:n,dispatch:r})=>{const i=Jt(e,n.schema),o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const l=o.before(s),u=o.after(s);t.delete(l,u).scrollIntoView()}return!0}return!1},Qz=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},jz=()=>({state:e,dispatch:t})=>J2(e,t),Xz=()=>({commands:e})=>e.keyboardShortcut("Enter"),Zz=()=>({state:e,dispatch:t})=>uz(e,t);function of(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:yb(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function Dx(e,t,n={}){return e.find(r=>r.type===t&&of(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function cO(e,t,n={}){return!!Dx(e,t,n)}function Cb(e,t,n){var r;if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if((!i.node||!i.node.marks.some(p=>p.type===t))&&(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(p=>p.type===t)||(n=n||((r=i.node.marks[0])===null||r===void 0?void 0:r.attrs),!Dx([...i.node.marks],t,n)))return;let s=i.index,a=e.start()+i.offset,l=s+1,u=a+i.node.nodeSize;for(;s>0&&cO([...e.parent.child(s-1).marks],t,n);)s-=1,a-=e.parent.child(s).nodeSize;for(;l<e.parent.childCount&&cO([...e.parent.child(l).marks],t,n);)u+=e.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function ds(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const Jz=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const o=ds(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:p}=a;if(i){const _=Cb(l,o,t);if(_&&_.from<=u&&_.to>=p){const f=ye.create(s,_.from,_.to);n.setSelection(f)}}return!0},eV=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function xx(e){return e instanceof ye}function Po(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Mx(e,t=null){if(!t)return null;const n=we.atStart(e),r=we.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const i=n.from,o=r.to;return t==="all"?ye.create(e,Po(0,i,o),Po(e.content.size,i,o)):ye.create(e,Po(t,i,o),Po(t,i,o))}function Em(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const tV=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};const s=()=>{Em()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(o&&e===null&&!xx(n.state.selection))return s(),!0;const a=Mx(i.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},nV=(e,t)=>n=>e.every((r,i)=>t Line truncated
position: relative;
}
.ProseMirror {
word-wrap: break-word;
white-space: pre-wrap;
white-space: break-spaces;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}
.ProseMirror [contenteditable="false"] {
white-space: normal;
}
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
white-space: pre-wrap;
}
.ProseMirror pre {
white-space: pre-wrap;
}
img.ProseMirror-separator {
display: inline !important;
border: none !important;
margin: 0 !important;
width: 0 !important;
height: 0 !important;
}
.ProseMirror-gapcursor {
display: none;
pointer-events: none;
position: absolute;
margin: 0;
}
.ProseMirror-gapcursor:after {
content: "";
display: block;
position: absolute;
top: -2px;
width: 20px;
border-top: 1px solid black;
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}
@keyframes ProseMirror-cursor-blink {
to {
visibility: hidden;
}
}
.ProseMirror-hideselection *::selection {
background: transparent;
}
.ProseMirror-hideselection *::-moz-selection {
background: transparent;
}
.ProseMirror-hideselection * {
caret-color: transparent;
}
.ProseMirror-focused .ProseMirror-gapcursor {
display: block;
}
.tippy-box[data-animation=fade][data-state=hidden] {
opacity: 0
}`;function fW(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}class Ux extends Nz{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:i})=>this.options.onDrop(n,r,i)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=fW(_W,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){const r=Ax(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}unregisterPlugin(t){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(t).forEach(o=>{const s=typeof o=="string"?`${o}$`:o.key;r=n.filter(a=>!a.key.startsWith(s))}),n.length===r.length)return;const i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}createExtensionManager(){var t,n;const i=[...this.options.enableCoreExtensions?[lW,Gz.configure({blockSeparator:(n=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),sW,cW,uW,pW,aW,dW].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new ja(i,this)}createCommandManager(){this.commandManager=new mm({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let n;try{n=xS(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),n=xS(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=Mx(n,this.options.autofocus);this.view=new $2(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)===null||t===void 0?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Qa.create({doc:n,selection:r||void 0})});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isC Line truncated
`,textSerializers:r={}}=t||{};return MV(this.state.doc,{blockSeparator:n,textSerializers:{...wx(this.schema),...r}})}get isEmpty(){return Ob(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(t,n))||null}$nodes(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(t,n))||null}$pos(t){const n=this.state.doc.resolve(t);return new ws(n,this)}get $doc(){return this.$pos(0)}}function na(e){return new nd({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ue(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),u=n.from+a.indexOf(s),p=u+s.length;if(vb(n.from,n.to,t.doc).filter(g=>g.mark.type.excluded.find(E=>E===e.type&&E!==g.mark.type)).filter(g=>g.to>u).length)return null;p<n.to&&o.delete(p,n.to),u>n.from&&o.delete(n.from+l,u);const f=n.from+l+s.length;o.addMark(n.from+l,f,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function Bx(e){return new nd({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ue(e.getAttributes,void 0,r)||{},{tr:o}=t,s=n.from;let a=n.to;const l=e.type.create(i);if(r[1]){const u=r[0].lastIndexOf(r[1]);let p=s+u;p>a?p=a:a=p+r[1].length;const _=r[0][r[0].length-1];o.insertText(_,s+r[0].length-1),o.replaceWith(p,a,l)}else if(r[0]){const u=e.type.isInline?s:s-1;o.insert(u,e.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()}})}function kS(e){return new nd({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=Ue(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function Dt(e){return new nd({find:e.find,handler:({state:t,range:n,match:r})=>{let i=e.replace,o=n.from;const s=n.to;if(r[1]){const a=r[0].lastIndexOf(r[1]);i+=r[0].slice(a+r[1].length),o+=a;const l=o-s;l>0&&(i=r[0].slice(a-l,a)+i,o=s)}t.tr.insertText(i,o,s)}})}function Iu(e){return new nd({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const o=Ue(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),u=l&&cb(l,e.type,o);if(!u)return null;if(s.wrap(l,u),e.keepMarks&&e.editor){const{selection:_,storedMarks:f}=t,{splittableMarks:g}=e.editor.extensionManager,h=f||_.$to.parentOffset&&_.$from.marks();if(h){const E=h.filter(b=>g.includes(b.type.name));s.ensureMarks(E)}}if(e.keepAttributes){const _=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(_,o).run()}const p=s.doc.resolve(n.from-1).nodeBefore;p&&p.type===e.type&&cs(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,p))&&s.join(n.from-1)}})}class tt{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(ge(this,"addOptions",{name:this.name}))),this.storage=Ue(ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new tt(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>hm(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new tt(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(ge(n,"addOptions",{name:n.name})),n.storage=Ue(ge(n,"addStorage",{name:n.name,options:n.options})),n}}function mW(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}class gW{constructor(t,n,r){this.isDragging=!1,this.component=t,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.innerDecorations=n.innerDecorations,this.view=n.view,this.HTMLAttributes=n.HTMLAttributes,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var n,r,i,o,s,a,l;const{view:u}=this.editor,p=t.target,_=p.nodeType===3?(n=p.parentElement)===null||n===void 0? Line truncated
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var _O;function SW(){if(_O)return Fh;_O=1;var e=it;function t(_,f){return _===f&&(_!==0||1/_===1/f)||_!==_&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function a(_,f){var g=f(),h=r({inst:{value:g,getSnapshot:f}}),E=h[0].inst,b=h[1];return o(function(){E.value=g,E.getSnapshot=f,l(E)&&b({inst:E})},[_,g,f]),i(function(){return l(E)&&b({inst:E}),_(function(){l(E)&&b({inst:E})})},[_]),s(g),g}function l(_){var f=_.getSnapshot;_=_.value;try{var g=f();return!n(_,g)}catch{return!0}}function u(_,f){return f()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return Fh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Fh}Gx.exports=SW();var Ab=Gx.exports;const TW=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},bW=({contentComponent:e})=>{const t=Ab.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return it.createElement(it.Fragment,null,Object.values(t))};function yW(){const e=new Set;let t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:gH.createPortal(r.reactElement,r.element,n)},e.forEach(i=>i())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(i=>i())}}}class CW extends it.Component{constructor(t){var n;super(t),this.editorContentRef=it.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=t.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.options.element.childNodes),t.setOptions({element:n}),t.contentComponent=yW(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!t.options.element.firstChild))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:t,innerRef:n,...r}=this.props;return it.createElement(it.Fragment,null,it.createElement("div",{ref:TW(n,this.editorContentRef),...r}),(t==null?void 0:t.contentComponent)&&it.createElement(bW,{contentComponent:t.contentComponent}))}}const RW=k.forwardRef((e,t)=>{const n=it.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return it.createElement(CW,{key:n,innerRef:t,...e})}),NW=it.memo(RW);var vW=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],n.get(i[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(t[i]!==n[i])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!(s==="_owner"&&t.$$typeof)&&!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n},OW=EW(vW),Yx={exports:{}},Uh={};/**
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var fO;function AW(){if(fO)return Uh;fO=1;var e=it,t=Ab;function n(u,p){return u===p&&(u!==0||1/u===1/p)||u!==u&&p!==p}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Uh.useSyncExternalStoreWithSelector=function(u,p,_,f,g){var h=o(null);if(h.current===null){var E={hasValue:!1,value:null};h.current=E}else E=h.current;h=a(function(){function T(w){if(!y){if(y=!0,C=w,w=f(w),g!==void 0&&E.hasValue){var L=E.value;if(g(L,w))return O=L}return O=w}if(L=O,r(C,w))return L;var U=f(w);return g!==void 0&&g(L,U)?L:(C=w,O=U)}var y=!1,C,O,A=_===void 0?null:_;return[function(){return T(p())},A===null?void 0:function(){return T(A())}]},[p,_,f,g]);var b=i(u,h[0],h[1]);return s(function(){E.hasValue=!0,E.value=b},[b]),l(b),b},Uh}Yx.exports=AW();var IW=Yx.exports;const wW=typeof window<"u"?k.useLayoutEffect:k.useEffect;class DW{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const n=()=>{this.transactionNumber+=1,this.subscribers.forEach(i=>i())},r=this.editor;return r.on("transaction",n),()=>{r.off("transaction",n)}}}}function xW(e){var t;const[n]=k.useState(()=>new DW(e.editor)),r=IW.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!==null&&t!==void 0?t:OW);return wW(()=>n.watch(e.editor),[e.editor,n]),k.useDebugValue(r),r}const MW=!1,PS=typeof window>"u",LW=PS||!!(typeof window<"u"&&window.next);class kW{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return PS||LW?null:this.createEditor();if(this.options.current.immediatelyRender&&PS&&MW)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const t={...this.options.current,onBeforeCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onBeforeCreate)===null||o===void 0?void 0:o.call(i,...r)},onBlur:(...r)=>{var i,o;return(o=(i=this.options.current).onBlur)===null||o===void 0?void 0:o.call(i,...r)},onCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onCreate)===null||o===void 0?void 0:o.call(i,...r)},onDestroy:(...r)=>{var i,o;return(o=(i=this.options.current).onDestroy)===null||o===void 0?void 0:o.call(i,...r)},onFocus:(...r)=>{var i,o;return(o=(i=this.options.current).onFocus)===null||o===void 0?void 0:o.call(i,...r)},onSelectionUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onSelectionUpdate)===null||o===void 0?void 0:o.call(i,...r)},onTransaction:(...r)=>{var i,o;return(o=(i=this.options.current).onTransaction)===null||o===void 0?void 0:o.call(i,...r)},onUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onUpdate)===null||o===void 0?void 0:o.call(i,...r)},onContentError:(...r)=>{var i,o;return(o=(i=this.options.current).onContentError)===null||o===void 0?void 0:o.call(i,...r)},onDrop:(...r)=>{var i,o;return(o=(i=this.options.current).onDrop)===null||o===void 0?void 0:o.call(i,...r)},onPaste:(...r)=>{var i,o;return(o=(i=this.options.current).onPaste)===null||o===void 0?void 0:o.call(i,...r)}};return new Ux(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?this.editor.setOptions({...this.options.curreLine truncated
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/af.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,p="__lodash_placeholder__",_=1,f=2,g=4,h=1,E=2,b=1,T=2,y=4,C=8,O=16,A=32,w=64,L=128,U=256,$=512,B=30,ae="...",be=800,pe=16,de=1,ee=2,ne=3,x=1/0,D=9007199254740991,H=17976931348623157e292,V=NaN,q=4294967295,te=q-1,ue=q>>>1,Be=[["ary",L],["bind",b],["bindKey",T],["curry",C],["curryRight",O],["flip",$],["partial",A],["partialRight",w],["rearg",U]],Ee="[object Arguments]",Oe="[object Array]",vt="[object AsyncFunction]",Tt="[object Boolean]",Ae="[object Date]",Gn="[object DOMException]",Te="[object Error]",Yn="[object Function]",oi="[object GeneratorFunction]",dt="[object Map]",Nn="[object Number]",nt="[object Null]",Ve="[object Object]",dn="[object Promise]",re="[object Proxy]",Er="[object RegExp]",Ie="[object Set]",Se="[object String]",vn="[object Symbol]",zt="[object Undefined]",Hn="[object WeakMap]",si="[object WeakSet]",z="[object ArrayBuffer]",Q="[object DataView]",se="[object Float32Array]",me="[object Float64Array]",Ge="[object Int8Array]",ht="[object Int16Array]",io="[object Int32Array]",oo="[object Uint8Array]",ld="[object Uint8ClampedArray]",cd="[object Uint16Array]",ud="[object Uint32Array]",ly=/\b__p \+= '';/g,cy=/\b(__p \+=) '' \+/g,uy=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vm=/&(?:amp|lt|gt|quot|#39);/g,Om=/[&<>"']/g,dy=RegExp(vm.source),py=RegExp(Om.source),_y=/<%-([\s\S]+?)%>/g,fy=/<%([\s\S]+?)%>/g,Am=/<%=([\s\S]+?)%>/g,my=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gy=/^\w*$/,hy=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dd=/[\\^$.*+?()[\]{}|]/g,Ey=RegExp(dd.source),pd=/^\s+/,Sy=/\s/,Ty=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,by=/\{\n\/\* \[wrapped with (.+)\] \*/,yy=/,? & /,Cy=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ry=/[()=,{}\[\]\/\s]/,Ny=/\\(\\)?/g,vy=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Im=/\w*$/,Oy=/^[-+]0x[0-9a-f]+$/i,Ay=/^0b[01]+$/i,Iy=/^\[object .+?Constructor\]$/,wy=/^0o[0-7]+$/i,Dy=/^(?:0|[1-9]\d*)$/,xy=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ul=/($^)/,My=/['\n\r\u2028\u2029\\]/g,Bl="\\ud800-\\udfff",Ly="\\u0300-\\u036f",ky="\\ufe20-\\ufe2f",Py="\\u20d0-\\u20ff",wm=Ly+ky+Py,Dm="\\u2700-\\u27bf",xm="a-z\\xdf-\\xf6\\xf8-\\xff",Fy="\\xac\\xb1\\xd7\\xf7",Uy="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",By="\\u2000-\\u206f",Gy=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Mm="A-Z\\xc0-\\xd6\\xd8-\\xde",Lm="\\ufe0e\\ufe0f",km=Fy+Uy+By+Gy,_d="['’]",Yy="["+Bl+"]",Pm="["+km+"]",Gl="["+wm+"]",Fm="\\d+",Hy="["+Dm+"]",Um="["+xm+"]",Bm="[^"+Bl+km+Fm+Dm+xm+Mm+"]",Yl="\\ud83c[\\udffb-\\udfff]",Gm="(?:"+Gl+"|"+Yl+")",fd="[^"+Bl+"]",Hl="(?:\\ud83c[\\udde6-\\uddff]){2}",$l="[\\ud800-\\udbff][\\udc00-\\udfff]",so="["+Mm+"]",md="\\u200d",zl="(?:"+Um+"|"+Bm+")",gd="(?:"+so+"|"+Bm+")",Vl="(?:"+_d+"(?:d|ll|m|re|s|t|ve))?",hd="(?:"+_d+"(?:D|LL|M|RE|S|T|VE))?",Ed=Gm+"?",Wl="["+Lm+"]?",da="(?:"+md+"(?:"+[fd,Hl,$l].join("|")+")"+Wl+Ed+")*",ql="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kl=Wl+Ed+da,Td="(?:"+[Hy,Hl,$l].join("|")+")"+Kl,$y="(?:"+[fd+Gl+"?",Gl,Hl,$l,Yy].join("|")+")",zy=RegExp(_d,"g"),tk=RegExp(Gl,"g"),Ym=RegExp(Yl+"(?="+Yl+")|"+$y+Kl,"g"),nk=RegExp([so+"?"+Um+"+"+Vl+"(?="+[Pm,so,"$"].join("|")+")",gd+"+"+hd+"(?="+[Pm,so+zl,"$"].join("|")+")",so+"?"+zl+"+"+Vl,so+"+"+hd,Sd,ql,Fm,Td].join("|"),"g"),rk=RegExp("["+md+Bl+wm+Lm+"]"),ik=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ok=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],sk=-1,pt={};pt[se]=pt[me]=pt[Ge]=pt[ht]=pt[io]=pt[oo]=pt[ld]=pt[cd]=pt[ud]=!0,pt[Ee]=pt[Oe]=pt[z]=pt[Tt]=pt[Q]=pt[Ae]=pt[Te]=pt[Yn]=pt[dt]=pt[Nn]=pt[Ve]=pt[Er]=pt[Ie]=pt[Se]=pt[Hn]=!1;var st={};st[Ee]=st[Oe]=st[z]=st[Q]=st[Tt]=st[Ae]=st[se]=st[me]=st[Ge]=st[ht]=st[io]=st[dt]=st[Nn]=st[Ve]=st[Er]=st[Ie]=st[Se]=st[vn]=st[oo]=st[ld]=st[cd]=st[ud]=!0,st[Te]=st[Yn]=st[Hn]=!1;var ak={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",Line truncated
/* [wrapped with `+d+`] */
`)}function C0(c){return xe(c)||bs(c)||!!(_C&&c&&c[_C])}function wi(c,d){var m=typeof c;return d=d??D,!!d&&(m=="number"||m!="symbol"&&Dy.test(c))&&c>-1&&c%1==0&&c<d}function An(c,d,m){if(!bt(m))return!1;var S=typeof d;return(S=="number"?zn(m)&&wi(d,m.length):S=="string"&&d in m)?Hr(m[d],c):!1}function Ag(c,d){if(xe(c))return!1;var m=typeof c;return m=="number"||m=="symbol"||m=="boolean"||c==null||sr(c)?!0:gy.test(c)||!my.test(c)||d!=null&&c in rt(d)}function R0(c){var d=typeof c;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?c!=="__proto__":c===null}function Ig(c){var d=Qd(c),m=v[d];if(typeof m!="function"||!(d in $e.prototype))return!1;if(c===m)return!0;var S=Ng(m);return!!S&&c===S[0]}function N0(c){return!!cC&&cC in c}var v0=Nd?Di:Wg;function ac(c){var d=c&&c.constructor,m=typeof d=="function"&&d.prototype||ga;return c===m}function cR(c){return c===c&&!bt(c)}function uR(c,d){return function(m){return m==null?!1:m[c]===d&&(d!==n||c in rt(m))}}function O0(c){var d=tp(c,function(S){return m.size===u&&m.clear(),S}),m=d.cache;return d}function A0(c,d){var m=c[1],S=d[1],R=m|S,I=R<(b|T|L),M=S==L&&m==C||S==L&&m==U&&c[7].length<=d[8]||S==(L|U)&&d[7].length<=d[8]&&m==C;if(!(I||M))return c;S&b&&(c[2]=d[2],R|=m&b?0:y);var P=d[3];if(P){var Y=c[3];c[3]=Y?WC(Y,P,d[4]):P,c[4]=Y?co(c[3],p):d[4]}return P=d[5],P&&(Y=c[5],c[5]=Y?qC(Y,P,d[6]):P,c[6]=Y?co(c[5],p):d[6]),P=d[7],P&&(c[7]=P),S&L&&(c[8]=c[8]==null?d[8]:pn(c[8],d[8])),c[9]==null&&(c[9]=d[9]),c[0]=d[0],c[1]=R,c}function I0(c){var d=[];if(c!=null)for(var m in rt(c))d.push(m);return d}function w0(c){return Od.call(c)}function dR(c,d,m){return d=Yt(d===n?c.length-1:d,0),function(){for(var S=arguments,R=-1,I=Yt(S.length-d,0),M=W(I);++R<I;)M[R]=S[d+R];R=-1;for(var P=W(d+1);++R<d;)P[R]=S[R];return P[d]=m(M),rr(c,this,P)}}function pR(c,d){return d.length<2?c:Es(c,Rr(d,0,-1))}function D0(c,d){for(var m=c.length,S=pn(d.length,m),R=$n(c);S--;){var I=d[S];c[S]=wi(I,m)?R[I]:n}return c}function wg(c,d){if(!(d==="constructor"&&typeof c[d]=="function")&&d!="__proto__")return c[d]}var _R=mR(PC),lc=Wk||function(c,d){return tn.setTimeout(c,d)},Dg=mR(e0);function fR(c,d,m){var S=d+"";return Dg(c,y0(S,x0(S0(S),m)))}function mR(c){var d=0,m=0;return function(){var S=jk(),R=pe-(S-m);if(m=S,R>0){if(++d>=be)return arguments[0]}else d=0;return c.apply(n,arguments)}}function Xd(c,d){var m=-1,S=c.length,R=S-1;for(d=d===n?S:d;++m<d;){var I=_g(m,R),M=c[I];c[I]=c[m],c[m]=M}return c.length=d,c}var gR=O0(function(c){var d=[];return c.charCodeAt(0)===46&&d.push(""),c.replace(hy,function(m,S,R,I){d.push(R?I.replace(Ny,"$1"):S||m)}),d});function ci(c){if(typeof c=="string"||sr(c))return c;var d=c+"";return d=="0"&&1/c==-x?"-0":d}function Ts(c){if(c!=null){try{return vd.call(c)}catch{}try{return c+""}catch{}}return""}function x0(c,d){return Tr(Be,function(m){var S="_."+m[0];d&m[1]&&!bd(c,S)&&c.push(S)}),c.sort()}function hR(c){if(c instanceof $e)return c.clone();var d=new yr(c.__wrapped__,c.__chain__);return d.__actions__=$n(c.__actions__),d.__index__=c.__index__,d.__values__=c.__values__,d}function M0(c,d,m){(m?An(c,d,m):d===n)?d=1:d=Yt(Me(d),0);var S=c==null?0:c.length;if(!S||d<1)return[];for(var R=0,I=0,M=W(Md(S/d));R<S;)M[I++]=Rr(c,R,R+=d);return M}function L0(c){for(var d=-1,m=c==null?0:c.length,S=0,R=[];++d<m;){var I=c[d];I&&(R[S++]=I)}return R}function k0(){var c=arguments.length;if(!c)return[];for(var d=W(c-1),m=arguments[0],S=c;S--;)d[S-1]=arguments[S];return lo(xe(m)?$n(m):[m],nn(d,1))}var P0=Fe(function(c,d){return xt(c)?nc(c,nn(d,1,xt,!0)):[]}),F0=Fe(function(c,d){var m=Nr(d);return xt(m)&&(m=n),xt(c)?nc(c,nn(d,1,xt,!0),Re(m,2)):[]}),U0=Fe(function(c,d){var m=Nr(d);return xt(m)&&(m=n),xt(c)?nc(c,nn(d,1,xt,!0),n,m):[]});function B0(c,d,m){var S=c==null?0:c.length;return S?(d=m||d===n?1:Me(d),Rr(c,d<0?0:d,S)):[]}function G0(c,d,m){var S=c==null?0:c.length;return S?(d=m||d===n?1:Me(d),d=S-d,Rr(c,0,d<0?0:d)):[]}function Y0(c,d){return c&&c.length?$d(c,Re(d,3),!0,!0):[]}function H0(c,d){return c&&c.length?$d(c,Re(d,3),!0):[]}function $0(c,d,m,S){var R=c==null?0:c.length;return R?(m&&typeof m!="number"&&An(c,d,m)&&(m=0,S=R),kP(c,d,m,S)):[]}function ER(c,d,m){var S=c==null?0:c.length;if(!S)return-1;var R=m==null?0:Me(m);return R<0&&(R=Yt(S+R,0)),yd(c,Re(d,3),R)}function SR(c,d,m){var S=c==null?0:c.length;if(!S)return-1;var R=S-1;return m!==n&&(R=Me(m),R=m<0?Yt(S+R,0):pn(R,S-1)),yd(c,Re(d,3),R,!0)}function TR(c){var d=c==null?0:c.length;return d?nn(c,1):[]}function z0(c){var d=c==null?0:c.length;return d?nn(c,x):[]}function V0(c,d){var m=c==null?0:c.length;return m?(d=d===n?1:Me(d),nn(c,d)):[]}function W0(c){for(var d=-1,m=c==null?0:c.length,S={};++d<m;){var R=c[d];S[R[0]]=R[1]}return S}function bR(c){return c&&c.length?c[0]:n}function q0(c,d,m){var S=c==null?0:c.length;if(!S)return-1;var R=m==null?0:Me(m);return R<0&&(R=Yt(S+R,0)),pa(c,d,R)}function K0(c){var d=c==null?0:c.length;return d?Rr(c,0,-1):[]}var Q0=Fe(function(c){var d=Et(c,Eg);return d.length&&d[0]===c[0]?lg(d):[]}),j0=Fe( Line truncated
`;c.replace(ce,function(ve,Ye,ze,ar,In,lr){return ze||(ze=ar),J+=c.slice(j,lr).replace(My,vk),Ye&&(P=!0,J+=`' +
__e(`+Ye+`) +
'`),In&&(Y=!0,J+=`';
`+In+`;
__p += '`),ze&&(J+=`' +
((__t = (`+ze+`)) == null ? '' : __t) +
'`),j=lr+ve.length,ve}),J+=`';
`;var Ne=Je.call(d,"variable")&&d.variable;if(!Ne)J=`with (obj) {
`+J+`
}
`;else if(Ry.test(Ne))throw new De(a);J=(Y?J.replace(ly,""):J).replace(cy,"$1").replace(uy,"$1;"),J="function("+(Ne||"obj")+`) {
`+(Ne?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(P?", __e = _.escape":"")+(Y?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+J+`return __p
}`;var ke=QR(function(){return je(I,he+"return "+J).apply(n,M)});if(ke.source=J,Pg(ke))throw ke;return ke}function ZU(c){return Ze(c).toLowerCase()}function JU(c){return Ze(c).toUpperCase()}function eB(c,d,m){if(c=Ze(c),c&&(m||d===n))return iC(c);if(!c||!(d=or(d)))return c;var S=Gr(c),R=Gr(d),I=oC(S,R),M=sC(S,R)+1;return mo(S,I,M).join("")}function tB(c,d,m){if(c=Ze(c),c&&(m||d===n))return c.slice(0,lC(c)+1);if(!c||!(d=or(d)))return c;var S=Gr(c),R=sC(S,Gr(d))+1;return mo(S,0,R).join("")}function nB(c,d,m){if(c=Ze(c),c&&(m||d===n))return c.replace(pd,"");if(!c||!(d=or(d)))return c;var S=Gr(c),R=oC(S,Gr(d));return mo(S,R).join("")}function rB(c,d){var m=B,S=ae;if(bt(d)){var R="separator"in d?d.separator:R;m="length"in d?Me(d.length):m,S="omission"in d?or(d.omission):S}c=Ze(c);var I=c.length;if(_a(c)){var M=Gr(c);I=M.length}if(m>=I)return c;var P=m-fa(S);if(P<1)return S;var Y=M?mo(M,0,P).join(""):c.slice(0,P);if(R===n)return Y+S;if(M&&(P+=Y.length-P),Fg(R)){if(c.slice(P).search(R)){var j,X=Y;for(R.global||(R=Jm(R.source,Ze(Im.exec(R))+"g")),R.lastIndex=0;j=R.exec(X);)var J=j.index;Y=Y.slice(0,J===n?P:J)}}else if(c.indexOf(or(R),P)!=P){var ce=Y.lastIndexOf(R);ce>-1&&(Y=Y.slice(0,ce))}return Y+S}function iB(c){return c=Ze(c),c&&dy.test(c)?c.replace(vm,Mk):c}var oB=ba(function(c,d,m){return c+(m?" ":"")+d.toUpperCase()}),Gg=jC("toUpperCase");function KR(c,d,m){return c=Ze(c),d=m?n:d,d===n?Ak(c)?Pk(c):Sk(c):c.match(d)||[]}var QR=Fe(function(c,d){try{return rr(c,n,d)}catch(m){return Pg(m)?m:new De(m)}}),sB=Ii(function(c,d){return Tr(d,function(m){m=ci(m),Oi(c,m,Lg(c[m],c))}),c});function aB(c){var d=c==null?0:c.length,m=Re();return c=d?Et(c,function(S){if(typeof S[1]!="function")throw new br(s);return[m(S[0]),S[1]]}):[],Fe(function(S){for(var R=-1;++R<d;){var I=c[R];if(rr(I[0],this,S))return rr(I[1],this,S)}})}function lB(c){return MP(Cr(c,_))}function Yg(c){return function(){return c}}function cB(c,d){return c==null||c!==c?d:c}var uB=ZC(),dB=ZC(!0);function Wn(c){return c}function Hg(c){return AC(typeof c=="function"?c:Cr(c,_))}function pB(c){return wC(Cr(c,_))}function _B(c,d){return DC(c,Cr(d,_))}var fB=Fe(function(c,d){return function(m){return rc(m,c,d)}}),mB=Fe(function(c,d){return function(m){return rc(c,m,d)}});function $g(c,d,m){var S=Vt(d),R=Gd(d,S);m==null&&!(bt(d)&&(R.length||!S.length))&&(m=d,d=c,c=this,R=Gd(d,Vt(d)));var I=!(bt(m)&&"chain"in m)||!!m.chain,M=Di(c);return Tr(R,function(P){var Y=d[P];c[P]=Y,M&&(c.prototype[P]=function(){var j=this.__chain__;if(I||j){var X=c(this.__wrapped__),J=X.__actions__=$n(this.__actions__);return J.push({func:Y,args:arguments,thisArg:c}),X.__chain__=j,X}return Y.apply(c,lo([this.value()],arguments))})}),c}function gB(){return tn._===this&&(tn._=Hk),this}function zg(){}function hB(c){return c=Me(c),Fe(function(d){return xC(d,c)})}var EB=bg(Et),SB=bg(Jy),TB=bg(Wm);function jR(c){return Ag(c)?qm(ci(c)):jP(c)}function bB(c){return function(d){return c==null?n:Es(c,d)}}var yB=eR(),CB=eR(!0);function Vg(){return[]}function Wg(){return!1}function RB(){return{}}function NB(){return""}function vB(){return!0}function OB(c,d){if(c=Me(c),c<1||c>D)return[];var m=q,S=pn(c,q);d=Re(d),c-=q;for(var R=jm(S,d);++m<c;)d(m);return R}function AB(c){return xe(c)?Et(c,ci):sr(c)?[c]:$n(gR(Ze(c)))}function IB(c){var d=++Gk;return Ze(c)+d}var wB=Wd(function(c,d){return c+d},0),DB=yg("ceil"),xB=Wd(function(c,d){return c/d},1),MB=yg("floor");function LB(c){return c&&c.length?Bd(c,Wn,ag):n}function kB(c,d){return c&&c.length?Bd(c,Re(d,2),ag):n}function PB(c){return nC(c,Wn)}function FB(c,d){return nC(c,Re(d,2))}function UB(c){return c&&c.length?Bd(c,Wn,dg):n}function BB(c,d){return c&&c.length?Bd(c,Re(d,2),dg):n}var GB=Wd(function(c,d){return c*d},1),YB=yg("round"),HB=Wd(function(c,d){return c-d},0);function $B(c){return c&&c.length?Qm(c,Wn):0}function zB(c,d){return c&&c.length?Qm(c,Re(d,2)):0}return v.after=pF,v.ary=OR,v.assign=JF,v.assignIn=YR,v.assignInWith=op,v.assignWith=eU,v.at=tU,v.before=AR,v.bind=Lg,v.bindAll=sB,v.bindKey=IR,v.castArray=RF,v.chain=RR,v.chunk=M0,v.compact=L0,v.concat=k0,v.cond=aB,v.conforms=lB,v.constant=Yg,v.countBy=$1,v.create=nU,v.curry=wR,v.curryRight=DR,v.debounce=xR,v.defaults=rU,v.defaultsDeep=iU,v.defer=_F,v.delay=fF,v.difference=P0,v.differenceBy=F0,v.differenceWith=U0,v.drop=B0,v.dropRight=G0,v.dropRightWhile=Y0,v.dropWhile=H0,v.fill=$0,v.filter=V1,v.flatMap=K1,v.flatMapDeep=Q1,v.flatMapDepth=j1,v.flatten=TR,v.flattenDeep=z0,v.flattenDepth=V0,v.flip=mF,v.flow=uB,v.flowRight=dB,v.fromPairs=W0,v.functions=dU,v.functionsIn=pU,v.groupBy=X1,v.initial=K0,v.intersection=Q0,v.intersectionBy=j0,v.intersectionWith=X0,v.invert=fU,v.invertBy=mU,v.invokeMap=J1,v.iteratee=Hg,v.keyBy=eF,v.keys=Vt,v.keysIn=Vn,v.map=Jd,v.mapKeys=hU,v.mapValues=EU,v.matches=pB,v.matchesProperty=_B,v.memoize=tp,v.merge=SU,v.mergeWith=HR,v.method=fB,v.methodOf=mB,v.mixin=$g,v.negate=np,v.nthArg=hB,v.omit=TU,v.omitBy=bU,v.once=gF,v.orderBy=tF,v.over=EB,v.overArgs=hF,v.overEvery=SB,v.overSome=TB, Line truncated
`);return!o||!s?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0?!1:r.nodeAt(a)?e.commands.command(({tr:u})=>(u.setSelection(we.near(r.resolve(a))),!0)):e.commands.exitCode()}}},addInputRules(){return[kS({find:ZW,type:this.type,getAttributes:e=>({language:e[1]})}),kS({find:JW,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Xe({key:new Qe("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i==null?void 0:i.mode;if(!n||!o)return!1;const{tr:s,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,`
`));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(ye.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}});function tq(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xx(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&Xx(n)}),e}let CO=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Zx(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Fo(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const nq="</span>",RO=e=>!!e.scope,rq=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};let iq=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Zx(t)}openNode(t){if(!RO(t))return;const n=rq(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){RO(t)&&(this.buffer+=nq)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}};const NO=(e={})=>{const t={children:[]};return Object.assign(t,e),t};let oq=class Jx{constructor(){this.rootNode=NO(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=NO({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Jx._collapse(n)}))}},sq=class extends oq{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new iq(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Du(e){return e?typeof e=="string"?e:e.source:null}function eM(e){return la("(?=",e,")")}function aq(e){return la("(?:",e,")*")}function lq(e){return la("(?:",e,")?")}function la(...e){return e.map(n=>Du(n)).join("")}function cq(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function xb(...e){return"("+(cq(e).capture?"":"?:")+e.map(r=>Du(r)).join("|")+")"}function tM(e){return new RegExp(e.toString()+"|").exec("").length-1}function uq(e,t){const n=e&&e.exec(t);return n&&n.index===0}const dq=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Mb(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let o=Du(r),s="";for(;o.length>0;){const a=dq.exec(o);if(!a){s+=o;break}s+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+i):(s+=a[0],a[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}const pq=/\b\B/,nM="[a-zA-Z]\\w*",Lb="[a-zA-Z_]\\w*",rM="\\b\\d+(\\.\\d+)?",iM="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",oM="\\b(0b[01]+)",_q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",fq=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=la(t,/.*\b/,e.binary,/\b.*/)),Fo({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},xu={begin:"\\\\[\\s\\S]",relevance:0},mq={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[xu]},gq={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[xu]},hq={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Tm=function(e,t,n={}){const r=Fo({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=xb("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:la(/[ ] Line truncated
https://github.com/highlightjs/highlight.js/issues/2277`),q=x,V=D),H===void 0&&(H=!0);const te={code:V,language:q};ee("before:highlight",te);const ue=te.result?te.result:_(te.language,te.code,H);return ue.code=te.code,ee("after:highlight",ue),ue}function _(x,D,H,V){const q=Object.create(null);function te(z,Q){return z.keywords[Q]}function ue(){if(!re.keywords){Ie.addText(Se);return}let z=0;re.keywordPatternRe.lastIndex=0;let Q=re.keywordPatternRe.exec(Se),se="";for(;Q;){se+=Se.substring(z,Q.index);const me=nt.case_insensitive?Q[0].toLowerCase():Q[0],Ge=te(re,me);if(Ge){const[ht,io]=Ge;if(Ie.addText(se),se="",q[me]=(q[me]||0)+1,q[me]<=Kq&&(vn+=io),ht.startsWith("_"))se+=Q[0];else{const oo=nt.classNameAliases[ht]||ht;Oe(Q[0],oo)}}else se+=Q[0];z=re.keywordPatternRe.lastIndex,Q=re.keywordPatternRe.exec(Se)}se+=Se.substring(z),Ie.addText(se)}function Be(){if(Se==="")return;let z=null;if(typeof re.subLanguage=="string"){if(!t[re.subLanguage]){Ie.addText(Se);return}z=_(re.subLanguage,Se,!0,Er[re.subLanguage]),Er[re.subLanguage]=z._top}else z=g(Se,re.subLanguage.length?re.subLanguage:null);re.relevance>0&&(vn+=z.relevance),Ie.__addSublanguage(z._emitter,z.language)}function Ee(){re.subLanguage!=null?Be():ue(),Se=""}function Oe(z,Q){z!==""&&(Ie.startScope(Q),Ie.addText(z),Ie.endScope())}function vt(z,Q){let se=1;const me=Q.length-1;for(;se<=me;){if(!z._emit[se]){se++;continue}const Ge=nt.classNameAliases[z[se]]||z[se],ht=Q[se];Ge?Oe(ht,Ge):(Se=ht,ue(),Se=""),se++}}function Tt(z,Q){return z.scope&&typeof z.scope=="string"&&Ie.openNode(nt.classNameAliases[z.scope]||z.scope),z.beginScope&&(z.beginScope._wrap?(Oe(Se,nt.classNameAliases[z.beginScope._wrap]||z.beginScope._wrap),Se=""):z.beginScope._multi&&(vt(z.beginScope,Q),Se="")),re=Object.create(z,{parent:{value:re}}),re}function Ae(z,Q,se){let me=uq(z.endRe,se);if(me){if(z["on:end"]){const Ge=new CO(z);z["on:end"](Q,Ge),Ge.isMatchIgnored&&(me=!1)}if(me){for(;z.endsParent&&z.parent;)z=z.parent;return z}}if(z.endsWithParent)return Ae(z.parent,Q,se)}function Gn(z){return re.matcher.regexIndex===0?(Se+=z[0],1):(si=!0,0)}function Te(z){const Q=z[0],se=z.rule,me=new CO(se),Ge=[se.__beforeBegin,se["on:begin"]];for(const ht of Ge)if(ht&&(ht(z,me),me.isMatchIgnored))return Gn(Q);return se.skip?Se+=Q:(se.excludeBegin&&(Se+=Q),Ee(),!se.returnBegin&&!se.excludeBegin&&(Se=Q)),Tt(se,z),se.returnBegin?0:Q.length}function Yn(z){const Q=z[0],se=D.substring(z.index),me=Ae(re,z,se);if(!me)return IO;const Ge=re;re.endScope&&re.endScope._wrap?(Ee(),Oe(Q,re.endScope._wrap)):re.endScope&&re.endScope._multi?(Ee(),vt(re.endScope,z)):Ge.skip?Se+=Q:(Ge.returnEnd||Ge.excludeEnd||(Se+=Q),Ee(),Ge.excludeEnd&&(Se=Q));do re.scope&&Ie.closeNode(),!re.skip&&!re.subLanguage&&(vn+=re.relevance),re=re.parent;while(re!==me.parent);return me.starts&&Tt(me.starts,z),Ge.returnEnd?0:Q.length}function oi(){const z=[];for(let Q=re;Q!==nt;Q=Q.parent)Q.scope&&z.unshift(Q.scope);z.forEach(Q=>Ie.openNode(Q))}let dt={};function Nn(z,Q){const se=Q&&Q[0];if(Se+=z,se==null)return Ee(),0;if(dt.type==="begin"&&Q.type==="end"&&dt.index===Q.index&&se===""){if(Se+=D.slice(Q.index,Q.index+1),!i){const me=new Error(`0 width match regex (${x})`);throw me.languageName=x,me.badRule=dt.rule,me}return 1}if(dt=Q,Q.type==="begin")return Te(Q);if(Q.type==="illegal"&&!H){const me=new Error('Illegal lexeme "'+se+'" for mode "'+(re.scope||"<unnamed>")+'"');throw me.mode=re,me}else if(Q.type==="end"){const me=Yn(Q);if(me!==IO)return me}if(Q.type==="illegal"&&se==="")return 1;if(Hn>1e5&&Hn>Q.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Se+=se,se.length}const nt=$(x);if(!nt)throw Vs(o.replace("{}",x)),new Error('Unknown language: "'+x+'"');const Ve=zq(nt);let dn="",re=V||Ve;const Er={},Ie=new a.__emitter(a);oi();let Se="",vn=0,zt=0,Hn=0,si=!1;try{if(nt.__emitTokens)nt.__emitTokens(D,Ie);else{for(re.matcher.considerAll();;){Hn++,si?si=!1:re.matcher.considerAll(),re.matcher.lastIndex=zt;const z=re.matcher.exec(D);if(!z)break;const Q=D.substring(zt,z.index),se=Nn(Q,z);zt=z.index+se}Nn(D.substring(zt))}return Ie.finalize(),dn=Ie.toHTML(),{language:x,value:dn,relevance:vn,illegal:!1,_emitter:Ie,_top:re}}catch(z){if(z.message&&z.message.includes("Illegal"))return{language:x,value:Hh(D),illegal:!0,relevance:0,_illegalBy:{message:z.message,index:zt,context:D.slice(zt-100,zt+100),mode:z.mode,resultSoFar:dn},_emitter:Ie};if(i)return{language:x,value:Hh(D),illegal:!1,relevance:0,errorRaised:z,_emitter:Ie,_top:re};throw z}}function f(x){const D={value:Hh(x),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return D._emitter.addText(x),D}function g(x,D){D=D||a.languages||Object.keys(t);const H=f(x),V=D.filter($).filter(ae).map(Ee=>_(Ee,x,!1));V.unshift(H);const q=V.sort((Ee,Oe)=>{if(Ee.relevance!==Oe.relevance)return Oe.relevance-Ee.relevance;if(Ee.language&&Oe.language){if($(Ee.language).supersetOf===Oe.language)return 1;if($(Oe.language).supersetOf===Ee.language)return-1}return 0}),[te,ue]=q, Line truncated
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}function FQ(e){const t="[a-z][a-zA-Z0-9_]*",n={className:"string",begin:"\\$.{1}"},r={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:t+":",relevance:0},e.C_NUMBER_MODE,r,n,{begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{begin:"#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,n,e.C_NUMBER_MODE,r]}]}}function UQ(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}function BQ(e){const t={className:"variable",begin:/\b_+[a-zA-Z]\w*/},n={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},r={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},i=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],o=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],s=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachmentsCargo","addWeaponWithAttachmentsCargoGlobal","admin","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityCurveRTD","airDensityRTD","airplaneThrottle","airportSide","AISFinishHeal","alive","all3DENEntities","allActiveTitleEffects","allAddonsInfo","allAirports","allControls","allCurators","allCutLayers","allDead","allDeadMen","allDiaryRecords","allDiarySubjects","allDisplays","allEnv3DSoundSources","allGroups","allLODs","allMapMarkers","allMines","allMissionObjects","allObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowedService","allowFileOperations","allowFleeing","allowGetIn","allowService","allowSprint","allPlayers","allSimpleObjects","allSites","allTurrets","allUnits","allUnitsUAV","allUsers","allVariables","ambientTemperature","ammo","ammoOnPylon","and","animate","animateBay","animateDoor","animatePylon","animateSouLine truncated
]*?"'`},{begin:`"[^\r
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},e.COMMENT("^[ ]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}function HQ(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}const $Q=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),zQ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],VQ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],WQ=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],qQ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],KQ=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","backgrou Line truncated
(multipart)?`,end:`\\]
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}function XQ(e){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}function ZQ(e){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}function JQ(e){const t=e.regex,n=/[a-zA-Z_][a-zA-Z0-9_]*/,r={className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:t.concat(/\$/,t.optional(/::/),n,"(::",n,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[r]}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r]}}function e4(e){const t=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...t,"set","list","map"]},end:">",contains:["self"]}]}}function t4(e){const t={className:"number",begin:"[1-9][0-9]*",relevance:0},n={className:"symbol",begin:":[^\\]]+"},r={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,n]},i={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,n]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[r,i,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT Line truncated
`},u]}}const G4=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),Y4=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],H4=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],gM=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],hM=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],$4=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","fon Line truncated
]`,g={scope:"string",variants:[u,l,p,_]},h={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},E=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],T=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:b,literal:(pe=>{const de=[];return pe.forEach(ee=>{de.push(ee),ee.toLowerCase()===ee?de.push(ee.toUpperCase()):de.push(ee.toLowerCase())}),de})(E),built_in:T},O=pe=>pe.map(de=>de.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",O(T).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},w=t.concat(r,"\\b(?!\\()"),L={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),w],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},U={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},$={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[U,o,L,e.C_BLOCK_COMMENT_MODE,g,h,A]},B={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",O(b).join("\\b|"),"|",O(T).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[$]};$.contains.push(B);const ae=[U,L,e.C_BLOCK_COMMENT_MODE,g,h,A],be={begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:E,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:E,keyword:["new","array"]},contains:["self",...ae]},...ae,{scope:"meta",match:i}]};return{case_insensitive:!1,keywords:C,contains:[be,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},o,B,L,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},A,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:C,contains:["self",o,L,e.C_BLOCK_COMMENT_MODE,g,h]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trai Line truncated
https://github.com/highlightjs/highlight.js/issues/2277`),q=x,V=D),H===void 0&&(H=!0);const te={code:V,language:q};ee("before:highlight",te);const ue=te.result?te.result:_(te.language,te.code,H);return ue.code=te.code,ee("after:highlight",ue),ue}function _(x,D,H,V){const q=Object.create(null);function te(z,Q){return z.keywords[Q]}function ue(){if(!re.keywords){Ie.addText(Se);return}let z=0;re.keywordPatternRe.lastIndex=0;let Q=re.keywordPatternRe.exec(Se),se="";for(;Q;){se+=Se.substring(z,Q.index);const me=nt.case_insensitive?Q[0].toLowerCase():Q[0],Ge=te(re,me);if(Ge){const[ht,io]=Ge;if(Ie.addText(se),se="",q[me]=(q[me]||0)+1,q[me]<=S5&&(vn+=io),ht.startsWith("_"))se+=Q[0];else{const oo=nt.classNameAliases[ht]||ht;Oe(Q[0],oo)}}else se+=Q[0];z=re.keywordPatternRe.lastIndex,Q=re.keywordPatternRe.exec(Se)}se+=Se.substring(z),Ie.addText(se)}function Be(){if(Se==="")return;let z=null;if(typeof re.subLanguage=="string"){if(!t[re.subLanguage]){Ie.addText(Se);return}z=_(re.subLanguage,Se,!0,Er[re.subLanguage]),Er[re.subLanguage]=z._top}else z=g(Se,re.subLanguage.length?re.subLanguage:null);re.relevance>0&&(vn+=z.relevance),Ie.__addSublanguage(z._emitter,z.language)}function Ee(){re.subLanguage!=null?Be():ue(),Se=""}function Oe(z,Q){z!==""&&(Ie.startScope(Q),Ie.addText(z),Ie.endScope())}function vt(z,Q){let se=1;const me=Q.length-1;for(;se<=me;){if(!z._emit[se]){se++;continue}const Ge=nt.classNameAliases[z[se]]||z[se],ht=Q[se];Ge?Oe(ht,Ge):(Se=ht,ue(),Se=""),se++}}function Tt(z,Q){return z.scope&&typeof z.scope=="string"&&Ie.openNode(nt.classNameAliases[z.scope]||z.scope),z.beginScope&&(z.beginScope._wrap?(Oe(Se,nt.classNameAliases[z.beginScope._wrap]||z.beginScope._wrap),Se=""):z.beginScope._multi&&(vt(z.beginScope,Q),Se="")),re=Object.create(z,{parent:{value:re}}),re}function Ae(z,Q,se){let me=kj(z.endRe,se);if(me){if(z["on:end"]){const Ge=new FO(z);z["on:end"](Q,Ge),Ge.isMatchIgnored&&(me=!1)}if(me){for(;z.endsParent&&z.parent;)z=z.parent;return z}}if(z.endsWithParent)return Ae(z.parent,Q,se)}function Gn(z){return re.matcher.regexIndex===0?(Se+=z[0],1):(si=!0,0)}function Te(z){const Q=z[0],se=z.rule,me=new FO(se),Ge=[se.__beforeBegin,se["on:begin"]];for(const ht of Ge)if(ht&&(ht(z,me),me.isMatchIgnored))return Gn(Q);return se.skip?Se+=Q:(se.excludeBegin&&(Se+=Q),Ee(),!se.returnBegin&&!se.excludeBegin&&(Se=Q)),Tt(se,z),se.returnBegin?0:Q.length}function Yn(z){const Q=z[0],se=D.substring(z.index),me=Ae(re,z,se);if(!me)return $O;const Ge=re;re.endScope&&re.endScope._wrap?(Ee(),Oe(Q,re.endScope._wrap)):re.endScope&&re.endScope._multi?(Ee(),vt(re.endScope,z)):Ge.skip?Se+=Q:(Ge.returnEnd||Ge.excludeEnd||(Se+=Q),Ee(),Ge.excludeEnd&&(Se=Q));do re.scope&&Ie.closeNode(),!re.skip&&!re.subLanguage&&(vn+=re.relevance),re=re.parent;while(re!==me.parent);return me.starts&&Tt(me.starts,z),Ge.returnEnd?0:Q.length}function oi(){const z=[];for(let Q=re;Q!==nt;Q=Q.parent)Q.scope&&z.unshift(Q.scope);z.forEach(Q=>Ie.openNode(Q))}let dt={};function Nn(z,Q){const se=Q&&Q[0];if(Se+=z,se==null)return Ee(),0;if(dt.type==="begin"&&Q.type==="end"&&dt.index===Q.index&&se===""){if(Se+=D.slice(Q.index,Q.index+1),!i){const me=new Error(`0 width match regex (${x})`);throw me.languageName=x,me.badRule=dt.rule,me}return 1}if(dt=Q,Q.type==="begin")return Te(Q);if(Q.type==="illegal"&&!H){const me=new Error('Illegal lexeme "'+se+'" for mode "'+(re.scope||"<unnamed>")+'"');throw me.mode=re,me}else if(Q.type==="end"){const me=Yn(Q);if(me!==$O)return me}if(Q.type==="illegal"&&se==="")return 1;if(Hn>1e5&&Hn>Q.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Se+=se,se.length}const nt=$(x);if(!nt)throw Ws(o.replace("{}",x)),new Error('Unknown language: "'+x+'"');const Ve=m5(nt);let dn="",re=V||Ve;const Er={},Ie=new a.__emitter(a);oi();let Se="",vn=0,zt=0,Hn=0,si=!1;try{if(nt.__emitTokens)nt.__emitTokens(D,Ie);else{for(re.matcher.considerAll();;){Hn++,si?si=!1:re.matcher.considerAll(),re.matcher.lastIndex=zt;const z=re.matcher.exec(D);if(!z)break;const Q=D.substring(zt,z.index),se=Nn(Q,z);zt=z.index+se}Nn(D.substring(zt))}return Ie.finalize(),dn=Ie.toHTML(),{language:x,value:dn,relevance:vn,illegal:!1,_emitter:Ie,_top:re}}catch(z){if(z.message&&z.message.includes("Illegal"))return{language:x,value:qh(D),illegal:!0,relevance:0,_illegalBy:{message:z.message,index:zt,context:D.slice(zt-100,zt+100),mode:z.mode,resultSoFar:dn},_emitter:Ie};if(i)return{language:x,value:qh(D),illegal:!1,relevance:0,errorRaised:z,_emitter:Ie,_top:re};throw z}}function f(x){const D={value:qh(x),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return D._emitter.addText(x),D}function g(x,D){D=D||a.languages||Object.keys(t);const H=f(x),V=D.filter($).filter(ae).map(Ee=>_(Ee,x,!1));V.unshift(H);const q=V.sort((Ee,Oe)=>{if(Ee.relevance!==Oe.relevance)return Oe.relevance-Ee.relevance;if(Ee.language&&Oe.language){if($(Ee.language).supersetOf===Oe.language)return 1;if($(Oe.language).supersetOf===Ee.language)return-1}return 0}),[te,ue]=q, Line truncated
`);return!r||!i?!1:!!e.chain().command(({tr:o})=>(o.delete(t.pos-2,t.pos),!0)).exitCode().run()}function M5(){if(this.options.codeMode)return!1;const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?!!this.editor.commands.clearNodes():!1}function L5({editor:e}){const t=e.state.selection.$from.parent.textContent.slice(0,e.state.selection.$from.parentOffset);return(t==null?void 0:t.split(`
`))||[]}const Gb=["arduino","bash","c","cpp","csharp","css","diff","go","graphql","ini","java","javascript","json","kotlin","less","lua","makefile","markdown","objectivec","perl","php","php-template","plaintext","python","python-repl","r","ruby","rust","scss","shell","sql","swift","typescript","vbnet","wasm","xml","yaml","ipsphtml","ipscss"],k5=tt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Ke(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Fu=k5.extend({parseHTML(){return[{tag:"li",getAttrs:e=>{var t;if(((t=e.childNodes)==null?void 0:t.length)>1){const n=document.createElement("div");n.innerHTML=e.innerHTML,e.innerHTML="",e.appendChild(n)}return null}}]}});function Qt(e,t="",n=!0){const r=i=>{t&&(i.message=t+": "+i.message),window.Debug[n?"warn":"error"](i)};try{const i=e();return i instanceof Promise?new Promise(o=>{i.catch(r).finally(()=>o(!1))}):!0}catch(i){return r(i),!1}}const cn=Mu.extend({addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this)}},addAttributes(){var e;return{language:{default:this.options.defaultLanguage||((e=this.options.allowedLanguages)==null?void 0:e[0])||"plaintext",parseHTML:t=>{var r,i;const n=(r=(()=>{if(t.hasAttribute("language"))return t.getAttribute("language");for(const o of t.classList)if(o.match(/^language-([a-z0-9\-_]+)$/i))return o.match(/^language-([a-z0-9\-_]+)$/i)[1];if(t.dataset.language&&t.dataset.language in pf)return pf[t.dataset.language];for(const o of t.querySelectorAll("code")){if(o.hasAttribute("language"))return o.getAttribute("language");for(const s of o.classList)if(s.match(/^language-([a-z0-9\-_]+)$/i))return s.match(/^language-([a-z0-9\-_]+)$/i)[1]}})())==null?void 0:r.toLowerCase();return this.options.codeMode&&(!n||!Gb.includes(n)||n!==this.options.defaultLanguage&&this.options.allowedLanguages&&!this.options.allowedLanguages.includes(n))?this.options.defaultLanguage||((i=this.options.allowedLanguages)==null?void 0:i[0])||"plaintext":n}}}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),codeMode:!1,allowedLanguages:null}},renderHTML({HTMLAttributes:e}){var n;const t=this.options.codeMode?this.editor.options.lastLang||((n=this.editor.options.allowedLanguages)==null?void 0:n[0])||"plaintext":e.language;return["pre",{spellcheck:"false",class:`${this.options.codeMode?"":"ipsCode "}language-${t}`,"data-language":Nl[t]||t},["code",{},0]]},onUpdate({editor:e}){this.options.codeMode&&e.options.lastLang&&e.options.lastLang!==e.getAttributes(this).language&&e.chain().setCodeBlock({language:e.options.lastLang}).run()},addKeyboardShortcuts(){const e=this.editor;return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{var o;if(!e.state.selection.empty||((o=e.state.selection.$from.parent)==null?void 0:o.type.name)!==this.name)return!1;if(M5.call(this))return!0;if(!this.options.codeMode&&(!e.state.selection.$from.parent.attrs.language||["plaintext","bash","shell","zsh","sh"].includes(e.state.selection.$from.parent.attrs.language)))return!1;const n=e.state.selection.$from.parent.textContent.slice(0,e.state.selection.$from.parentOffset),r=e.state.selection.$from.parent.textContent.slice(e.state.selection.$from.parentOffset);if(n&&r){for(const s in qt)if(n.endsWith(s)&&r.startsWith(qt[s]))return e.chain().deleteRange({from:e.state.selection.from-s.length,to:e.state.selection.from+qt[s].length}).setTextSelection(e.state.selection.from-s.length).focus().run()}const i=n.match(/(\t)[^\n]*(\n\t+)$/);return i?e.chain().deleteRange({from:e.state.selection.from-i[2].length,to:e.state.selection.from}).setTextSelection(e.state.selection.from-i[2].length).focus().run():!1},Enter:({editor:t})=>{var y,C,O,A,w,L,U,$,B,ae,be;if(x5.call(this,{editor:t}))return!0;const{$from:r}=t.state.selection,{parent:i}=r;if(!t.state.selection.empty||(i==null?void 0:i.type.name)!==this.name||!this.options.codeMode&&(!i.attrs.language||["plaintext","bash","shell","zsh","sh"].includes(i.attrs.language)))return!1;const o=L5({editor:t});if(!o.length)return!1;const s=o[o.length-1],a=o[o.length-2];let l=((C=(y=s.match(/^\t*/))==null?void 0:y[0])==null?void 0:C.length)||0,u=!1;const p=i.attrs.language,_=["ipsphtml","xml","html","xhtml","html5"].includes(p),f=["ipscss","css","scss","sass","less"].includes(p),g=["plaintext","rtf","markdown","md","bbcode"].includes(p),h=_?/(<[^>/]*>)$/:/([{[(.:]|->)$/,E=_?/(<\/[^/>]*>)$/:/^\s*([}\])]+[,;]?)$/;let b=!1;if(!_&&!f&&!g&&s.match(/^\s+(\.|->)?[a-z0-9_-]/i))if(s.match(/^\s+(\.|->)/))b=!0,l--;else{let pe=1;for(;pe<o.length&&((w=(A=(O=o[o.length-1-pe])==null?void 0:O.match(/^\t*/))==null?void 0:A[0])==null?void 0:w.length)< Line truncated
`+" ".repeat(l);u?(pe-=s.length,ee=s.replace(/^\t/,"")+ee):T&&(de=`
`+(l>1?" ".repeat(l-1):""),ee+=de);let ne=this.editor.chain().insertContentAt({from:pe,to:t.state.selection.from},{type:"text",text:ee});return de&&(ne=ne.setTextSelection(t.state.selection.from+ee.length-de.length)),ne.focus().run()}return!1},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown||this.options.codeMode)return!1;const{state:n}=t,{selection:r,doc:i}=n,{$from:o,empty:s}=r;if(!s||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const l=o.after();return l===void 0||i.nodeAt(l)?!1:!!t.commands.exitCode()},ArrowUp:P5.bind(this),Tab:Up.bind(this,!1,{editor:e}),"Shift-Tab":Up.bind(this,!0,{editor:e}),"Alt-Tab":Up.bind(this,!1,{editor:e},!0),"Shift-Alt-Tab":Up.bind(this,!0,{editor:e},!0)}},addProseMirrorPlugins(){var t;const e={};for(const n in qt)e[qt[n]]=n;return[...((t=this.parent)==null?void 0:t.call(this))||[],new Xe({key:new Qe("ipsCodeModeSyntaxHelpers"),props:{handleKeyDown:(n,r)=>{var o;if(!(r instanceof KeyboardEvent)||r.metaKey||r.altKey)return;const i=this.editor;if(((o=r.key)==null?void 0:o.toLowerCase())in qt)return r.key.toLowerCase()in e&&zO({editor:i,opener:r.key.toLowerCase()})?!0:!!F5({editor:i,char:r.key.toLowerCase()});if(r.key.toLowerCase()in e)return!!zO({editor:i,opener:e[r.key.toLowerCase()]})}}})]}});function P5({editor:e}){if(e.options.codeMode)return!1;const{$from:t,empty:n}=e.state.selection;if(t.nodeBefore||!n||t.parent.type!==this.type)return!1;let r=0,i;for(const s of[...t.path].reverse()){if(!Number.isInteger(s)&&(r++,r===2))break;i=s}return!r||!Number.isInteger(i)||i!==0||!(t.parentOffset===0)?!1:(e.chain().insertContentAt(t.before(),"<p>&nbsp;</p>",{updateSelection:!0}).run(),!0)}function Up(e=!1,{editor:t=null},n=!1){var r,i,o,s;if((!t.state.selection.empty||e)&&t.isActive(this.name)&&(t.options.codeMode||[...t.state.selection.$from.path].reverse()[3]===[...t.state.selection.$to.path].reverse()[3]))return t.state.selection.empty&&e&&t.state.selection.$from.parentOffset===0||Qt(()=>{t.chain().command(({tr:a,chain:l})=>{var u,p,_,f;try{const{from:g,to:h}=t.state.selection,E=[...t.state.selection.$from.path].reverse()[3]+1;let b=g;if(b>[...t.state.selection.$from.path].reverse()[3]){for(;b>[...t.state.selection.$from.path].reverse()[3]&&!((u=a.doc.slice(b-1,b--).content.content[0])!=null&&u.textContent.startsWith(`
`)););b++}const T=((p=a.doc.slice(b,h).content.content[0])==null?void 0:p.textContent)||"",y=g-b,C=T.split(`
`),O=C.map(L=>e?L.replace(/^\t/,""):" "+L).join(`
`);let A=!1;try{e&&C.length>1&&C[C.length-1].match(/^\t/)&&((f=(_=a.doc.slice(h,h+1))==null?void 0:_.content.content[0])==null?void 0:f.textContent)===" "&&(A=!0)}catch{}a.insertText(O,b,h);const w={from:b+y,to:b+O.length};e&&T.startsWith(" ")?w.from--:e||w.from++,A&&w.to++,E>w.from&&(w.from=E),l().setTextSelection(w).focus().run()}catch{}return!0}).run()},"Something went wrong when modifying indents in a codeblock selection"),!0;if(!n&&t.isActive(Fu.name))return!1;if(t.state.selection.empty){if(e){if(t.state.selection.$from.parentOffset>0){const a=t.state.doc.slice(t.state.selection.from-1,t.state.selection.from);if(((i=(r=a==null?void 0:a.content)==null?void 0:r.content[0])==null?void 0:i.textContent)===" "){const{from:l}=t.state.selection;return t.chain().command(({tr:u})=>(u.deleteRange(l-1,l),!0)).setTextSelection({from:l-1,to:l-1}).run(),!0}}if(t.state.selection.$from.parentOffset<t.state.selection.$from.parent.nodeSize-2){const a=t.state.doc.slice(t.state.selection.from,t.state.selection.from+1);if(((s=(o=a==null?void 0:a.content)==null?void 0:o.content[0])==null?void 0:s.textContent)===" "){const{from:l}=t.state.selection;return t.chain().command(({tr:u})=>(u.deleteRange(l,l+1),!0)).setTextSelection({from:l,to:l}).run(),!0}}}}else return!0;return t.chain().insertContent(" ").focus().run(),!0}function F5({editor:e,char:t}){var _,f,g;if(!(t in qt))return!1;const{$from:n,$to:r}=e.state.selection,i=n.parent,o=r.parent;if(((_=i==null?void 0:i.type)==null?void 0:_.name)!==Mu.name||i!==o)return!1;if(e.state.selection.empty)return e.chain().insertContent(`${t}${qt[t]}`).setTextSelection(e.state.selection.from+t.length).focus().run();const s=i.textContent;let a=s.slice(n.parentOffset,r.parentOffset);if(!a)return!1;if(['"',"'","`"].includes(t)){const h=new RegExp(`(^|[^\\\\])\\${t}`,"g");a=a.replaceAll(h,`$1\\${t}`).replaceAll(/\n/g,"\\n")}let l="",u=0;if(a.match(/\n/)){const E=s.slice(0,n.parentOffset).split(`
`).pop(),b=s.slice(r.parentOffset).split(`
`).shift();let T=Math.max(0,((g=(f=E.match(/^\t*/))==null?void 0:f[0])==null?void 0:g.length)+1);E.match(/^\t*$/)&&b.match(/^\t+$/)&&(T+=b.match(/^\t+$/)[0].length),b.match(/^\s*$/)&&(a=a.replace(/^\s*?\n\s*(.?)/,"$1")),u=T+1;const y=" ".repeat(T),C=new RegExp(`\\n\\t{0,${T?T-1:0}}`,"g");if(a=a.replaceAll(C,`
${y}`),a=`${t}
${y}${a}
${y?y.slice(0,y.length-1):""}${qt[t]}`,r.parentOffset<s.length)try{const O=s.slice(r.parentOffset,r.parentOffset+1);O!=null&&O.match(/\n/)||(l=`
`+(y?y.slice(0,y.length-1):""),a+=l)}catch{}}else a=`${t}${a}${qt[t]}`;const p={from:e.state.selection.from+t.length+u,to:e.state.selection.from+a.length-qt[t].length-l.length-(u?u-1:0)};return e.chain().insertContentAt({from:e.state.selection.from,to:e.state.selection.to},{type:"text",text:a}).setTextSelection(p).focus().run()}function zO({editor:e,opener:t}){var o;if(!(t in qt)||!e.state.selection.empty)return!1;const{$from:n}=e.state.selection,r=n.parent;if((r==null?void 0:r.type.name)!==Mu.name)return!1;const i=(o=n.parent)==null?void 0:o.textContent;if(n.parentOffset<1||n.parentOffset>=i.length)return!1;try{const s=n.parentOffset;let a=i==null?void 0:i.slice(s,s+qt[t].length);if(!a)return;if(a.startsWith(qt[t]))return s>0&&['"',"'","`"].includes(t)&&(i==null?void 0:i[s-1])==="\\"?e.chain().insertContent({type:"text",text:qt[t]}).focus().run():e.chain().setTextSelection(e.state.selection.from+qt[t].length).focus().run()}catch{return!1}return!1}const qt={"{":"}","[":"]","(":")","'":"'",'"':'"',"`":"`"};function VM(e){const t=[...e.state.selection.$from.path].reverse()[2],n=t==null?void 0:t.type.name;return n===kr.name?[n,{level:t.attrs.level||1}]:[n||"",{}]}function Dc(e){var n;if(e[0]===kr.name)return`Heading ${((n=e[1])==null?void 0:n.level)||""}`;const t=e[0]in zS?e[0]:Bt.name;return zS[t]}function U5(e){if(e in VO)return[VO[e],{}];const t=Dc([kr.name,{}]);if(e.startsWith(t)){const n=parseInt(e.replace("Heading","").trim())||1;return[kr.name,{level:n}]}return[Bt.name,{}]}const zS={[eo.name]:"Ordered List",[rs.name]:"Bullet List",[cn.name]:"Code Block",[Bt.name]:"Paragraph"},VO=Object.fromEntries([...Object.entries(zS)].map(e=>e.reverse())),Kh=new WeakMap;function B5(e){if(!Kh.has(e)){const t=[...xc].filter(i=>!(i===kr.name&&e.options.restrictions.has("heading"))&&e.extensionManager.extensions.some(o=>o.name===i)),n=[],r=e.extensionManager.extensions.find(i=>i.name===kr.name);t.forEach(i=>{i===kr.name?r.options.levels.forEach(o=>n.push([kr.name,{level:o}])):n.push([i,{}])}),Kh.set(e,n)}return Kh.get(e)}const xc=new Set([Bt.name,cn.name,kr.name]);function G5({...e}){const{editor:t}=k.useContext(Le),n=VM(t);e.dropdownOptions=e.dropdownOptions||{},e.dropdownOptions.className=e.dropdownOptions.className||"",e.dropdownOptions.className=[...e.dropdownOptions.className.split(/\s+/),"ipsRichText"].join(" ");const r=B5(t);return N.jsx(ps,{current:N.jsx(N.Fragment,{children:N.jsx("i",{className:"fa-solid fa-paragraph"})}),currentValue:Dc(n),blank:N.jsx(WO,{block:[Bt.title,{}]}),items:r.map(i=>[Dc(i),N.jsx(WO,{block:i},Dc(i))]),itemProps:Object.fromEntries(r.map(i=>[Dc(i),{disabled:!t.can().convertBlocks(i)}])),onChange:i=>{const o=U5(i);t.chain().convertBlocks(o).focus().run()},...e,dropdownOptions:{...e.dropdownOptions,location:"se"}})}function WO({block:e,style:t=!0}){if(e[0]===kr.name){const n=`h${e[1].level}`,r=window.ips.getString(`editor_node--heading_${e[1].level}`);return t?N.jsx(n,{children:r}):N.jsx(N.Fragment,{children:r})}if(e[0]===cn.name){const n=window.ips.getString("editor_node--code_block");return t?N.jsx("code",{children:n}):N.jsx(N.Fragment,{children:n})}return N.jsx(N.Fragment,{children:window.ips.getString("editor_node--paragraph")})}const Uu=en.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",Ke(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Bu=en.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",Ke(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),Y5=tt.create({name:"ipsLatexContainer",group:"inline",inline:!0,content:"text*",renderHTML(){return["span",{class:"ipsLatexContainer"},0]},parseHTML(){return[{tag:"span",getAttrs:e=>e.classList.contains("ipsLatexContainer")&&null}]}}),id=tt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",Ke(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{selection:n}=t,{$from:r,$to:i}=n,o=e();return r.parentOffset===0?o.insertContentAt({from:Math.max(r.pos-1,0),to:i.pos},{type:this.name}):BV(n)?o.insertContentAt(i.pos,{type:this.name}):o.insertContent({type:tLine truncated
`,Q5="️",j5="‍",Jh="";let Bp=null,Gp=null;function X5(e=[]){const t={};Qn.groups=t;const n=new Qn;Bp==null&&(Bp=QO($5)),Gp==null&&(Gp=QO(z5)),ie(n,"'",$b),ie(n,"{",Xc),ie(n,"}",Zc),ie(n,"[",_f),ie(n,"]",ff),ie(n,"(",mf),ie(n,")",gf),ie(n,"<",hf),ie(n,">",Ef),ie(n,"(",Sf),ie(n,")",Tf),ie(n,"「",bf),ie(n,"」",yf),ie(n,"『",Cf),ie(n,"』",Rf),ie(n,"<",Nf),ie(n,">",vf),ie(n,"&",Of),ie(n,"*",Af),ie(n,"@",No),ie(n,"`",wf),ie(n,"^",Df),ie(n,":",wo),ie(n,",",zb),ie(n,"$",xf),ie(n,".",_i),ie(n,"=",Mf),ie(n,"!",Vb),ie(n,"-",Ir),ie(n,"%",Jc),ie(n,"|",Lf),ie(n,"+",kf),ie(n,"#",Pf),ie(n,"?",eu),ie(n,'"',Wb),ie(n,"/",fi),ie(n,";",qb),ie(n,"~",tu),ie(n,"_",Ff),ie(n,"\\",If),ie(n,"・",QM);const r=At(n,Pi,Yb,{[VS]:!0});At(r,Pi,r);const i=At(r,ki,qM,{[jc]:!0}),o=At(r,yc,KM,{[Mc]:!0}),s=At(n,ki,Ui,{[WS]:!0});At(s,Pi,i),At(s,ki,s),At(i,Pi,i),At(i,ki,i);const a=At(n,yc,QS,{[qS]:!0});At(a,ki),At(a,Pi,o),At(a,yc,a),At(o,Pi,o),At(o,ki),At(o,yc,o);const l=ie(n,Zh,Hb,{[Qh]:!0}),u=ie(n,KO,ZS,{[Qh]:!0}),p=At(n,Xh,ZS,{[Qh]:!0});ie(n,Jh,p),ie(u,Zh,l),ie(u,Jh,p),At(u,Xh,p),ie(p,KO),ie(p,Zh),At(p,Xh,p),ie(p,Jh,p);const _=At(n,jh,jM,{[WM]:!0});ie(_,"#"),At(_,jh,_),ie(_,Q5,_);const f=ie(_,j5);ie(f,"#"),At(f,jh,_);const g=[[ki,s],[Pi,i]],h=[[ki,null],[yc,a],[Pi,o]];for(let E=0;E<Bp.length;E++)Eo(n,Bp[E],jS,Ui,g);for(let E=0;E<Gp.length;E++)Eo(n,Gp[E],XS,QS,h);Fs(jS,{tld:!0,ascii:!0},t),Fs(XS,{utld:!0,alpha:!0},t),Eo(n,"file",h_,Ui,g),Eo(n,"mailto",h_,Ui,g),Eo(n,"http",Pa,Ui,g),Eo(n,"https",Pa,Ui,g),Eo(n,"ftp",Pa,Ui,g),Eo(n,"ftps",Pa,Ui,g),Fs(h_,{scheme:!0,ascii:!0},t),Fs(Pa,{slashscheme:!0,ascii:!0},t),e=e.sort((E,b)=>E[0]>b[0]?1:-1);for(let E=0;E<e.length;E++){const b=e[E][0],y=e[E][1]?{[V5]:!0}:{[W5]:!0};b.indexOf("-")>=0?y[KS]=!0:ki.test(b)?Pi.test(b)?y[jc]=!0:y[WS]=!0:y[VS]=!0,qO(n,b,b,y)}return qO(n,"localhost",Gu,{ascii:!0}),n.jd=new Qn(Uf),{start:n,tokens:ra({groups:t},XM)}}function ZM(e,t){const n=Z5(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=e,l=null,u=0,p=null,_=-1,f=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(_=0,f=0,p=a):_>=0&&(_+=n[s].length,f++),u+=n[s].length,o+=n[s].length,s++;o-=_,s-=f,u-=_,i.push({t:p.t,v:t.slice(o-u,o),s:o-u,e:o})}return i}function Z5(e){const t=[],n=e.length;let r=0;for(;r<n;){let i=e.charCodeAt(r),o,s=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function Eo(e,t,n,r,i){let o;const s=t.length;for(let a=0;a<s-1;a++){const l=t[a];e.j[l]?o=e.j[l]:(o=new Qn(r),o.jr=i.slice(),e.j[l]=o),e=o}return o=new Qn(n),o.jr=i.slice(),e.j[t[s-1]]=o,o}function QO(e){const t=[],n=[];let r=0,i="0123456789";for(;r<e.length;){let o=0;for(;i.indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+o),10);s>0;s--)n.pop();r+=o}else n.push(e[r]),r++}return t}const vl={defaultProtocol:"http",events:null,format:jO,formatHref:jO,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ym(e,t=null){let n=ra({},vl);e&&(n=ra(n,e instanceof ym?e.o:e));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}ym.prototype={o:vl,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:vl[e],typeof i=="function"&&r&&(i=i(t,n))):typeof i=="function"&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function jO(e){return e}var J5=Object.freeze({__proto__:null,defaults:vl,Options:ym,assign:ra});function JM(e,t){this.t="token",this.v=e,this.tk=t}JM.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=vl.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),o=this.toFormattedString(e),s={},a=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),p=e.getObj("attributes",n,t),_=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),p&&ra(s,p),{tagName:i,aLine truncated
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);ft.customSchemes.push([e,t])}function s6(){ft.scanner=X5(ft.customSchemes);for(let e=0;e<ft.tokenQueue.length;e++)ft.tokenQueue[e][1]({scanner:ft.scanner});ft.parser=t6(ft.scanner.tokens);for(let e=0;e<ft.pluginQueue.length;e++)ft.pluginQueue[e][1]({scanner:ft.scanner,parser:ft.parser});return ft.initialized=!0,ft}function Kb(e){return ft.initialized||s6(),n6(ft.parser.start,e,ZM(ft.scanner.start,e))}Kb.scan=ZM;function Qb(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new ym(n),i=Kb(e),o=[];for(let s=0;s<i.length;s++){const a=i[s];a.isLink&&(!t||a.t===t)&&r.check(a)&&o.push(a.toFormattedObject(r))}return o}function a6(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function l6(e){return new Xe({key:new Qe("autolink"),appendTransaction:(t,n,r)=>{const i=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,a=wV(n.doc,[...t]);if(FV(a).forEach(({newRange:u})=>{const p=xV(r.doc,u,g=>g.isTextblock);let _,f;if(p.length>1?(_=p[0],f=r.doc.textBetween(_.pos,_.pos+_.node.nodeSize,void 0," ")):p.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(_=p[0],f=r.doc.textBetween(_.pos,u.to,void 0," ")),_&&f){const g=f.split(" ").filter(T=>T!=="");if(g.length<=0)return!1;const h=g[g.length-1],E=_.pos+f.lastIndexOf(h);if(!h)return!1;const b=Kb(h).map(T=>T.toObject(e.defaultProtocol));if(!a6(b))return!1;b.filter(T=>T.isLink).map(T=>({...T,from:E+T.start+1,to:E+T.end+1})).filter(T=>r.schema.marks.code?!r.doc.rangeHasMark(T.from,T.to,r.schema.marks.code):!0).filter(T=>e.validate(T.value)).filter(T=>e.shouldAutoLink(T.value)).forEach(T=>{vb(T.from,T.to,r.doc).some(y=>y.mark.type===e.type)||s.addMark(T.from,T.to,e.type.create({href:T.href}))})}}),!!s.steps.length)return s}})}function c6(e){return new Xe({key:new Qe("handleClickLink"),props:{handleClick:(t,n,r)=>{var i,o;if(r.button!==0||!t.editable)return!1;let s=r.target;const a=[];for(;s.nodeName!=="DIV";)a.push(s),s=s.parentNode;if(!a.find(f=>f.nodeName==="A"))return!1;const l=Nb(t.state,e.type.name),u=r.target,p=(i=u==null?void 0:u.href)!==null&&i!==void 0?i:l.href,_=(o=u==null?void 0:u.target)!==null&&o!==void 0?o:l.target;return u&&p?(window.open(p,_),!0):!1}}})}function u6(e){return new Xe({key:new Qe("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:i}=t,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach(u=>{a+=u.textContent});const l=Qb(a,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!l?!1:(e.editor.commands.setMark(e.type,{href:l.href}),!0)}}})}const d6=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function Cc(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!e||e.replace(d6,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}const wa=en.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){JO(e);return}JO(e.scheme,e.optionalSlashes)})},onDestroy(){o6()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!Cc(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!Cc(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!Cc(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Ke(this.options.HTMLAttributes,e),0]:["a",Ke(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[ns({find:e=>{const t=[];if(e){const{protocols:n,defaul Line truncated
`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:p})=>{if(p&&l&&s){const _=l.filter(f=>a.includes(f.type.name));u.ensureMarks(_)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),T_=tt.create({name:"doc",topNode:!0,content:"block+"}),BL=gt.create({name:"ipsAutosave",addCommands(){return{clearAutosave:()=>({editor:e,chain:t})=>(e.options.autoSaveKey&&(window.ips.utils.db.remove("editorSave",e.options.autoSaveKey),t().hideMessage("autosave").run()),!0)}},onUpdate(){this.storage.updateCallback()},onCreate(){var e,t;if(this.storage.initial=this.editor.getHTML(),this.storage.updateCallback=fr.debounce(()=>{var n;(n=this.editor)!=null&&n.options.autoSaveKey&&(this.editor.getHTML().trim()&&this.editor.getHTML()!=="<p></p>"?window.ips.utils.db.set("editorSave",this.editor.options.autoSaveKey,{content:this.editor.getHTML(),time:Math.round(Date.now()/1e3)}):this.editor.commands.clearAutosave(),this.editor.commands.hideMessage("autosave"))},500),(e=this.editor)!=null&&e.options.autoSaveKey){const n=window.ips.utils.db.get("editorSave",this.editor.options.autoSaveKey);if((t=n==null?void 0:n.content)!=null&&t.trim()&&(!n.time||Date.now()/1e3-86400*3<parseInt(n.time))){const r=new DOMParser().parseFromString(n.content,"text/html");if(!(r.body.innerText.trim().length||r.body.querySelector("iframe,img,video,audio,a,embed,.ipsEmoji,.ipsEmbeddedVideo,.ipsEmbeddedBrightcove,.ipsEmbeddedOther,.ipsEmbeddedPhoto")))return;this.editor.chain().setContent(n.content).command(({tr:i,chain:o})=>(!i.docChanged||GL(i.doc)?o().undo().hideMessage("autosave").run():o().showMessage("autosave").focus().run(),!0)).run()}}},addStorage(){return{initial:"",updateCallback:()=>{}}}});function GL(e){var t,n,r;return e.textContent==="<p></p>"?!0:!((t=e.textContent)!=null&&t.trim().length||![T_.name,Bt.name,bi.name,zu.name].includes(e.type.name)||(r=(n=e.content)==null?void 0:n.content)!=null&&r.length&&!e.content.content.some(i=>!GL(i)))}function FX(){const{editor:e}=k.useContext(Le);return N.jsxs(N.Fragment,{children:[window.ips.getString("editor_tool--autosave-message-before"),N.jsx("button",{className:"ipsEditor__autosave-clear",onClick:()=>e.chain().clearAutosave().setContent(e.storage[BL.name].initial||"").focus().run(),children:window.ips.getString("editor_tool--autosave-message-inner")}),window.ips.getString("editor_tool--autosave-message-after")]})}function UX({positions:e="",href:t}){const{editor:n}=k.useContext(Le),r=()=>{if(!e.length){n.commands.hideMessage("autoembed");return}let i=n.chain();for(const o of e)i=i.command(({tr:s,chain:a})=>a().insertContentAt({from:Math.max(0,s.mapping.map(o[0])),to:Math.min(s.doc.nodeSize-2,s.mapping.map(o[1]))},`<a href="${encodeURI(t)}" >${o[2]}</a>`));i.hideMessage("autoembed").focus().run()};return N.jsxs(N.Fragment,{children:[window.ips.getString("editor_tool--autoembed-message-before"),N.jsx("button",{className:"ipsEditor__autosave-clear",onClick:r,children:window.ips.getString("editor_tool--autoembed-message-inner")}),window.ips.getString("editor_tool--autoembed-message-after")]})}function BX(){const{editor:e}=k.useContext(Le),t=()=>{if(!e.storage[We.name].autolinked){e.commands.hideMessage("autolink");return}const n=e.storage[We.name].autolinked,{from:r,to:i}=e.state.selection;e.chain().setTextSelection({from:n.from,to:n.to}).unsetMark(We.name).setTextSelection({from:r,to:i}).focus().hideMessage("autolink").run()};return N.jsxs(N.Fragment,{children:[window.ips.getString("editor_tool--autolink-message-before"),N.jsx("button",{className:"ipsEditor__autosave-clear",onClick:t,children:window.ips.getString("editor_tool--autolink-message-inner")}),window.ips.getString("editor_tool--autolink-message-after")]})}function AA({name:e}){const{editor:t}=k.useContext(Le);return N.jsxs("div",{className:`ipsEditor__global-message ipsEditor__global-message--${e}`,children:[N.jsxs("div",{className:"ipsEditor__global-message-content",children:[N.jsx("i",{className:"fa-solid fa-circle-info"}),"  ",N.jsx(GX,{name:e})]}),N.jsx("button",{className:"ipsEditor__global-message-close",onClick:()=>t==null?void 0:t.commands.hideMessage(e),children:N.jsx("i",{className:"fa-solid fa-times-circle"})})]})}function GX({name:e}){const{messages:t}=k.useContext(dT),n=t.get(e);switch(e){case"autosave":return N.jsx(FX,{});case"autoembed":return N.jsx(UX,{...n});case"autolink":return N.jsx(BX,{});default:return typeof n=="string"&&n?N.jsx("span",{"data-ipseditorcustommessage":"true",dangerouslySetInnerHTML:{__html:n}}):N.jsx(N.Fragment,{children:"This is a global message!"})}}const dT=k.creLine truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xA(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 MA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xA(Object(n),!0).forEach(function(r){jX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XX(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(i,o){return o(i)},r)}}function kc(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return t.apply(n,[].concat(i,a))}}}function Yf(e){return{}.toString.call(e).includes("Object")}function ZX(e){return!Object.keys(e).length}function Vu(e){return typeof e=="function"}function JX(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function e8(e,t){return Yf(t)||Zo("changeType"),Object.keys(t).some(function(n){return!JX(e,n)})&&Zo("changeField"),t}function t8(e){Vu(e)||Zo("selectorType")}function n8(e){Vu(e)||Yf(e)||Zo("handlerType"),Yf(e)&&Object.values(e).some(function(t){return!Vu(t)})&&Zo("handlersType")}function r8(e){e||Zo("initialIsRequired"),Yf(e)||Zo("initialType"),ZX(e)&&Zo("initialContent")}function i8(e,t){throw new Error(e[t]||e.default)}var o8={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Zo=kc(i8)(o8),Xp={changes:e8,selector:t8,handler:n8,initial:r8};function s8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Xp.initial(e),Xp.handler(t);var n={current:e},r=kc(c8)(n,t),i=kc(l8)(n),o=kc(Xp.changes)(e),s=kc(a8)(n);function a(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(p){return p};return Xp.selector(u),u(n.current)}function l(u){XX(r,i,o,s)(u)}return[a,l]}function a8(e,t){return Vu(t)?t(e.current):t}function l8(e,t){return e.current=MA(MA({},e.current),t),t}function c8(e,t,n){return Vu(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var u8={create:s8},d8={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function p8(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return t.apply(n,[].concat(i,a))}}}function _8(e){return{}.toString.call(e).includes("Object")}function f8(e){return e||LA("configIsRequired"),_8(e)||LA("configType"),e.urls?(m8(),{paths:{vs:e.urls.monacoBase}}):e}function m8(){console.warn(YL.deprecation)}function g8(e,t){throw new Error(e[t]||e.default)}var YL={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
You are using deprecated way of configuration.
Instead of using
monaco.config({ urls: { monacoBase: '...' } })
use
monaco.config({ paths: { vs: '...' } })
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
`},LA=p8(g8)(YL),h8={config:f8},E8=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduceRight(function(o,s){return s(o)},i)}};function HL(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],HL(e[n],t[n]))}),wA(wA({},e),t)}var S8={type:"cancelation",msg:"operation is manually canceled"};function fE(e){var t=!1,n=new Promise(function(r,i){e.then(function(o){return t?i(S8):r(o)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var T8=u8.create({config:d8,isInitialized:!1,resolve:null,reject:null,monaco:null}),$L=VX(T8,2),ad=$L[0],Nm=$L[1];function b8(e){var t=h8.config(e),n=t.monaco,r=zX(t,["monaco"]);Nm(function(i){return{config:HL(i.config,r),monaco:n}})}function y8(){var e=ad(function(t){var n=t.monaco,r=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:r,resolve:i}});if(!e.isInitialized){if(Nm({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),fE(mE);if(window.monaco&&window.monaco.editor)return zL(window.monaco),e.resolve(window.monaco),fE(mE);E8(C8,N8)(v8)}return fE(mE)}function C8(e){return document.body.appendChild(e)}function R8(e){var t=document.createElement("script");return e&&(t.src=e),t}function N8(e){var t=ad(function(r){var i=r.config,o=r.reject;return{config:i,reject:o}}),n=R8("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function v8(){var e=ad(function(n){var r=n.config,i=n.resolve,o=n.reject;return{config:r,resolve:i,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){zL(n),e.resolve(n)},function(n){e.reject(n)})}function zL(e){ad().monaco||Nm({monaco:e})}function O8(){return ad(function(e){var t=e.monaco;return t})}var mE=new Promise(function(e,t){return Nm({resolve:e,reject:t})}),ay={config:b8,init:y8,__getMonacoInstance:O8},A8={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},gE=A8,I8={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},w8=I8;function D8({children:e}){return it.createElement("div",{style:w8.container},e)}var x8=D8,M8=x8;function L8({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:o,wrapperProps:s}){return it.createElement("section",{style:{...gE.wrapper,width:e,height:t},...s},!n&&it.createElement(M8,null,r),it.createElement("div",{ref:i,style:{...gE.fullWidth,...!n&&gE.hide},className:o}))}var k8=L8,VL=k.memo(k8);function P8(e){k.useEffect(e,[])}var WL=P8;function F8(e,t,n=!0){let r=k.useRef(!0);k.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var ur=F8;function ru(){}function Xa(e,t,n,r){return U8(e,r)||B8(e,t,n,r)}function U8(e,t){return e.editor.getModel(qL(e,t))}function B8(e,t,n,r){return e.editor.createModel(t,n,r?qL(e,r):void 0)}function qL(e,t){return e.Uri.parse(t)}function G8({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:l=!1,theme:u="light",loading:p="Loading...",options:_={},height:f="100%",width:g="100%",className:h,wrapperProps:E={},beforeMount:b=ru,onMount:T=ru}){let[y,C]=k.useState(!1),[O,A]=k.useState(!0),w=k.useRef(null),L=k.useRef(null),U=k.useRef(null),$=k.useRef(T),B=k.useRef(b),ae=k.useRef(!1);WL(()=>{let ee=ay.init();return ee.then(ne=>(L.current=ne)&&A(!1)).catch(ne=>(ne==null?void 0:ne.type)!=="cancelation"&&console.error("Monaco initialization: error:",ne)),()=>w.current?de():ee.cancel()}),ur(()=>{if(w.current&&L.current){let ee=w.current.getOriginalEditor(),ne=Xa(L.current,e||"",r||n||"text",o||"");ne!==ee.getModel()&&ee.setModel(ne)}},[o],y),ur(()=>{if(w.current&&L.current){let ee=w.current.getModifiedEditor(),ne=Xa(L.current,t||"",i||n||"text",s||"");ne!==ee.getModel()&&ee.setModel(ne)}},[s],y),ur(()=>{let ee=w.current.getModifiedEditor();ee.getOption(L.current.editor.EditorOption.readOnly)?ee.setValue(t||""):t!==ee.getValue()&&(ee.executeEdits("",[{range:ee.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),ee.pushUndoStop())},[t],y),ur(()=>{var ee,ne;(ne=(ee=w.current)==null?void 0:ee.getModel())==null||ne.original.setValue(e||"")},[e],y),ur(()=>{let{original:ee,modified:ne}=w.current.getModel();L.current.editor.setModelLanguage(ee,r||n||"text"),L.current.editor.setModelLanguage(ne,i||n||"text")},[n,r,i],y),ur(()=>{var ee;(ee=L.current)==null||ee.editor.setTheme(u)},[u],y),ur(()=>{var ee;(ee=w.current)==null||ee.updateOptions(_)},[_],y);let be=k.useCallback(()=>{var x;if(!L.current)return;B.current(L.current);let ee=Xa(L.current,e||"",r||n||"text",o||""),ne=Xa(L.current,t||"",i||n||"text",s||"");(x=w.current)==null||x.setModel({original:ee,modified:ne})},[n,t,i,e,r,o,s]),pe=k.useCallback(()=>{var ee;!ae.current&&U.current&&(w.current=L.current.editor.createDiffEditor(U.current,{automaticLayout:!0,..._}),be(),(ee=L.current)==null||ee.editor.setTheme(u),C(!0),ae.current Line truncated
`+t.message,window.Debug.error(t),e_=null}).finally(()=>{for(const t of $A)t(e_),$A.delete(t);e(e_)})})}const o7=gt.create({name:"ipsMessages",addCommands(){let e={_messages:new Map,addMessage(n,r=""){this._messages.set(n,r)},removeMessage(n){this._messages.delete(n)},get messages(){return this._messages},onVisibilityChange(n){t=n}},t=!1;return{showMessage:(n,r="")=>()=>{e==null||e.addMessage(n,r)},hideMessage:n=>()=>{e==null||e.removeMessage(n)},registerMessageInterface:n=>()=>{var i,o,s;if(Object.is(n,e))return!1;let r=!1;for(const a in n)if(!Object.is(n[a],e[a])){r=!0;break}if(!r)return!1;if(e.messages instanceof Map)for(const a of e.messages.keys())(o=(i=n==null?void 0:n.messages)==null?void 0:i.has)!=null&&o.call(i,a)&&n.messages.get(a)===e.messages.get(a)||n.addMessage(a,e.messages.get(a));(!("visible"in n)||n.visible!==t)&&((s=n.onVisibilityChange)==null||s.call(n,t)),e=n},fireVisibilityChange:n=>()=>{var r;t=!!n,(r=e==null?void 0:e.onVisibilityChange)==null||r.call(e,t)}}}}),s7=({key:e,editor:t,onPaste:n,onDrop:r,allowedMimeTypes:i})=>new Xe({key:e||new Qe("fileHandler"),props:{handleDrop(o,s){var a;if(!r||!(!((a=s.dataTransfer)===null||a===void 0)&&a.files.length))return!1;const l=o.posAtCoords({left:s.clientX,top:s.clientY});let u=Array.from(s.dataTransfer.files);return i&&(u=u.filter(p=>i.includes(p.type))),u.length!==0&&(s.preventDefault(),s.stopPropagation(),r(t,u,(l==null?void 0:l.pos)||0),!0)},handlePaste(o,s){var a;if(!n||!(!((a=s.clipboardData)===null||a===void 0)&&a.files.length))return!1;let l=Array.from(s.clipboardData.files);const u=s.clipboardData.getData("text/html");return i&&(l=l.filter(p=>i.includes(p.type))),l.length!==0&&(s.preventDefault(),s.stopPropagation(),n(t,l,u),!(u.length>0))}}}),a7=gt.create({name:"fileHandler",addOptions:()=>({onPaste:void 0,onDrop:void 0,allowedMimeTypes:void 0}),addProseMirrorPlugins(){return[s7({key:new Qe(this.name),editor:this.editor,allowedMimeTypes:this.options.allowedMimeTypes,onDrop:this.options.onDrop,onPaste:this.options.onPaste})]}});function l7({mimeTypes:e,handler:t}){let n;Array.isArray(e)&&(n=new Set(e.map(i=>i.toLowerCase())));const r=i=>{const o=i instanceof DragEvent?i.dataTransfer:i.clipboardData;if(o.files.length){const s=[];for(const a of o.files)(!n||n.has(a.type.toLowerCase()))&&s.push(a);if(s.length)return t(s),!0}};return new Xe({key:new Qe("ipsDataTransferFixer"),props:{handlePaste:(i,o)=>r(o),handleDrop:(i,o)=>r(o)}})}const c7=a7.extend({addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),injectAttachments:t=>({editor:n,chain:r})=>{const i=u7(n.options.postkey);if(!i)return!1;let o=r();for(const s of t){const a=Math.round(Math.random()*Math.pow(10,8));let l=!1;o=o.insertContent({type:ct.name,attrs:{attachmentType:"file",attachmentSrc:"",attachmentLink:"",fileId:a,attachmentTitle:window.ips.getString("editor_attachment_upload_placeholder")}}),i.dispatchEvent(new d7({file:s,data:{ready:u=>{if(l)return;l=!0;const p=jb(n.$doc,a);p.length&&n.commands.command(({tr:_,chain:f})=>{let g=f();for(const{to:h,from:E}of p)g=g.insertContentAt({from:_.mapping.map(E),to:_.mapping.map(h)},u,{parseOptions:{preserveWhitespace:!1}});return!0})},error:u=>{l||(l=!0,u instanceof Error&&(u.message=`File upload failed:
${u.message}`,window.Debug.warn(u),n.commands.showMessage("file-attach","Couldn't insert one or more files pasted or dropped in the editor.")),n.commands.removeAttachment(a))}}}))}return o.run(),!0}}},addProseMirrorPlugins(){var e;return[l7({mimeTypes:this.options.allowedMimeTypes,handler:t=>this.options.onPaste(this.editor,t)}),...((e=this.parent)==null?void 0:e.call(this))||[]]}}).configure({onPaste(e,t){return e.commands.injectAttachments(t)},onDrop(e,t){return e.commands.injectAttachments(t)}});function u7(e){return!e||typeof e!="string"?null:document.querySelector(`[data-ipsuploader-postkey="${e}"]`)}class d7 extends Event{constructor(t){super("injectFile"),this.data=t}}const p7=["name","group","isInline","isBlock","isText","content","isLeaf","selectable","exitable","atom","addOptions","addKeyboardShortcuts","addAttributes","addGlobalAttributes","addCommands","renderHTML","parseHTML","onCreate","onUpdate","onBeforeCreate","onFocus","onBlur","onBeforeCreate","onSelectionUpdate","onDestroy","onTransaction","priority","defaultOptions","addInputRules","marks","addNodeView","whitespace","defining","isolating","renderText"];function _7(e,t){var a,l,u;if(!e.ipsPlugins){e.ipsPlugins={buttons:{},extensions:[],nodes:[],marks:[]};return}e.ipsPlugins.buttons={},Array.isArray((a=e.ipsPlugins)==null?void 0:a.extensions)?s(e.ipsPlugins.extensions,gt):e.ipsPlugins.extensions=[],Array.isArray((l=e.ipsPlugins)==null?void 0:l.nodes)?s(e.ipsPlugins.nodes,tt):e.ipsPlugins.nodes=[],Array.isArray((u=e.ipsPlugins)==null?void 0:u.marks)?s(e.ipsPlugins.marks,en):e.ipsPlugins.marks=[],e.ipsPlugins.nestedToolbars={},e.pluginButtonKeys=new Set;const n=new Set(e.tools.toolbar);for(const p in e.ipsPlugins.buttons)for(const{before:_,after:f}of e.ipsPlugins.buttons[p].locations){let g,h=!1;if(typeof f=="string"&&f in dA){const E=dA[f];e.ipsPlugins.nestedToolbars[E]=e.ipsPlugins.nestedToolbars[E]||[...is[E]],e.ipsPlugins.nestedToolbars[E].push(`custom:${p}`),h=!0}else if(typeof f=="string"&&n.has(f))g=e.tools.toolbar.indexOf(f)+1;else if(typeof _=="string"&&n.has(_))g=e.tools.toolbar.indexOf(_);else if(!_&&!f||_===null||f===null)g=e.tools.toolbar.length;else continue;e.pluginButtonKeys.add(`custom:${p}`),h||(n.add(`custom:${p}`),e.tools.toolbar.splice(g,0,`custom:${p}`))}function r(p){for(const _ of p.attributes)["class","style","id","src","title","rel","alt"].includes(_.name.toLowerCase())||p.removeAttribute(_.name);for(const _ of p.querySelectorAll(":scope > *"))r(_)}function i(p,_){var f;if(p.addButtons instanceof Function){const g=p.addButtons.bind(_)();if(typeof g!="object")throw new TypeError;const h=new DOMParser;for(const E in g){let{html:b,command:T,locations:y,element:C,isActive:O,isAvailable:A}=g[E];if(typeof b!="string"&&!(C instanceof HTMLElement)||!(T instanceof Function)||!Array.isArray(y))throw new TypeError;O!==void 0&&typeof O!="boolean"&&!(O instanceof Function)&&(window.Debug.warn(`Expected isActive to be a boolean or a Function, got a ${typeof O}. Casting to boolean.`),O=!!O),A!==void 0&&typeof A!="boolean"&&!(A instanceof Function)&&(window.Debug.warn(`Expected isAvailable to be a boolean or a Function, got a ${typeof A}. Casting to boolean.`),A=!!A);const w=[];for(const B of y)if(B===null)w.push({after:null,before:void 0});else if(typeof B=="object"){if(![void 0,null].includes(B.before)&&typeof B.before!="string"||![void 0,null].includes(B.after)&&typeof B.after!="string")throw new TypeError;w.push({after:B.after,before:B.before})}else typeof B=="string"?w.push({after:B,before:void 0}):w.push({after:void 0,before:void 0});y=w;const L=["script","link","style","pre","code","iframe","object","embed","noscript","video"];if(C instanceof Element)C.querySelectorAll(L.join(",")).forEach(B=>B.remove());else{const B=h.parseFromString(b,"text/html");if(!(B instanceof Document))throw new RangeError("The html passed in for the button is not readable");if(B.querySelectorAll(L.join(",")).forEach(ae=>ae.remove()),!(((f=B==null?void 0:B.body)==null?void 0:f.firstElementChild)instanceof HTMLElement)||!B.body.firstElementChild.innerHTML.length)throw new RangeError("The html passed in for the button is not readable");C=B.body.firstElementChild}if(r(C),L.includes(C.tagName.toLowerCase()))throw new RangeError(`The element of type ${C.tagName} cannot be used as a toolbar button`);const U=C.cloneNode(!0),$=`${p.name}_${E}`;e.ipsPlugins.buttons[$]={get element(){return U},set element(B){throw new Error("Cannot update the element of an ipsPlugin button!")},get command(){return T.bind(_)},set command(B){throw new Error("Cannot update the command of an ipsPlugin button!")},get isActive(){return O instanceof Function?O.bind(_):O},set isActive(B){throw new Error("Cannot update the isActive property of an ipsPlugin button!")},get isAvailable(){return A instanceof Function?A.bind(_):A},set isAvailable(B){throw new Error("Cannot update the isAvailable property of an ipsPlugin button!")},get locations(){return y},set locations(B){throw new Error Line truncated
${g.message}`,window.Debug.warn(g)}}}const bE=gt.create({name:"ipsHomeEnd",addKeyboardShortcuts(){return{Home:({editor:e})=>(Qt(()=>{var i,o,s;const{$from:t}=e.state.selection,n=t.pos-t.parentOffset;let r=t.pos;for(;r>n;){const a=e.state.doc.slice(r-1,r);if(((i=a.content.content[0])==null?void 0:i.textContent)===`
`||((s=(o=a.content.content[0])==null?void 0:o.type)==null?void 0:s.name)===zu.name)break;r--}e.chain().setTextSelection(r).focus().run()},"Something went wrong handling the 'Home' key press"),!0),End:({editor:e})=>(Qt(()=>{var i,o,s;const{$to:t}=e.state.selection,n=[...t.path].reverse()[3]+t.parent.nodeSize-1;let r=t.pos;for(;r<n;){const a=e.state.doc.slice(r,r+1);if(((i=a.content.content[0])==null?void 0:i.textContent)===`
`||((s=(o=a.content.content[0])==null?void 0:o.type)==null?void 0:s.name)===zu.name)break;r++}e.chain().setTextSelection(r).focus().run()},"Something went wrong handling the 'End' key press"),!0)}}}),f7=gt.create({name:"IPSSimpleRichText",addProseMirrorPlugins(){return[new Xe({key:new Qe("ipsSimpleRichTextPlugin"),filterTransaction:e=>!(this.editor.options.lengthFunction instanceof Function&&typeof this.editor.options.maxLength=="number"&&this.editor.options.lengthFunction(td(e.doc.content,this.editor.schema))>this.editor.options.maxLength),appendTransaction:(e,t,n)=>{const r=[];let i;const{from:o,to:s}=n.selection;n.doc.descendants((l,u)=>{var p,_;if(typeof l.textContent=="string"&&!l.textContent&&!l.isInline){const f=n.doc.resolve(u),g=m7(f,n.doc),h=g7(f,n.doc);if([o,s].some(E=>g.pos<E&&h.pos>E)){if(i===void 0&&e.some(E=>{var b;return(b=E.steps)==null?void 0:b.length})){let E=1,b=l;for(;(_=(p=b.content)==null?void 0:p.content)!=null&&_.length;)E++,b=b.content.content[0];i=E+u}return!1}return r.push([u,u+l.nodeSize]),!1}if(l.isInline||!l.content.content.length)return!1});const{tr:a}=n;for(const[l,u]of r.reverse())a.delete(l,u);if(i!==void 0){const l=ye.atStart(n.doc).from,u=ye.atEnd(n.doc).to,p=ye.create(n.doc,Po(i,l,u));o===p.from&&o===s||a.setSelection(p)}return a}})]},addKeyboardShortcuts(){return{Enter:({editor:e})=>{const t=e.view.dom.closest("form");if(t){let n=t.querySelector('button:is([type="submit"], :not([type]))');n||(n=document.createElement("button"),n.setAttribute("type","button"),n.setAttribute("hidden",""),t.appendChild(n),setTimeout(()=>n.documentElement===document.documentElement&&n.remove(),200)),n.click()}return!0},"Shift-Enter":({editor:e})=>(e.isActive(Fu.name)?e.commands.splitListItem(Fu.name):e.commands.splitBlock(),!1)}},onCreate(){this.editor.view.dom.addEventListener("clear",e=>{var t;this.editor.commands.setContent(((t=e.detail)==null?void 0:t.content)||"")})}});function m7(e,t){var r,i;const n=[...e.path].reverse();for(;n.length>=3;){if(n[1]>0){let o=n[2].content.content[n[1]-1],s=0;for(;o;)o=(i=(r=o.content)==null?void 0:r.content)!=null&&i.length?o.content.content[o.content.content.length-1]:null,s++;return t.resolve(e.pos-s)}n.splice(0,3)}return t.resolve(0)}function g7(e,t){var r,i;const n=[...e.path].reverse();for(;n.length>=3;){if(n[1]<n[2].content.content.length-1){let o=n[2].content.content[n[1]+1],s=0;for(;o;)s++,o=(i=(r=o.content)==null?void 0:r.content)==null?void 0:i[0];return t.resolve(e.pos+n[2].content.content[n[1]].nodeSize+s)}n.splice(0,3)}return t.resolve(t.nodeSize-2)}const h7=tt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",Ke(this.options.HTMLAttributes,e),0]}}),E7=tt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",Ke(this.options.HTMLAttributes,e),0]}}),S7=tt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",Ke(this.options.HTMLAttributes,e),0]}}),T7=gt.create({name:"ipsClearNewLine",addOptions(){return{removeNewLinesBefore:[]}},addStorage(){return{observedNodes:[cn.name,nr.name,ul.name,to.name,ny.name,ct.name]}},onCreate(){this.options.removeNewLinesBefore.length&&(this.storage.observedNodes=[...new Set([...this.storage.observedNodes,...this.options.removeNewLinesBefore])])},addKeyboardShortcuts(){return{Backspace:({editor:e})=>{var o,s,a,l,u,p,_;const{observedNodes:t}=this.storage;if(!(t!=null&&t.length))return;const n=e.state.selection;if(!n.empty)return;const r=n.$from.parent;if(!r||r.type.name!==Bt.name)return;const i=[...n.$from.path].reverse();if(r.content.size){if(!((u=(l=r==null?void 0:r.content)==null?void 0:l.content)!=null&&u.length)||r.content.content.length<2||((p=n.$from.nodeAfter)==null?void 0:p.type.name)!==zu.name||!t.includes((_=r.content.content[n.$from.parentOffset+1])==null?void 0:_.type.name))return;const f=i[1];let g;if(f!==0){if(!t.includes(r.content.content[f-1]))return;g=n.from-r.content.content[f-1].nodeSize}else{const h=i[5],E=i[4],b=h.type.name===ul.name?1:0;E>b&&t.includes(h.content.content[E-1].type.name)&&(g=i[3]-h.content.content[E-1].nodeSize)}return(typeof g!="number"||Number.isNaN(g))&&(g=n.from),e.chain().deleteRange({from:n.from,to:n.from+1}).setNodeSelection(g).run(),!0}else{const f=i[5],g=i[4];if(!f||g===void 0)return;co Line truncated
`);return n.chain().insertContentAt({from:a,to:h},{type:cn.name,attrs:_,content:[{type:"text",text:E}]}).setNodeSelection(a)}}}}),y7=tt.create({name:"IPSLazyLoadLegacy",parseHTML(){return[{tag:"*",getAttrs:e=>(window.ips.utils.lazyload.parseLazyLoadElements(e,!1),!1)}]},renderHTML(){return window.Debug.warn("The IPSLazyLoadLegacy node fixer is being rendered as HTML, but should never exist in the ProseMirror Node tree. This will create one empty <i-lazy-load-dummy-element> wrapper"),["i-lazy-load-dummy-element",0]},priority:1e4});function C7(e){var n,r,i,o,s,a,l,u,p,_,f,g,h,E,b,T,y;if(e.simpleRichText){const C=[bi,TE,T_,Bt,Fu,cA,kA,PA,FA,eo,rs,HA,$f,YA,f7];return window.navigator.platform==="MacIntel"&&C.push(bE),C}if(e.codeMode){const C=[cn.configure({defaultLanguage:"xml",...e,lowlight:Pu}),bi,TE,T_.extend({content:cn.name})];return window.navigator.platform==="MacIntel"&&C.push(bE),C}const t=[Bt,tZ,kA,PA,ek.extend({addInputRules(){var C;return(C=this.parent)==null?void 0:C.call(this).filter(O=>O.find.test("(c)")||O.find.test("(r)")||O.find.test("(tm)"))}}),T_,eo,rs,cA,cn.extend({addNodeView(){return Ml(z6,{update:()=>{}})}}).configure({lowlight:Pu,defaultLanguage:"plaintext",allowedLanguages:e.allowedLanguages&&Symbol.iterator in e.allowedLanguages?e.allowedLanguages:null}),We,b7,YA,FA,nr.configure({inline:!0,allowExternal:!((n=e.restrictions)!=null&&n.has("external_image")),float:!((r=e.restrictions)!=null&&r.has("float"))}),dl,Bu,Uu,bi,Fu,Yu,ny,id,TE,CZ,HA,$f,o7,Us,ul.configure({float:!((i=e.restrictions)!=null&&i.has("float"))}),_Z,Hu,(o=e.restrictions)!=null&&o.has("external_embed")&&((s=e.restrictions)!=null&&s.has("internal_embed"))?null:to.configure({internalEmbeds:!((a=e.restrictions)!=null&&a.has("internal_embed")),externalEmbeds:!((l=e.restrictions)!=null&&l.has("external_embed")),externalVideos:!((u=e.restrictions)!=null&&u.has("external_video")),externalImages:!((p=e.restrictions)!=null&&p.has("external_image")),ogEmbed:!((_=e.restrictions)!=null&&_.has("og_embed"))}),Bo.configure({types:I6(e)}),e[En.name]?En.configure(e[En.name]):En,zu.extend({addKeyboardShortcuts(){var O;const C={...(O=this.parent)==null?void 0:O.call(this)};return delete C["Mod-Enter"],C},renderText(){return`
`}}),...(f=e.restrictions)!=null&&f.has("tables")?[!1]:[PL.configure({resizable:!0,cellMinWidth:((g=e.table)==null?void 0:g.cellMinWidth)||20}),h7,E7,S7],UL,T7].filter(C=>!!C);return window.navigator.platform==="MacIntel"&&t.push(bE),e.autoSaveKey&&t.push(BL),e.postkey&&(t.push(c7),t.push(ct.configure({externalImages:!((h=e.restrictions)!=null&&h.has("external_image")),externalVideos:!((E=e.restrictions)!=null&&E.has("external_video")),float:!((b=e.restrictions)!=null&&b.has("float"))}))),(T=e.restrictions)!=null&&T.has("heading")||t.push(kr.configure({levels:(y=e.restrictions)!=null&&y.has("heading_1")?[2,3,4,5,6]:[1,2,3,4,5,6]})),t.push(y7),t}async function zA(e,t){var n,r;if(e.pluginButtonKeys=new Set,e.simpleRichText?(delete e.codeMode,e.tools={toolbar:[...RL]},e.react&&VW(e.react)):await D5(),e.restrictions&&Symbol.iterator in e.restrictions?e.restrictions=new Set(e.restrictions):(delete e.restrictions,e.restrictions=new Set),e.jQuery=e.jQuery||window.jQuery,e.editorProps={attributes:{class:e.codeMode?"":"ipsRichText"}},e.itemStates={},e.restrictions.has("native_emoji")&&!e.restrictions.has("custom_emoji")&&!await window.ips.utils.iconpicker.hasCustomEmoji()&&e.restrictions.add("custom_emoji"),e.extensions=C7(e),!(e.messagesContainer instanceof Element)&&((n=t==null?void 0:t.closest(".ipsEditor"))!=null&&n.querySelector('[data-role="editor-messages-container"]'))&&(e.messagesContainer=(r=t==null?void 0:t.closest(".ipsEditor"))==null?void 0:r.querySelector('[data-role="editor-messages-container"]')),e.codeMode)return e.tools={toolbar:["codelanguage"]},e;if(e.simpleRichText||_7(e,e.extensions),e.stockrepliesenabled){const i=await ey();Object.keys(i).length?window.Debug.log("Loaded stock replies"):(e.stockrepliesenabled=!1,window.Debug.log("No stock replies, disabling the button"))}if(!e.codeMode){for(const i in e.tools)e.tools[i]=e.tools[i].filter(o=>o==="giphy"&&!e.giphyenabled||o==="stockreply"&&!e.stockrepliesenabled?!1:!(e.hidebuttons instanceof Array&&e.hidebuttons.includes(o)));e.parseOptions=e.parseOptions||{},e.parseOptions.preserveWhitespace=!1}return e.tools.toolbar&&e.tools.toolbar[0]!=="block"&&(e.tools.toolbar=["block",...e.tools.toolbar.filter(i=>i!=="block")]),e}let VA=!1;function R7(){if(!VA){for(const e of["click","focus","keydown","keyup"])document.addEventListener(e,t=>{var n,r,i;(r=(n=t.target)==null?void 0:n.closest)!=null&&r.call(n,".ipsEditor__toolbar-item--unavailable")&&(t.preventDefault(),t.stopPropagation(),(i=t.stopImmediatePropagation)==null||i.call(t))},{capture:!0});VA=!0}}setTimeout(()=>window.ips.createModule("ips.utils.tiptap",()=>{const e=()=>({tools:{toolbar:["block","insert","bold","italic","underline","size","color","link","icon","stockreply","giphy","clear","format","tableOptions"]},allowedIframeDomains:window.ips.getSetting("allowedIframeDomains")||[],restrictions:new Set});return document.dispatchEvent(new CustomEvent("ipsTiptapLoaded")),{editorInstance(t,n={}){const r=yE.createRoot(t),i=fr.debounce((o,s)=>{s([o,r]),o instanceof Ux&&o.options.name&&setTimeout(()=>o.options.jQuery(o.view.dom.closest("[data-ipseditorv5]")).trigger("editorWidgetInitialized",{id:o.options.name}))},10,{leading:!1});return R7(),new Promise(o=>{zA({...e(),...n},t).then(s=>{r.render(N.jsx(it.StrictMode,{children:N.jsx(Q8,{resolve:a=>{i(a,o)},config:s})}))})})},allCodeLanguages:Nl,async decorateSimpleRichTextConfig(t){return t.simpleRichText=!0,await zA(t)}}}));
@@ -1,217 +0,0 @@
var uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var WA={exports:{}},$f={},qA={exports:{}},He={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Vu=Symbol.for("react.element"),$B=Symbol.for("react.portal"),zB=Symbol.for("react.fragment"),VB=Symbol.for("react.strict_mode"),WB=Symbol.for("react.profiler"),qB=Symbol.for("react.provider"),KB=Symbol.for("react.context"),QB=Symbol.for("react.forward_ref"),jB=Symbol.for("react.suspense"),XB=Symbol.for("react.memo"),ZB=Symbol.for("react.lazy"),jR=Symbol.iterator;function JB(e){return e===null||typeof e!="object"?null:(e=jR&&e[jR]||e["@@iterator"],typeof e=="function"?e:null)}var KA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},QA=Object.assign,jA={};function Ol(e,t,n){this.props=e,this.context=t,this.refs=jA,this.updater=n||KA}Ol.prototype.isReactComponent={};Ol.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ol.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function XA(){}XA.prototype=Ol.prototype;function uT(e,t,n){this.props=e,this.context=t,this.refs=jA,this.updater=n||KA}var dT=uT.prototype=new XA;dT.constructor=uT;QA(dT,Ol.prototype);dT.isPureReactComponent=!0;var XR=Array.isArray,ZA=Object.prototype.hasOwnProperty,pT={current:null},JA={key:!0,ref:!0,__self:!0,__source:!0};function eI(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)ZA.call(t,r)&&!JA.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Vu,type:e,key:o,ref:s,props:i,_owner:pT.current}}function eG(e,t){return{$$typeof:Vu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function _T(e){return typeof e=="object"&&e!==null&&e.$$typeof===Vu}function tG(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ZR=/\/+/g;function Kg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tG(""+e.key):t.toString(36)}function Jp(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Vu:case $B:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Kg(s,0):r,XR(i)?(n="",e!=null&&(n=e.replace(ZR,"$&/")+"/"),Jp(i,t,n,"",function(u){return u})):i!=null&&(_T(i)&&(i=eG(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(ZR,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",XR(e))for(var a=0;a<e.length;a++){o=e[a];var l=r+Kg(o,a);s+=Jp(o,t,n,l,i)}else if(l=JB(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+Kg(o,a++),s+=Jp(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function ip(e,t,n){if(e==null)return e;var r=[],i=0;return Jp(e,r,"","",function(o){return t.call(n,o,i++)}),r}function nG(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Yn={current:null},e_={transition:null},rG={ReactCurrentDispatcher:Yn,ReactCurrentBatchConfig:e_,ReactCurrentOwner:pT};function tI(){throw Error("act(...) is not supported in production builds of React.")}He.Children={map:ip,forEach:function(e,t,n){ip(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ip(e,function(){t++}),t},toArray:function(e){return ip(e,function(t){return t})||[]},only:function(e){if(!_T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};He.Component=Ol;He.Fragment=zB;He.Profiler=WB;He.PureComponent=uT;He.StrictMode=VB;He.Suspense=jB;He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rG;He.act=tI;He.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=QA({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=pT.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)ZA.call(t,l)&&!JA.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Vu,type:e.type,key:i,ref:o,props:r,_owner:s}};He.createContext=function(e){return e={$$typeof:KB,_currentValue:e,_currentValue2:e,_threadCountLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var iG=k,oG=Symbol.for("react.element"),sG=Symbol.for("react.fragment"),aG=Object.prototype.hasOwnProperty,lG=iG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cG={key:!0,ref:!0,__self:!0,__source:!0};function nI(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)aG.call(t,r)&&!cG.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:oG,type:e,key:o,ref:s,props:i,_owner:lG.current}}$f.Fragment=sG;$f.jsx=nI;$f.jsxs=nI;WA.exports=$f;var N=WA.exports,TE={},rI={exports:{}},Er={},iI={exports:{}},oI={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(w,G){var q=w.length;w.push(G);e:for(;0<q;){var V=q-1>>>1,te=w[V];if(0<i(te,G))w[V]=G,w[q]=te,q=V;else break e}}function n(w){return w.length===0?null:w[0]}function r(w){if(w.length===0)return null;var G=w[0],q=w.pop();if(q!==G){w[0]=q;e:for(var V=0,te=w.length,Ee=te>>>1;V<Ee;){var be=2*(V+1)-1,ye=w[be],Ie=be+1,et=w[Ie];if(0>i(ye,q))Ie<te&&0>i(et,ye)?(w[V]=et,w[Ie]=q,V=Ie):(w[V]=ye,w[be]=q,V=be);else if(Ie<te&&0>i(et,q))w[V]=et,w[Ie]=q,V=Ie;else break e}}return G}function i(w,G){var q=w.sortIndex-G.sortIndex;return q!==0?q:w.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],p=1,_=null,f=3,g=!1,h=!1,E=!1,b=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(w){for(var G=n(u);G!==null;){if(G.callback===null)r(u);else if(G.startTime<=w)r(u),G.sortIndex=G.expirationTime,t(l,G);else break;G=n(u)}}function O(w){if(E=!1,R(w),!h)if(n(l)!==null)h=!0,ue(I);else{var G=n(u);G!==null&&L(O,G.startTime-w)}}function I(w,G){h=!1,E&&(E=!1,T($),$=-1),g=!0;var q=f;try{for(R(G),_=n(l);_!==null&&(!(_.expirationTime>G)||w&&!se());){var V=_.callback;if(typeof V=="function"){_.callback=null,f=_.priorityLevel;var te=V(_.expirationTime<=G);G=e.unstable_now(),typeof te=="function"?_.callback=te:_===n(l)&&r(l),R(G)}else r(l);_=n(l)}if(_!==null)var Ee=!0;else{var be=n(u);be!==null&&L(O,be.startTime-G),Ee=!1}return Ee}finally{_=null,f=q,g=!1}}var D=!1,M=null,$=-1,H=5,B=-1;function se(){return!(e.unstable_now()-B<H)}function de(){if(M!==null){var w=e.unstable_now();B=w;var G=!0;try{G=M(!0,w)}finally{G?pe():(D=!1,M=null)}}else D=!1}var pe;if(typeof y=="function")pe=function(){y(de)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,ee=ce.port2;ce.port1.onmessage=de,pe=function(){ee.postMessage(null)}}else pe=function(){b(de,0)};function ue(w){M=w,D||(D=!0,pe())}function L(w,G){$=b(function(){w(e.unstable_now())},G)}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(w){w.callback=null},e.unstable_continueExecution=function(){h||g||(h=!0,ue(I))},e.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<w?Math.floor(1e3/w):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(w){switch(f){case 1:case 2:case 3:var G=3;break;default:G=f}var q=f;f=G;try{return w()}finally{f=q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(w,G){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var q=f;f=w;try{return G()}finally{f=q}},e.unstable_scheduleCallback=function(w,G,q){var V=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?V+q:V):q=V,w){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=q+te,w={id:p++,callback:G,priorityLevel:w,startTime:q,expirationTime:te,sortIndex:-1},q>V?(w.sortIndex=q,t(u,w),n(l)===null&&w===n(u)&&(E?(T($),$=-1):E=!0,L(O,q-V))):(w.sortIndex=te,t(l,w),h||g||(h=!0,ue(I))),w},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(w){var G=f;return function(){var q=f;f=G;try{return w.apply(this,arguments)}finally{f=q}}}})(oI);iI.exports=oI;var uG=iI.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var dG=k,hr=uG;function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var sI=new Set,ou={};function sa(e,t){dl(e,t),dl(e+"Capture",t)}function dl(e,t){for(ou[e]=t,e=0;e<t.length;e++)sI.add(t[e])}var ji=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bE=Object.prototype.hasOwnProperty,pG=/^[: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]*$/,JR={},eN={};function _G(e){return bE.call(eN,e)?!0:bE.call(JR,e)?!1:pG.test(e)?eN[e]=!0:(JR[e]=!0,!1)}function fG(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mG(e,t,n,r){if(t===null||typeof t>"u"||fG(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Hn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var cn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cn[e]=new Hn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];cn[t]=new Hn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cn[e]=new Hn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cn[e]=new Hn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){cn[e]=new Hn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cn[e]=new Hn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cn[e]=new Hn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cn[e]=new Hn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cn[e]=new Hn(e,5,!1,e.toLowerCase(),null,!1,!1)});var fT=/[\-:]([a-z])/g;function mT(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(fT,mT);cn[t]=new Hn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(fT,mT);cn[t]=new Hn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(fT,mT);cn[t]=new Hn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cn[e]=new Hn(e,1,!1,e.toLowerCase(),null,!1,!1)});cn.xlinkHref=new Hn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cn[e]=new Hn(e,1,!1,e.toLowerCase(),null,!0,!0)});function gT(e,t,n,r){var i=cn.hasOwnProperty(t)?cn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!== Line truncated
`+Qg+e}var jg=!1;function Xg(e,t){if(!e||jg)return"";jg=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),o=r.stack.split(`
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var l=`
`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{jg=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Oc(e):""}function gG(e){switch(e.tag){case 5:return Oc(e.type);case 16:return Oc("Lazy");case 13:return Oc("Suspense");case 19:return Oc("SuspenseList");case 0:case 2:case 15:return e=Xg(e.type,!1),e;case 11:return e=Xg(e.type.render,!1),e;case 1:return e=Xg(e.type,!0),e;default:return""}}function NE(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ua:return"Fragment";case Pa:return"Portal";case yE:return"Profiler";case hT:return"StrictMode";case CE:return"Suspense";case RE:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case lI:return(e.displayName||"Context")+".Consumer";case aI:return(e._context.displayName||"Context")+".Provider";case ET:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ST:return t=e.displayName||null,t!==null?t:NE(e.type)||"Memo";case bo:t=e._payload,e=e._init;try{return NE(e(t))}catch{}}return null}function hG(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return NE(t);case 8:return t===hT?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function EG(e){var t=uI(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sp(e){e._valueTracker||(e._valueTracker=EG(e))}function dI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=uI(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function b_(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function vE(e,t){var n=t.checked;return Nt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function nN(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function pI(e,t){t=t.checked,t!=null&&gT(e,"checked",t,!1)}function OE(e,t){pI(e,t);var n=Jo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?AE(e,t.type,n):t.hasOwnProperty("defaultValue")&&AE(e,t.type,Jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rN(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function AE(e,t,n){(t!=="number"||b_(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ac=Array.isArray;function Xa(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Jo(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function IE(e,t){if(t.dan Line truncated
`).replace(AY,"")}function fp(e,t,n){if(t=vN(t),vN(e)!==t&&n)throw Error(ie(425))}function I_(){}var HE=null,$E=null;function zE(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var VE=typeof setTimeout=="function"?setTimeout:void 0,IY=typeof clearTimeout=="function"?clearTimeout:void 0,ON=typeof Promise=="function"?Promise:void 0,wY=typeof queueMicrotask=="function"?queueMicrotask:typeof ON<"u"?function(e){return ON.resolve(null).then(e).catch(DY)}:VE;function DY(e){setTimeout(function(){throw e})}function uh(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),uu(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);uu(t)}function $o(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function AN(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Il=Math.random().toString(36).slice(2),hi="__reactFiber$"+Il,mu="__reactProps$"+Il,Xi="__reactContainer$"+Il,WE="__reactEvents$"+Il,xY="__reactListeners$"+Il,MY="__reactHandles$"+Il;function Ms(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xi]||n[hi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=AN(e);e!==null;){if(n=e[hi])return n;e=AN(e)}return t}e=n,n=e.parentNode}return null}function Ku(e){return e=e[hi]||e[Xi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ya(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function Kf(e){return e[mu]||null}var qE=[],Ha=-1;function ls(e){return{current:e}}function gt(e){0>Ha||(e.current=qE[Ha],qE[Ha]=null,Ha--)}function ct(e,t){Ha++,qE[Ha]=e.current,e.current=t}var es={},Tn=ls(es),Jn=ls(!1),Qs=es;function pl(e,t){var n=e.type.contextTypes;if(!n)return es;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function er(e){return e=e.childContextTypes,e!=null}function w_(){gt(Jn),gt(Tn)}function IN(e,t,n){if(Tn.current!==es)throw Error(ie(168));ct(Tn,t),ct(Jn,n)}function ew(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ie(108,hG(e)||"Unknown",i));return Nt({},n,r)}function D_(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||es,Qs=Tn.current,ct(Tn,e),ct(Jn,Jn.current),!0}function wN(e,t,n){var r=e.stateNode;if(!r)throw Error(ie(169));n?(e=ew(e,t,Qs),r.__reactInternalMemoizedMergedChildContext=e,gt(Jn),gt(Tn),ct(Tn,e)):gt(Jn),ct(Jn,n)}var Hi=null,Qf=!1,dh=!1;function tw(e){Hi===null?Hi=[e]:Hi.push(e)}function LY(e){Qf=!0,tw(e)}function cs(){if(!dh&&Hi!==null){dh=!0;var e=0,t=Je;try{var n=Hi;for(Je=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Hi=null,Qf=!1}catch(i){throw Hi!==null&&(Hi=Hi.slice(e+1)),vI(bT,cs),i}finally{Je=t,dh=!1}}return null}var $a=[],za=0,x_=null,M_=0,xr=[],Mr=0,js=null,zi=1,Vi="";function Os(e,t){$a[za++]=M_,$a[za++]=x_,x_=e,M_=t}function nw(e,t,n){xr[Mr++]=zi,xr[Mr++]=Vi,xr[Mr++]=js,js=e;var r=zi;e=Vi;var i=32-Jr(r)-1;r&=~(1<<i),n+=1;var o=32-Jr(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,zi=1<<32-Jr(t)+i|n<<i|r,Vi=o+e}else zi=1<<o|n<<i|r,Vi=e}function wT(e){e.return!==null&&(Os(e,1),nw(e,1,0))}function DT(e){for(;e===x_;)x_=$a[--za],$a[za]=null,M_=$a[--za],$a[za]=null;for(;e===js;)js=xr[--Mr],xr[Mr]=null,Vi=xr[--Mr],xr[Mr]=null,zi=xr[--Mr],xr[Mr]=null}var gr=null,fr=null,St=!1,jr=null;function rw(e,t){var n=kr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function DN(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,gr=e,fr=$o(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,gr=e,fr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=js!==null?{id:zi,overflow:Vi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=kr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,gr=e,fr=null,!0):!1;default:return!1}}function KE(e){return(e.mode&1)!==0&&(e.flags&128)===0}function QE(e){if(St){var t=fr;if(t){var n=t;if(!DN(e,t)){if(KE(e))throw Error(ie(418));t=$o(n.nextSibling);var r=gr;t&&DN(e,t)?rw(r,n):(e.flags=e.flags&-4097|2,St=!1,gr=e)}}else{if(KE(e))throw Error(ie(418));e.flags=e.flags&-4097|2,St=!1,gr=e}}}function xN(e){ Line truncated
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function gh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function JE(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var $Y=typeof WeakMap=="function"?WeakMap:Map;function ww(e,t,n){n=Ki(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Y_||(Y_=!0,cS=r),JE(e,t)},n}function Dw(e,t,n){n=Ki(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){JE(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){JE(e,t),typeof r!="function"&&(Vo===null?Vo=new Set([this]):Vo.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function GN(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $Y;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=rH.bind(null,e,t,n),t.then(e,e))}function YN(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function HN(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ki(-1,1),t.tag=2,zo(n,t,1))),n.lanes|=1),e)}var zY=to.ReactCurrentOwner,Zn=!1;function Ln(e,t,n,r){t.child=e===null?sw(t,null,n,r):fl(t,e.child,n,r)}function $N(e,t,n,r,i){n=n.render;var o=t.ref;return tl(t,i),r=HT(e,t,n,r,o,i),n=$T(),e!==null&&!Zn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ji(e,t,i)):(St&&n&&wT(t),t.flags|=1,Ln(e,t,r,i),t.child)}function zN(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!JT(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,xw(e,t,o,r,i)):(e=u_(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:pu,n(s,r)&&e.ref===t.ref)return Ji(e,t,i)}return t.flags|=1,e=qo(o,r),e.ref=t.ref,e.return=t,t.child=e}function xw(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(pu(o,r)&&e.ref===t.ref)if(Zn=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Zn=!0);else return t.lanes=e.lanes,Ji(e,t,i)}return eS(e,t,n,r,i)}function Mw(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ct(qa,dr),dr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ct(qa,dr),dr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ct(qa,dr),dr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ct(qa,dr),dr|=r;return Ln(e,t,i,n),t.child}function Lw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function eS(e,t,n,r,i){var o=er(n)?Qs:Tn.current;return o=pl(t,o),tl(t,i),n=HT(e,t,n,r,o,i),r=$T(),e!==null&&!Zn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ji(e,t,i)):(St&&r&&wT(t),t.flags|=1,Ln(e,t,n,i),t.child)}function VN(e,t,n,r,i){if(er(n)){var o=!0;D_(t)}else o=!1;if(tl(t,i),t.stateNode===null)a_(e,t),Iw(t,n,r),ZE(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Br(u):(u=er(n)?Qs:Tn.current,u=pl(t,u));var p=n.getDerivedStateFromProps,_=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function";_||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&BN(t,s,r,u),yo=!1;var f=t.memoizedState;s.state=f,P_(t,r,s,i),l=t.memoizedState,a!==r||f!==l||Jn.current||yo?(typeof p=="function"&&(XE(t,n,p,r),l=t.memoizedState),(a=yo||FN(t,n,a,r,f,l,u))?(_||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,lw(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Kr(t.type,a),s.props=u,_=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Br(l):(l=er(n)?Qs:Tn.current,l=pl(t,l));var g=n.getDerivedStateFromProps;(p=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==_||f!==l)&&BN(t,s,r,l),yo=!1,f=t.memoizedState,s.state=f,P_(t,r,s,i);var h=t.memoizedS Line truncated
`)}}ea.empty=new ea(!0);class TH{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function pD(e){let t=[];do t.push(bH(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function bH(e){let t=[];do t.push(yH(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function yH(e){let t=NH(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=CH(e,t);else break;return t}function sv(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function CH(e,t){let n=sv(e),r=n;return e.eat(",")&&(e.next!="}"?r=sv(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function RH(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.isInGroup(t)&&i.push(s)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function NH(e){if(e.eat("(")){let t=pD(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=RH(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function vH(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,l){let u={term:l,to:a};return t[s].push(u),u}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(o(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=o(s.exprs[l],a);if(l==s.exprs.length-1)return u;i(u,a=n())}else if(s.type=="star"){let l=n();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u<s.min;u++){let p=n();i(o(s.expr,l),p),l=p}if(s.max==-1)i(o(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let p=n();r(l,p),i(o(s.expr,l),p),l=p}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function _D(e,t){return t-e}function av(e,t){let n=[];return r(t),n.sort(_D);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&n.indexOf(l)==-1&&r(l)}}}function OH(e){let t=Object.create(null);return n(av(e,0));function n(r){let i=[];r.forEach(s=>{e[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let p=0;p<i.length;p++)i[p][0]==a&&(u=i[p][1]);av(e,l).forEach(p=>{u||i.push([a,u=[]]),u.indexOf(p)==-1&&u.push(p)})})});let o=t[r.join(",")]=new ea(r.indexOf(e.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(_D);o.next.push({type:i[s][0],next:t[a.join(",")]||n(a)})}return o}}function AH(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:u}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(u)==-1&&r.push(u)}o&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function fD(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function mD(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function gD(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let o=e[i];o.validate&&o.validate(t[i])}}function hD(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new wH(e,r,t[r]);return n}let lv=class ED{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=hD(t,r.attrs),this.defaultAttrs=fD(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ea.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultA Line truncated
`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],a=t.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,o=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),a;bD.hasOwnProperty(s)&&this.parser.normalizeLists&&LH(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,r));e:if(l?l.ignore:MH.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let u,p=this.needsBlock;if(TD.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),u=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let _=l&&l.skip?n:this.readStyles(t,n);_&&this.addAll(t,_),u&&this.sync(o),this.needsBlock=p}else{let u=this.readStyles(t,n);u&&this.addElementByRule(t,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r)||this.leafFallback(t,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}o&&this.sync(a)&&this.open--}addAll(t,n,r,i){let o=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(s,n);this.findAtPoint(t,o)}findPlace(t,n){let r,i;for(let o=this.open;o>=0;o--){let s=this.nodes[o],a=s.findWrapping(t);if(a&&(!r||r.length>a.length)&&(r=a,i=s,!a.length)||s.solid)break}if(!r)return null;this.sync(i);for(let o=0;o<r.length;o++)n=this.enterInner(r[o],null,n,!1);return n}insertNode(t,n){if(t.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let r=this.findPlace(t,n);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(t.type));let o=it.none;for(let s of r.concat(t.marks))(i.type?i.type.allowsMarkType(s.type):_v(s.type,t.type))&&(o=s.addToSet(o));return i.content.push(t.mark(o)),!0}return!1}enter(t,n,r,i){let o=this.findPlace(t.create(n),r);return o&&(o=this.enterInner(t,n,r,!0,i)),o}enterInner(t,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=uv(t,o,s.options);s.options&Kc&&s.content.length==0&&(a|=Kc);let l=it.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):_v(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new yp(t,n,l,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Cu)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let p=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!p||p.name!=u&&!p.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function LH(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&bD.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function kH(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Line truncated
`))}})}function KH(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function QH(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Xt(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new ae(Z.from(s),0,0),1,!0))}function il(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,p=n-2;u>o;u--,p--){let _=i.node(u),f=i.index(u);if(_.type.spec.isolating)return!1;let g=_.content.cutByIndex(f,_.childCount),h=r&&r[p+1];h&&(g=g.replaceChild(0,h.type.create(h.attrs)));let E=r&&r[p]||_;if(!_.canReplace(f+1,_.childCount)||!E.type.validContent(g))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function jH(e,t,n=1,r){let i=e.doc.resolve(t),o=Z.empty,s=Z.empty;for(let a=i.depth,l=i.depth-n,u=n-1;a>l;a--,u--){o=Z.from(i.node(a).copy(o));let p=r&&r[u];s=Z.from(p?p.type.create(p.attrs,s):i.node(a).copy(s))}e.step(new Kt(t,t,new ae(o.append(s),n,n),!0))}function us(e,t){let n=e.resolve(t),r=n.index();return ID(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function XH(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let o=t.child(i),s=o.type==r?e.type.schema.nodes.text:o.type;if(n=n.matchType(s),!n||!e.type.allowsMarks(o.marks))return!1}return n.validEnd}function ID(e,t){return!!(e&&t&&!e.isLeaf&&XH(e,t))}function sm(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,s,a=r.index(i);if(i==r.depth?(o=r.nodeBefore,s=r.nodeAfter):n>0?(o=r.node(i+1),a++,s=r.node(i).maybeChild(a)):(o=r.node(i).maybeChild(a-1),s=r.node(i+1)),o&&!o.isTextblock&&ID(o,s)&&r.node(i).canReplace(a,a+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function ZH(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,o=e.doc.resolve(t-n),s=o.node().type;if(i&&s.inlineContent){let p=s.whitespace=="pre",_=!!s.contentMatch.matchType(i);p&&!_?r=!1:!p&&_&&(r=!0)}let a=e.steps.length;if(r===!1){let p=e.doc.resolve(t+n);AD(e,p.node(),p.before(),a)}s.inlineContent&&ob(e,t+n-1,s,o.node().contentMatchAt(o.index()),r==null);let l=e.mapping.slice(a),u=l.map(t-n);if(e.step(new Kt(u,l.map(t+n,-1),ae.empty,!0)),r===!0){let p=e.doc.resolve(u);OD(e,p.node(),p.before(),e.steps.length)}return e}function JH(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function e$(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),u=r.node(s),p=!1;if(o==1)p=u.canReplace(l,l,i);else{let _=u.contentMatchAt(l).findWrapping(i.firstChild.type);p=_&&u.canReplaceWith(l,l,_[0])}if(p)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function am(e,t,n=t,r=ae.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return wD(i,o,r)?new Kt(t,n,r):new t$(i,o,r).fit()}function wD(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class t${constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Z.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=Z.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new ae(o,s,a);return t>-1?new Xt(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Kt(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n+ Line truncated
`),_&&h==g.nodeValue.length)for(let E=g,b;E;E=E.parentNode){if(b=E.nextSibling){b.nodeName=="BR"&&(a=l={node:b.parentNode,offset:sn(b)+1});break}let T=E.pmViewDesc;if(T&&T.node&&T.node.isBlock)break}}else{let E=g.childNodes[h-1];_=E&&(E.nodeName=="BR"||E.contentEditable=="false")}}if(ii&&p.focusNode&&p.focusNode!=l.node&&p.focusNode.nodeType==1){let g=p.focusNode.childNodes[p.focusOffset];g&&g.contentEditable=="false"&&(i=!0)}if(!(i||_&&Fn)&&ta(a.node,a.offset,p.anchorNode,p.anchorOffset)&&ta(l.node,l.offset,p.focusNode,p.focusOffset))return;let f=!1;if((u.extend||t==n)&&!_){u.collapse(a.node,a.offset);try{t!=n&&u.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(t>n){let h=a;a=l,l=h}let g=document.createRange();g.setEnd(l.node,l.offset),g.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(g)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?t<=s&&n>=r:t<s&&n>r){let a=r+o.border,l=s-o.border;if(t>=a&&n<=l){this.dirty=t==r||n==s?Ps:Dv,t==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Ci:o.markDirty(t-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Ps:Ci}r=s}this.dirty=Ps}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Ps:Dv;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class VD extends Ju{constructor(t,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==Fr&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class L$ extends Ju{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class na extends Ju{constructor(t,n,r,i,o){super(t,[],r,i),this.mark=n,this.spec=o}static create(t,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return(!s||!s.dom)&&(s=la.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new na(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Ci||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Ci&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Fr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Fr}}slice(t,n,r){let i=na.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=NS(o,n,s,r)),t>0&&(o=NS(o,0,t,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class jo extends Ju{constructor(t,n,r,i,o,s,a,l,u){super(t,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,o,s){let a=o.nodeViews[n.type.name],l,u=a&&a(n,o,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,i),p=u&&u.dom,_=u&&u.contentDOM;if(n.isText){if(!p)p=document.createTextNode(n.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:_}=la.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!_&&!n.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),n.type.spec.draggable&&(p.draggable=!0));let f=p;return p=QD(p,r,n),u?l=new k$(t,n,r,i,p,_||null,f,u,o,s+1):n.isText?new um(t,n,r,i,p,f,o):new jo(t,n,r,i,p,_||null,f,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Z.empty)}return t}matchesNode(t,n,r){return this.dirty==Fr&&t.eq(this. Line truncated
`);return{dom:l,text:f,slice:t}}function tx(e,t,n,r,i){let o=i.parent.type.spec.code,s,a;if(!n&&!t)return null;let l=t&&(r||o||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,o||r,e)}),o)return t?new ae(Z.from(e.state.schema.text(t.replace(/\r\n?/g,`
`))),0,0):ae.empty;let _=e.someProp("clipboardTextParser",f=>f(t,i,r,e));if(_)a=_;else{let f=i.marks(),{schema:g}=e.state,h=la.fromSchema(g);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(E=>{let b=s.appendChild(document.createElement("p"));E&&b.appendChild(h.serializeNode(g.text(E,f)))})}}else e.someProp("transformPastedHTML",_=>{n=_(n,e)}),s=n2(n),Zu&&r2(s);let u=s&&s.querySelector("[data-pm-slice]"),p=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let _=+p[3];_>0;_--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||qc.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||p),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!J$.test(f.parentNode.nodeName)?{ignore:!0}:null}})),p)a=i2(zv(a,+p[1],+p[2]),p[4]);else if(a=ae.maxOpen(e2(a.content,i),!0),a.openStart||a.openEnd){let _=0,f=0;for(let g=a.content.firstChild;_<a.openStart&&!g.type.spec.isolating;_++,g=g.firstChild);for(let g=a.content.lastChild;f<a.openEnd&&!g.type.spec.isolating;f++,g=g.lastChild);a=zv(a,_,f)}return e.someProp("transformPasted",_=>{a=_(a,e)}),a}const J$=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function e2(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),o,s=[];if(e.forEach(a=>{if(!s)return;let l=i.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&o.length&&rx(l,o,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=ix(s[s.length-1],o.length));let p=nx(a,l);s.push(p),i=i.matchType(p.type),o=l}}),s)return Z.from(s)}return e}function nx(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Z.from(e));return e}function rx(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=rx(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Z.from(nx(n,e,i+1))))}}function ix(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,ix(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Z.empty,!0);return e.copy(n.append(r))}function AS(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(o=0),i<r-1&&(a=AS(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Z.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function zv(e,t,n){return t<e.openStart&&(e=new ae(AS(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new ae(AS(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const ox={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Vv=null;function sx(){return Vv||(Vv=document.implementation.createHTMLDocument("title"))}let wh=null;function t2(e){let t=window.trustedTypes;return t?(wh||(wh=t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),wh.createHTML(e)):e}function n2(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=sx().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&ox[r[1].toLowerCase()])&&(e=i.map(o=>"<"+o+">").join("")+e+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=t2(e),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function r2(e){let t=e.querySelectorAll(En?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function i2(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:o,openEnd:s}=e;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=Z.from(l.create(r[a+1],i)),o++,s++}return new ae(i,o,s)}const Bn={},Gn={},o2={touchstart:!0,touchmove:!0};class s2{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function a2(e){for(let t in Bn){let n=Bn[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{c2(e,r)&&!pb(e,r)&&(e.editable||!(r.type in Gn))&&n(e,r)},o2[t]?{passive:!0}:void 0)}Fn&&e.dom.addEventListener("input",()=>null), Line truncated
`).scrollIntoView()),!0)};function bx(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const lz=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=bx(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(we.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},cz=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof ti||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=bx(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(s,o.createAndFill());a.setSelection(Ce.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},uz=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(il(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&wl(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},dz=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),t&&t(e.tr.setSelection(Re.create(e.doc,i))),!0)};function pz(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||us(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function yx(e,t,n,r){let i=t.nodeBefore,o=t.nodeAfter,s,a,l=i.type.spec.isolating||o.type.spec.isolating;if(!l&&pz(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(n){let g=t.pos+o.nodeSize,h=Z.empty;for(let T=s.length-1;T>=0;T--)h=Z.from(s[T].create(null,h));h=Z.from(i.copy(h));let E=e.tr.step(new Xt(t.pos-1,g,t.pos,g,new ae(h,1,0),s.length,!0)),b=E.doc.resolve(g+2*s.length);b.nodeAfter&&b.nodeAfter.type==i.type&&us(E.doc,b.pos)&&E.join(b.pos),n(E.scrollIntoView())}return!0}let p=o.type.spec.isolating||r>0&&l?null:we.findFrom(t,1),_=p&&p.$from.blockRange(p.$to),f=_&&wl(_);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(_,f).scrollIntoView()),!0;if(u&&bl(o,"start",!0)&&bl(i,"end")){let g=i,h=[];for(;h.push(g),!g.isTextblock;)g=g.lastChild;let E=o,b=1;for(;!E.isTextblock;E=E.firstChild)b++;if(g.canReplace(g.childCount,g.childCount,E.content)){if(n){let T=Z.empty;for(let R=h.length-1;R>=0;R--)T=Z.from(h[R].copy(T));let y=e.tr.step(new Xt(t.pos-h.length,t.pos+o.nodeSize,t.pos+b,t.pos+o.nodeSize-b,new ae(T,h.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function Cx(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(t.tr.setSelection(Ce.create(t.doc,e<0?i.start(o):i.end(o)))),!0):!1}}const _z=Cx(-1),fz=Cx(1);function mz(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&sb(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function rO(e,t=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(s,a,(l,u)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let p=n.doc.resolve(u),_=p.index();i=p.parent.canReplaceWith(_,_+1,e)}})}if(!i)return!1;if(r){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];o.setBlockType(a,l,e,t)}r(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function gz(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o);if(!s)return!1;let a=r?n.tr:null;return hz(a,s,e,t)?(r&&r(a.scrollIntoView()),!0):!1}}function hz(e,t,n,r=null){let i=!1,o=t,s=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=s.resolve(t.start-2);o=new K_(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new K_(t.$from,s.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let a=sb(o,n,r,t);return a?(e&&Ez(e,t,a,i,n),!0):!1}function Ez(e,t,n,r,i){let o=Z.empty;for(let p=n.length-1;p>=0;p--)o=Z.from(n[p].type.create(n[p].attrs,o));e.step(new Xt(t.start-(r?2:0),t.end,t.start,t.end,new ae(o,0,0),n.length,!0));let s=0;for(let p=0;p<n.length;p++)n[p].type==i&&(s=p+1);let a=n.length-s,l=t.start+n.length-(r?2:0),u=t.parent;for(let p=t.startIndex,_=t.endIndex,f=!0;p<_;p++,f=!1)!f&&il(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=u.child(p).nodeSize;return e}function Sz(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type= Line truncated
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function wz(e){return Object.prototype.toString.call(e).slice(8,-1)}function Np(e){return wz(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function mm(e,t){const n={...e};return Np(e)&&Np(t)&&Object.keys(t).forEach(r=>{Np(t[r])&&Np(e[r])?n[r]=mm(e[r],t[r]):n[r]=t[r]}),n}class un{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Be(ge(this,"addOptions",{name:this.name}))),this.storage=Be(ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new un(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>mm(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new un(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Be(ge(n,"addOptions",{name:n.name})),n.storage=Be(ge(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!!!s.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const l=s.find(u=>(u==null?void 0:u.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}}function Dz(e){return typeof e=="number"}class xz{constructor(t){this.find=t.find,this.handler=t.handler}}const Mz=(e,t,n)=>{if(Sb(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=e,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function Lz(e){const{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:u,can:p}=new _m({editor:t,state:n}),_=[];return n.doc.nodesBetween(r,i,(g,h)=>{if(!g.isTextblock||g.type.spec.code)return;const E=Math.max(r,h),b=Math.min(i,h+g.content.size),T=g.textBetween(E-h,b-h,void 0,"");Mz(T,o.find,s).forEach(R=>{if(R.index===void 0)return;const O=E+R.index+1,I=O+R[0].length,D={from:n.tr.mapping.map(O),to:n.tr.mapping.map(I)},M=o.handler({state:n,range:D,match:R,commands:l,chain:u,can:p,pasteEvent:s,dropEvent:a});_.push(M)})}),_.every(g=>g!==null)}const kz=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function Pz(e){const{editor:t,rules:n}=e;let r=null,i=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:p,from:_,to:f,rule:g,pasteEvt:h})=>{const E=p.tr,b=pm({state:p,transaction:E});if(!(!Lz({editor:t,state:b,from:Math.max(_-1,0),to:f.b-1,rule:g,pasteEvent:h,dropEvent:a})||!E.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,E}};return n.map(p=>new Xe({view(_){const f=g=>{var h;r=!((h=_.dom.parentElement)===null||h===void 0)&&h.contains(g.target)?_.dom.parentElement:null};return window.addEventListener("dragstart",f),{destroy(){window.removeEventListener("dragstart",f)}}},props:{handleDOMEvents:{drop:(_,f)=>(o=r===_.dom.parentElement,a=f,!1),paste:(_,f)=>{var g;const h=(g=f.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return s=f,i=!!(h!=null&&h.includes("data-pm-slice")),!1}}},appendTransaction:(_,f,g)=>{const h=_[0],E=h.getMeta("uiEvent")==="paste"&&!i,b=h.getMeta("uiEvent")==="drop"&&!o,T=h.getMeta("applyPasteRules"),y=!!T;if(!E&&!b&&!y)return;if(y){let{text:I}=T;typeof I=="string"?I=I:I=ed(Z.from(I),g.schema);const{from:D}=T,M=D+I.length,$=kz(I);return l({rule:p,state:g,from:D,to:{b:M},pasteEvt:$})}const R=f.doc.content.findDiffStart(g.doc.content),O=f.doc.content.findDiffEnd(g.doc.content);if(!(!Dz(R)||!O||R===O.b))return l({rule:p,state:g,from:R,to:O,pasteEvt:s})}}))}function Uz(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}class Qa{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=Qa.resolve(t),this.schema=vz(this.extensions,n),this.setupExtensions()}static resolve(t){const n=Qa.sort(Qa.flatten(t)),r=Uz(n.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}' Line truncated
`,textSerializers:s={}}=n||{};let a="";return e.nodesBetween(r,i,(l,u,p,_)=>{var f;l.isBlock&&u>r&&(a+=o);const g=s==null?void 0:s[l.type.name];if(g)return p&&(a+=g({node:l,pos:u,parent:p,index:_,range:t})),!1;l.isText&&(a+=(f=l==null?void 0:l.text)===null||f===void 0?void 0:f.slice(Math.max(r,u)-u,i-u))}),a}function Ox(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const Fz=Tt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Xe({key:new Ke("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map(p=>p.$from.pos)),a=Math.max(...o.map(p=>p.$to.pos)),l=Ox(n);return vx(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),Bz=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),Gz=(e=!1)=>({commands:t})=>t.setContent("",e),Yz=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:s})=>{e.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:p}=t,_=u.resolve(p.map(l)),f=u.resolve(p.map(l+a.nodeSize)),g=_.blockRange(f);if(!g)return;const h=wl(g);if(a.type.isTextblock){const{defaultType:E}=_.parent.contentMatchAt(_.index());t.setNodeMarkup(g.start,E)}(h||h===0)&&t.lift(g,h)})}),!0},Hz=e=>t=>e(t),$z=()=>({state:e,dispatch:t})=>cz(e,t),zz=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,o.content),r.setSelection(new Ce(r.doc.resolve(s-1))),!0},Vz=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){const a=i.before(o),l=i.after(o);e.delete(a,l).scrollIntoView()}return!0}return!1},Wz=e=>({tr:t,state:n,dispatch:r})=>{const i=Jt(e,n.schema),o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const l=o.before(s),u=o.after(s);t.delete(l,u).scrollIntoView()}return!0}return!1},qz=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},Kz=()=>({state:e,dispatch:t})=>X2(e,t),Qz=()=>({commands:e})=>e.keyboardShortcut("Enter"),jz=()=>({state:e,dispatch:t})=>lz(e,t);function rf(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:Sb(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function Ax(e,t,n={}){return e.find(r=>r.type===t&&rf(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function aO(e,t,n={}){return!!Ax(e,t,n)}function Tb(e,t,n){var r;if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if((!i.node||!i.node.marks.some(p=>p.type===t))&&(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(p=>p.type===t)||(n=n||((r=i.node.marks[0])===null||r===void 0?void 0:r.attrs),!Ax([...i.node.marks],t,n)))return;let s=i.index,a=e.start()+i.offset,l=s+1,u=a+i.node.nodeSize;for(;s>0&&aO([...e.parent.child(s-1).marks],t,n);)s-=1,a-=e.parent.child(s).nodeSize;for(;l<e.parent.childCount&&aO([...e.parent.child(l).marks],t,n);)u+=e.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function ps(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const Xz=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const o=ps(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:p}=a;if(i){const _=Tb(l,o,t);if(_&&_.from<=u&&_.to>=p){const f=Ce.create(s,_.from,_.to);n.setSelection(f)}}return!0},Zz=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function Ix(e){return e instanceof Ce}function ko(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function wx(e,t=null){if(!t)return null;const n=we.atStart(e),r=we.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const i=n.from,o=r.to;return t==="all"?Ce.create(e,ko(0,i,o),ko(e.content.size,i,o)):Ce.create(e,ko(t,i,o),ko(t,i,o))}function gm(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const Jz=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};const s=()=>{gm()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(o&&e===null&&!Ix(n.state.selection))return s(),!0;const a=wx(i.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},eV=(e,t)=>n=>e.every((r,i)=>t Line truncated
position: relative;
}
.ProseMirror {
word-wrap: break-word;
white-space: pre-wrap;
white-space: break-spaces;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}
.ProseMirror [contenteditable="false"] {
white-space: normal;
}
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
white-space: pre-wrap;
}
.ProseMirror pre {
white-space: pre-wrap;
}
img.ProseMirror-separator {
display: inline !important;
border: none !important;
margin: 0 !important;
width: 0 !important;
height: 0 !important;
}
.ProseMirror-gapcursor {
display: none;
pointer-events: none;
position: absolute;
margin: 0;
}
.ProseMirror-gapcursor:after {
content: "";
display: block;
position: absolute;
top: -2px;
width: 20px;
border-top: 1px solid black;
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}
@keyframes ProseMirror-cursor-blink {
to {
visibility: hidden;
}
}
.ProseMirror-hideselection *::selection {
background: transparent;
}
.ProseMirror-hideselection *::-moz-selection {
background: transparent;
}
.ProseMirror-hideselection * {
caret-color: transparent;
}
.ProseMirror-focused .ProseMirror-gapcursor {
display: block;
}
.tippy-box[data-animation=fade][data-state=hidden] {
opacity: 0
}`;function pW(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}class kx extends Cz{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:i})=>this.options.onDrop(n,r,i)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=pW(dW,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){const r=Nx(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}unregisterPlugin(t){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(t).forEach(o=>{const s=typeof o=="string"?`${o}$`:o.key;r=n.filter(a=>!a.key.startsWith(s))}),n.length===r.length)return;const i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}createExtensionManager(){var t,n;const i=[...this.options.enableCoreExtensions?[sW,Fz.configure({blockSeparator:(n=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),iW,aW,lW,uW,oW,cW].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new Qa(i,this)}createCommandManager(){this.commandManager=new _m({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let n;try{n=wS(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),n=wS(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=wx(n,this.options.autofocus);this.view=new Y2(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)===null||t===void 0?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Ka.create({doc:n,selection:r||void 0})});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isC Line truncated
`,textSerializers:r={}}=t||{};return DV(this.state.doc,{blockSeparator:n,textSerializers:{...Ox(this.schema),...r}})}get isEmpty(){return Rb(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(t,n))||null}$nodes(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(t,n))||null}$pos(t){const n=this.state.doc.resolve(t);return new Ds(n,this)}get $doc(){return this.$pos(0)}}function ra(e){return new td({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Be(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),u=n.from+a.indexOf(s),p=u+s.length;if(Cb(n.from,n.to,t.doc).filter(g=>g.mark.type.excluded.find(E=>E===e.type&&E!==g.mark.type)).filter(g=>g.to>u).length)return null;p<n.to&&o.delete(p,n.to),u>n.from&&o.delete(n.from+l,u);const f=n.from+l+s.length;o.addMark(n.from+l,f,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function Px(e){return new td({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Be(e.getAttributes,void 0,r)||{},{tr:o}=t,s=n.from;let a=n.to;const l=e.type.create(i);if(r[1]){const u=r[0].lastIndexOf(r[1]);let p=s+u;p>a?p=a:a=p+r[1].length;const _=r[0][r[0].length-1];o.insertText(_,s+r[0].length-1),o.replaceWith(p,a,l)}else if(r[0]){const u=e.type.isInline?s:s-1;o.insert(u,e.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()}})}function MS(e){return new td({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=Be(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function Dt(e){return new td({find:e.find,handler:({state:t,range:n,match:r})=>{let i=e.replace,o=n.from;const s=n.to;if(r[1]){const a=r[0].lastIndexOf(r[1]);i+=r[0].slice(a+r[1].length),o+=a;const l=o-s;l>0&&(i=r[0].slice(a-l,a)+i,o=s)}t.tr.insertText(i,o,s)}})}function wu(e){return new td({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const o=Be(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),u=l&&sb(l,e.type,o);if(!u)return null;if(s.wrap(l,u),e.keepMarks&&e.editor){const{selection:_,storedMarks:f}=t,{splittableMarks:g}=e.editor.extensionManager,h=f||_.$to.parentOffset&&_.$from.marks();if(h){const E=h.filter(b=>g.includes(b.type.name));s.ensureMarks(E)}}if(e.keepAttributes){const _=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(_,o).run()}const p=s.doc.resolve(n.from-1).nodeBefore;p&&p.type===e.type&&us(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,p))&&s.join(n.from-1)}})}class ot{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Be(ge(this,"addOptions",{name:this.name}))),this.storage=Be(ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new ot(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>mm(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new ot(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Be(ge(n,"addOptions",{name:n.name})),n.storage=Be(ge(n,"addStorage",{name:n.name,options:n.options})),n}}function _W(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}class fW{constructor(t,n,r){this.isDragging=!1,this.component=t,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.innerDecorations=n.innerDecorations,this.view=n.view,this.HTMLAttributes=n.HTMLAttributes,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var n,r,i,o,s,a,l;const{view:u}=this.editor,p=t.target,_=p.nodeType===3?(n=p.parentElement)===null||n===void 0? Line truncated
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var dO;function hW(){if(dO)return Fh;dO=1;var e=rt;function t(_,f){return _===f&&(_!==0||1/_===1/f)||_!==_&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function a(_,f){var g=f(),h=r({inst:{value:g,getSnapshot:f}}),E=h[0].inst,b=h[1];return o(function(){E.value=g,E.getSnapshot=f,l(E)&&b({inst:E})},[_,g,f]),i(function(){return l(E)&&b({inst:E}),_(function(){l(E)&&b({inst:E})})},[_]),s(g),g}function l(_){var f=_.getSnapshot;_=_.value;try{var g=f();return!n(_,g)}catch{return!0}}function u(_,f){return f()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return Fh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Fh}Ux.exports=hW();var Nb=Ux.exports;const EW=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},SW=({contentComponent:e})=>{const t=Nb.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return rt.createElement(rt.Fragment,null,Object.values(t))};function TW(){const e=new Set;let t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:fH.createPortal(r.reactElement,r.element,n)},e.forEach(i=>i())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(i=>i())}}}class bW extends rt.Component{constructor(t){var n;super(t),this.editorContentRef=rt.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=t.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.options.element.childNodes),t.setOptions({element:n}),t.contentComponent=TW(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!t.options.element.firstChild))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:t,innerRef:n,...r}=this.props;return rt.createElement(rt.Fragment,null,rt.createElement("div",{ref:EW(n,this.editorContentRef),...r}),(t==null?void 0:t.contentComponent)&&rt.createElement(SW,{contentComponent:t.contentComponent}))}}const yW=k.forwardRef((e,t)=>{const n=rt.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return rt.createElement(bW,{key:n,innerRef:t,...e})}),CW=rt.memo(yW);var RW=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],n.get(i[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(t[i]!==n[i])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!(s==="_owner"&&t.$$typeof)&&!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n},NW=gW(RW),Fx={exports:{}},Bh={};/**
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var pO;function vW(){if(pO)return Bh;pO=1;var e=rt,t=Nb;function n(u,p){return u===p&&(u!==0||1/u===1/p)||u!==u&&p!==p}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Bh.useSyncExternalStoreWithSelector=function(u,p,_,f,g){var h=o(null);if(h.current===null){var E={hasValue:!1,value:null};h.current=E}else E=h.current;h=a(function(){function T(D){if(!y){if(y=!0,R=D,D=f(D),g!==void 0&&E.hasValue){var M=E.value;if(g(M,D))return O=M}return O=D}if(M=O,r(R,D))return M;var $=f(D);return g!==void 0&&g(M,$)?M:(R=D,O=$)}var y=!1,R,O,I=_===void 0?null:_;return[function(){return T(p())},I===null?void 0:function(){return T(I())}]},[p,_,f,g]);var b=i(u,h[0],h[1]);return s(function(){E.hasValue=!0,E.value=b},[b]),l(b),b},Bh}Fx.exports=vW();var OW=Fx.exports;const AW=typeof window<"u"?k.useLayoutEffect:k.useEffect;class IW{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const n=()=>{this.transactionNumber+=1,this.subscribers.forEach(i=>i())},r=this.editor;return r.on("transaction",n),()=>{r.off("transaction",n)}}}}function wW(e){var t;const[n]=k.useState(()=>new IW(e.editor)),r=OW.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!==null&&t!==void 0?t:NW);return AW(()=>n.watch(e.editor),[e.editor,n]),k.useDebugValue(r),r}const DW=!1,LS=typeof window>"u",xW=LS||!!(typeof window<"u"&&window.next);class MW{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return LS||xW?null:this.createEditor();if(this.options.current.immediatelyRender&&LS&&DW)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const t={...this.options.current,onBeforeCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onBeforeCreate)===null||o===void 0?void 0:o.call(i,...r)},onBlur:(...r)=>{var i,o;return(o=(i=this.options.current).onBlur)===null||o===void 0?void 0:o.call(i,...r)},onCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onCreate)===null||o===void 0?void 0:o.call(i,...r)},onDestroy:(...r)=>{var i,o;return(o=(i=this.options.current).onDestroy)===null||o===void 0?void 0:o.call(i,...r)},onFocus:(...r)=>{var i,o;return(o=(i=this.options.current).onFocus)===null||o===void 0?void 0:o.call(i,...r)},onSelectionUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onSelectionUpdate)===null||o===void 0?void 0:o.call(i,...r)},onTransaction:(...r)=>{var i,o;return(o=(i=this.options.current).onTransaction)===null||o===void 0?void 0:o.call(i,...r)},onUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onUpdate)===null||o===void 0?void 0:o.call(i,...r)},onContentError:(...r)=>{var i,o;return(o=(i=this.options.current).onContentError)===null||o===void 0?void 0:o.call(i,...r)},onDrop:(...r)=>{var i,o;return(o=(i=this.options.current).onDrop)===null||o===void 0?void 0:o.call(i,...r)},onPaste:(...r)=>{var i,o;return(o=(i=this.options.current).onPaste)===null||o===void 0?void 0:o.call(i,...r)}};return new kx(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?this.editor.setOptions({...this.options.curreLine truncated
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/sf.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,p="__lodash_placeholder__",_=1,f=2,g=4,h=1,E=2,b=1,T=2,y=4,R=8,O=16,I=32,D=64,M=128,$=256,H=512,B=30,se="...",de=800,pe=16,ce=1,ee=2,ue=3,L=1/0,w=9007199254740991,G=17976931348623157e292,q=NaN,V=4294967295,te=V-1,Ee=V>>>1,be=[["ary",M],["bind",b],["bindKey",T],["curry",R],["curryRight",O],["flip",H],["partial",I],["partialRight",D],["rearg",$]],ye="[object Arguments]",Ie="[object Array]",et="[object AsyncFunction]",Bt="[object Boolean]",De="[object Date]",xt="[object DOMException]",Nn="[object Error]",Te="[object Function]",si="[object GeneratorFunction]",pt="[object Map]",vn="[object Number]",tt="[object Null]",en="[object Object]",Qe="[object Promise]",ne="[object Proxy]",On="[object RegExp]",Ae="[object Set]",Se="[object String]",An="[object Symbol]",zt="[object Undefined]",$n="[object WeakMap]",ai="[object WeakSet]",z="[object ArrayBuffer]",Q="[object DataView]",oe="[object Float32Array]",me="[object Float64Array]",Ge="[object Int8Array]",ht="[object Int16Array]",ro="[object Int32Array]",io="[object Uint8Array]",sd="[object Uint8ClampedArray]",ad="[object Uint16Array]",ld="[object Uint32Array]",sy=/\b__p \+= '';/g,ay=/\b(__p \+=) '' \+/g,ly=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Om=/&(?:amp|lt|gt|quot|#39);/g,Am=/[&<>"']/g,cy=RegExp(Om.source),uy=RegExp(Am.source),dy=/<%-([\s\S]+?)%>/g,py=/<%([\s\S]+?)%>/g,Im=/<%=([\s\S]+?)%>/g,_y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fy=/^\w*$/,my=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cd=/[\\^$.*+?()[\]{}|]/g,gy=RegExp(cd.source),ud=/^\s+/,hy=/\s/,Ey=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Sy=/\{\n\/\* \[wrapped with (.+)\] \*/,Ty=/,? & /,by=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yy=/[()=,{}\[\]\/\s]/,Cy=/\\(\\)?/g,Ry=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,wm=/\w*$/,Ny=/^[-+]0x[0-9a-f]+$/i,vy=/^0b[01]+$/i,Oy=/^\[object .+?Constructor\]$/,Ay=/^0o[0-7]+$/i,Iy=/^(?:0|[1-9]\d*)$/,wy=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Fl=/($^)/,Dy=/['\n\r\u2028\u2029\\]/g,Bl="\\ud800-\\udfff",xy="\\u0300-\\u036f",My="\\ufe20-\\ufe2f",Ly="\\u20d0-\\u20ff",Dm=xy+My+Ly,xm="\\u2700-\\u27bf",Mm="a-z\\xdf-\\xf6\\xf8-\\xff",ky="\\xac\\xb1\\xd7\\xf7",Py="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Uy="\\u2000-\\u206f",Fy=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lm="A-Z\\xc0-\\xd6\\xd8-\\xde",km="\\ufe0e\\ufe0f",Pm=ky+Py+Uy+Fy,dd="['’]",By="["+Bl+"]",Um="["+Pm+"]",Gl="["+Dm+"]",Fm="\\d+",Gy="["+xm+"]",Bm="["+Mm+"]",Gm="[^"+Bl+Pm+Fm+xm+Mm+Lm+"]",Yl="\\ud83c[\\udffb-\\udfff]",Ym="(?:"+Gl+"|"+Yl+")",pd="[^"+Bl+"]",Hl="(?:\\ud83c[\\udde6-\\uddff]){2}",$l="[\\ud800-\\udbff][\\udc00-\\udfff]",oo="["+Lm+"]",_d="\\u200d",zl="(?:"+Bm+"|"+Gm+")",fd="(?:"+oo+"|"+Gm+")",Vl="(?:"+dd+"(?:d|ll|m|re|s|t|ve))?",md="(?:"+dd+"(?:D|LL|M|RE|S|T|VE))?",gd=Ym+"?",Wl="["+km+"]?",da="(?:"+_d+"(?:"+[pd,Hl,$l].join("|")+")"+Wl+gd+")*",ql="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kl=Wl+gd+da,Ed="(?:"+[Gy,Hl,$l].join("|")+")"+Kl,Yy="(?:"+[pd+Gl+"?",Gl,Hl,$l,By].join("|")+")",Hy=RegExp(dd,"g"),JL=RegExp(Gl,"g"),Hm=RegExp(Yl+"(?="+Yl+")|"+Yy+Kl,"g"),ek=RegExp([oo+"?"+Bm+"+"+Vl+"(?="+[Um,oo,"$"].join("|")+")",fd+"+"+md+"(?="+[Um,oo+zl,"$"].join("|")+")",oo+"?"+zl+"+"+Vl,oo+"+"+md,hd,ql,Fm,Ed].join("|"),"g"),tk=RegExp("["+_d+Bl+Dm+km+"]"),nk=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rk=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ik=-1,_t={};_t[oe]=_t[me]=_t[Ge]=_t[ht]=_t[ro]=_t[io]=_t[sd]=_t[ad]=_t[ld]=!0,_t[ye]=_t[Ie]=_t[z]=_t[Bt]=_t[Q]=_t[De]=_t[Nn]=_t[Te]=_t[pt]=_t[vn]=_t[en]=_t[On]=_t[Ae]=_t[Se]=_t[$n]=!1;var st={};st[ye]=st[Ie]=st[z]=st[Q]=st[Bt]=st[De]=st[oe]=st[me]=st[Ge]=st[ht]=st[ro]=st[pt]=st[vn]=st[en]=st[On]=st[Ae]=st[Se]=st[An]=st[io]=st[sd]=st[ad]=st[ld]=!0,st[Nn]=st[Te]=st[$n]=!1;var ok={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",Line truncated
/* [wrapped with `+d+`] */
`)}function b0(c){return Me(c)||ys(c)||!!(dC&&c&&c[dC])}function wi(c,d){var m=typeof c;return d=d??w,!!d&&(m=="number"||m!="symbol"&&Iy.test(c))&&c>-1&&c%1==0&&c<d}function wn(c,d,m){if(!bt(m))return!1;var S=typeof d;return(S=="number"?Vn(m)&&wi(d,m.length):S=="string"&&d in m)?$r(m[d],c):!1}function Ig(c,d){if(Me(c))return!1;var m=typeof c;return m=="number"||m=="symbol"||m=="boolean"||c==null||lr(c)?!0:fy.test(c)||!_y.test(c)||d!=null&&c in nt(d)}function y0(c){var d=typeof c;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?c!=="__proto__":c===null}function wg(c){var d=qd(c),m=v[d];if(typeof m!="function"||!(d in $e.prototype))return!1;if(c===m)return!0;var S=vg(m);return!!S&&c===S[0]}function C0(c){return!!aC&&aC in c}var R0=Cd?Di:qg;function ac(c){var d=c&&c.constructor,m=typeof d=="function"&&d.prototype||ga;return c===m}function aR(c){return c===c&&!bt(c)}function lR(c,d){return function(m){return m==null?!1:m[c]===d&&(d!==n||c in nt(m))}}function N0(c){var d=Jd(c,function(S){return m.size===u&&m.clear(),S}),m=d.cache;return d}function v0(c,d){var m=c[1],S=d[1],C=m|S,A=C<(b|T|M),x=S==M&&m==R||S==M&&m==$&&c[7].length<=d[8]||S==(M|$)&&d[7].length<=d[8]&&m==R;if(!(A||x))return c;S&b&&(c[2]=d[2],C|=m&b?0:y);var P=d[3];if(P){var Y=c[3];c[3]=Y?zC(Y,P,d[4]):P,c[4]=Y?lo(c[3],p):d[4]}return P=d[5],P&&(Y=c[5],c[5]=Y?VC(Y,P,d[6]):P,c[6]=Y?lo(c[5],p):d[6]),P=d[7],P&&(c[7]=P),S&M&&(c[8]=c[8]==null?d[8]:dn(c[8],d[8])),c[9]==null&&(c[9]=d[9]),c[0]=d[0],c[1]=C,c}function O0(c){var d=[];if(c!=null)for(var m in nt(c))d.push(m);return d}function A0(c){return Nd.call(c)}function cR(c,d,m){return d=Yt(d===n?c.length-1:d,0),function(){for(var S=arguments,C=-1,A=Yt(S.length-d,0),x=W(A);++C<A;)x[C]=S[d+C];C=-1;for(var P=W(d+1);++C<d;)P[C]=S[C];return P[d]=m(x),or(c,this,P)}}function uR(c,d){return d.length<2?c:Ss(c,Nr(d,0,-1))}function I0(c,d){for(var m=c.length,S=dn(d.length,m),C=zn(c);S--;){var A=d[S];c[S]=wi(A,m)?C[A]:n}return c}function Dg(c,d){if(!(d==="constructor"&&typeof c[d]=="function")&&d!="__proto__")return c[d]}var dR=_R(LC),lc=zk||function(c,d){return tn.setTimeout(c,d)},xg=_R(ZP);function pR(c,d,m){var S=d+"";return xg(c,T0(S,w0(h0(S),m)))}function _R(c){var d=0,m=0;return function(){var S=Kk(),C=pe-(S-m);if(m=S,C>0){if(++d>=de)return arguments[0]}else d=0;return c.apply(n,arguments)}}function Qd(c,d){var m=-1,S=c.length,C=S-1;for(d=d===n?S:d;++m<d;){var A=fg(m,C),x=c[A];c[A]=c[m],c[m]=x}return c.length=d,c}var fR=N0(function(c){var d=[];return c.charCodeAt(0)===46&&d.push(""),c.replace(my,function(m,S,C,A){d.push(C?A.replace(Cy,"$1"):S||m)}),d});function ui(c){if(typeof c=="string"||lr(c))return c;var d=c+"";return d=="0"&&1/c==-L?"-0":d}function bs(c){if(c!=null){try{return Rd.call(c)}catch{}try{return c+""}catch{}}return""}function w0(c,d){return br(be,function(m){var S="_."+m[0];d&m[1]&&!Sd(c,S)&&c.push(S)}),c.sort()}function mR(c){if(c instanceof $e)return c.clone();var d=new Cr(c.__wrapped__,c.__chain__);return d.__actions__=zn(c.__actions__),d.__index__=c.__index__,d.__values__=c.__values__,d}function D0(c,d,m){(m?wn(c,d,m):d===n)?d=1:d=Yt(Le(d),0);var S=c==null?0:c.length;if(!S||d<1)return[];for(var C=0,A=0,x=W(Dd(S/d));C<S;)x[A++]=Nr(c,C,C+=d);return x}function x0(c){for(var d=-1,m=c==null?0:c.length,S=0,C=[];++d<m;){var A=c[d];A&&(C[S++]=A)}return C}function M0(){var c=arguments.length;if(!c)return[];for(var d=W(c-1),m=arguments[0],S=c;S--;)d[S-1]=arguments[S];return ao(Me(m)?zn(m):[m],nn(d,1))}var L0=Fe(function(c,d){return Mt(c)?nc(c,nn(d,1,Mt,!0)):[]}),k0=Fe(function(c,d){var m=vr(d);return Mt(m)&&(m=n),Mt(c)?nc(c,nn(d,1,Mt,!0),Ne(m,2)):[]}),P0=Fe(function(c,d){var m=vr(d);return Mt(m)&&(m=n),Mt(c)?nc(c,nn(d,1,Mt,!0),n,m):[]});function U0(c,d,m){var S=c==null?0:c.length;return S?(d=m||d===n?1:Le(d),Nr(c,d<0?0:d,S)):[]}function F0(c,d,m){var S=c==null?0:c.length;return S?(d=m||d===n?1:Le(d),d=S-d,Nr(c,0,d<0?0:d)):[]}function B0(c,d){return c&&c.length?Yd(c,Ne(d,3),!0,!0):[]}function G0(c,d){return c&&c.length?Yd(c,Ne(d,3),!0):[]}function Y0(c,d,m,S){var C=c==null?0:c.length;return C?(m&&typeof m!="number"&&wn(c,d,m)&&(m=0,S=C),MP(c,d,m,S)):[]}function gR(c,d,m){var S=c==null?0:c.length;if(!S)return-1;var C=m==null?0:Le(m);return C<0&&(C=Yt(S+C,0)),Td(c,Ne(d,3),C)}function hR(c,d,m){var S=c==null?0:c.length;if(!S)return-1;var C=S-1;return m!==n&&(C=Le(m),C=m<0?Yt(S+C,0):dn(C,S-1)),Td(c,Ne(d,3),C,!0)}function ER(c){var d=c==null?0:c.length;return d?nn(c,1):[]}function H0(c){var d=c==null?0:c.length;return d?nn(c,L):[]}function $0(c,d){var m=c==null?0:c.length;return m?(d=d===n?1:Le(d),nn(c,d)):[]}function z0(c){for(var d=-1,m=c==null?0:c.length,S={};++d<m;){var C=c[d];S[C[0]]=C[1]}return S}function SR(c){return c&&c.length?c[0]:n}function V0(c,d,m){var S=c==null?0:c.length;if(!S)return-1;var C=m==null?0:Le(m);return C<0&&(C=Yt(S+C,0)),pa(c,d,C)}function W0(c){var d=c==null?0:c.length;return d?Nr(c,0,-1):[]}var q0=Fe(function(c){var d=Et(c,Sg);return d.length&&d[0]===c[0]?cg(d):[]}),K0=Fe( Line truncated
`;c.replace(le,function(Oe,Ye,ze,cr,Dn,ur){return ze||(ze=cr),J+=c.slice(j,ur).replace(Dy,Rk),Ye&&(P=!0,J+=`' +
__e(`+Ye+`) +
'`),Dn&&(Y=!0,J+=`';
`+Dn+`;
__p += '`),ze&&(J+=`' +
((__t = (`+ze+`)) == null ? '' : __t) +
'`),j=ur+Oe.length,Oe}),J+=`';
`;var ve=Ze.call(d,"variable")&&d.variable;if(!ve)J=`with (obj) {
`+J+`
}
`;else if(yy.test(ve))throw new xe(a);J=(Y?J.replace(sy,""):J).replace(ay,"$1").replace(ly,"$1;"),J="function("+(ve||"obj")+`) {
`+(ve?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(P?", __e = _.escape":"")+(Y?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+J+`return __p
}`;var ke=qR(function(){return qe(A,he+"return "+J).apply(n,x)});if(ke.source=J,Ug(ke))throw ke;return ke}function jF(c){return je(c).toLowerCase()}function XF(c){return je(c).toUpperCase()}function ZF(c,d,m){if(c=je(c),c&&(m||d===n))return nC(c);if(!c||!(d=ar(d)))return c;var S=Yr(c),C=Yr(d),A=rC(S,C),x=iC(S,C)+1;return fo(S,A,x).join("")}function JF(c,d,m){if(c=je(c),c&&(m||d===n))return c.slice(0,sC(c)+1);if(!c||!(d=ar(d)))return c;var S=Yr(c),C=iC(S,Yr(d))+1;return fo(S,0,C).join("")}function eB(c,d,m){if(c=je(c),c&&(m||d===n))return c.replace(ud,"");if(!c||!(d=ar(d)))return c;var S=Yr(c),C=rC(S,Yr(d));return fo(S,C).join("")}function tB(c,d){var m=B,S=se;if(bt(d)){var C="separator"in d?d.separator:C;m="length"in d?Le(d.length):m,S="omission"in d?ar(d.omission):S}c=je(c);var A=c.length;if(_a(c)){var x=Yr(c);A=x.length}if(m>=A)return c;var P=m-fa(S);if(P<1)return S;var Y=x?fo(x,0,P).join(""):c.slice(0,P);if(C===n)return Y+S;if(x&&(P+=Y.length-P),Fg(C)){if(c.slice(P).search(C)){var j,X=Y;for(C.global||(C=eg(C.source,je(wm.exec(C))+"g")),C.lastIndex=0;j=C.exec(X);)var J=j.index;Y=Y.slice(0,J===n?P:J)}}else if(c.indexOf(ar(C),P)!=P){var le=Y.lastIndexOf(C);le>-1&&(Y=Y.slice(0,le))}return Y+S}function nB(c){return c=je(c),c&&cy.test(c)?c.replace(Om,Dk):c}var rB=ba(function(c,d,m){return c+(m?" ":"")+d.toUpperCase()}),Yg=KC("toUpperCase");function WR(c,d,m){return c=je(c),d=m?n:d,d===n?vk(c)?Lk(c):hk(c):c.match(d)||[]}var qR=Fe(function(c,d){try{return or(c,n,d)}catch(m){return Ug(m)?m:new xe(m)}}),iB=Ii(function(c,d){return br(d,function(m){m=ui(m),Oi(c,m,kg(c[m],c))}),c});function oB(c){var d=c==null?0:c.length,m=Ne();return c=d?Et(c,function(S){if(typeof S[1]!="function")throw new yr(s);return[m(S[0]),S[1]]}):[],Fe(function(S){for(var C=-1;++C<d;){var A=c[C];if(or(A[0],this,S))return or(A[1],this,S)}})}function sB(c){return DP(Rr(c,_))}function Hg(c){return function(){return c}}function aB(c,d){return c==null||c!==c?d:c}var lB=jC(),cB=jC(!0);function qn(c){return c}function $g(c){return vC(typeof c=="function"?c:Rr(c,_))}function uB(c){return AC(Rr(c,_))}function dB(c,d){return IC(c,Rr(d,_))}var pB=Fe(function(c,d){return function(m){return rc(m,c,d)}}),_B=Fe(function(c,d){return function(m){return rc(c,m,d)}});function zg(c,d,m){var S=Vt(d),C=Fd(d,S);m==null&&!(bt(d)&&(C.length||!S.length))&&(m=d,d=c,c=this,C=Fd(d,Vt(d)));var A=!(bt(m)&&"chain"in m)||!!m.chain,x=Di(c);return br(C,function(P){var Y=d[P];c[P]=Y,x&&(c.prototype[P]=function(){var j=this.__chain__;if(A||j){var X=c(this.__wrapped__),J=X.__actions__=zn(this.__actions__);return J.push({func:Y,args:arguments,thisArg:c}),X.__chain__=j,X}return Y.apply(c,ao([this.value()],arguments))})}),c}function fB(){return tn._===this&&(tn._=Gk),this}function Vg(){}function mB(c){return c=Le(c),Fe(function(d){return wC(d,c)})}var gB=yg(Et),hB=yg(Xy),EB=yg(qm);function KR(c){return Ig(c)?Km(ui(c)):KP(c)}function SB(c){return function(d){return c==null?n:Ss(c,d)}}var TB=ZC(),bB=ZC(!0);function Wg(){return[]}function qg(){return!1}function yB(){return{}}function CB(){return""}function RB(){return!0}function NB(c,d){if(c=Le(c),c<1||c>w)return[];var m=V,S=dn(c,V);d=Ne(d),c-=V;for(var C=Xm(S,d);++m<c;)d(m);return C}function vB(c){return Me(c)?Et(c,ui):lr(c)?[c]:zn(fR(je(c)))}function OB(c){var d=++Fk;return je(c)+d}var AB=zd(function(c,d){return c+d},0),IB=Cg("ceil"),wB=zd(function(c,d){return c/d},1),DB=Cg("floor");function xB(c){return c&&c.length?Ud(c,qn,lg):n}function MB(c,d){return c&&c.length?Ud(c,Ne(d,2),lg):n}function LB(c){return eC(c,qn)}function kB(c,d){return eC(c,Ne(d,2))}function PB(c){return c&&c.length?Ud(c,qn,pg):n}function UB(c,d){return c&&c.length?Ud(c,Ne(d,2),pg):n}var FB=zd(function(c,d){return c*d},1),BB=Cg("round"),GB=zd(function(c,d){return c-d},0);function YB(c){return c&&c.length?jm(c,qn):0}function HB(c,d){return c&&c.length?jm(c,Ne(d,2)):0}return v.after=uU,v.ary=NR,v.assign=XU,v.assignIn=BR,v.assignInWith=rp,v.assignWith=ZU,v.at=JU,v.before=vR,v.bind=kg,v.bindAll=iB,v.bindKey=OR,v.castArray=yU,v.chain=yR,v.chunk=D0,v.compact=x0,v.concat=M0,v.cond=oB,v.conforms=sB,v.constant=Hg,v.countBy=Y1,v.create=eF,v.curry=AR,v.curryRight=IR,v.debounce=wR,v.defaults=tF,v.defaultsDeep=nF,v.defer=dU,v.delay=pU,v.difference=L0,v.differenceBy=k0,v.differenceWith=P0,v.drop=U0,v.dropRight=F0,v.dropRightWhile=B0,v.dropWhile=G0,v.fill=Y0,v.filter=$1,v.flatMap=W1,v.flatMapDeep=q1,v.flatMapDepth=K1,v.flatten=ER,v.flattenDeep=H0,v.flattenDepth=$0,v.flip=_U,v.flow=lB,v.flowRight=cB,v.fromPairs=z0,v.functions=cF,v.functionsIn=uF,v.groupBy=Q1,v.initial=W0,v.intersection=q0,v.intersectionBy=K0,v.intersectionWith=Q0,v.invert=pF,v.invertBy=_F,v.invokeMap=X1,v.iteratee=$g,v.keyBy=Z1,v.keys=Vt,v.keysIn=Wn,v.map=Xd,v.mapKeys=mF,v.mapValues=gF,v.matches=uB,v.matchesProperty=dB,v.memoize=Jd,v.merge=hF,v.mergeWith=GR,v.method=pB,v.methodOf=_B,v.mixin=zg,v.negate=ep,v.nthArg=mB,v.omit=EF,v.omitBy=SF,v.once=fU,v.orderBy=J1,v.over=gB,v.overArgs=mU,v.overEvery=hB,v.overSome=EB, Line truncated
`);return!o||!s?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0?!1:r.nodeAt(a)?e.commands.command(({tr:u})=>(u.setSelection(we.near(r.resolve(a))),!0)):e.commands.exitCode()}}},addInputRules(){return[MS({find:ZW,type:this.type,getAttributes:e=>({language:e[1]})}),MS({find:JW,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Xe({key:new Ke("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i==null?void 0:i.mode;if(!n||!o)return!1;const{tr:s,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,`
`));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(Ce.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}});function tq(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Qx(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&Qx(n)}),e}let bO=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function jx(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Po(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const nq="</span>",yO=e=>!!e.scope,rq=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};let iq=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=jx(t)}openNode(t){if(!yO(t))return;const n=rq(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){yO(t)&&(this.buffer+=nq)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}};const CO=(e={})=>{const t={children:[]};return Object.assign(t,e),t};let oq=class Xx{constructor(){this.rootNode=CO(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=CO({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Xx._collapse(n)}))}},sq=class extends oq{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new iq(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Du(e){return e?typeof e=="string"?e:e.source:null}function Zx(e){return ca("(?=",e,")")}function aq(e){return ca("(?:",e,")*")}function lq(e){return ca("(?:",e,")?")}function ca(...e){return e.map(n=>Du(n)).join("")}function cq(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Ab(...e){return"("+(cq(e).capture?"":"?:")+e.map(r=>Du(r)).join("|")+")"}function Jx(e){return new RegExp(e.toString()+"|").exec("").length-1}function uq(e,t){const n=e&&e.exec(t);return n&&n.index===0}const dq=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Ib(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let o=Du(r),s="";for(;o.length>0;){const a=dq.exec(o);if(!a){s+=o;break}s+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+i):(s+=a[0],a[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}const pq=/\b\B/,eM="[a-zA-Z]\\w*",wb="[a-zA-Z_]\\w*",tM="\\b\\d+(\\.\\d+)?",nM="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",rM="\\b(0b[01]+)",_q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",fq=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ca(t,/.*\b/,e.binary,/\b.*/)),Po({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},xu={begin:"\\\\[\\s\\S]",relevance:0},mq={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[xu]},gq={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[xu]},hq={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Tm=function(e,t,n={}){const r=Po({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=Ab("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ca(/[ ] Line truncated
https://github.com/highlightjs/highlight.js/issues/2277`),V=L,q=w),G===void 0&&(G=!0);const te={code:q,language:V};ee("before:highlight",te);const Ee=te.result?te.result:_(te.language,te.code,G);return Ee.code=te.code,ee("after:highlight",Ee),Ee}function _(L,w,G,q){const V=Object.create(null);function te(z,Q){return z.keywords[Q]}function Ee(){if(!ne.keywords){Ae.addText(Se);return}let z=0;ne.keywordPatternRe.lastIndex=0;let Q=ne.keywordPatternRe.exec(Se),oe="";for(;Q;){oe+=Se.substring(z,Q.index);const me=tt.case_insensitive?Q[0].toLowerCase():Q[0],Ge=te(ne,me);if(Ge){const[ht,ro]=Ge;if(Ae.addText(oe),oe="",V[me]=(V[me]||0)+1,V[me]<=Kq&&(An+=ro),ht.startsWith("_"))oe+=Q[0];else{const io=tt.classNameAliases[ht]||ht;Ie(Q[0],io)}}else oe+=Q[0];z=ne.keywordPatternRe.lastIndex,Q=ne.keywordPatternRe.exec(Se)}oe+=Se.substring(z),Ae.addText(oe)}function be(){if(Se==="")return;let z=null;if(typeof ne.subLanguage=="string"){if(!t[ne.subLanguage]){Ae.addText(Se);return}z=_(ne.subLanguage,Se,!0,On[ne.subLanguage]),On[ne.subLanguage]=z._top}else z=g(Se,ne.subLanguage.length?ne.subLanguage:null);ne.relevance>0&&(An+=z.relevance),Ae.__addSublanguage(z._emitter,z.language)}function ye(){ne.subLanguage!=null?be():Ee(),Se=""}function Ie(z,Q){z!==""&&(Ae.startScope(Q),Ae.addText(z),Ae.endScope())}function et(z,Q){let oe=1;const me=Q.length-1;for(;oe<=me;){if(!z._emit[oe]){oe++;continue}const Ge=tt.classNameAliases[z[oe]]||z[oe],ht=Q[oe];Ge?Ie(ht,Ge):(Se=ht,Ee(),Se=""),oe++}}function Bt(z,Q){return z.scope&&typeof z.scope=="string"&&Ae.openNode(tt.classNameAliases[z.scope]||z.scope),z.beginScope&&(z.beginScope._wrap?(Ie(Se,tt.classNameAliases[z.beginScope._wrap]||z.beginScope._wrap),Se=""):z.beginScope._multi&&(et(z.beginScope,Q),Se="")),ne=Object.create(z,{parent:{value:ne}}),ne}function De(z,Q,oe){let me=uq(z.endRe,oe);if(me){if(z["on:end"]){const Ge=new bO(z);z["on:end"](Q,Ge),Ge.isMatchIgnored&&(me=!1)}if(me){for(;z.endsParent&&z.parent;)z=z.parent;return z}}if(z.endsWithParent)return De(z.parent,Q,oe)}function xt(z){return ne.matcher.regexIndex===0?(Se+=z[0],1):(ai=!0,0)}function Nn(z){const Q=z[0],oe=z.rule,me=new bO(oe),Ge=[oe.__beforeBegin,oe["on:begin"]];for(const ht of Ge)if(ht&&(ht(z,me),me.isMatchIgnored))return xt(Q);return oe.skip?Se+=Q:(oe.excludeBegin&&(Se+=Q),ye(),!oe.returnBegin&&!oe.excludeBegin&&(Se=Q)),Bt(oe,z),oe.returnBegin?0:Q.length}function Te(z){const Q=z[0],oe=w.substring(z.index),me=De(ne,z,oe);if(!me)return OO;const Ge=ne;ne.endScope&&ne.endScope._wrap?(ye(),Ie(Q,ne.endScope._wrap)):ne.endScope&&ne.endScope._multi?(ye(),et(ne.endScope,z)):Ge.skip?Se+=Q:(Ge.returnEnd||Ge.excludeEnd||(Se+=Q),ye(),Ge.excludeEnd&&(Se=Q));do ne.scope&&Ae.closeNode(),!ne.skip&&!ne.subLanguage&&(An+=ne.relevance),ne=ne.parent;while(ne!==me.parent);return me.starts&&Bt(me.starts,z),Ge.returnEnd?0:Q.length}function si(){const z=[];for(let Q=ne;Q!==tt;Q=Q.parent)Q.scope&&z.unshift(Q.scope);z.forEach(Q=>Ae.openNode(Q))}let pt={};function vn(z,Q){const oe=Q&&Q[0];if(Se+=z,oe==null)return ye(),0;if(pt.type==="begin"&&Q.type==="end"&&pt.index===Q.index&&oe===""){if(Se+=w.slice(Q.index,Q.index+1),!i){const me=new Error(`0 width match regex (${L})`);throw me.languageName=L,me.badRule=pt.rule,me}return 1}if(pt=Q,Q.type==="begin")return Nn(Q);if(Q.type==="illegal"&&!G){const me=new Error('Illegal lexeme "'+oe+'" for mode "'+(ne.scope||"<unnamed>")+'"');throw me.mode=ne,me}else if(Q.type==="end"){const me=Te(Q);if(me!==OO)return me}if(Q.type==="illegal"&&oe==="")return 1;if($n>1e5&&$n>Q.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Se+=oe,oe.length}const tt=H(L);if(!tt)throw Ws(o.replace("{}",L)),new Error('Unknown language: "'+L+'"');const en=zq(tt);let Qe="",ne=q||en;const On={},Ae=new a.__emitter(a);si();let Se="",An=0,zt=0,$n=0,ai=!1;try{if(tt.__emitTokens)tt.__emitTokens(w,Ae);else{for(ne.matcher.considerAll();;){$n++,ai?ai=!1:ne.matcher.considerAll(),ne.matcher.lastIndex=zt;const z=ne.matcher.exec(w);if(!z)break;const Q=w.substring(zt,z.index),oe=vn(Q,z);zt=z.index+oe}vn(w.substring(zt))}return Ae.finalize(),Qe=Ae.toHTML(),{language:L,value:Qe,relevance:An,illegal:!1,_emitter:Ae,_top:ne}}catch(z){if(z.message&&z.message.includes("Illegal"))return{language:L,value:$h(w),illegal:!0,relevance:0,_illegalBy:{message:z.message,index:zt,context:w.slice(zt-100,zt+100),mode:z.mode,resultSoFar:Qe},_emitter:Ae};if(i)return{language:L,value:$h(w),illegal:!1,relevance:0,errorRaised:z,_emitter:Ae,_top:ne};throw z}}function f(L){const w={value:$h(L),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return w._emitter.addText(L),w}function g(L,w){w=w||a.languages||Object.keys(t);const G=f(L),q=w.filter(H).filter(se).map(ye=>_(ye,L,!1));q.unshift(G);const V=q.sort((ye,Ie)=>{if(ye.relevance!==Ie.relevance)return Ie.relevance-ye.relevance;if(ye.language&&Ie.language){if(H(ye.language).supersetOf===Ie.language)return 1;if(H(Ie.language).supersetOf===ye.language)return-1}return 0}),[te,Ee]=V, Line truncated
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}function UQ(e){const t="[a-z][a-zA-Z0-9_]*",n={className:"string",begin:"\\$.{1}"},r={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:t+":",relevance:0},e.C_NUMBER_MODE,r,n,{begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{begin:"#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,n,e.C_NUMBER_MODE,r]}]}}function FQ(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}function BQ(e){const t={className:"variable",begin:/\b_+[a-zA-Z]\w*/},n={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},r={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},i=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],o=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],s=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachmentsCargo","addWeaponWithAttachmentsCargoGlobal","admin","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityCurveRTD","airDensityRTD","airplaneThrottle","airportSide","AISFinishHeal","alive","all3DENEntities","allActiveTitleEffects","allAddonsInfo","allAirports","allControls","allCurators","allCutLayers","allDead","allDeadMen","allDiaryRecords","allDiarySubjects","allDisplays","allEnv3DSoundSources","allGroups","allLODs","allMapMarkers","allMines","allMissionObjects","allObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowedService","allowFileOperations","allowFleeing","allowGetIn","allowService","allowSprint","allPlayers","allSimpleObjects","allSites","allTurrets","allUnits","allUnitsUAV","allUsers","allVariables","ambientTemperature","ammo","ammoOnPylon","and","animate","animateBay","animateDoor","animatePylon","animateSouLine truncated
]*?"'`},{begin:`"[^\r
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},e.COMMENT("^[ ]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}function HQ(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}const $Q=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),zQ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],VQ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],WQ=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],qQ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],KQ=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","backgrou Line truncated
(multipart)?`,end:`\\]
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}function XQ(e){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}function ZQ(e){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}function JQ(e){const t=e.regex,n=/[a-zA-Z_][a-zA-Z0-9_]*/,r={className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:t.concat(/\$/,t.optional(/::/),n,"(::",n,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[r]}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r]}}function e4(e){const t=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...t,"set","list","map"]},end:">",contains:["self"]}]}}function t4(e){const t={className:"number",begin:"[1-9][0-9]*",relevance:0},n={className:"symbol",begin:":[^\\]]+"},r={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,n]},i={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,n]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[r,i,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT Line truncated
`},u]}}const G4=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),Y4=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],H4=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],fM=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],mM=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],$4=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","fon Line truncated
]`,g={scope:"string",variants:[u,l,p,_]},h={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},E=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],T=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],R={keyword:b,literal:(pe=>{const ce=[];return pe.forEach(ee=>{ce.push(ee),ee.toLowerCase()===ee?ce.push(ee.toUpperCase()):ce.push(ee.toLowerCase())}),ce})(E),built_in:T},O=pe=>pe.map(ce=>ce.replace(/\|\d+$/,"")),I={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",O(T).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},D=t.concat(r,"\\b(?!\\()"),M={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),D],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),D],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},$={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},H={relevance:0,begin:/\(/,end:/\)/,keywords:R,contains:[$,o,M,e.C_BLOCK_COMMENT_MODE,g,h,I]},B={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",O(b).join("\\b|"),"|",O(T).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[H]};H.contains.push(B);const se=[$,M,e.C_BLOCK_COMMENT_MODE,g,h,I],de={begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:E,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:E,keyword:["new","array"]},contains:["self",...se]},...se,{scope:"meta",match:i}]};return{case_insensitive:!1,keywords:R,contains:[de,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},o,B,M,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},I,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:R,contains:["self",o,M,e.C_BLOCK_COMMENT_MODE,g,h]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trai Line truncated
https://github.com/highlightjs/highlight.js/issues/2277`),V=L,q=w),G===void 0&&(G=!0);const te={code:q,language:V};ee("before:highlight",te);const Ee=te.result?te.result:_(te.language,te.code,G);return Ee.code=te.code,ee("after:highlight",Ee),Ee}function _(L,w,G,q){const V=Object.create(null);function te(z,Q){return z.keywords[Q]}function Ee(){if(!ne.keywords){Ae.addText(Se);return}let z=0;ne.keywordPatternRe.lastIndex=0;let Q=ne.keywordPatternRe.exec(Se),oe="";for(;Q;){oe+=Se.substring(z,Q.index);const me=tt.case_insensitive?Q[0].toLowerCase():Q[0],Ge=te(ne,me);if(Ge){const[ht,ro]=Ge;if(Ae.addText(oe),oe="",V[me]=(V[me]||0)+1,V[me]<=Sj&&(An+=ro),ht.startsWith("_"))oe+=Q[0];else{const io=tt.classNameAliases[ht]||ht;Ie(Q[0],io)}}else oe+=Q[0];z=ne.keywordPatternRe.lastIndex,Q=ne.keywordPatternRe.exec(Se)}oe+=Se.substring(z),Ae.addText(oe)}function be(){if(Se==="")return;let z=null;if(typeof ne.subLanguage=="string"){if(!t[ne.subLanguage]){Ae.addText(Se);return}z=_(ne.subLanguage,Se,!0,On[ne.subLanguage]),On[ne.subLanguage]=z._top}else z=g(Se,ne.subLanguage.length?ne.subLanguage:null);ne.relevance>0&&(An+=z.relevance),Ae.__addSublanguage(z._emitter,z.language)}function ye(){ne.subLanguage!=null?be():Ee(),Se=""}function Ie(z,Q){z!==""&&(Ae.startScope(Q),Ae.addText(z),Ae.endScope())}function et(z,Q){let oe=1;const me=Q.length-1;for(;oe<=me;){if(!z._emit[oe]){oe++;continue}const Ge=tt.classNameAliases[z[oe]]||z[oe],ht=Q[oe];Ge?Ie(ht,Ge):(Se=ht,Ee(),Se=""),oe++}}function Bt(z,Q){return z.scope&&typeof z.scope=="string"&&Ae.openNode(tt.classNameAliases[z.scope]||z.scope),z.beginScope&&(z.beginScope._wrap?(Ie(Se,tt.classNameAliases[z.beginScope._wrap]||z.beginScope._wrap),Se=""):z.beginScope._multi&&(et(z.beginScope,Q),Se="")),ne=Object.create(z,{parent:{value:ne}}),ne}function De(z,Q,oe){let me=k5(z.endRe,oe);if(me){if(z["on:end"]){const Ge=new kO(z);z["on:end"](Q,Ge),Ge.isMatchIgnored&&(me=!1)}if(me){for(;z.endsParent&&z.parent;)z=z.parent;return z}}if(z.endsWithParent)return De(z.parent,Q,oe)}function xt(z){return ne.matcher.regexIndex===0?(Se+=z[0],1):(ai=!0,0)}function Nn(z){const Q=z[0],oe=z.rule,me=new kO(oe),Ge=[oe.__beforeBegin,oe["on:begin"]];for(const ht of Ge)if(ht&&(ht(z,me),me.isMatchIgnored))return xt(Q);return oe.skip?Se+=Q:(oe.excludeBegin&&(Se+=Q),ye(),!oe.returnBegin&&!oe.excludeBegin&&(Se=Q)),Bt(oe,z),oe.returnBegin?0:Q.length}function Te(z){const Q=z[0],oe=w.substring(z.index),me=De(ne,z,oe);if(!me)return YO;const Ge=ne;ne.endScope&&ne.endScope._wrap?(ye(),Ie(Q,ne.endScope._wrap)):ne.endScope&&ne.endScope._multi?(ye(),et(ne.endScope,z)):Ge.skip?Se+=Q:(Ge.returnEnd||Ge.excludeEnd||(Se+=Q),ye(),Ge.excludeEnd&&(Se=Q));do ne.scope&&Ae.closeNode(),!ne.skip&&!ne.subLanguage&&(An+=ne.relevance),ne=ne.parent;while(ne!==me.parent);return me.starts&&Bt(me.starts,z),Ge.returnEnd?0:Q.length}function si(){const z=[];for(let Q=ne;Q!==tt;Q=Q.parent)Q.scope&&z.unshift(Q.scope);z.forEach(Q=>Ae.openNode(Q))}let pt={};function vn(z,Q){const oe=Q&&Q[0];if(Se+=z,oe==null)return ye(),0;if(pt.type==="begin"&&Q.type==="end"&&pt.index===Q.index&&oe===""){if(Se+=w.slice(Q.index,Q.index+1),!i){const me=new Error(`0 width match regex (${L})`);throw me.languageName=L,me.badRule=pt.rule,me}return 1}if(pt=Q,Q.type==="begin")return Nn(Q);if(Q.type==="illegal"&&!G){const me=new Error('Illegal lexeme "'+oe+'" for mode "'+(ne.scope||"<unnamed>")+'"');throw me.mode=ne,me}else if(Q.type==="end"){const me=Te(Q);if(me!==YO)return me}if(Q.type==="illegal"&&oe==="")return 1;if($n>1e5&&$n>Q.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Se+=oe,oe.length}const tt=H(L);if(!tt)throw qs(o.replace("{}",L)),new Error('Unknown language: "'+L+'"');const en=mj(tt);let Qe="",ne=q||en;const On={},Ae=new a.__emitter(a);si();let Se="",An=0,zt=0,$n=0,ai=!1;try{if(tt.__emitTokens)tt.__emitTokens(w,Ae);else{for(ne.matcher.considerAll();;){$n++,ai?ai=!1:ne.matcher.considerAll(),ne.matcher.lastIndex=zt;const z=ne.matcher.exec(w);if(!z)break;const Q=w.substring(zt,z.index),oe=vn(Q,z);zt=z.index+oe}vn(w.substring(zt))}return Ae.finalize(),Qe=Ae.toHTML(),{language:L,value:Qe,relevance:An,illegal:!1,_emitter:Ae,_top:ne}}catch(z){if(z.message&&z.message.includes("Illegal"))return{language:L,value:Kh(w),illegal:!0,relevance:0,_illegalBy:{message:z.message,index:zt,context:w.slice(zt-100,zt+100),mode:z.mode,resultSoFar:Qe},_emitter:Ae};if(i)return{language:L,value:Kh(w),illegal:!1,relevance:0,errorRaised:z,_emitter:Ae,_top:ne};throw z}}function f(L){const w={value:Kh(L),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return w._emitter.addText(L),w}function g(L,w){w=w||a.languages||Object.keys(t);const G=f(L),q=w.filter(H).filter(se).map(ye=>_(ye,L,!1));q.unshift(G);const V=q.sort((ye,Ie)=>{if(ye.relevance!==Ie.relevance)return Ie.relevance-ye.relevance;if(ye.language&&Ie.language){if(H(ye.language).supersetOf===Ie.language)return 1;if(H(Ie.language).supersetOf===ye.language)return-1}return 0}),[te,Ee]=V, Line truncated
`);return!r||!i?!1:!!e.chain().command(({tr:o})=>(o.delete(t.pos-2,t.pos),!0)).exitCode().run()}function Mj(){if(this.options.codeMode)return!1;const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?!!this.editor.commands.clearNodes():!1}function Lj({editor:e}){const t=e.state.selection.$from.parent.textContent.slice(0,e.state.selection.$from.parentOffset);return(t==null?void 0:t.split(`
`))||[]}const Ub=["arduino","bash","c","cpp","csharp","css","diff","go","graphql","ini","java","javascript","json","kotlin","less","lua","makefile","markdown","objectivec","perl","php","php-template","plaintext","python","python-repl","r","ruby","rust","scss","shell","sql","swift","typescript","vbnet","wasm","xml","yaml","ipsphtml","ipscss"],kj=ot.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",We(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Pu=kj.extend({parseHTML(){return[{tag:"li",getAttrs:e=>{var t;if(((t=e.childNodes)==null?void 0:t.length)>1){const n=document.createElement("div");n.innerHTML=e.innerHTML,e.innerHTML="",e.appendChild(n)}return null}}]}});function Qt(e,t="",n=!0){const r=i=>{t&&(i.message=t+": "+i.message),window.Debug[n?"warn":"error"](i)};try{const i=e();return i instanceof Promise?new Promise(o=>{i.catch(r).finally(()=>o(!1))}):!0}catch(i){return r(i),!1}}const rr=Db.extend({addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this)}},addAttributes(){var e;return{language:{default:this.options.defaultLanguage||((e=this.options.allowedLanguages)==null?void 0:e[0])||"plaintext",parseHTML:t=>{var r,i;const n=(r=(()=>{if(t.hasAttribute("language"))return t.getAttribute("language");for(const o of t.classList)if(o.match(/^language-([a-z0-9\-_]+)$/i))return o.match(/^language-([a-z0-9\-_]+)$/i)[1];if(t.dataset.language&&t.dataset.language in df)return df[t.dataset.language];for(const o of t.querySelectorAll("code")){if(o.hasAttribute("language"))return o.getAttribute("language");for(const s of o.classList)if(s.match(/^language-([a-z0-9\-_]+)$/i))return s.match(/^language-([a-z0-9\-_]+)$/i)[1]}})())==null?void 0:r.toLowerCase();return this.options.codeMode&&(!n||!Ub.includes(n)||n!==this.options.defaultLanguage&&this.options.allowedLanguages&&!this.options.allowedLanguages.includes(n))?this.options.defaultLanguage||((i=this.options.allowedLanguages)==null?void 0:i[0])||"plaintext":n}}}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),codeMode:!1,allowedLanguages:null}},renderHTML({HTMLAttributes:e}){var n;const t=this.options.codeMode?this.editor.options.lastLang||((n=this.editor.options.allowedLanguages)==null?void 0:n[0])||"plaintext":e.language;return["pre",{spellcheck:"false",class:`${this.options.codeMode?"":"ipsCode "}language-${t}`,"data-language":Rl[t]||t},["code",{},0]]},onUpdate({editor:e}){this.options.codeMode&&e.options.lastLang&&e.options.lastLang!==e.getAttributes(this).language&&e.chain().setCodeBlock({language:e.options.lastLang}).run()},addKeyboardShortcuts(){const e=this.editor;return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{var o;if(!e.state.selection.empty||((o=e.state.selection.$from.parent)==null?void 0:o.type.name)!==this.name)return!1;if(Mj.call(this))return!0;if(!this.options.codeMode&&(!e.state.selection.$from.parent.attrs.language||["plaintext","bash","shell","zsh","sh"].includes(e.state.selection.$from.parent.attrs.language)))return!1;const n=e.state.selection.$from.parent.textContent.slice(0,e.state.selection.$from.parentOffset),r=e.state.selection.$from.parent.textContent.slice(e.state.selection.$from.parentOffset);if(n&&r){for(const s in qt)if(n.endsWith(s)&&r.startsWith(qt[s]))return e.chain().deleteRange({from:e.state.selection.from-s.length,to:e.state.selection.from+qt[s].length}).setTextSelection(e.state.selection.from-s.length).focus().run()}const i=n.match(/(\t)[^\n]*(\n\t+)$/);return i?e.chain().deleteRange({from:e.state.selection.from-i[2].length,to:e.state.selection.from}).setTextSelection(e.state.selection.from-i[2].length).focus().run():!1},Enter:({editor:t})=>{var y,R,O,I,D,M,$,H,B,se,de;if(xj.call(this,{editor:t}))return!0;const{$from:r}=t.state.selection,{parent:i}=r;if(!t.state.selection.empty||(i==null?void 0:i.type.name)!==this.name||!this.options.codeMode&&(!i.attrs.language||["plaintext","bash","shell","zsh","sh"].includes(i.attrs.language)))return!1;const o=Lj({editor:t});if(!o.length)return!1;const s=o[o.length-1],a=o[o.length-2];let l=((R=(y=s.match(/^\t*/))==null?void 0:y[0])==null?void 0:R.length)||0,u=!1;const p=i.attrs.language,_=["ipsphtml","xml","html","xhtml","html5"].includes(p),f=["ipscss","css","scss","sass","less"].includes(p),g=["plaintext","rtf","markdown","md","bbcode"].includes(p),h=_?/(<[^>/]*>)$/:/([{[(.:]|->)$/,E=_?/(<\/[^/>]*>)$/:/^\s*([}\])]+[,;]?)$/;let b=!1;if(!_&&!f&&!g&&s.match(/^\s+(\.|->)?[a-z0-9_-]/i))if(s.match(/^\s+(\.|->)/))b=!0,l--;else{let pe=1;for(;pe<o.length&&((D=(I=(O=o[o.length-1-pe])==null?void 0:O.match(/^\t*/))==null?void 0:I[0])==null?void 0:D.length)< Line truncated
`+" ".repeat(l);u?(pe-=s.length,ee=s.replace(/^\t/,"")+ee):T&&(ce=`
`+(l>1?" ".repeat(l-1):""),ee+=ce);let ue=this.editor.chain().insertContentAt({from:pe,to:t.state.selection.from},{type:"text",text:ee});return ce&&(ue=ue.setTextSelection(t.state.selection.from+ee.length-ce.length)),ue.focus().run()}return!1},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown||this.options.codeMode)return!1;const{state:n}=t,{selection:r,doc:i}=n,{$from:o,empty:s}=r;if(!s||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const l=o.after();return l===void 0||i.nodeAt(l)?!1:!!t.commands.exitCode()},ArrowUp:Pj.bind(this),Tab:Pp.bind(this,!1,{editor:e}),"Shift-Tab":Pp.bind(this,!0,{editor:e}),"Alt-Tab":Pp.bind(this,!1,{editor:e},!0),"Shift-Alt-Tab":Pp.bind(this,!0,{editor:e},!0)}},addProseMirrorPlugins(){var t;const e={};for(const n in qt)e[qt[n]]=n;return[...((t=this.parent)==null?void 0:t.call(this))||[],new Xe({key:new Ke("ipsCodeModeSyntaxHelpers"),props:{handleKeyDown:(n,r)=>{var o;if(!(r instanceof KeyboardEvent)||r.metaKey||r.altKey)return;const i=this.editor;if(((o=r.key)==null?void 0:o.toLowerCase())in qt)return r.key.toLowerCase()in e&&HO({editor:i,opener:r.key.toLowerCase()})?!0:!!Uj({editor:i,char:r.key.toLowerCase()});if(r.key.toLowerCase()in e)return!!HO({editor:i,opener:e[r.key.toLowerCase()]})}}})]}});function Pj({editor:e}){if(e.options.codeMode)return!1;const{$from:t,empty:n}=e.state.selection;if(t.nodeBefore||!n||t.parent.type!==this.type)return!1;let r=0,i;for(const s of[...t.path].reverse()){if(!Number.isInteger(s)&&(r++,r===2))break;i=s}return!r||!Number.isInteger(i)||i!==0||!(t.parentOffset===0)?!1:(e.chain().insertContentAt(t.before(),"<p>&nbsp;</p>",{updateSelection:!0}).run(),!0)}function Pp(e=!1,{editor:t=null},n=!1){var r,i,o,s;if((!t.state.selection.empty||e)&&t.isActive(this.name)&&(t.options.codeMode||[...t.state.selection.$from.path].reverse()[3]===[...t.state.selection.$to.path].reverse()[3]))return t.state.selection.empty&&e&&t.state.selection.$from.parentOffset===0||Qt(()=>{t.chain().command(({tr:a,chain:l})=>{var u,p,_,f;try{const{from:g,to:h}=t.state.selection,E=[...t.state.selection.$from.path].reverse()[3]+1;let b=g;if(b>[...t.state.selection.$from.path].reverse()[3]){for(;b>[...t.state.selection.$from.path].reverse()[3]&&!((u=a.doc.slice(b-1,b--).content.content[0])!=null&&u.textContent.startsWith(`
`)););b++}const T=((p=a.doc.slice(b,h).content.content[0])==null?void 0:p.textContent)||"",y=g-b,R=T.split(`
`),O=R.map(M=>e?M.replace(/^\t/,""):" "+M).join(`
`);let I=!1;try{e&&R.length>1&&R[R.length-1].match(/^\t/)&&((f=(_=a.doc.slice(h,h+1))==null?void 0:_.content.content[0])==null?void 0:f.textContent)===" "&&(I=!0)}catch{}a.insertText(O,b,h);const D={from:b+y,to:b+O.length};e&&T.startsWith(" ")?D.from--:e||D.from++,I&&D.to++,E>D.from&&(D.from=E),l().setTextSelection(D).focus().run()}catch{}return!0}).run()},"Something went wrong when modifying indents in a codeblock selection"),!0;if(!n&&t.isActive(Pu.name))return!1;if(t.state.selection.empty){if(e){if(t.state.selection.$from.parentOffset>0){const a=t.state.doc.slice(t.state.selection.from-1,t.state.selection.from);if(((i=(r=a==null?void 0:a.content)==null?void 0:r.content[0])==null?void 0:i.textContent)===" "){const{from:l}=t.state.selection;return t.chain().command(({tr:u})=>(u.deleteRange(l-1,l),!0)).setTextSelection({from:l-1,to:l-1}).run(),!0}}if(t.state.selection.$from.parentOffset<t.state.selection.$from.parent.nodeSize-2){const a=t.state.doc.slice(t.state.selection.from,t.state.selection.from+1);if(((s=(o=a==null?void 0:a.content)==null?void 0:o.content[0])==null?void 0:s.textContent)===" "){const{from:l}=t.state.selection;return t.chain().command(({tr:u})=>(u.deleteRange(l,l+1),!0)).setTextSelection({from:l,to:l}).run(),!0}}}}else return!0;return t.chain().insertContent(" ").focus().run(),!0}function Uj({editor:e,char:t}){var _,f,g;if(!(t in qt))return!1;const{$from:n,$to:r}=e.state.selection,i=n.parent,o=r.parent;if(((_=i==null?void 0:i.type)==null?void 0:_.name)!==Db.name||i!==o)return!1;if(e.state.selection.empty)return e.chain().insertContent(`${t}${qt[t]}`).setTextSelection(e.state.selection.from+t.length).focus().run();const s=i.textContent;let a=s.slice(n.parentOffset,r.parentOffset);if(!a)return!1;if(['"',"'","`"].includes(t)){const h=new RegExp(`(^|[^\\\\])\\${t}`,"g");a=a.replaceAll(h,`$1\\${t}`).replaceAll(/\n/g,"\\n")}let l="",u=0;if(a.match(/\n/)){const E=s.slice(0,n.parentOffset).split(`
`).pop(),b=s.slice(r.parentOffset).split(`
`).shift();let T=Math.max(0,((g=(f=E.match(/^\t*/))==null?void 0:f[0])==null?void 0:g.length)+1);E.match(/^\t*$/)&&b.match(/^\t+$/)&&(T+=b.match(/^\t+$/)[0].length),b.match(/^\s*$/)&&(a=a.replace(/^\s*?\n\s*(.?)/,"$1")),u=T+1;const y=" ".repeat(T),R=new RegExp(`\\n\\t{0,${T?T-1:0}}`,"g");if(a=a.replaceAll(R,`
${y}`),a=`${t}
${y}${a}
${y?y.slice(0,y.length-1):""}${qt[t]}`,r.parentOffset<s.length)try{const O=s.slice(r.parentOffset,r.parentOffset+1);O!=null&&O.match(/\n/)||(l=`
`+(y?y.slice(0,y.length-1):""),a+=l)}catch{}}else a=`${t}${a}${qt[t]}`;const p={from:e.state.selection.from+t.length+u,to:e.state.selection.from+a.length-qt[t].length-l.length-(u?u-1:0)};return e.chain().insertContentAt({from:e.state.selection.from,to:e.state.selection.to},{type:"text",text:a}).setTextSelection(p).focus().run()}function HO({editor:e,opener:t}){var o;if(!(t in qt)||!e.state.selection.empty)return!1;const{$from:n}=e.state.selection,r=n.parent;if((r==null?void 0:r.type.name)!==Db.name)return!1;const i=(o=n.parent)==null?void 0:o.textContent;if(n.parentOffset<1||n.parentOffset>=i.length)return!1;try{const s=n.parentOffset;let a=i==null?void 0:i.slice(s,s+qt[t].length);if(!a)return;if(a.startsWith(qt[t]))return s>0&&['"',"'","`"].includes(t)&&(i==null?void 0:i[s-1])==="\\"?e.chain().insertContent({type:"text",text:qt[t]}).focus().run():e.chain().setTextSelection(e.state.selection.from+qt[t].length).focus().run()}catch{return!1}return!1}const qt={"{":"}","[":"]","(":")","'":"'",'"':'"',"`":"`"},yc={};function $M(e,t,n=[]){var r;if(!((r=yc[e])!=null&&r.to)){let i=!1;if(e===t)i=[e];else if(e in Fo){const o=[e];if(t in Fo[e])o.push(t);else{let s;n=[...n,...o];for(const a in Fo[e])if(!(n.includes(a)||a===e)&&Fo[a]){const l=$M(a,t,n);Array.isArray(l)&&(!s||s.length>l.length)&&(s=l)}Array.isArray(s)&&o.splice(1,0,...s)}o.length&&o[o.length-1]===t&&(i=o)}e in yc||(yc[e]={}),yc[e][t]=i}return yc[e][t]}function Fj(e,t,n){const r=$M(e,t);if(!Array.isArray(r))throw new RangeError(`Cannot convert ${e} to ${t} because there is not a known conversion pathway`);r.length===1&&e===bn.name&&n.chain().toggleHeading({level:n.level||1});for(let i=0;i<r.length-1;i++){const o=Fo[r[i]][r[i+1]](n);if(o!==void 0&&!o)throw new Error(`Could not convert ${r[i]} to ${r[i+1]}`)}return!0}function Fb(e){const t=[...e.state.selection.$from.path].reverse()[2],n=t==null?void 0:t.type.name;return n===bn.name?[n,{level:t.attrs.level||1}]:[n||"",{}]}function m_(e){var n;if(e[0]===bn.name)return`Heading ${((n=e[1])==null?void 0:n.level)||""}`;const t=e[0]in HS?e[0]:wt.name;return HS[t]}function Bj(e){if(e in $O)return[$O[e],{}];const t=m_([bn.name,{}]);if(e.startsWith(t)){const n=parseInt(e.replace("Heading","").trim())||1;return[bn.name,{level:n}]}return[wt.name,{}]}const HS={[eo.name]:"Ordered List",[rs.name]:"Bullet List",[rr.name]:"Code Block",[wt.name]:"Paragraph"},$O=Object.fromEntries([...Object.entries(HS)].map(e=>e.reverse()));function Gj(e){for(let t of bn.options.levels)if(e.isActive(bn.name,{level:t}))return{level:t};return null}function zM(e){const t=Fb(e);return t[0]in Fo?Yj(...t).filter(n=>{var r,i;return(n[0]!==bn.name||!((r=e.options.restrictions)!=null&&r.has("heading")))&&!(n[0]===bn.name&&n[1].level===1&&((i=e.options.restrictions)!=null&&i.has("heading_1")))}):[]}const Cc={};function Yj(e,t={}){const n=JSON.stringify({name:e,attributes:t});if(!(n in Cc)){const r=VM(e);Cc[n]=[];for(const i of r)if(i===bn.name)for(let o=1;o<=6;o++)Cc[n].push([bn.name,{level:o}]);else Cc[n].push([i,{}])}return Cc[n]}function VM(e,t){if(t=t||new Set,t.add(e),e in Fo)for(const n in Fo[e])t.has(n)||VM(n,t);return t}const Fo={[wt.name]:{[rr.name]:({chain:e})=>e().setCodeBlock(),[bn.name]:({chain:e,level:t=1})=>e().setHeading({level:t})},[rr.name]:{[wt.name]:({chain:e})=>e().toggleCodeBlock()},[bn.name]:{[wt.name]:({chain:e,editor:t,level:n})=>{var r;return n=n||((r=Gj(t))==null?void 0:r.level),n?e().toggleHeading({level:n}):!1}}};function Hj({...e}){const{editor:t}=k.useContext(Ue),n=Fb(t);return e.dropdownOptions=e.dropdownOptions||{},e.dropdownOptions.className=e.dropdownOptions.className||"",e.dropdownOptions.className=[...e.dropdownOptions.className.split(/\s+/),"ipsRichText"].join(" "),N.jsx(_s,{current:N.jsx(N.Fragment,{children:N.jsx("i",{className:"fa-solid fa-paragraph"})}),currentValue:m_(n),blank:N.jsx(zO,{block:[wt.title,{}]}),items:zM(t).map(r=>[m_(r),N.jsx(zO,{block:r},m_(r))]),onChange:r=>{const i=Bj(r);t.chain().command(o=>Fj(n[0],i[0],{...i[1]||{},...o})).focus().run()},...e,dropdownOptions:{...e.dropdownOptions,location:"se"}})}function zO({block:e,style:t=!0}){if(e[0]===bn.name){const n=`h${e[1].level}`;return t?N.jsxs(n,{children:["Heading ",e[1].level]}):N.jsxs(N.Fragment,{children:["Heading ",e[1].level]})}return e[0]===rr.name?t?N.jsx("code",{children:"Code Block"}):N.jsx(N.Fragment,{children:"Code Block"}):N.jsx(N.Fragment,{children:"Paragraph"})}const Uu=un.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",We(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Fu=un.create({name:"superscript",addOptionsLine truncated
`,Xj="️",Zj="‍",Jh="";let Up=null,Fp=null;function Jj(e=[]){const t={};jn.groups=t;const n=new jn;Up==null&&(Up=qO(Vj)),Fp==null&&(Fp=qO(Wj)),re(n,"'",Yb),re(n,"{",Zc),re(n,"}",Jc),re(n,"[",pf),re(n,"]",_f),re(n,"(",ff),re(n,")",mf),re(n,"<",gf),re(n,">",hf),re(n,"(",Ef),re(n,")",Sf),re(n,"「",Tf),re(n,"」",bf),re(n,"『",yf),re(n,"』",Cf),re(n,"<",Rf),re(n,">",Nf),re(n,"&",vf),re(n,"*",Of),re(n,"@",Ro),re(n,"`",If),re(n,"^",wf),re(n,":",Io),re(n,",",Hb),re(n,"$",Df),re(n,".",fi),re(n,"=",xf),re(n,"!",$b),re(n,"-",wr),re(n,"%",eu),re(n,"|",Mf),re(n,"+",Lf),re(n,"#",kf),re(n,"?",tu),re(n,'"',zb),re(n,"/",mi),re(n,";",Vb),re(n,"~",nu),re(n,"_",Pf),re(n,"\\",Af),re(n,"・",QM);const r=Ot(n,Pi,Bb,{[$S]:!0});Ot(r,Pi,r);const i=Ot(r,ki,qM,{[Xc]:!0}),o=Ot(r,Rc,KM,{[Lc]:!0}),s=Ot(n,ki,Fi,{[zS]:!0});Ot(s,Pi,i),Ot(s,ki,s),Ot(i,Pi,i),Ot(i,ki,i);const a=Ot(n,Rc,qS,{[VS]:!0});Ot(a,ki),Ot(a,Pi,o),Ot(a,Rc,a),Ot(o,Pi,o),Ot(o,ki),Ot(o,Rc,o);const l=re(n,Zh,Gb,{[Qh]:!0}),u=re(n,WO,jS,{[Qh]:!0}),p=Ot(n,Xh,jS,{[Qh]:!0});re(n,Jh,p),re(u,Zh,l),re(u,Jh,p),Ot(u,Xh,p),re(p,WO),re(p,Zh),Ot(p,Xh,p),re(p,Jh,p);const _=Ot(n,jh,jM,{[WM]:!0});re(_,"#"),Ot(_,jh,_),re(_,Xj,_);const f=re(_,Zj);re(f,"#"),Ot(f,jh,_);const g=[[ki,s],[Pi,i]],h=[[ki,null],[Rc,a],[Pi,o]];for(let E=0;E<Up.length;E++)ho(n,Up[E],KS,Fi,g);for(let E=0;E<Fp.length;E++)ho(n,Fp[E],QS,qS,h);Fs(KS,{tld:!0,ascii:!0},t),Fs(QS,{utld:!0,alpha:!0},t),ho(n,"file",g_,Fi,g),ho(n,"mailto",g_,Fi,g),ho(n,"http",ka,Fi,g),ho(n,"https",ka,Fi,g),ho(n,"ftp",ka,Fi,g),ho(n,"ftps",ka,Fi,g),Fs(g_,{scheme:!0,ascii:!0},t),Fs(ka,{slashscheme:!0,ascii:!0},t),e=e.sort((E,b)=>E[0]>b[0]?1:-1);for(let E=0;E<e.length;E++){const b=e[E][0],y=e[E][1]?{[qj]:!0}:{[Kj]:!0};b.indexOf("-")>=0?y[WS]=!0:ki.test(b)?Pi.test(b)?y[Xc]=!0:y[zS]=!0:y[$S]=!0,VO(n,b,b,y)}return VO(n,"localhost",Bu,{ascii:!0}),n.jd=new jn(Uf),{start:n,tokens:ia({groups:t},XM)}}function ZM(e,t){const n=e6(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=e,l=null,u=0,p=null,_=-1,f=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(_=0,f=0,p=a):_>=0&&(_+=n[s].length,f++),u+=n[s].length,o+=n[s].length,s++;o-=_,s-=f,u-=_,i.push({t:p.t,v:t.slice(o-u,o),s:o-u,e:o})}return i}function e6(e){const t=[],n=e.length;let r=0;for(;r<n;){let i=e.charCodeAt(r),o,s=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function ho(e,t,n,r,i){let o;const s=t.length;for(let a=0;a<s-1;a++){const l=t[a];e.j[l]?o=e.j[l]:(o=new jn(r),o.jr=i.slice(),e.j[l]=o),e=o}return o=new jn(n),o.jr=i.slice(),e.j[t[s-1]]=o,o}function qO(e){const t=[],n=[];let r=0,i="0123456789";for(;r<e.length;){let o=0;for(;i.indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+o),10);s>0;s--)n.pop();r+=o}else n.push(e[r]),r++}return t}const Nl={defaultProtocol:"http",events:null,format:KO,formatHref:KO,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ym(e,t=null){let n=ia({},Nl);e&&(n=ia(n,e instanceof ym?e.o:e));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}ym.prototype={o:Nl,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:Nl[e],typeof i=="function"&&r&&(i=i(t,n))):typeof i=="function"&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function KO(e){return e}var t6=Object.freeze({__proto__:null,defaults:Nl,Options:ym,assign:ia});function JM(e,t){this.t="token",this.v=e,this.tk=t}JM.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Nl.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),o=this.toFormattedString(e),s={},a=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),p=e.getObj("attributes",n,t),_=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),p&&ia(s,p),{tagName:i,aLine truncated
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);mt.customSchemes.push([e,t])}function l6(){mt.scanner=Jj(mt.customSchemes);for(let e=0;e<mt.tokenQueue.length;e++)mt.tokenQueue[e][1]({scanner:mt.scanner});mt.parser=r6(mt.scanner.tokens);for(let e=0;e<mt.pluginQueue.length;e++)mt.pluginQueue[e][1]({scanner:mt.scanner,parser:mt.parser});return mt.initialized=!0,mt}function Wb(e){return mt.initialized||l6(),i6(mt.parser.start,e,ZM(mt.scanner.start,e))}Wb.scan=ZM;function qb(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new ym(n),i=Wb(e),o=[];for(let s=0;s<i.length;s++){const a=i[s];a.isLink&&(!t||a.t===t)&&r.check(a)&&o.push(a.toFormattedObject(r))}return o}function c6(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function u6(e){return new Xe({key:new Ke("autolink"),appendTransaction:(t,n,r)=>{const i=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,a=AV(n.doc,[...t]);if(kV(a).forEach(({newRange:u})=>{const p=wV(r.doc,u,g=>g.isTextblock);let _,f;if(p.length>1?(_=p[0],f=r.doc.textBetween(_.pos,_.pos+_.node.nodeSize,void 0," ")):p.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(_=p[0],f=r.doc.textBetween(_.pos,u.to,void 0," ")),_&&f){const g=f.split(" ").filter(T=>T!=="");if(g.length<=0)return!1;const h=g[g.length-1],E=_.pos+f.lastIndexOf(h);if(!h)return!1;const b=Wb(h).map(T=>T.toObject(e.defaultProtocol));if(!c6(b))return!1;b.filter(T=>T.isLink).map(T=>({...T,from:E+T.start+1,to:E+T.end+1})).filter(T=>r.schema.marks.code?!r.doc.rangeHasMark(T.from,T.to,r.schema.marks.code):!0).filter(T=>e.validate(T.value)).filter(T=>e.shouldAutoLink(T.value)).forEach(T=>{Cb(T.from,T.to,r.doc).some(y=>y.mark.type===e.type)||s.addMark(T.from,T.to,e.type.create({href:T.href}))})}}),!!s.steps.length)return s}})}function d6(e){return new Xe({key:new Ke("handleClickLink"),props:{handleClick:(t,n,r)=>{var i,o;if(r.button!==0||!t.editable)return!1;let s=r.target;const a=[];for(;s.nodeName!=="DIV";)a.push(s),s=s.parentNode;if(!a.find(f=>f.nodeName==="A"))return!1;const l=yb(t.state,e.type.name),u=r.target,p=(i=u==null?void 0:u.href)!==null&&i!==void 0?i:l.href,_=(o=u==null?void 0:u.target)!==null&&o!==void 0?o:l.target;return u&&p?(window.open(p,_),!0):!1}}})}function p6(e){return new Xe({key:new Ke("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:i}=t,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach(u=>{a+=u.textContent});const l=qb(a,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!l?!1:(e.editor.commands.setMark(e.type,{href:l.href}),!0)}}})}const _6=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function Nc(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!e||e.replace(_6,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}const vc=un.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){XO(e);return}XO(e.scheme,e.optionalSlashes)})},onDestroy(){a6()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!Nc(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!Nc(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!Nc(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",We(this.options.HTMLAttributes,e),0]:["a",We(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[ns({find:e=>{const t=[];if(e){const{protocols:n,defaul Line truncated
`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:p})=>{if(p&&l&&s){const _=l.filter(f=>a.includes(f.type.name));u.ensureMarks(_)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),S_=ot.create({name:"doc",topNode:!0,content:"block+"}),PL=Tt.create({name:"ipsAutosave",addCommands(){return{clearAutosave:()=>({editor:e,chain:t})=>(e.options.autoSaveKey&&(window.ips.utils.db.remove("editorSave",e.options.autoSaveKey),t().hideMessage("autosave").run()),!0)}},onUpdate(){this.storage.updateCallback()},onCreate(){var e,t;if(this.storage.updateCallback=Un.debounce(()=>{var n;(n=this.editor)!=null&&n.options.autoSaveKey&&(this.editor.getHTML().trim()&&this.editor.getHTML()!=="<p></p>"?window.ips.utils.db.set("editorSave",this.editor.options.autoSaveKey,{content:this.editor.getHTML(),time:Math.round(Date.now()/1e3)}):this.editor.commands.clearAutosave(),this.editor.commands.hideMessage("autosave"))},500),(e=this.editor)!=null&&e.options.autoSaveKey){const n=window.ips.utils.db.get("editorSave",this.editor.options.autoSaveKey);if((t=n==null?void 0:n.content)!=null&&t.trim()&&(!n.time||Date.now()/1e3-86400*3<parseInt(n.time))){const r=new DOMParser().parseFromString(n.content,"text/html");if(!(r.body.innerText.trim().length||r.body.querySelector("iframe,img,video,audio,a,embed,.ipsEmoji,.ipsEmbeddedVideo,.ipsEmbeddedBrightcove,.ipsEmbeddedOther,.ipsEmbeddedPhoto")))return;this.storage.initial=this.editor.getHTML(),this.editor.chain().setContent(n.content).command(({tr:i,chain:o})=>(!i.docChanged||UL(i.doc)?o().undo().hideMessage("autosave").run():o().showMessage("autosave").focus().run(),!0)).run()}}},addStorage(){return{initial:"",updateCallback:()=>{}}}});function UL(e){var t,n,r;return e.textContent==="<p></p>"?!0:!((t=e.textContent)!=null&&t.trim().length||![S_.name,wt.name,ni.name,$u.name].includes(e.type.name)||(r=(n=e.content)==null?void 0:n.content)!=null&&r.length&&!e.content.content.some(i=>!UL(i)))}function GX(){const{editor:e}=k.useContext(Ue);return N.jsxs(N.Fragment,{children:["The content was restored from an automatically saved draft. Click to ",N.jsx("button",{className:"ipsEditor__autosave-clear",onClick:()=>e.chain().clearAutosave().setContent(e.storage[PL.name].initial||"").focus().run(),children:"clear draft."})]})}function YX({positions:e="",href:t}){const{editor:n}=k.useContext(Ue),r=()=>{if(!e.length){n.commands.hideMessage("autoembed");return}let i=n.chain();for(const o of e)i=i.command(({tr:s,chain:a})=>a().insertContentAt({from:Math.max(0,s.mapping.map(o[0])),to:Math.min(s.doc.nodeSize-2,s.mapping.map(o[1]))},`<a href="${encodeURI(t)}" >${o[2]}</a>`));i.hideMessage("autoembed").focus().run()};return N.jsxs(N.Fragment,{children:["A URL was inserted as embedded content. Click to ",N.jsx("button",{className:"ipsEditor__autosave-clear",onClick:r,children:"insert as link"})," instead."]})}function vA({name:e}){const{editor:t}=k.useContext(Ue);return N.jsxs("div",{className:`ipsEditor__global-message ipsEditor__global-message--${e}`,children:[N.jsxs("div",{className:"ipsEditor__global-message-content",children:[N.jsx("i",{className:"fa-solid fa-circle-info"}),"  ",N.jsx(HX,{name:e})]}),N.jsx("button",{className:"ipsEditor__global-message-close",onClick:()=>t==null?void 0:t.commands.hideMessage(e),children:N.jsx("i",{className:"fa-solid fa-times-circle"})})]})}function HX({name:e}){const{messages:t}=k.useContext(cT),n=t.get(e);switch(e){case"autosave":return N.jsx(GX,{});case"autoembed":return N.jsx(YX,{...n});default:return typeof n=="string"&&n?N.jsx("span",{"data-ipseditorcustommessage":"true",dangerouslySetInnerHTML:{__html:n}}):N.jsx(N.Fragment,{children:"This is a global message!"})}}const cT=k.createContext({messages:new Map,addMessage(e,t=""){this.messages.set(e,t)},removeMessage(e){this.messages.has(e)&&this.messages.delete(e)}});function $X({children:e}){var l;const[t,n]=k.useState(()=>new Map),[r,i]=k.useState(!1),{editor:o}=k.useContext(Ue),s=k.useMemo(()=>({messages:t,addMessage:(u,p="")=>{if(!t.has(u)||t.get(u)!==p){t.set(u,p);const _=new Map;for(const[f,g]of t.entries())_.set(f,g);n(_)}},removeMessage:u=>{if(t.has(u)){t.delete(u);const p=new Map;for(const[_,f]of t.entries())p.set(_,f);n(p)}},onVisibilityChange(u=!1){u!==r&&i(u)},visible:r}),[t,n,r,i]);if(k.useEffect(()=>{!o.options.codeMode&&!o.options.simpleRichText&&o.can().registerMessageInterface(s)&&(o==null||o.commands.registerMessageInterface(s))},[s,o]),o.options.codeMode||o.options.simpleRichText)return N.jsx(N.Fragment,{children:e});const a=[...t.keys()];return o.options.messagesCLine truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wA(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 DA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wA(Object(n),!0).forEach(function(r){ZX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JX(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(i,o){return o(i)},r)}}function Pc(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return t.apply(n,[].concat(i,a))}}}function Gf(e){return{}.toString.call(e).includes("Object")}function e8(e){return!Object.keys(e).length}function zu(e){return typeof e=="function"}function t8(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function n8(e,t){return Gf(t)||Zo("changeType"),Object.keys(t).some(function(n){return!t8(e,n)})&&Zo("changeField"),t}function r8(e){zu(e)||Zo("selectorType")}function i8(e){zu(e)||Gf(e)||Zo("handlerType"),Gf(e)&&Object.values(e).some(function(t){return!zu(t)})&&Zo("handlersType")}function o8(e){e||Zo("initialIsRequired"),Gf(e)||Zo("initialType"),e8(e)&&Zo("initialContent")}function s8(e,t){throw new Error(e[t]||e.default)}var a8={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Zo=Pc(s8)(a8),Qp={changes:n8,selector:r8,handler:i8,initial:o8};function l8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Qp.initial(e),Qp.handler(t);var n={current:e},r=Pc(d8)(n,t),i=Pc(u8)(n),o=Pc(Qp.changes)(e),s=Pc(c8)(n);function a(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(p){return p};return Qp.selector(u),u(n.current)}function l(u){JX(r,i,o,s)(u)}return[a,l]}function c8(e,t){return zu(t)?t(e.current):t}function u8(e,t){return e.current=DA(DA({},e.current),t),t}function d8(e,t,n){return zu(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var p8={create:l8},_8={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function f8(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return t.apply(n,[].concat(i,a))}}}function m8(e){return{}.toString.call(e).includes("Object")}function g8(e){return e||xA("configIsRequired"),m8(e)||xA("configType"),e.urls?(h8(),{paths:{vs:e.urls.monacoBase}}):e}function h8(){console.warn(FL.deprecation)}function E8(e,t){throw new Error(e[t]||e.default)}var FL={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
You are using deprecated way of configuration.
Instead of using
monaco.config({ urls: { monacoBase: '...' } })
use
monaco.config({ paths: { vs: '...' } })
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
`},xA=f8(E8)(FL),S8={config:g8},T8=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduceRight(function(o,s){return s(o)},i)}};function BL(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],BL(e[n],t[n]))}),AA(AA({},e),t)}var b8={type:"cancelation",msg:"operation is manually canceled"};function pE(e){var t=!1,n=new Promise(function(r,i){e.then(function(o){return t?i(b8):r(o)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var y8=p8.create({config:_8,isInitialized:!1,resolve:null,reject:null,monaco:null}),GL=qX(y8,2),od=GL[0],vm=GL[1];function C8(e){var t=S8.config(e),n=t.monaco,r=WX(t,["monaco"]);vm(function(i){return{config:BL(i.config,r),monaco:n}})}function R8(){var e=od(function(t){var n=t.monaco,r=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:r,resolve:i}});if(!e.isInitialized){if(vm({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),pE(_E);if(window.monaco&&window.monaco.editor)return YL(window.monaco),e.resolve(window.monaco),pE(_E);T8(N8,O8)(A8)}return pE(_E)}function N8(e){return document.body.appendChild(e)}function v8(e){var t=document.createElement("script");return e&&(t.src=e),t}function O8(e){var t=od(function(r){var i=r.config,o=r.reject;return{config:i,reject:o}}),n=v8("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function A8(){var e=od(function(n){var r=n.config,i=n.resolve,o=n.reject;return{config:r,resolve:i,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){YL(n),e.resolve(n)},function(n){e.reject(n)})}function YL(e){od().monaco||vm({monaco:e})}function I8(){return od(function(e){var t=e.monaco;return t})}var _E=new Promise(function(e,t){return vm({resolve:e,reject:t})}),HL={config:C8,init:R8,__getMonacoInstance:I8},w8={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},fE=w8,D8={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},x8=D8;function M8({children:e}){return rt.createElement("div",{style:x8.container},e)}var L8=M8,k8=L8;function P8({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:o,wrapperProps:s}){return rt.createElement("section",{style:{...fE.wrapper,width:e,height:t},...s},!n&&rt.createElement(k8,null,r),rt.createElement("div",{ref:i,style:{...fE.fullWidth,...!n&&fE.hide},className:o}))}var U8=P8,$L=k.memo(U8);function F8(e){k.useEffect(e,[])}var zL=F8;function B8(e,t,n=!0){let r=k.useRef(!0);k.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var pr=B8;function iu(){}function ja(e,t,n,r){return G8(e,r)||Y8(e,t,n,r)}function G8(e,t){return e.editor.getModel(VL(e,t))}function Y8(e,t,n,r){return e.editor.createModel(t,n,r?VL(e,r):void 0)}function VL(e,t){return e.Uri.parse(t)}function H8({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:l=!1,theme:u="light",loading:p="Loading...",options:_={},height:f="100%",width:g="100%",className:h,wrapperProps:E={},beforeMount:b=iu,onMount:T=iu}){let[y,R]=k.useState(!1),[O,I]=k.useState(!0),D=k.useRef(null),M=k.useRef(null),$=k.useRef(null),H=k.useRef(T),B=k.useRef(b),se=k.useRef(!1);zL(()=>{let ee=HL.init();return ee.then(ue=>(M.current=ue)&&I(!1)).catch(ue=>(ue==null?void 0:ue.type)!=="cancelation"&&console.error("Monaco initialization: error:",ue)),()=>D.current?ce():ee.cancel()}),pr(()=>{if(D.current&&M.current){let ee=D.current.getOriginalEditor(),ue=ja(M.current,e||"",r||n||"text",o||"");ue!==ee.getModel()&&ee.setModel(ue)}},[o],y),pr(()=>{if(D.current&&M.current){let ee=D.current.getModifiedEditor(),ue=ja(M.current,t||"",i||n||"text",s||"");ue!==ee.getModel()&&ee.setModel(ue)}},[s],y),pr(()=>{let ee=D.current.getModifiedEditor();ee.getOption(M.current.editor.EditorOption.readOnly)?ee.setValue(t||""):t!==ee.getValue()&&(ee.executeEdits("",[{range:ee.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),ee.pushUndoStop())},[t],y),pr(()=>{var ee,ue;(ue=(ee=D.current)==null?void 0:ee.getModel())==null||ue.original.setValue(e||"")},[e],y),pr(()=>{let{original:ee,modified:ue}=D.current.getModel();M.current.editor.setModelLanguage(ee,r||n||"text"),M.current.editor.setModelLanguage(ue,i||n||"text")},[n,r,i],y),pr(()=>{var ee;(ee=M.current)==null||ee.editor.setTheme(u)},[u],y),pr(()=>{var ee;(ee=D.current)==null||ee.updateOptions(_)},[_],y);let de=k.useCallback(()=>{var L;if(!M.current)return;B.current(M.current);let ee=ja(M.current,e||"",r||n||"text",o||""),ue=ja(M.current,t||"",i||n||"text",s||"");(L=D.current)==null||L.setModel({original:ee,modified:ue})},[n,t,i,e,r,o,s]),pe=k.useCallback(()=>{var ee;!se.current&&$.current&&(D.current=M.current.editor.createDiffEditor($.current,{automaticLayout:!0,..._}),de(),(ee=M.current)==null||ee.editor.setTheme(u),R(!0),se.current Line truncated
`+t.message,window.Debug.error(t),Zp=null}).finally(()=>{for(const t of YA)t(Zp),YA.delete(t);e(Zp)})})}const o7=Tt.create({name:"ipsMessages",addCommands(){let e={_messages:new Map,addMessage(n,r=""){this._messages.set(n,r)},removeMessage(n){this._messages.delete(n)},get messages(){return this._messages},onVisibilityChange(n){t=n}},t=!1;return{showMessage:(n,r="")=>()=>{e==null||e.addMessage(n,r)},hideMessage:n=>()=>{e==null||e.removeMessage(n)},registerMessageInterface:n=>()=>{var i,o,s;if(Object.is(n,e))return!1;let r=!1;for(const a in n)if(!Object.is(n[a],e[a])){r=!0;break}if(!r)return!1;if(e.messages instanceof Map)for(const a of e.messages.keys())(o=(i=n==null?void 0:n.messages)==null?void 0:i.has)!=null&&o.call(i,a)&&n.messages.get(a)===e.messages.get(a)||n.addMessage(a,e.messages.get(a));(!("visible"in n)||n.visible!==t)&&((s=n.onVisibilityChange)==null||s.call(n,t)),e=n},fireVisibilityChange:n=>()=>{var r;t=!!n,(r=e==null?void 0:e.onVisibilityChange)==null||r.call(e,t)}}}}),s7=({key:e,editor:t,onPaste:n,onDrop:r,allowedMimeTypes:i})=>new Xe({key:e||new Ke("fileHandler"),props:{handleDrop(o,s){var a;if(!r||!(!((a=s.dataTransfer)===null||a===void 0)&&a.files.length))return!1;const l=o.posAtCoords({left:s.clientX,top:s.clientY});let u=Array.from(s.dataTransfer.files);return i&&(u=u.filter(p=>i.includes(p.type))),u.length!==0&&(s.preventDefault(),s.stopPropagation(),r(t,u,(l==null?void 0:l.pos)||0),!0)},handlePaste(o,s){var a;if(!n||!(!((a=s.clipboardData)===null||a===void 0)&&a.files.length))return!1;let l=Array.from(s.clipboardData.files);const u=s.clipboardData.getData("text/html");return i&&(l=l.filter(p=>i.includes(p.type))),l.length!==0&&(s.preventDefault(),s.stopPropagation(),n(t,l,u),!(u.length>0))}}}),a7=Tt.create({name:"fileHandler",addOptions:()=>({onPaste:void 0,onDrop:void 0,allowedMimeTypes:void 0}),addProseMirrorPlugins(){return[s7({key:new Ke(this.name),editor:this.editor,allowedMimeTypes:this.options.allowedMimeTypes,onDrop:this.options.onDrop,onPaste:this.options.onPaste})]}});function l7({mimeTypes:e,handler:t}){let n;Array.isArray(e)&&(n=new Set(e.map(i=>i.toLowerCase())));const r=i=>{const o=i instanceof DragEvent?i.dataTransfer:i.clipboardData;if(o.files.length){const s=[];for(const a of o.files)(!n||n.has(a.type.toLowerCase()))&&s.push(a);if(s.length)return t(s),!0}};return new Xe({key:new Ke("ipsDataTransferFixer"),props:{handlePaste:(i,o)=>r(o),handleDrop:(i,o)=>r(o)}})}const c7=a7.extend({addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),injectAttachments:t=>({editor:n,chain:r})=>{const i=u7(n.options.postkey);if(!i)return!1;let o=r();for(const s of t){const a=Math.round(Math.random()*Math.pow(10,8));let l=!1;o=o.insertContent({type:ut.name,attrs:{attachmentType:"file",attachmentSrc:"",attachmentLink:"",fileId:a,attachmentTitle:"Uploading Attachment..."}}),i.dispatchEvent(new d7({file:s,data:{ready:u=>{if(l)return;l=!0;const p=Qb(n.$doc,a);p.length&&n.commands.command(({tr:_,chain:f})=>{let g=f();for(const{to:h,from:E}of p)g=g.insertContentAt({from:_.mapping.map(E),to:_.mapping.map(h)},u,{parseOptions:{preserveWhitespace:!1}});return!0})},error:u=>{l||(l=!0,u instanceof Error&&(u.message=`File upload failed:
${u.message}`,window.Debug.warn(u),n.commands.showMessage("file-attach","Couldn't insert one or more files pasted or dropped in the editor.")),n.commands.removeAttachment(a))}}}))}return o.run(),!0}}},addProseMirrorPlugins(){var e;return[l7({mimeTypes:this.options.allowedMimeTypes,handler:t=>this.options.onPaste(this.editor,t)}),...((e=this.parent)==null?void 0:e.call(this))||[]]}}).configure({onPaste(e,t){return e.commands.injectAttachments(t)},onDrop(e,t){return e.commands.injectAttachments(t)}});function u7(e){return!e||typeof e!="string"?null:document.querySelector(`[data-ipsuploader-postkey="${e}"]`)}class d7 extends Event{constructor(t){super("injectFile"),this.data=t}}const p7=["name","group","isInline","isBlock","isText","selectable","exitable","atom","addOptions","addKeyboardShortcuts","addAttributes","addGlobalAttributes","renderHTML","parseHTML","onCreate","onUpdate","onBeforeCreate","onFocus","onBlur","onBeforeCreate","onSelectionUpdate","onDestroy","onTransaction","priority","defaultOptions","addInputRules","marks","addNodeView","whitespace","defining","isolating","renderText"];function _7(e,t){var a,l,u;if(!e.ipsPlugins){e.ipsPlugins={buttons:{},extensions:[],nodes:[],marks:[]};return}e.ipsPlugins.buttons={},Array.isArray((a=e.ipsPlugins)==null?void 0:a.extensions)?s(e.ipsPlugins.extensions,Tt):e.ipsPlugins.extensions=[],Array.isArray((l=e.ipsPlugins)==null?void 0:l.nodes)?s(e.ipsPlugins.nodes,ot):e.ipsPlugins.nodes=[],Array.isArray((u=e.ipsPlugins)==null?void 0:u.marks)?s(e.ipsPlugins.marks,un):e.ipsPlugins.marks=[],e.ipsPlugins.nestedToolbars={},e.pluginButtonKeys=new Set;const n=new Set(e.tools.toolbar);for(const p in e.ipsPlugins.buttons)for(const{before:_,after:f}of e.ipsPlugins.buttons[p].locations){let g,h=!1;if(typeof f=="string"&&f in cA){const E=cA[f];e.ipsPlugins.nestedToolbars[E]=e.ipsPlugins.nestedToolbars[E]||[...ss[E]],e.ipsPlugins.nestedToolbars[E].push(`custom:${p}`),h=!0}else if(typeof f=="string"&&n.has(f))g=e.tools.toolbar.indexOf(f)+1;else if(typeof _=="string"&&n.has(_))g=e.tools.toolbar.indexOf(_);else if(!_&&!f||_===null||f===null)g=e.tools.toolbar.length;else continue;e.pluginButtonKeys.add(`custom:${p}`),h||(n.add(`custom:${p}`),e.tools.toolbar.splice(g,0,`custom:${p}`))}function r(p){for(const _ of p.attributes)["class","style","id","src","title","rel","alt"].includes(_.name.toLowerCase())||p.removeAttribute(_.name);for(const _ of p.querySelectorAll(":scope > *"))r(_)}function i(p,_){var f;if(p.addButtons instanceof Function){const g=p.addButtons.bind(_)();if(typeof g!="object")throw new TypeError;const h=new DOMParser;for(const E in g){let{html:b,command:T,locations:y,element:R,isActive:O,isAvailable:I}=g[E];if(typeof b!="string"&&!(R instanceof HTMLElement)||!(T instanceof Function)||!Array.isArray(y))throw new TypeError;O!==void 0&&typeof O!="boolean"&&!(O instanceof Function)&&(window.Debug.warn(`Expected isActive to be a boolean or a Function, got a ${typeof O}. Casting to boolean.`),O=!!O),I!==void 0&&typeof I!="boolean"&&!(I instanceof Function)&&(window.Debug.warn(`Expected isAvailable to be a boolean or a Function, got a ${typeof I}. Casting to boolean.`),I=!!I);const D=[];for(const B of y)if(B===null)D.push({after:null,before:void 0});else if(typeof B=="object"){if(![void 0,null].includes(B.before)&&typeof B.before!="string"||![void 0,null].includes(B.after)&&typeof B.after!="string")throw new TypeError;D.push({after:B.after,before:B.before})}else typeof B=="string"?D.push({after:B,before:void 0}):D.push({after:void 0,before:void 0});y=D;const M=["script","link","style","pre","code","iframe","object","embed","noscript","video"];if(R instanceof Element)R.querySelectorAll(M.join(",")).forEach(B=>B.remove());else{const B=h.parseFromString(b,"text/html");if(!(B instanceof Document))throw new RangeError("The html passed in for the button is not readable");if(B.querySelectorAll(M.join(",")).forEach(se=>se.remove()),!(((f=B==null?void 0:B.body)==null?void 0:f.firstElementChild)instanceof HTMLElement)||!B.body.firstElementChild.innerHTML.length)throw new RangeError("The html passed in for the button is not readable");R=B.body.firstElementChild}if(r(R),M.includes(R.tagName.toLowerCase()))throw new RangeError(`The element of type ${R.tagName} cannot be used as a toolbar button`);const $=R.cloneNode(!0),H=`${p.name}_${E}`;e.ipsPlugins.buttons[H]={get element(){return $},set element(B){throw new Error("Cannot update the element of an ipsPlugin button!")},get command(){return T.bind(_)},set command(B){throw new Error("Cannot update the command of an ipsPlugin button!")},get isActive(){return O instanceof Function?O.bind(_):O},set isActive(B){throw new Error("Cannot update the isActive property of an ipsPlugin button!")},get isAvailable(){return I instanceof Function?I.bind(_):I},set isAvailable(B){throw new Error("Cannot update the isAvailable property of an ipsPlugin button!")},get locations(){return y},set locations(B){throw new Error("Cannot update properties of ips Line truncated
${g.message}`,window.Debug.warn(g)}}}const SE=Tt.create({name:"ipsHomeEnd",addKeyboardShortcuts(){return{Home:({editor:e})=>(Qt(()=>{var i,o,s;const{$from:t}=e.state.selection,n=t.pos-t.parentOffset;let r=t.pos;for(;r>n;){const a=e.state.doc.slice(r-1,r);if(((i=a.content.content[0])==null?void 0:i.textContent)===`
`||((s=(o=a.content.content[0])==null?void 0:o.type)==null?void 0:s.name)===$u.name)break;r--}e.chain().setTextSelection(r).focus().run()},"Something went wrong handling the 'Home' key press"),!0),End:({editor:e})=>(Qt(()=>{var i,o,s;const{$to:t}=e.state.selection,n=[...t.path].reverse()[3]+t.parent.nodeSize-1;let r=t.pos;for(;r<n;){const a=e.state.doc.slice(r,r+1);if(((i=a.content.content[0])==null?void 0:i.textContent)===`
`||((s=(o=a.content.content[0])==null?void 0:o.type)==null?void 0:s.name)===$u.name)break;r++}e.chain().setTextSelection(r).focus().run()},"Something went wrong handling the 'End' key press"),!0)}}}),f7=Tt.create({name:"IPSSimpleRichText",addProseMirrorPlugins(){return[new Xe({key:new Ke("ipsSimpleRichTextPlugin"),filterTransaction:e=>!(this.editor.options.lengthFunction instanceof Function&&typeof this.editor.options.maxLength=="number"&&this.editor.options.lengthFunction(ed(e.doc.content,this.editor.schema))>this.editor.options.maxLength),appendTransaction:(e,t,n)=>{const r=[];let i;const{from:o,to:s}=n.selection;n.doc.descendants((l,u)=>{var p,_;if(typeof l.textContent=="string"&&!l.textContent&&!l.isInline){const f=n.doc.resolve(u),g=m7(f,n.doc),h=g7(f,n.doc);if([o,s].some(E=>g.pos<E&&h.pos>E)){if(i===void 0&&e.some(E=>{var b;return(b=E.steps)==null?void 0:b.length})){let E=1,b=l;for(;(_=(p=b.content)==null?void 0:p.content)!=null&&_.length;)E++,b=b.content.content[0];i=E+u}return!1}return r.push([u,u+l.nodeSize]),!1}if(l.isInline||!l.content.content.length)return!1});const{tr:a}=n;for(const[l,u]of r.reverse())a.delete(l,u);if(i!==void 0){const l=Ce.atStart(n.doc).from,u=Ce.atEnd(n.doc).to,p=Ce.create(n.doc,ko(i,l,u));o===p.from&&o===s||a.setSelection(p)}return a}})]},addKeyboardShortcuts(){return{Enter:({editor:e})=>{const t=e.view.dom.closest("form");if(t){let n=t.querySelector('button:is([type="submit"], :not([type]))');n||(n=document.createElement("button"),n.setAttribute("type","button"),n.setAttribute("hidden",""),t.appendChild(n),setTimeout(()=>n.documentElement===document.documentElement&&n.remove(),200)),n.click()}return!0},"Shift-Enter":({editor:e})=>(e.isActive(Pu.name)?e.commands.splitListItem(Pu.name):e.commands.splitBlock(),!1)}},onCreate(){this.editor.view.dom.addEventListener("clear",e=>{var t;this.editor.commands.setContent(((t=e.detail)==null?void 0:t.content)||"")})}});function m7(e,t){var r,i;const n=[...e.path].reverse();for(;n.length>=3;){if(n[1]>0){let o=n[2].content.content[n[1]-1],s=0;for(;o;)o=(i=(r=o.content)==null?void 0:r.content)!=null&&i.length?o.content.content[o.content.content.length-1]:null,s++;return t.resolve(e.pos-s)}n.splice(0,3)}return t.resolve(0)}function g7(e,t){var r,i;const n=[...e.path].reverse();for(;n.length>=3;){if(n[1]<n[2].content.content.length-1){let o=n[2].content.content[n[1]+1],s=0;for(;o;)s++,o=(i=(r=o.content)==null?void 0:r.content)==null?void 0:i[0];return t.resolve(e.pos+n[2].content.content[n[1]].nodeSize+s)}n.splice(0,3)}return t.resolve(t.nodeSize-2)}const h7=ot.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",We(this.options.HTMLAttributes,e),0]}}),E7=ot.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",We(this.options.HTMLAttributes,e),0]}}),S7=ot.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",We(this.options.HTMLAttributes,e),0]}}),T7=Tt.create({name:"ipsClearNewLine",addOptions(){return{removeNewLinesBefore:[]}},addStorage(){return{observedNodes:[rr.name,ir.name,cl.name,is.name,ey.name,ut.name]}},onCreate(){this.options.removeNewLinesBefore.length&&(this.storage.observedNodes=[...new Set([...this.storage.observedNodes,...this.options.removeNewLinesBefore])])},addKeyboardShortcuts(){return{Backspace:({editor:e})=>{var o,s,a,l,u,p,_;const{observedNodes:t}=this.storage;if(!(t!=null&&t.length))return;const n=e.state.selection;if(!n.empty)return;const r=n.$from.parent;if(!r||r.type.name!==wt.name)return;const i=[...n.$from.path].reverse();if(r.content.size){if(!((u=(l=r==null?void 0:r.content)==null?void 0:l.content)!=null&&u.length)||r.content.content.length<2||((p=n.$from.nodeAfter)==null?void 0:p.type.name)!==$u.name||!t.includes((_=r.content.content[n.$from.parentOffset+1])==null?void 0:_.type.name))return;const f=i[1];let g;if(f!==0){if(!t.includes(r.content.content[f-1]))return;g=n.from-r.content.content[f-1].nodeSize}else{const h=i[5],E=i[4],b=h.type.name===cl.name?1:0;E>b&&t.includes(h.content.content[E-1].type.name)&&(g=i[3]-h.content.content[E-1].nodeSize)}return(typeof g!="number"||Number.isNaN(g))&&(g=n.from),e.chain().deleteRange({from:n.from,to:n.from+1}).setNodeSelection(g).run(),!0}else{const f=i[5],g=i[4];if(!f||g===void 0)return;co Line truncated
`}}),...(f=e.restrictions)!=null&&f.has("tables")?[!1]:[ML.configure({resizable:!0,cellMinWidth:((g=e.table)==null?void 0:g.cellMinWidth)||100}),h7,E7,S7],kL,T7].filter(R=>!!R);return window.navigator.platform==="MacIntel"&&t.push(SE),e.autoSaveKey&&t.push(PL),e.postkey&&(t.push(c7),t.push(ut.configure({externalImages:!((h=e.restrictions)!=null&&h.has("external_image")),externalVideos:!((E=e.restrictions)!=null&&E.has("external_video")),float:!((b=e.restrictions)!=null&&b.has("float"))}))),(T=e.restrictions)!=null&&T.has("heading")||t.push(bn.configure({levels:(y=e.restrictions)!=null&&y.has("heading_1")?[2,3,4,5,6]:[1,2,3,4,5,6]})),t}async function HA(e,t){var n,r;if(e.pluginButtonKeys=new Set,e.simpleRichText?(delete e.codeMode,e.tools={toolbar:[...bL]},e.react&&$W(e.react)):await Dj(),e.restrictions&&Symbol.iterator in e.restrictions?e.restrictions=new Set(e.restrictions):delete e.restrictions,e.jQuery=e.jQuery||window.jQuery,e.editorProps={attributes:{class:e.codeMode?"":"ipsRichText"}},e.itemStates={},e.extensions=b7(e),!(e.messagesContainer instanceof Element)&&((n=t==null?void 0:t.closest(".ipsEditor"))!=null&&n.querySelector('[data-role="editor-messages-container"]'))&&(e.messagesContainer=(r=t==null?void 0:t.closest(".ipsEditor"))==null?void 0:r.querySelector('[data-role="editor-messages-container"]')),e.codeMode)return e.tools={toolbar:["codelanguage"]},e;if(e.simpleRichText||_7(e,e.extensions),e.stockrepliesenabled){const i=await Jb();Object.keys(i).length?window.Debug.log("Loaded stock replies"):(e.stockrepliesenabled=!1,window.Debug.log("No stock replies, disabling the button"))}if(!e.codeMode){for(const i in e.tools)e.tools[i]=e.tools[i].filter(o=>o==="giphy"&&!e.giphyenabled||o==="stockreply"&&!e.stockrepliesenabled?!1:!(e.hidebuttons instanceof Array&&e.hidebuttons.includes(o)));e.parseOptions=e.parseOptions||{},e.parseOptions.preserveWhitespace=!1}return e.tools.toolbar&&e.tools.toolbar[0]!=="block"&&(e.tools.toolbar=["block",...e.tools.toolbar.filter(i=>i!=="block")]),e}let $A=!1;function y7(){if(!$A){for(const e of["click","focus","keydown","keyup"])document.addEventListener(e,t=>{var n,r,i;(r=(n=t.target)==null?void 0:n.closest)!=null&&r.call(n,".ipsEditor__toolbar-item--unavailable")&&(t.preventDefault(),t.stopPropagation(),(i=t.stopImmediatePropagation)==null||i.call(t))},{capture:!0});$A=!0}}setTimeout(()=>window.ips.createModule("ips.utils.tiptap",()=>{const e={tools:{toolbar:["block","insert","bold","italic","underline","size","color","link","icon","stockreply","giphy","clear","format","tableOptions"]},allowedIframeDomains:window.ips.getSetting("allowedIframeDomains")||[],restrictions:new Set};return document.dispatchEvent(new CustomEvent("ipsTiptapLoaded")),{editorInstance(t,n={}){const r=TE.createRoot(t),i=Un.debounce((o,s)=>{s([o,r]),o instanceof kx&&o.options.name&&setTimeout(()=>o.options.jQuery(o.view.dom.closest("[data-ipseditorv5]")).trigger("editorWidgetInitialized",{id:o.options.name}))},10,{leading:!1});return y7(),new Promise(o=>{HA({...e,...n},t).then(s=>{r.render(N.jsx(rt.StrictMode,{children:N.jsx(X8,{resolve:a=>{i(a,o)},config:s})}))})})},allCodeLanguages:Rl,async decorateSimpleRichTextConfig(t){return t.simpleRichText=!0,await HA(t)}}}));
@@ -1 +0,0 @@
.resize-cursor{cursor:ew-resize;cursor:col-resize}.column-resize-handle{background-color:var(--i-primary);bottom:calc(-2 * var(--i-ta--bo-wi));position:absolute;right:calc(-2 * var(--i-ta--bo-wi));pointer-events:none;top:0;width:clamp(3px,calc(4 * var(--i-ta--bo-wi)),8px)}.ipsEditor__table-wrapper{position:relative;width:min-content;max-width:100%}.ipsEditor__table-wrapper.ProseMirror-selectednode{outline-offset:3px;max-width:100%}.ipsEditor__table-wrapper>.tableWrapper{outline:none!important}.tiptap .ipsEditor__table-wrapper .selectedCell{position:relative}.tiptap .ipsEditor__table-wrapper .selectedCell:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;display:block;z-index:1;background-color:oklch(from var(--i-color_primary) l c h / .1)}
@@ -11,6 +11,12 @@
"src": "src/assets/icons/box.svg",
"isDynamicEntry": true
},
"src/assets/icons/codebox.svg": {
"file": "assets/codebox-BPbJfn4U.js",
"name": "codebox",
"src": "src/assets/icons/codebox.svg",
"isDynamicEntry": true
},
"src/assets/icons/katex.svg": {
"file": "assets/katex-CEwnAn2c.js",
"name": "katex",
@@ -69,13 +75,14 @@
"isDynamicEntry": true
},
"src/main.jsx": {
"file": "assets/main-BwLJeu7q.js",
"file": "assets/main-6RAkeGwz.js",
"name": "main",
"src": "src/main.jsx",
"isEntry": true,
"dynamicImports": [
"src/assets/icons/accordion.svg",
"src/assets/icons/box.svg",
"src/assets/icons/codebox.svg",
"src/assets/icons/katex.svg",
"src/assets/icons/spoiler.svg",
"src/assets/icons/table-base.svg",
+1 -1
View File
@@ -19,6 +19,7 @@ use IPS\Task;
define('REPORT_EXCEPTIONS', TRUE);
define('READ_WRITE_SEPARATION', FALSE);
define('IS_CLI', true);
require_once str_replace( 'applications/core/interface/task/web.php', 'init.php', str_replace( '\\', '/', __FILE__ ) );
@header( "Cache-Control: no-cache, no-store, must-revalidate, max-age=0, s-maxage=0" );
@@ -51,7 +52,6 @@ try
}
@header( "HTTP/{$http} 200 OK" );
print "Task Ran";
}
catch (OutOfRangeException $e )
{
@@ -1,92 +0,0 @@
customElements.define('i-navigation-menu', class extends HTMLElement {
constructor () {
super();
this.menu = this.querySelector('.ipsNavBar');
this.moreLi = this.menu.querySelector("[data-el='nav-more']");
this.moreMenu = this.moreLi.querySelector(".ipsNav__dropdown");
}
emptyMoreMenu() {
// Move all children back into main
this.moreLi.before(...this.moreMenu.children);
// Then hide the More menu
this.moreLi.hidden = true;
}
fillMoreMenu(clientWidth){
let scrollWidth = this.menu.scrollWidth;
// If there's no overflow, return early
if(scrollWidth <= clientWidth) return;
// Show More menu
this.moreLi.hidden = false;
// While the navigation list overflows, move items into the More menu
while(scrollWidth > clientWidth){
// If the More menu is the first element, end the while loop
if(!this.moreLi.previousElementSibling){ break; }
// Move last link into More menu
this.moreMenu.prepend(this.moreLi.previousElementSibling);
scrollWidth = this.menu.scrollWidth;
}
}
updateAttributes(){
// Reapply the light-dismiss functionality to items which have been moved from the More menu back to the main menu
this.menu.querySelectorAll('[data-ips-hidden-light-dismiss-disabled]').forEach(el => {
el.removeAttribute('data-ips-hidden-light-dismiss-disabled');
el.setAttribute('data-ips-hidden-light-dismiss', '');
});
// Then loop through menus inside More menu and remove their light-dismiss feature, and add a -disabled variant so we can reapply the correct attribute later
this.moreMenu.querySelectorAll('[data-ips-hidden-light-dismiss]').forEach(el => {
el.removeAttribute('data-ips-hidden-light-dismiss');
el.setAttribute('data-ips-hidden-light-dismiss-disabled', '');
});
// If the active link is inside the More menu...
if(this.moreMenu.querySelector("[aria-current]")){
// ..add [data-active] to "More"
this.moreLi.setAttribute("data-active", "");
// ..and expand the active dropdown
this.moreMenu.querySelectorAll(':scope > [data-active]').forEach(el => {
const button = el.querySelector(":scope > [aria-expanded]");
if(button){
button.setAttribute("aria-expanded", "true");
}
const menu = el.querySelector(":scope > .ipsNav__dropdown");
if(menu){
menu.hidden = false;
}
});
} else {
// Otherwise remove [data-active] from the More menu
this.moreLi.removeAttribute("data-active");
}
}
connectedCallback(){
// Empty More menu and refill it on resize
this.ro = new ResizeObserver(entries => {
for (let entry of entries) {
let entryWidth = Math.ceil(entry.contentRect.width);
if(this.lastWidth && entryWidth > this.lastWidth){
this.emptyMoreMenu();
}
this.fillMoreMenu(entryWidth);
this.updateAttributes();
this.lastWidth = entryWidth;
}
});
this.ro.observe(this.menu);
}
});